Initial Waybar config

This commit is contained in:
Aleksey Samoilov 2023-08-22 22:56:35 +04:00
parent cbf4cec03c
commit 234214551f
6 changed files with 402 additions and 7 deletions

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
tileos-settings-river (0.6~tileos) unstable; urgency=medium
* Initial Waybar config
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 22 Aug 2023 22:56:07 +0400
tileos-settings-river (0.5~tileos) unstable; urgency=medium
* Set Alacritty as default terminal

2
debian/files vendored
View file

@ -1,2 +0,0 @@
tileos-settings-river_0.4~tileos_amd64.buildinfo x11 optional
tileos-settings-river_0.4~tileos_amd64.deb x11 optional

View file

@ -138,11 +138,8 @@ done
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add float -app-id 'float*' -title 'foo'
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add csd -app-id "bar"
# Make all views with an app-id that starts with "floating_shell" start floating.
riverctl float-filter-add app-id "floating_shell"
# Set the default layout generator to be rivertile and start it.
# River will send the process group of the init executable SIGTERM on exit.

View file

@ -0,0 +1,187 @@
{
"layer": "top",
"position": "top",
"height": 30,
"modules-left": ["custom/menu"],
"modules-center": ["custom/wf-recorder"],
"modules-right": [
"custom/scratchpad",
"custom/playerctl",
"custom/wlsunset",
"idle_inhibitor",
"custom/dunst",
"custom/clipboard",
"cpu",
"memory",
"battery",
"network",
"bluetooth",
"pulseaudio",
"clock",
"custom/power",
"tray"
],
"custom/menu": {
"format": "",
"on-click": "exec nwg-drawer",
"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
},
"custom/playerctl": {
"interval": "once",
"tooltip": true,
"return-type": "json",
"format": "{icon}",
"format-icons": {
"Playing": "",
"Paused": ""
},
"exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"tooltip\": \"{{playerName}}: {{markup_escape(title)}} - {{markup_escape(artist)}}\" }'",
"on-click": "playerctl play-pause; pkill -RTMIN+5 waybar",
"on-click-right": "playerctl next; pkill -RTMIN+5 waybar",
"on-scroll-up": "playerctl position 10+; pkill -RTMIN+5 waybar",
"on-scroll-down": "playerctl position 10-; pkill -RTMIN+5 waybar",
"signal": 5
},
"custom/wlsunset": {
"interval": "once",
"tooltip": true,
"tooltip-format": "{tooltip}",
"return-type": "json",
"format": "{icon}",
"format-icons": {
"on": "",
"off": ""
},
"exec": "fallback_latitude=50.1 fallback_longitude=8.7 latitude= longitude= /usr/share/river/scripts/sunset.sh",
"on-click": "/usr/share/river/scripts/sunset.sh toggle; pkill -RTMIN+6 waybar",
"exec-if": "/usr/share/river/scripts/sunset.sh check",
"signal": 6
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip": true,
"tooltip-format-activated": "power-saving disabled",
"tooltip-format-deactivated": "power-saving enabled"
},
"custom/dunst": {
"exec": "/usr/share/river/scripts/dunst.sh",
"on-click": "dunstctl set-paused toggle",
"restart-interval": 1,
},
"custom/clipboard": {
"format": "",
"interval": "once",
"return-type": "json",
"on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar",
"on-click-right": "swaymsg -q exec '$clipboard-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 ]",
"signal": 9
},
"cpu": {
"interval": 5,
"format": " {usage}%",
"states": {
"warning": 70,
"critical": 90
},
"on-click": "riverctl spawn /usr/share/river/scripts/btop.sh"
},
"memory": {
"interval": 30,
"format": " {}%",
"states": {
"warning": 70,
"critical": 90
},
"on-click": "riverctl spawn /usr/share/river/scripts/btop.sh"
},
"battery": {
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": " ({signalStrength}%)",
"format-ethernet": "",
"format-disconnected": "",
"tooltip-format": "{ifname} ({essid}): {ipaddr}",
"tooltip-format": "{icon} {ifname}: {ipaddr}",
"tooltip-format-ethernet": "{icon} {ifname}: {ipaddr}",
"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"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"on-click": "riverctl spawn /usr/share/river/scripts/bluetooth-manager.sh",
"on-click-right": "rfkill toggle bluetooth",
"tooltip-format": "{}"
},
"pulseaudio": {
"format": "{icon} {volume}% {format_source}",
"format-bluetooth": "{icon} {volume}%",
"format-muted": " {format_source}",
"format-source": "  {volume}%",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"headset": "",
"default": ["", "", ""]
},
"tooltip-format": "{icon} {volume}% {format_source}",
"on-click": "riverctl spawn /usr/share/river/scripts/pulse.sh",
"on-click-middle": "exec pulsemixer --toggle-mute && /usr/share/river/scripts/volume-notify.sh",
"on-click-right": "riverctl spawn pavucontrol",
"on-scroll-up": "exec pulsemixer --change-volume +5 && /usr/share/river/scripts/volume-notify.sh",
"on-scroll-down": "exec pulsemixer --change-volume -5 && /usr/share/river/scripts/volume-notify.sh"
},
"clock": {
"format": "{:%e %b %H:%M}",
"tooltip": true,
"tooltip-format": "{:%d.%m.%Y %H:%M}",
"interval": 5,
"on-click": "riverctl spawn /usr/share/river/scripts/calendar.sh"
},
"custom/power": {
"format": "",
"on-click": "nwg-bar -x"
},
"tray": {
"icon-size": 21,
"spacing": 10
}
}

View file

@ -0,0 +1,203 @@
@keyframes blink-warning {
70% {
color: @wm_icon_bg;
}
to {
color: @wm_icon_bg;
background-color: @warning_color;
}
}
@keyframes blink-critical {
70% {
color: @wm_icon_bg;
}
to {
color: @wm_icon_bg;
background-color: @error_color;
}
}
/* Reset all styles */
* {
border: 0px;
border-radius: 0px;
color: #cad3f5;
padding: 0 0;
margin-right: 2px;
margin-left: 2px;
font-family: "Noto Sans", "Font Awesome 6 Free", "Font Awesome";
font-size: 14px;
}
#window {
margin-left: 10px;
margin-bottom: 3px;
}
window#waybar {
background: #24273a;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button {
border-bottom: 2px;
border-color: #24273a;
border-style: solid;
margin-bottom: 3px;
}
#workspaces button.focused {
color: #7dc4e4;
border-color: #7dc4e4;
}
#workspaces button.urgent {
border-color: #ed8796;
color: #ed8796;
}
#mode {
color: #ebcb8b;
margin-bottom: 3px;
}
#clock,
#custom-playerctl,
#custom-power,
#custom-scratchpad,
#custom-wlsunset,
#custom-clipboard,
#custom-menu,
#custom-dunst,
#battery,
#cpu,
#language,
#memory,
#network,
#bluetooth,
#pulseaudio,
#tray,
#mode,
#idle_inhibitor {
padding: 0 6px;
border-bottom: 2px;
border-style: solid;
margin-bottom: 3px;
}
#clock {
color: #b7bdf8;
}
#custom-wlsunset {
color: #f5bde6;
}
#custom-playerctl {
color: #f0c6c6;
}
#custom-power {
color: #cad3f5;
}
#custom-scratchpad {
color: #f4dbd6;
}
#custom-clipboard {
color: #f5a97f;
}
#custom-menu {
color: #a6da95;
}
#custom-dunst {
color: #ed8796;
}
#battery {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
color: #8bd5ca;
}
#battery.warning {
color: @warning_color;
}
#battery.critical {
color: @error_color;
}
#battery.warning.discharging {
animation-name: blink-warning;
animation-duration: 3s;
}
#battery.critical.discharging {
animation-name: blink-critical;
animation-duration: 2s;
}
label:focus {
background-color: #000000;
}
#cpu {
color: #eed49f;
}
#language {
color: #ee99a0;
}
#memory {
color: #a6da95;
}
#network {
color: #91d7e3;
}
#bluetooth {
color: #7dc4e4;
}
#bluetooth.disabled {
color: @wm_icon_bg;
}
#network.disconnected {
color: @wm_icon_bg
}
#pulseaudio {
color: #8aadf4;
}
#pulseaudio.muted {
color: @wm_icon_bg;
}
#custom-wf-recorder {
color: @error_color;
padding-right: 10px;
}
#tray {
padding-left: 5px;
padding-right: 5px;
}
#idle_inhibitor {
color: #c6a0f6;
}

View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
term_float="alacritty --class floating_shell -e"
$term_float nmtui connect