Unix3r

Build. Break. Learn. Repeat.

Starting0%
Skip to content

unix3r/dotfiles

Public
main
U Unix3r Initial commit: sway + waybar dotfiles (Catppuccin Mocha) eb290df
258 lines ยท 8.9 KB Raw History
1// โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2// โ”‚ Waybar config ยท docs: man 5 waybar / github.com/Alexays/Waybar/wiki
3// โ”‚ Icons are written as \uXXXX escapes (Font Awesome / Nerd Font)
4// โ”‚ so they survive any editor. Reload: killall -SIGUSR2 waybar
5// โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
6{
7 "layer": "top",
8 "position": "top",
9 "height": 34,
10 "margin-top": 6,
11 "margin-left": 8,
12 "margin-right": 8,
13 "spacing": 4,
14 "reload_style_on_change": true,
15
16 "modules-left": [
17 "custom/launcher",
18 "sway/workspaces",
19 "sway/scratchpad",
20 "sway/mode",
21 "mpris"
22 ],
23 "modules-center": [
24 "clock"
25 ],
26 "modules-right": [
27 "custom/weather",
28 "group/system",
29 "pulseaudio",
30 "backlight",
31 "network",
32 "bluetooth",
33 "battery",
34 "custom/updates",
35 "idle_inhibitor",
36 "custom/nightlight",
37 "custom/dnd",
38 "tray",
39 "custom/power"
40 ],
41
42 // โ”€โ”€ Left โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
43 "custom/launcher": {
44 "format": "๏…ผ",
45 "tooltip-format": "Apps (Super+D)\nRight-click: keybindings",
46 "on-click": "wofi --show drun",
47 "on-click-right": "~/.config/sway/scripts/keybinds.sh"
48 },
49
50 "sway/workspaces": {
51 "disable-scroll": false,
52 "all-outputs": false,
53 "format": "{icon}",
54 "format-icons": {
55 "1": "1", "2": "2", "3": "3", "4": "4", "5": "5",
56 "6": "6", "7": "7", "8": "8", "9": "9", "10": "10",
57 "urgent": "๏ช"
58 },
59 "persistent-workspaces": { "1": [], "2": [], "3": [], "4": [], "5": [] }
60 },
61
62 "sway/scratchpad": {
63 "format": "๏‹’ {count}",
64 "show-empty": false,
65 "tooltip": true,
66 "tooltip-format": "{app}: {title}",
67 "on-click": "swaymsg scratchpad show"
68 },
69
70 "sway/mode": {
71 "format": "{}",
72 "max-length": 60
73 },
74
75 "mpris": {
76 "format": "{status_icon} {artist} โ€” {title}",
77 "format-stopped": "",
78 "status-icons": { "playing": "๏‹", "paused": "๏Œ", "stopped": "๏" },
79 "max-length": 45,
80 "tooltip-format": "{player}: {artist} โ€” {title}\n{album}\nclick: play/pause ยท scroll: next/prev",
81 "on-scroll-up": "playerctl next",
82 "on-scroll-down": "playerctl previous"
83 },
84
85 // โ”€โ”€ Center โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
86 "clock": {
87 "interval": 1,
88 "format": "๏€— {:%H:%M}",
89 "format-alt": "๏ณ {:%A %d %B %Y %H:%M:%S}",
90 "tooltip-format": "<tt><small>{calendar}</small></tt>",
91 "calendar": {
92 "mode": "month",
93 "mode-mon-col": 3,
94 "weeks-pos": "left",
95 "on-scroll": 1,
96 "format": {
97 "months": "<span color='#cba6f7'><b>{}</b></span>",
98 "days": "<span color='#cdd6f4'>{}</span>",
99 "weeks": "<span color='#94e2d5'><b>W{}</b></span>",
100 "weekdays": "<span color='#f9e2af'><b>{}</b></span>",
101 "today": "<span color='#f38ba8'><b><u>{}</u></b></span>"
102 }
103 },
104 "actions": {
105 "on-click-right": "mode",
106 "on-scroll-up": "shift_up",
107 "on-scroll-down": "shift_down"
108 }
109 },
110
111 // โ”€โ”€ Right โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
112 "custom/weather": {
113 "exec": "~/.config/waybar/scripts/weather.sh",
114 "return-type": "json",
115 "interval": 900,
116 "on-click": "xdg-open https://wttr.in"
117 },
118
119 // Hover to expand CPU โ†’ memory, temperature, disk
120 "group/system": {
121 "orientation": "horizontal",
122 "drawer": {
123 "transition-duration": 300,
124 "transition-left-to-right": false
125 },
126 "modules": ["cpu", "memory", "temperature", "disk"]
127 },
128 "cpu": {
129 "interval": 3,
130 "format": "๏‹› {usage}%",
131 "states": { "warning": 70, "critical": 90 },
132 "on-click": "foot -e btop || foot -e htop"
133 },
134 "memory": {
135 "interval": 5,
136 "format": "๏‡€ {percentage}%",
137 "tooltip-format": "RAM {used:0.1f}/{total:0.1f} GiB\nSwap {swapUsed:0.1f}/{swapTotal:0.1f} GiB",
138 "states": { "warning": 75, "critical": 90 }
139 },
140 "temperature": {
141 "interval": 5,
142 "critical-threshold": 85,
143 "format": "{icon} {temperatureC}ยฐ",
144 "format-icons": ["๏‹‹", "๏‹Š", "๏‹‰", "๏‹ˆ", "๏‹‡"]
145 // Wrong sensor? find yours with: ls /sys/class/hwmon/*/temp*_input
146 // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input"
147 },
148 "disk": {
149 "interval": 60,
150 "path": "/",
151 "format": "๏‚  {percentage_used}%",
152 "tooltip-format": "{used} used of {total} on {path}"
153 },
154
155 "pulseaudio": {
156 "scroll-step": 5,
157 "max-volume": 150,
158 "format": "{icon} {volume}% {format_source}",
159 "format-bluetooth": "{icon}๏Š“ {volume}% {format_source}",
160 "format-muted": "๏€ฆ muted {format_source}",
161 "format-source": "",
162 "format-source-muted": "๏„ฑ",
163 "format-icons": {
164 "headphone": "๏€ฅ",
165 "headset": "๏€ฅ",
166 "default": ["๏€ฆ", "๏€ง", "๏€จ"]
167 },
168 "on-click": "~/.config/sway/scripts/volume.sh mute",
169 "on-click-right": "pavucontrol",
170 "on-click-middle": "~/.config/sway/scripts/volume.sh mic"
171 },
172
173 "backlight": {
174 "format": "{icon} {percent}%",
175 "format-icons": ["๏††", "๏ƒซ", "๏†…"],
176 "on-scroll-up": "~/.config/sway/scripts/brightness.sh up",
177 "on-scroll-down": "~/.config/sway/scripts/brightness.sh down"
178 },
179
180 "network": {
181 "interval": 5,
182 "format-wifi": "๏‡ซ {signalStrength}%",
183 "format-ethernet": "๏ƒจ wired",
184 "format-linked": "๏ƒจ no IP",
185 "format-disconnected": "๏„ง offline",
186 "tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ipaddr}/{cidr} via {gwaddr}\n๏ฃ {bandwidthDownBytes} ๏ข {bandwidthUpBytes}",
187 "tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}\n๏ฃ {bandwidthDownBytes} ๏ข {bandwidthUpBytes}",
188 "tooltip-format-disconnected": "Disconnected",
189 "on-click": "foot -e nmtui",
190 "on-click-right": "nm-connection-editor"
191 },
192
193 "bluetooth": {
194 "format": "๏Š“",
195 "format-disabled": "",
196 "format-off": "",
197 "format-connected": "๏Š“ {num_connections}",
198 "tooltip-format-connected": "{device_enumerate}",
199 "tooltip-format-enumerate-connected": "{device_alias}",
200 "tooltip-format-enumerate-connected-battery": "{device_alias} ({device_battery_percentage}%)",
201 "on-click": "blueman-manager"
202 },
203
204 "battery": {
205 "interval": 30,
206 "states": { "good": 80, "warning": 25, "critical": 10 },
207 "format": "{icon} {capacity}%",
208 "format-charging": "๏ƒง {capacity}%",
209 "format-plugged": "๏‡ฆ {capacity}%",
210 "format-full": "๏‰€ full",
211 "format-icons": ["๏‰„", "๏‰ƒ", "๏‰‚", "๏‰", "๏‰€"],
212 "tooltip-format": "{timeTo}\n{power:.1f} W ยท health {health}%"
213 },
214
215 "custom/updates": {
216 "exec": "~/.config/waybar/scripts/updates.sh",
217 "return-type": "json",
218 "interval": 3600,
219 "signal": 10,
220 "on-click": "foot -e sh -c '~/.config/waybar/scripts/updates.sh --upgrade'"
221 },
222
223 "idle_inhibitor": {
224 "format": "{icon}",
225 "format-icons": { "activated": "๏ฎ", "deactivated": "๏ฐ" },
226 "tooltip-format-activated": "Caffeine ON โ€” screen won't lock",
227 "tooltip-format-deactivated": "Caffeine off"
228 },
229
230 "custom/nightlight": {
231 "exec": "~/.config/sway/scripts/nightlight.sh status",
232 "return-type": "json",
233 "interval": "once",
234 "signal": 9,
235 "on-click": "~/.config/sway/scripts/nightlight.sh toggle"
236 },
237
238 "custom/dnd": {
239 "exec": "~/.config/sway/scripts/dnd.sh status",
240 "return-type": "json",
241 "interval": 30,
242 "signal": 8,
243 "on-click": "~/.config/sway/scripts/dnd.sh toggle",
244 "on-click-right": "makoctl restore"
245 },
246
247 "tray": {
248 "icon-size": 16,
249 "spacing": 8
250 },
251
252 "custom/power": {
253 "format": "๏€‘",
254 "tooltip-format": "Power menu\nRight-click: wlogout",
255 "on-click": "~/.config/sway/scripts/powermenu.sh",
256 "on-click-right": "~/.config/sway/scripts/powermenu.sh --wlogout"
257 }
258}