correct audio and network for waybar freebsd

This commit is contained in:
2025-02-08 15:15:54 +01:00
parent b29fbdf615
commit 77488ab995
2 changed files with 25 additions and 16 deletions

View File

@@ -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": "<span color=\"#EE915D\" >󰈹</span> $1",
"(.*)gitui(.*)": "<span color=\"#EE915D\" >󰊢</span> Gitui",
"(jika@.+)": ">_ $1",
"nvim (.*)": "<span color=\"#8bcd5b\" ></span> $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": "<span font='14' rise='1000'></span> {}",
"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": {

View File

@@ -149,11 +149,11 @@ tooltip {
}
#window {
color: #DDDAEC;
color: #abb2bf;
}
#custom-power {
color: #f65866;
color: #e06c75;
}
#custom-launcher {