Add River modules to Waybar

This commit is contained in:
Aleksey Samoilov 2023-08-24 00:09:50 +04:00
parent 0830acf4c5
commit 6b614a2d40
7 changed files with 39 additions and 59 deletions

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
tileos-settings-river (0.8~tileos) unstable; urgency=medium
* Add River modules to Waybar
-- Aleksey Samoilov <samoilov.lex@gmail.com> Thu, 24 Aug 2023 00:09:15 +0400
tileos-settings-river (0.7~tileos) unstable; urgency=medium tileos-settings-river (0.7~tileos) unstable; urgency=medium
* Add missing scripts * Add missing scripts

View file

@ -2,10 +2,10 @@
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"height": 30, "height": 30,
"modules-left": ["custom/menu"], "modules-left": ["custom/menu", "river/tags", "river/window"],
"modules-center": ["custom/wf-recorder"], "modules-center": ["clock"],
"modules-right": [ "modules-right": [
"custom/scratchpad", "tray",
"custom/playerctl", "custom/playerctl",
"custom/wlsunset", "custom/wlsunset",
"idle_inhibitor", "idle_inhibitor",
@ -17,9 +17,7 @@
"network", "network",
"bluetooth", "bluetooth",
"pulseaudio", "pulseaudio",
"clock", "custom/power"
"custom/power",
"tray"
], ],
"custom/menu": { "custom/menu": {
@ -28,15 +26,12 @@
"tooltip": false "tooltip": false
}, },
"custom/wf-recorder": { "river/tags": {
"interval": "once", "num-tags": 9
"return-type": "json", },
"format": "{}",
"tooltip-format": "{tooltip}", "river/window": {
"exec": "echo '{\"class\": \"recording\",\"text\":\"\",\"tooltip\":\"press $mod+Esc to stop recording\"}'", "format": "{}"
"exec-if": "pgrep wf-recorder",
"on-click": "killall -s SIGINT wf-recorder",
"signal": 8
}, },
"custom/playerctl": { "custom/playerctl": {
@ -93,8 +88,8 @@
"format": "", "format": "",
"interval": "once", "interval": "once",
"return-type": "json", "return-type": "json",
"on-click": "riverctl spawn '/usr/share/river/scripts/clipboard-manager.sh --list'; pkill -RTMIN+9 waybar", "on-click": "/usr/share/river/scripts/clipboard-manager.sh --list; pkill -RTMIN+9 waybar",
"on-click-right": "riverctl spawn '/usr/share/river/scripts/clipboard-manager.sh --del'; pkill -RTMIN+9 waybar", "on-click-right": "/usr/share/river/scripts/clipboard-manager.sh --del; pkill -RTMIN+9 waybar",
"on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar", "on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
"exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'", "exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
"exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]", "exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
@ -108,7 +103,7 @@
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
}, },
"on-click": "riverctl spawn /usr/share/river/scripts/btop.sh" "on-click": "aclacritty --class floating_shell -e btop"
}, },
"memory": { "memory": {
@ -118,7 +113,7 @@
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
}, },
"on-click": "riverctl spawn /usr/share/river/scripts/btop.sh" "on-click": "aclacritty --class floating_shell -e btop"
}, },
@ -137,13 +132,13 @@
"tooltip-format-wifi": "{icon} {ifname} ({essid}): {ipaddr}", "tooltip-format-wifi": "{icon} {ifname} ({essid}): {ipaddr}",
"tooltip-format-disconnected": "{icon} disconnected", "tooltip-format-disconnected": "{icon} disconnected",
"tooltip-format-disabled": "{icon} disabled", "tooltip-format-disabled": "{icon} disabled",
"on-click": "riverctl spawn /usr/share/river/scripts/nmtui.sh" "on-click": "alacritty --class floating_shell -e nmtui connect"
}, },
"bluetooth": { "bluetooth": {
"format": "", "format": "",
"format-disabled": "", "format-disabled": "",
"on-click": "riverctl spawn /usr/share/river/scripts/bluetooth-manager.sh", "on-click": "alacritty --class floating_shell -e bluetuith",
"on-click-right": "rfkill toggle bluetooth", "on-click-right": "rfkill toggle bluetooth",
"tooltip-format": "{}" "tooltip-format": "{}"
}, },
@ -160,9 +155,9 @@
"default": ["", "", ""] "default": ["", "", ""]
}, },
"tooltip-format": "{icon} {volume}% {format_source}", "tooltip-format": "{icon} {volume}% {format_source}",
"on-click": "riverctl spawn /usr/share/river/scripts/pulse.sh", "on-click": "alacritty --class floating_shell -e pulsemixer",
"on-click-middle": "pulsemixer --toggle-mute && /usr/share/river/scripts/volume-notify.sh", "on-click-middle": "pulsemixer --toggle-mute && /usr/share/river/scripts/volume-notify.sh",
"on-click-right": "riverctl spawn pavucontrol", "on-click-right": "pavucontrol",
"on-scroll-up": "pulsemixer --change-volume +5 && /usr/share/river/scripts/volume-notify.sh", "on-scroll-up": "pulsemixer --change-volume +5 && /usr/share/river/scripts/volume-notify.sh",
"on-scroll-down": "pulsemixer --change-volume -5 && /usr/share/river/scripts/volume-notify.sh" "on-scroll-down": "pulsemixer --change-volume -5 && /usr/share/river/scripts/volume-notify.sh"
}, },
@ -172,7 +167,7 @@
"tooltip": true, "tooltip": true,
"tooltip-format": "{:%d.%m.%Y %H:%M}", "tooltip-format": "{:%d.%m.%Y %H:%M}",
"interval": 5, "interval": 5,
"on-click": "riverctl spawn /usr/share/river/scripts/calendar.sh" "on-click": "alacritty --class floating_shell -e calcurse"
}, },
"custom/power": { "custom/power": {

View file

@ -45,26 +45,32 @@ window#waybar.hidden {
opacity: 0.2; opacity: 0.2;
} }
#workspaces button { #tags button {
border-bottom: 2px; border-bottom: 2px;
border-color: #24273a; border-color: #24273a;
border-style: solid; border-style: solid;
margin-bottom: 3px; margin-bottom: 3px;
transition-property: none;
} }
#workspaces button.focused { #tags button.focused {
color: #7dc4e4; color: #7dc4e4;
border-color: #7dc4e4; border-color: #7dc4e4;
} }
#workspaces button.urgent { #tags button.focused.occupied {
border-color: #ed8796; color: #7dc4e4;
color: #ed8796; border-color: #7dc4e4;
} }
#mode { #tags button.occupied {
color: #ebcb8b; color: #939ab7;
margin-bottom: 3px; border-color: #939ab7;
}
#tags button.urgent {
color: #ed8796;
border-color: #ed8796;
} }
#clock, #clock,

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
HASH="$(echo "$@" | shasum | cut -f1 -d" " | cut -c1-7)"
term_float="alacritty --class floating_shell -e"
FLOCK="flock --verbose -n "$HOME/.local/state/${HASH}.lock""
$FLOCK $term_float bluetuith

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
HASH="$(echo "$@" | shasum | cut -f1 -d" " | cut -c1-7)"
term_float="alacritty --class floating_shell -e"
FLOCK="flock --verbose -n "$HOME/.local/state/${HASH}.lock""
$FLOCK $term_float btop

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
HASH="$(echo "$@" | shasum | cut -f1 -d" " | cut -c1-7)"
term_float="alacritty --class floating_shell -e"
FLOCK="flock --verbose -n "$HOME/.local/state/${HASH}.lock""
$FLOCK $term_float calcurse

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
HASH="$(echo "$@" | shasum | cut -f1 -d" " | cut -c1-7)"
term_float="alacritty --class floating_shell -e"
FLOCK="flock --verbose -n "$HOME/.local/state/${HASH}.lock""
$FLOCK $term_float nmtui connect