diff options
| -rwxr-xr-x | install.nu | 9 | ||||
| -rw-r--r-- | src/waybar/020_config.jsonc | 121 | ||||
| -rw-r--r-- | src/waybar/020_style.css | 55 |
3 files changed, 185 insertions, 0 deletions
@@ -104,6 +104,15 @@ if ($DEVICE_ID == "010" or $DEVICE_ID == "020") { } +# waybar +if ($DEVICE_ID == "010" or $DEVICE_ID == "020") { + + mkdir $"($env.HOME)/.config/waybar" + cp $"($DOTFILES_DIR)/waybar/($DEVICE_ID)_config.jsonc" $"($env.HOME)/.config/waybar/config.jsonc" + cp $"($DOTFILES_DIR)/waybar/($DEVICE_ID)_style.css" $"($env.HOME)/.config/waybar/style.css" + +} + # yt-dlp if ($DEVICE_ID == "010" or $DEVICE_ID == "020" or $DEVICE_ID == "040") { diff --git a/src/waybar/020_config.jsonc b/src/waybar/020_config.jsonc new file mode 100644 index 0000000..967c256 --- /dev/null +++ b/src/waybar/020_config.jsonc @@ -0,0 +1,121 @@ +{ + // + // ~~~ waybar config + // + + // + /// ~~~ bar + + // sizing + "position": "bottom", + "height": 28, + + // modules + "modules-left": [ "sway/workspaces", "sway/window" ], + "modules-right": [ "cpu", "memory", "wireplumber", "network", "custom/vpn", "bluetooth", "battery", "clock" ], + + // + // ~~~ modules + + // sway workspaces + "sway/workspaces": { + "persistent-workspaces": { + "1": [ "eDP-1" ], + "2": [ "eDP-1" ], + "3": [ "eDP-1" ], + "4": [ "eDP-1" ], + "5": [ "eDP-1" ], + "6": [ "eDP-1" ], + "7": [ "eDP-1" ], + "8": [ "eDP-1" ], + "9": [ "eDP-1" ], + "10": [ "eDP-1" ], + "11": [ "DP-2" ], + "12": [ "DP-2" ], + "13": [ "DP-2" ], + "14": [ "DP-2" ], + "15": [ "DP-2" ], + "16": [ "DP-2" ], + "17": [ "DP-2" ], + "18": [ "DP-2" ], + "19": [ "DP-2" ], + "20": [ "DP-2" ] + } + }, + + // cpu + "cpu": { + "interval": 5, + + "format": "[ CPU: {usage}% ]" + }, + + // memory + "memory": { + "interval": 15, + + "format": "[ MEM: {percentage}% ]", + "tooltip-format": "{used}GiB used out of {total}GiB" + }, + + // volume + "wireplumber": { + "max-volume": 100, + + "format": "[ VOL: {volume}% ]", + "format-muted": "[ VOL: <span color='#eb4056'>MUTE</span> ]", + + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle" + }, + + // internet + "network": { + "interface": "wlan0", + + "format": "[ NET: <span color='#fad075'>UNKNOWN</span> ]", + "format-wifi": "[ NET: {essid} ]", + "format-linked": "[ NET: <span color='#fad075'>{essid}</span> ]", + "format-disconnected": "[ NET: <span color='#eb4056'>NONE</span> ]", + + "tooltip-format-wifi": "IP: {ipaddr}\nStrength: {signalStrength}%" + }, + + // tinc + "custom/vpn": { + "exec": "~/scripts/sway/vpn.nu", + "interval": 3 + }, + + // bluetooth + "bluetooth": { + "format-off": "[ BT: <span color='#f7768e'>0</span> ]", + "format-on": "[ BT: 0 ]", + "format-connected": "[ BT: <span color='#7aa2f7'>{num_connections}</span> ]" + }, + + // battery + "battery": { + "states": { + "warning": 20, + "critical": 10 + }, + "full-at": 95, + + "format": "[ BAT: {capacity}% ]", + "format-charging": "[ BAT: <span color='#9ece6a'>{capacity}%+</span> ]", + "format-warning": "[ BAT: <span color='#e0af68'>{capacity}%</span> ]", + "format-critical": "[BAT: <span color='#f7768e'>{capacity}%</span> ]", + + "tooltip": true, + "tooltip-format": "{time} remaining" + }, + + // clock + "clock": { + "interval": 45, + + "format": "[ {:%H:%M} ]", + "tooltip": true, + "tooltip-format": "{:%Y-%m-%d %H:%M}" + } +} diff --git a/src/waybar/020_style.css b/src/waybar/020_style.css new file mode 100644 index 0000000..6d3c380 --- /dev/null +++ b/src/waybar/020_style.css @@ -0,0 +1,55 @@ +/* + * ~~~ waybar styling +*/ + +/* global */ +* { + font-family: "mononoki"; + font-size: 13px; +} + +/* bar */ +window#waybar { + background-color: #18191b; + border-top: 2px solid #e0e1e4; +} + +/* workspaces */ +#workspaces button { + padding: 2px 4px 0 4px; + border-radius: 0; + color: #e0e1e4; +} + +#workspaces button.persistent { + color: #646b71; +} + +#workspaces button.focused { + background-color: #e0e1e4; + color: #18191b; +} + +/* window title */ +#window { + padding: 2px 8px 0 8px; + color: #e0e1e4; +} + +/* clock */ +#clock { + padding: 2px 8px 0 4px; + color: #e0e1e4; +} + +/* other modules */ +#cpu, +#memory, +#wireplumber, +#network, +#custom-vpn, +#bluetooth, +#battery { + padding: 2px 4px 0 4px; + color: #e0e1e4; +} |
