diff --git a/waybar/config b/waybar/config index 8a07333..b6c3bde 100755 --- a/waybar/config +++ b/waybar/config @@ -5,15 +5,14 @@ "gtk-layer-shell": "true", //"exclusive": "false", //"passthrough": "true", - // "spacing": 0, - // "margin-top": 0, - // "margin-left": 16, - // "margin-right": 16, - // "margin-bottom": -7, + "spacing": 0, + "margin-top": 0, + "margin-bottom": 2, "height": 32, "modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"], "modules-center": [], - "modules-right": ["sway/mode","custom/kernel","pulseaudio","tray","clock","custom/power"], + "modules-right": ["custom/update_audio","sway/mode","custom/kernel","custom/network","pulseaudio","tray","clock","custom/power"], + "keyboard-state": { "numlock": true, "capslock": true, @@ -56,16 +55,19 @@ "active": "", "focused": "" }, - "on-click": "activate" + "on-click": "activate", + "window-rewrite": {} // "sort-by-coordinates": true }, "sway/window": { "format": "{}", "max-length": 45, + // "icon":true, "rewrite": { - "(.*) - Mozilla Firefox": "🌎 $1", - "(.*) - zsh": "> [$1]", - "nvim(.*)": "Editing $1" + "(.*) — Mozilla Firefox": "󰈹 $1", + "(.*)gitui(.*)": "󰊢 Gitui", + "(jika@.+)": ">_ $1", + "nvim (.*)": " $1" }, "tooltip": false }, @@ -152,10 +154,17 @@ "default": ["", "", ""] }, "tooltip-format": "{desc}, {volume}%", - "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-scroll-up": "mixer vol=+5%", + "on-scroll-down": "mixer vol=-5%", + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle && mixer vol.mute=toggle", "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", "on-click-middle": "pavucontrol" }, + "custom/update_audio": { + "format":"", + "exec": "pactl get-sink-volume @DEFAULT_SINK@", + "restart-interval": 1, + }, "custom/updater":{ "format": " {}", "exec": "checkupdates | wc -l", @@ -171,7 +180,6 @@ }, "custom/launcher": { "format": "", - //"format": "異", "on-click": "wofi --show drun", "on-click-right": "killall -9 wofi", "tooltip": false @@ -201,8 +209,9 @@ "on-click" : "", }, "custom/network": { - "format": "{}", - "exec": "$HOME/.local/bin/network-traffic.sh", + "format": "󰈀 {} Mb/s", + "exec": "netstat -w 1 -q 1 -I re0 | tail -n 1 | awk -F ' ' '{mb =0 $4/1048576; printf \"%.2f\", mb}'", + "interval": 1, "on-click" : "", }, "custom/gputmp": { diff --git a/waybar/style.css b/waybar/style.css index 9879f63..58209c0 100755 --- a/waybar/style.css +++ b/waybar/style.css @@ -149,11 +149,11 @@ tooltip { } #window { - color: #DDDAEC; + color: #abb2bf; } #custom-power { - color: #f65866; + color: #e06c75; } #custom-launcher {