Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(config): waybar

+442
+210
config/waybar/config.jsonc
··· 1 + // -*- mode: jsonc -*- 2 + { 3 + // "layer": "top", // Waybar at top layer 4 + // "position": "bottom", // Waybar position (top|bottom|left|right) 5 + "height": 35, // Waybar height (to be removed for auto height) 6 + // "width": 1280, // Waybar width 7 + "spacing": 0, // Gaps between modules (4px) 8 + // Choose the order of the modules 9 + "modules-left": [ 10 + "sway/workspaces", 11 + "sway/mode" 12 + ], 13 + "modules-center": [ 14 + "mpd" 15 + ], 16 + "modules-right": [ 17 + "tray", 18 + "cpu", 19 + "memory", 20 + "temperature", 21 + "clock" 22 + ], 23 + // Modules configuration 24 + "sway/workspaces": { 25 + "disable-scroll": false, 26 + "all-outputs": false, 27 + "warp-on-scroll": false, 28 + "format": "{name} {icon}", 29 + "format-icons": { 30 + "1": "", 31 + "2": "", 32 + "4": "", 33 + "10": "", 34 + "urgent": "", 35 + "default": "" 36 + }, 37 + "persistent-workspaces": { 38 + "1": ["HDMI-A-1"], 39 + "2": ["HDMI-A-1"], 40 + "4": ["DP-1"], 41 + "10": ["DP-1"] 42 + } 43 + }, 44 + "keyboard-state": { 45 + "numlock": true, 46 + "capslock": true, 47 + "format": "{name} {icon}", 48 + "format-icons": { 49 + "locked": "", 50 + "unlocked": "" 51 + } 52 + }, 53 + "sway/mode": { 54 + "format": "<span style=\"italic\">{}</span>" 55 + }, 56 + "sway/scratchpad": { 57 + "format": "{icon} {count}", 58 + "show-empty": false, 59 + "format-icons": ["", ""], 60 + "tooltip": true, 61 + "tooltip-format": "{app}: {title}" 62 + }, 63 + "mpd": { 64 + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", 65 + "format-disconnected": "Disconnected ", 66 + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", 67 + "unknown-tag": "N/A", 68 + "interval": 5, 69 + "consume-icons": { 70 + "on": " " 71 + }, 72 + "random-icons": { 73 + "off": "<span color=\"#f53c3c\"></span> ", 74 + "on": " " 75 + }, 76 + "repeat-icons": { 77 + "on": " " 78 + }, 79 + "single-icons": { 80 + "on": "1 " 81 + }, 82 + "state-icons": { 83 + "paused": "", 84 + "playing": "" 85 + }, 86 + "tooltip-format": "MPD (connected)", 87 + "tooltip-format-disconnected": "MPD (disconnected)" 88 + }, 89 + "idle_inhibitor": { 90 + "format": "{icon}", 91 + "format-icons": { 92 + "activated": "", 93 + "deactivated": "" 94 + } 95 + }, 96 + "tray": { 97 + // "icon-size": 21, 98 + "spacing": 10, 99 + // "icons": { 100 + // "blueman": "bluetooth", 101 + // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png" 102 + // } 103 + }, 104 + "clock": { 105 + // "timezone": "America/New_York", 106 + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", 107 + "format-alt": "{:%Y-%m-%d}" 108 + }, 109 + "cpu": { 110 + "format": "{usage}% ", 111 + "tooltip": false 112 + }, 113 + "memory": { 114 + "format": "{}% " 115 + }, 116 + "temperature": { 117 + // "thermal-zone": 2, 118 + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", 119 + "critical-threshold": 80, 120 + // "format-critical": "{temperatureC}°C {icon}", 121 + "format": "{temperatureC}°C {icon}", 122 + "format-icons": ["", "", ""] 123 + }, 124 + "backlight": { 125 + // "device": "acpi_video1", 126 + "format": "{percent}% {icon}", 127 + "format-icons": ["", "", "", "", "", "", "", "", ""] 128 + }, 129 + "battery": { 130 + "states": { 131 + // "good": 95, 132 + "warning": 30, 133 + "critical": 15 134 + }, 135 + "format": "{capacity}% {icon}", 136 + "format-full": "{capacity}% {icon}", 137 + "format-charging": "{capacity}% ", 138 + "format-plugged": "{capacity}% ", 139 + "format-alt": "{time} {icon}", 140 + // "format-good": "", // An empty format will hide the module 141 + // "format-full": "", 142 + "format-icons": ["", "", "", "", ""] 143 + }, 144 + "battery#bat2": { 145 + "bat": "BAT2" 146 + }, 147 + "power-profiles-daemon": { 148 + "format": "{icon}", 149 + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", 150 + "tooltip": true, 151 + "format-icons": { 152 + "default": "", 153 + "performance": "", 154 + "balanced": "", 155 + "power-saver": "" 156 + } 157 + }, 158 + "network": { 159 + // "interface": "wlp2*", // (Optional) To force the use of this interface 160 + "format-wifi": "{essid} ({signalStrength}%) ", 161 + "format-ethernet": "{ipaddr}/{cidr} ", 162 + "tooltip-format": "{ifname} via {gwaddr} ", 163 + "format-linked": "{ifname} (No IP) ", 164 + "format-disconnected": "Disconnected ⚠", 165 + "format-alt": "{ifname}: {ipaddr}/{cidr}" 166 + }, 167 + "pulseaudio": { 168 + // "scroll-step": 1, // %, can be a float 169 + "format": "{volume}% {icon} {format_source}", 170 + "format-bluetooth": "{volume}% {icon} {format_source}", 171 + "format-bluetooth-muted": " {icon} {format_source}", 172 + "format-muted": " {format_source}", 173 + "format-source": "{volume}% ", 174 + "format-source-muted": "", 175 + "format-icons": { 176 + "headphone": "", 177 + "hands-free": "", 178 + "headset": "", 179 + "phone": "", 180 + "portable": "", 181 + "car": "", 182 + "default": ["", "", ""] 183 + }, 184 + "on-click": "pavucontrol" 185 + }, 186 + "custom/media": { 187 + "format": "{icon} {text}", 188 + "return-type": "json", 189 + "max-length": 40, 190 + "format-icons": { 191 + "spotify": "", 192 + "default": "🎜" 193 + }, 194 + "escape": true, 195 + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder 196 + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name 197 + }, 198 + "custom/power": { 199 + "format" : "⏻", 200 + "tooltip": false, 201 + "menu": "on-click", 202 + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder 203 + "menu-actions": { 204 + "shutdown": "shutdown", 205 + "reboot": "reboot", 206 + "suspend": "systemctl suspend", 207 + "hibernate": "systemctl hibernate" 208 + } 209 + } 210 + }
+232
config/waybar/style.css
··· 1 + * { 2 + /* `otf-font-awesome` is required to be installed for icons */ 3 + font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; 4 + font-size: 16px; 5 + } 6 + 7 + window#waybar { 8 + background-color: rgba(43, 48, 59, 0); 9 + color: #000; 10 + transition-property: background-color; 11 + /*transition-duration: .5s;*/ 12 + } 13 + 14 + window#waybar.hidden { 15 + opacity: 0.2; 16 + } 17 + 18 + /* 19 + window#waybar.empty { 20 + background-color: transparent; 21 + } 22 + window#waybar.solo { 23 + background-color: #FFFFFF; 24 + } 25 + */ 26 + 27 + window#waybar.termite { 28 + background-color: #3F3F3F; 29 + } 30 + 31 + window#waybar.chromium { 32 + background-color: #000000; 33 + border: none; 34 + } 35 + 36 + button { 37 + /* Use box-shadow instead of border so the text isn't offset */ 38 + /*box-shadow: inset 0 -3px transparent;*/ 39 + /* Avoid rounded borders under each button name */ 40 + border: none; 41 + border-radius: 0; 42 + } 43 + 44 + /* you can set a style on hover for any module like this */ 45 + #pulseaudio:hover { 46 + background-color: #a37800; 47 + } 48 + 49 + #workspaces button { 50 + background-color: #2F3E46; 51 + padding: 0 10px; 52 + color: #fff; 53 + } 54 + 55 + #workspaces button:hover { 56 + background-color: #52796F; 57 + } 58 + 59 + #workspaces button.focused { 60 + background-color: #354F52; 61 + box-shadow: inset 0 -3px #84A98C; 62 + } 63 + 64 + #workspaces button.urgent { 65 + background-color: #84A98C; 66 + } 67 + 68 + #mode { 69 + background-color: #52796F; 70 + box-shadow: inset 0 -3px #84A98C; 71 + } 72 + 73 + #clock, 74 + #battery, 75 + #cpu, 76 + #memory, 77 + #disk, 78 + #temperature, 79 + #backlight, 80 + #network, 81 + #pulseaudio, 82 + #wireplumber, 83 + #custom-media, 84 + #tray, 85 + #mode, 86 + #idle_inhibitor, 87 + #scratchpad, 88 + #power-profiles-daemon, 89 + #mpd { 90 + padding: 0 10px; 91 + color: #ffffff; 92 + } 93 + 94 + #window, 95 + #workspaces { 96 + /*margin: 0 4px;*/ 97 + } 98 + 99 + /* If workspaces is the leftmost module, omit left margin */ 100 + .modules-left > widget:first-child > #workspaces { 101 + margin-left: 0; 102 + } 103 + 104 + /* If workspaces is the rightmost module, omit right margin */ 105 + .modules-right > widget:last-child > #workspaces { 106 + margin-right: 0; 107 + } 108 + 109 + #clock { 110 + background-color: #2F3E46; 111 + } 112 + 113 + #battery { 114 + background-color: #ffffff; 115 + color: #000000; 116 + } 117 + 118 + #battery.charging, #battery.plugged { 119 + color: #ffffff; 120 + background-color: #26A65B; 121 + } 122 + 123 + @keyframes blink { 124 + to { 125 + background-color: #ffffff; 126 + color: #000000; 127 + } 128 + } 129 + 130 + label:focus { 131 + background-color: #000000; 132 + } 133 + 134 + #cpu { 135 + background-color: #2F3E46; 136 + color: #fff; 137 + } 138 + 139 + #memory { 140 + background-color: #2F3E46; 141 + } 142 + 143 + #disk { 144 + background-color: #964B00; 145 + } 146 + 147 + #backlight { 148 + background-color: #90b1b1; 149 + } 150 + 151 + #network { 152 + background-color: #2980b9; 153 + } 154 + 155 + #network.disconnected { 156 + background-color: #f53c3c; 157 + } 158 + 159 + #pulseaudio { 160 + background-color: #f1c40f; 161 + color: #000000; 162 + } 163 + 164 + #pulseaudio.muted { 165 + background-color: #90b1b1; 166 + color: #2a5c45; 167 + } 168 + 169 + #wireplumber { 170 + background-color: #fff0f5; 171 + color: #000000; 172 + } 173 + 174 + #wireplumber.muted { 175 + background-color: #f53c3c; 176 + } 177 + 178 + #custom-media { 179 + background-color: #66cc99; 180 + color: #2a5c45; 181 + min-width: 100px; 182 + } 183 + 184 + #custom-media.custom-spotify { 185 + background-color: #66cc99; 186 + } 187 + 188 + #custom-media.custom-vlc { 189 + background-color: #ffa000; 190 + } 191 + 192 + #temperature { 193 + background-color: #f0932b; 194 + } 195 + 196 + #temperature.critical { 197 + background-color: #eb4d4b; 198 + } 199 + 200 + #tray { 201 + background-color: #354F52; 202 + } 203 + 204 + #tray > .passive { 205 + -gtk-icon-effect: dim; 206 + } 207 + 208 + #tray > .needs-attention { 209 + -gtk-icon-effect: highlight; 210 + background-color: #52796F; 211 + } 212 + 213 + #privacy { 214 + padding: 0; 215 + } 216 + 217 + #privacy-item { 218 + padding: 0 5px; 219 + color: white; 220 + } 221 + 222 + #privacy-item.screenshare { 223 + background-color: #cf5700; 224 + } 225 + 226 + #privacy-item.audio-in { 227 + background-color: #1ca000; 228 + } 229 + 230 + #privacy-item.audio-out { 231 + background-color: #0069d4; 232 + }