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
* Add missing scripts

View file

@ -2,10 +2,10 @@
"layer": "top",
"position": "top",
"height": 30,
"modules-left": ["custom/menu"],
"modules-center": ["custom/wf-recorder"],
"modules-left": ["custom/menu", "river/tags", "river/window"],
"modules-center": ["clock"],
"modules-right": [
"custom/scratchpad",
"tray",
"custom/playerctl",
"custom/wlsunset",
"idle_inhibitor",
@ -17,9 +17,7 @@
"network",
"bluetooth",
"pulseaudio",
"clock",
"custom/power",
"tray"
"custom/power"
],
"custom/menu": {
@ -28,15 +26,12 @@
"tooltip": false
},
"custom/wf-recorder": {
"interval": "once",
"return-type": "json",
"format": "{}",
"tooltip-format": "{tooltip}",
"exec": "echo '{\"class\": \"recording\",\"text\":\"\",\"tooltip\":\"press $mod+Esc to stop recording\"}'",
"exec-if": "pgrep wf-recorder",
"on-click": "killall -s SIGINT wf-recorder",
"signal": 8
"river/tags": {
"num-tags": 9
},
"river/window": {
"format": "{}"
},
"custom/playerctl": {
@ -93,8 +88,8 @@
"format": "",
"interval": "once",
"return-type": "json",
"on-click": "riverctl spawn '/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": "/usr/share/river/scripts/clipboard-manager.sh --list; 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",
"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 ]",
@ -108,7 +103,7 @@
"warning": 70,
"critical": 90
},
"on-click": "riverctl spawn /usr/share/river/scripts/btop.sh"
"on-click": "aclacritty --class floating_shell -e btop"
},
"memory": {
@ -118,7 +113,7 @@
"warning": 70,
"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-disconnected": "{icon} disconnected",
"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": {
"format": "",
"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",
"tooltip-format": "{}"
},
@ -160,9 +155,9 @@
"default": ["", "", ""]
},
"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-right": "riverctl spawn pavucontrol",
"on-click-right": "pavucontrol",
"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"
},
@ -172,7 +167,7 @@
"tooltip": true,
"tooltip-format": "{:%d.%m.%Y %H:%M}",
"interval": 5,
"on-click": "riverctl spawn /usr/share/river/scripts/calendar.sh"
"on-click": "alacritty --class floating_shell -e calcurse"
},
"custom/power": {

View file

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