summary refs log tree commit diff
path: root/.config/waybar/config
diff options
context:
space:
mode:
Diffstat (limited to '.config/waybar/config')
-rw-r--r--.config/waybar/config61
1 files changed, 40 insertions, 21 deletions
diff --git a/.config/waybar/config b/.config/waybar/config
index 27d90a6..3a2423d 100644
--- a/.config/waybar/config
+++ b/.config/waybar/config
@@ -1,12 +1,14 @@
-// vim: commentstring=//\ %s
+// vim: ft=json commentstring=//\ %s
 {
     "layer": "top",
     "position": "top",
-    "height": 30,
+    "height": 25,
+    "gtk-layer-shell": true,
 
-    "modules-left": ["sway/mode", "sway/workspaces", "sway/window"],
-    "modules-center": ["custom/media", "custom/toggl", "custom/weather", "clock#local", "clock#utc"],
+    "modules-left": ["sway/mode", "sway/workspaces", "sway/window", "custom/mpv", "custom/mpd", "custom/spotify", "custom/toggl"],
+    "modules-center": ["custom/weather", "clock#local", "clock#utc"],
     "modules-right": ["tray", "cpu", "memory", "disk#root", "disk#home", "temperature", "idle_inhibitor", "backlight", "custom/redshift", "pulseaudio", "network#wg", "network", "battery"],
+
     "sway/workspaces": {
         "disable-scroll": true,
         "all-outputs": false,
@@ -14,7 +16,8 @@
         "format-icons": {
             "m": "󰎇",
             "v": "󰿏",
-            "g": "󰺵"
+            "g": "󰺵",
+            "__vnc": "󱒃"
         }
     },
     "sway/window": {
@@ -37,7 +40,7 @@
     "clock#local": {
         "timezone": "Europe/Berlin",
         "format": "{:<i>%a</i> %d %b <b>%H:%M</b>}",
-	"tooltip-format": "{:%Z %z}\n\n{calendar}"
+	"tooltip-format": "TZ: {:%Z %z}\n\n{calendar}"
     },
     "clock#utc": {
         "timezone": "UTC",
@@ -54,17 +57,21 @@
     },
     "cpu": {
         "format": "󰊚 {}%",
-        "on-click": "$HOME/bin/swx -t -f htop"
+        "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_CPU"
     },
     "memory": {
-        "format": "󰍛 {}%"
+        "format": "󰍛 {}%",
+        "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_MEM"
     },
     "temperature": {
-        "critical-threshold": 90,
+        "critical-threshold": 100,
         "format": "{icon} {temperatureC}℃",
         "format-icons": ["󱃃", "󰔏", "󱃂", "󰸁"]
     },
     "backlight": {
+        "states": {
+	    "off": "1"
+	},
         "format": "{icon} {percent}%",
         "format-icons": ["󰹐", "󰌶", "󰛩"],
         "on-scroll-down": "light -D 5",
@@ -80,15 +87,15 @@
         "format-charging": "󰗱 {capacity}%",
         "format-plugged": "󰚥 {capacity}%",
         "format-alt": "{icon} {time}",
-        "format-full": "{icon}",
+        "format-full": "󱊦",
         "format-icons": ["󱃍", "󱊡", "󱊢", "󱊣"]
     },
     "network": {
         "format-wifi": "{icon} ({signalStrength}%)",
         "format-icons": ["󰤫", "󰤟", "󰤢", "󰤥", "󰤨"],
         "format-ethernet": "󰌗 {ifname}: {ipaddr}/{cidr}",
-        "format-linked": "󰈀 {ifname} (-)",
-        "format-disconnected": "󰌙 (-)",
+        "format-linked": "󰈀 {ifname}",
+        "format-disconnected": "󰌙 ",
         "tooltip-format": "{ifname}: {ipaddr}/{cidr}\nssid: {essid}\nsignal: {signaldBm} dbm",
         "tooltip-format-disconnected": "disconnected",
         "on-click": "swx -t -f iwctl"
@@ -119,18 +126,30 @@
         "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
         "on-click": "swx -t -f pulsemixer"
     },
-    "custom/media": {
-        "format": "{icon} {}",
+    "custom/spotify": {
+        "format": "󰓇 {}",
         "return-type": "json",
         "max-length": 80,
-        "format-icons": {
-            "spotify": "󰓇",
-            "mpv": "󰐍",
-            "default": "󰴙"
-        },
-        "on-click": "sway [workspace=$wsMusic] focus",
         "escape": false,
-        "exec": "$HOME/.config/waybar/modules/mediaplayer.py -I chromium -I firefox 2> /dev/null"
+	"interval": 2,
+        "exec": "$HOME/.config/waybar/modules/waybar-media spotify",
+	"exec-if": "pgrep spotify"
+     },
+    "custom/mpd": {
+        "format": "󰴙 {}",
+        "return-type": "json",
+        "max-length": 80,
+	"interval": 2,
+        "exec": "$HOME/.config/waybar/modules/waybar-media mpd",
+	"exec-if": "pgrep mpd"
+    },
+    "custom/mpv": {
+        "format": "󰐍 {}",
+        "return-type": "json",
+        "max-length": 80,
+	"interval": 2,
+        "exec": "$HOME/.config/waybar/modules/waybar-media mpv",
+	"exec-if": "pgrep mpv"
     },
     "custom/toggl": {
 	"format": "󰔟 {}",