Update waybar config for `swm`
7c69f474db87577969812759456058276a25de59
1 parent
61197475
.config/waybar/config
+25 -16
| 1 | 1 | { |
|
| 2 | 2 | "layer": "top", |
|
| 3 | 3 | "position": "bottom", |
|
| 4 | 4 | "height": 30, |
|
| 5 | 5 | "spacing": 8, |
|
| 6 | - | "modules-left": [ "hyprland/workspaces", "niri/workspaces" ], |
|
| 7 | - | "modules-center": [ "hyprland/window", "niri/window" ], |
|
| 8 | - | "modules-right": [ "network", "cpu", "memory", "disk", "pulseaudio", "battery", "custom/clipboard", "tray", "clock" ], |
|
| 9 | - | "hyprland/workspaces": { |
|
| 10 | - | "disable-scroll": true, |
|
| 11 | - | "all-outputs": false, |
|
| 6 | + | "fixed-center": true, |
|
| 7 | + | "modules-left": [ "ext/workspaces" ], |
|
| 8 | + | "modules-center": [ "custom/swm-window" ], |
|
| 9 | + | "modules-right": [ "network", "cpu", "memory", "disk", "pulseaudio", "battery", "custom/screenshot", "custom/clipboard", "tray", "clock" ], |
|
| 10 | + | "custom/swm-window": { |
|
| 11 | + | "exec": "tail -n 1 -F -s 0.05 ${XDG_RUNTIME_DIR}/swm-title 2>/dev/null", |
|
| 12 | + | "max-length": 80, |
|
| 13 | + | "tooltip": false |
|
| 14 | + | }, |
|
| 15 | + | "ext/workspaces": { |
|
| 12 | 16 | "format": "{name}", |
|
| 13 | - | "sort-by-number": true |
|
| 17 | + | "sort-by-name": true, |
|
| 18 | + | "on-click": "activate" |
|
| 14 | 19 | }, |
|
| 15 | - | "hyprland/window": { |
|
| 16 | - | "format": "{}", |
|
| 17 | - | "max-length": 80 |
|
| 20 | + | "custom/screenshot": { |
|
| 21 | + | "format": "", |
|
| 22 | + | "tooltip-format": "Screenshot\nLeft: region\nRight: full output\nMiddle: region edit", |
|
| 23 | + | "on-click": "waybar-screenshot region", |
|
| 24 | + | "on-click-right": "waybar-screenshot full", |
|
| 25 | + | "on-click-middle": "waybar-screenshot edit" |
|
| 18 | 26 | }, |
|
| 19 | 27 | "clock": { |
|
| 20 | 28 | "format": "{:%a %H:%M}", |
|
| 21 | 29 | "tooltip-format": "{:%A, %d %B %Y %H:%M:%S}" |
|
| 22 | 30 | }, |
| 44 | 52 | }, |
|
| 45 | 53 | "pulseaudio": { |
|
| 46 | 54 | "format": " {volume}%", |
|
| 47 | 55 | "format-muted": " muted", |
|
| 48 | 56 | "scroll-step": 5, |
|
| 49 | - | "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle" |
|
| 57 | + | "on-click": "waybar-audio-output-selector", |
|
| 58 | + | "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle" |
|
| 50 | 59 | }, |
|
| 51 | 60 | "battery": { |
|
| 52 | 61 | "interval": 30, |
|
| 53 | 62 | "format": " {capacity}%", |
|
| 54 | 63 | "format-charging": " {capacity}%", |
| 60 | 69 | }, |
|
| 61 | 70 | "custom/clipboard": { |
|
| 62 | 71 | "format": "", |
|
| 63 | 72 | "interval": "once", |
|
| 64 | 73 | "return-type": "json", |
|
| 65 | - | "exec": "sh -c 'printf \"{\\\"tooltip\\\":\\\"%s clipboard items\\\"}\\n\" \"$(cliphist list 2>/dev/null | wc -l)\"'", |
|
| 66 | - | "exec-if": "sh -c 'command -v cliphist >/dev/null && [ \"$(cliphist list 2>/dev/null | wc -l)\" -gt 0 ]'", |
|
| 67 | - | "on-click": "sh -c 'cliphist list | fuzzel --dmenu --width 100 | cliphist decode | wl-copy && pkill -RTMIN+9 waybar'", |
|
| 68 | - | "on-click-right": "sh -c 'cliphist list | fuzzel --dmenu --width 100 | cliphist delete && pkill -RTMIN+9 waybar'", |
|
| 69 | - | "on-click-middle": "sh -c 'cliphist wipe && pkill -RTMIN+9 waybar'", |
|
| 74 | + | "exec": "waybar-clipboard status", |
|
| 75 | + | "exec-if": "waybar-clipboard has-items", |
|
| 76 | + | "on-click": "waybar-clipboard copy", |
|
| 77 | + | "on-click-right": "waybar-clipboard delete", |
|
| 78 | + | "on-click-middle": "waybar-clipboard wipe", |
|
| 70 | 79 | "signal": 9 |
|
| 71 | 80 | }, |
|
| 72 | 81 | "tray": { |
|
| 73 | 82 | "icon-size": 18, |
|
| 74 | 83 | "spacing": 8 |