Compare commits
4 commits
b0ed357037
...
8e7aaef291
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e7aaef291 | |||
| 53b8bd0175 | |||
| 03f85fd958 | |||
| 7447cb3354 |
6 changed files with 48 additions and 11 deletions
|
|
@ -1,8 +1,21 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"modules-left": ["river/tags", "custom/events", "custom/vidl", "river/window"],
|
||||
"modules-center": ["clock", "custom/media"],
|
||||
"modules-center": ["clock", "custom/media", "custom/keepawake"],
|
||||
"modules-right": ["river/mode", "custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "tray", "battery"],
|
||||
"custom/keepawake": {
|
||||
"format": "{icon}",
|
||||
"format-alt": "{} {icon}",
|
||||
"format-alt-click": "click-right",
|
||||
"format-icons": {
|
||||
"idle-disabled": " ",
|
||||
"idle-enabled": ""
|
||||
},
|
||||
"exec": "~/.config/waybar/modules/keepawake",
|
||||
"on-click": "SVDIR=~/.local/state/service sv start swayidle",
|
||||
"return-type": "json",
|
||||
"interval": 5
|
||||
},
|
||||
"custom/archupdates": {
|
||||
"format": "{icon}",
|
||||
"format-alt": "{} {icon}",
|
||||
|
|
|
|||
9
desktop/.config/waybar/modules/keepawake
Executable file
9
desktop/.config/waybar/modules/keepawake
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
status="idle-disabled"
|
||||
if pgrep -x swayidle >/dev/null; then
|
||||
status="idle-enabled"
|
||||
fi
|
||||
|
||||
printf "{\"text\": \"\", \"alt\": \"%s\", \"tooltip\": \"\", \"class\": \"\"}" \
|
||||
"$status"
|
||||
|
|
@ -18,6 +18,10 @@ window#waybar.hidden {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#tags button {
|
||||
font-size:17px;
|
||||
font-weight:900;
|
||||
|
|
@ -70,6 +74,7 @@ window#waybar.hidden {
|
|||
#custom-wireguard,
|
||||
#custom-events,
|
||||
#custom-vidl,
|
||||
#custom-keepawake,
|
||||
#custom-media {
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
|
|
|
|||
|
|
@ -86,15 +86,21 @@ return {
|
|||
vim.g.molten_image_provider = "image.nvim"
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<localleader>pi", function()
|
||||
for k, v in pairs(opts.integrations) do
|
||||
if v["only_render_image_at_cursor"] ~= nil then
|
||||
v["only_render_image_at_cursor"] = not v["only_render_image_at_cursor"]
|
||||
local prev_img_everywhere = function(state)
|
||||
for _, integ in pairs(opts.integrations) do
|
||||
if integ["only_render_image_at_cursor"] ~= nil then
|
||||
integ["only_render_image_at_cursor"] = not state
|
||||
end
|
||||
print(k, v)
|
||||
end
|
||||
require("image").setup(opts)
|
||||
end, { desc = "toggle image rendering", silent = true })
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "]sp", function()
|
||||
prev_img_everywhere(true)
|
||||
end, { desc = "preview images everywhere", silent = true })
|
||||
vim.keymap.set("n", "[sp", function()
|
||||
prev_img_everywhere(false)
|
||||
end, { desc = "preview images at cursor", silent = true })
|
||||
end,
|
||||
ft = { "markdown", "vimwiki", "quarto", "norg", "typst", "python" },
|
||||
priority = 60,
|
||||
|
|
|
|||
|
|
@ -13,10 +13,14 @@ private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')
|
|||
[ui]
|
||||
default-command = "log"
|
||||
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
||||
pager = "delta"
|
||||
|
||||
[ui.diff]
|
||||
format = "git" # for the time being to use delta well
|
||||
# use delta as formatter but _only_ for diff and show
|
||||
# see: https://github.com/jj-vcs/jj/discussions/4690#discussioncomment-12388965
|
||||
[[--scope]]
|
||||
--when.commands = ["diff", "show"]
|
||||
[--scope.ui]
|
||||
pager = "delta"
|
||||
diff-formatter = ":git"
|
||||
|
||||
[aliases]
|
||||
# see: https://shaddy.dev/notes/jj-tug/, update most recent bookmark
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ linewrap: 79
|
|||
tagsymbols: +
|
||||
template: false
|
||||
timeformat: '%F %r'
|
||||
version: v4.1
|
||||
version: v4.2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue