Compare commits
No commits in common. "cdf48a537eb38a2e86c5c9752239ce24275bae68" and "75fcc025f9aeae4d539c6b1e194258ff0c03fbf5" have entirely different histories.
cdf48a537e
...
75fcc025f9
3 changed files with 5 additions and 8 deletions
|
|
@ -8,8 +8,8 @@
|
||||||
"format-alt": "{} {icon}",
|
"format-alt": "{} {icon}",
|
||||||
"format-alt-click": "click-right",
|
"format-alt-click": "click-right",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"idle-disabled": " ",
|
"idle-disabled": " ",
|
||||||
"idle-enabled": " "
|
"idle-enabled": " "
|
||||||
},
|
},
|
||||||
"exec": "~/.config/waybar/modules/keepawake",
|
"exec": "~/.config/waybar/modules/keepawake",
|
||||||
"on-click": "~/.config/waybar/modules/keepawake toggle",
|
"on-click": "~/.config/waybar/modules/keepawake toggle",
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,14 @@ if [ "$cmd" != "" ]; then
|
||||||
|
|
||||||
if [ "$cmd" = "start" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-disabled" ]; then
|
if [ "$cmd" = "start" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-disabled" ]; then
|
||||||
SVDIR="$USER_SV_DIR" sv start swayidle
|
SVDIR="$USER_SV_DIR" sv start swayidle
|
||||||
status="idle-enabled"
|
|
||||||
elif [ "$cmd" = "stop" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-enabled" ]; then
|
elif [ "$cmd" = "stop" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-enabled" ]; then
|
||||||
SVDIR="$USER_SV_DIR" sv stop swayidle
|
SVDIR="$USER_SV_DIR" sv stop swayidle
|
||||||
status="idle-disabled"
|
|
||||||
fi
|
fi
|
||||||
printf "{\"text\": \"\", \"alt\": \"%s\", \"tooltip\": \"\", \"class\": \"\"}" \
|
|
||||||
"$status"
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pid=$(pgrep -x swayidle)
|
||||||
status="idle-disabled"
|
status="idle-disabled"
|
||||||
if pgrep -x swayidle >/dev/null; then
|
if [ "$pid" != "" ]; then
|
||||||
status="idle-enabled"
|
status="idle-enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ c.url.searchengines = {
|
||||||
"gol": "https://golang.org/pkg/{}/",
|
"gol": "https://golang.org/pkg/{}/",
|
||||||
"hn": "https://hn.algolia.com/?q={}",
|
"hn": "https://hn.algolia.com/?q={}",
|
||||||
"hub": "https://hub.docker.com/search?q={}",
|
"hub": "https://hub.docker.com/search?q={}",
|
||||||
|
"kb": "https://soeg.kb.dk/discovery/search?query=any,contains,{}&lang=en",
|
||||||
"l": "https://links.martyoeh.me/bookmarks?q={}",
|
"l": "https://links.martyoeh.me/bookmarks?q={}",
|
||||||
"lib": "http://libgen.fun/search.php?req={}",
|
"lib": "http://libgen.fun/search.php?req={}",
|
||||||
"man": "https://manned.org/browse/search?q={}",
|
"man": "https://manned.org/browse/search?q={}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue