Compare commits
2 commits
75fcc025f9
...
cdf48a537e
| Author | SHA1 | Date | |
|---|---|---|---|
| cdf48a537e | |||
| 89e1c20358 |
3 changed files with 8 additions and 5 deletions
|
|
@ -8,8 +8,8 @@
|
|||
"format-alt": "{} {icon}",
|
||||
"format-alt-click": "click-right",
|
||||
"format-icons": {
|
||||
"idle-disabled": " ",
|
||||
"idle-enabled": " "
|
||||
"idle-disabled": " ",
|
||||
"idle-enabled": " "
|
||||
},
|
||||
"exec": "~/.config/waybar/modules/keepawake",
|
||||
"on-click": "~/.config/waybar/modules/keepawake toggle",
|
||||
|
|
|
|||
|
|
@ -13,14 +13,18 @@ if [ "$cmd" != "" ]; then
|
|||
|
||||
if [ "$cmd" = "start" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-disabled" ]; then
|
||||
SVDIR="$USER_SV_DIR" sv start swayidle
|
||||
status="idle-enabled"
|
||||
elif [ "$cmd" = "stop" ] || [ "$cmd" = "toggle" ] && [ "$status" = "idle-enabled" ]; then
|
||||
SVDIR="$USER_SV_DIR" sv stop swayidle
|
||||
status="idle-disabled"
|
||||
fi
|
||||
printf "{\"text\": \"\", \"alt\": \"%s\", \"tooltip\": \"\", \"class\": \"\"}" \
|
||||
"$status"
|
||||
exit
|
||||
fi
|
||||
|
||||
pid=$(pgrep -x swayidle)
|
||||
status="idle-disabled"
|
||||
if [ "$pid" != "" ]; then
|
||||
if pgrep -x swayidle >/dev/null; then
|
||||
status="idle-enabled"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ c.url.searchengines = {
|
|||
"gol": "https://golang.org/pkg/{}/",
|
||||
"hn": "https://hn.algolia.com/?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={}",
|
||||
"lib": "http://libgen.fun/search.php?req={}",
|
||||
"man": "https://manned.org/browse/search?q={}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue