From 281484e41aabb7a38d21e2cff230e7e6d5beeabf Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Fri, 1 Mar 2024 16:32:45 -0500 Subject: [PATCH] initial commit --- config | 184 ++++++++++++++++++++++++++++++++++++++++++++ scripts/fortivpn.sh | 3 + style.css | 87 +++++++++++++++++++++ 3 files changed, 274 insertions(+) create mode 100644 config create mode 100755 scripts/fortivpn.sh create mode 100644 style.css diff --git a/config b/config new file mode 100644 index 0000000..9669454 --- /dev/null +++ b/config @@ -0,0 +1,184 @@ +// -*- mode: json -*- + +{ + "layer": "top", + "position": "bottom", + + "modules-left": [ + "sway/workspaces", + "custom/right-arrow-dark", + ], + "modules-center": [ + ], + "modules-right": [ + "custom/left-arrow-dark", + "custom/twcount", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "custom/fortivpn", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "idle_inhibitor", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "pulseaudio", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "battery", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "tray", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "custom/notification", + "clock" + + ], + + "custom/twcount": { + "format": " {}", + "exec": "task status:pending count", + "interval": 30 + }, + "custom/fortivpn": { + "format": "{icon} ", + "return-type": "json", + "tooltip": "{}", + "interval": 30, + "on-click": "forticlient gui", + "exec": "/home/kellya/.config/waybar/scripts/fortivpn.sh", + "format-icons": { + "connected": "", + "not running": "" + } + }, + "custom/left-arrow-dark": { + "format": "", + "tooltip": false + }, + "custom/left-arrow-light": { + "format": "", + "tooltip": false + }, + "custom/right-arrow-dark": { + "format": "", + "tooltip": false + }, + "custom/right-arrow-light": { + "format": "", + "tooltip": false + }, + + "sway/workspaces": { + "disable-scroll": true, + "format": "{icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "🎝", + "6": "", + "7": "", + "urgent": "" + } + + }, + + "clock#1": { + "format": "{:%a}", + "tooltip": false + }, + "clock#2": { + "format": "{:%H:%M}", + "tooltip": false + }, + "clock#3": { + "format": "{:%m-%d}", + "tooltip": false + }, + + "pulseaudio": { + "format": "{icon} {volume:2}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": "MUTE", + "format-icons": { + "headphones": "", + "default": [ + "", + "" + ] + }, + "scroll-step": 5, + "on-click": "pamixer -t", + "on-click-right": "pavucontrol" + }, + "memory": { + "interval": 5, + "format": "Mem {}%" + }, + "cpu": { + "interval": 5, + "format": "CPU {usage:2}%" + }, + "battery": { + "bat": "BAT0", + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-discharging": "{icon} {capacity}% {time}", + "tooltip-format": "{time} {capacity}%", + "format-icons": [ + "", + "", + "", + "", + "" + ] + }, + "disk": { + "interval": 5, + "format": "Disk {percentage_used:2}%", + "path": "/" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + "icon-size": 15, + "spacing": 8 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "custom/notification": { + "tooltip": true, + "format": "{icon}", + "tooltip-format": "{}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, +} diff --git a/scripts/fortivpn.sh b/scripts/fortivpn.sh new file mode 100755 index 0000000..dcc5453 --- /dev/null +++ b/scripts/fortivpn.sh @@ -0,0 +1,3 @@ +#!/bin/bash +STATUS=$(forticlient vpn status|grep Status:|cut -d: -f2|tr '[:upper:]' '[:lower:]'|xargs) +echo "{ \"status\": \"$STATUS\", \"alt\": \"$STATUS\", \"tooltip\": \"$STATUS\" }" diff --git a/style.css b/style.css new file mode 100644 index 0000000..27c988a --- /dev/null +++ b/style.css @@ -0,0 +1,87 @@ +* { + font-size: 12px; + font-family: monospace; +} + +window#waybar { + background: #292b2e; + color: #fdf6e3; + padding: 0; + margin: 0; +} + +#custom-right-arrow-dark, +#custom-left-arrow-dark { + color: #1a1a1a; + font-size: 20px; +} +#custom-right-arrow-light, +#custom-left-arrow-light { + color: #292b2e; + background: #1a1a1a; + font-size: 20px; +} + +#workspaces, +#clock, +#clock.1, +#clock.2, +#clock.3, +#pulseaudio, +#memory, +#cpu, +#battery, +#disk, +#idle_inhibitor, +#custom-twcount, +#custom-fortivpn, +#tray { + background: #1a1a1a; + padding-left: 5px; + padding-right: 5px; +} + +#workspaces button { + padding: 0 2px; + color: #fdf6e3; +} +#workspaces button.focused { + color: #268bd2; +} +#workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; +} +#workspaces button:hover { + background: #1a1a1a; + border: #1a1a1a; + padding: 0 3px; +} + +#pulseaudio { + color: #268bd2; +} +#memory { + color: #2aa198; +} +#cpu { + color: #6c71c4; +} +#battery { + color: #859900; +} +#disk { + color: #b58900; +} + +#clock, +#pulseaudio, +#memory, +#cpu, +#battery, +#disk { + padding: 0 10px; +} +#custom-notification { + background: #1a1a1a; +}