tenseleyflow/ndotfiles / 9d6ea45

Browse files

add new machine configs

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
9d6ea45e0465cdc0c3fda0a8d4be3b00dde730f5
Parents
0b49278
Tree
9e4df6a

7 changed files

StatusFile+-
A hypr2/hyprland.conf 436 0
A waybar2/config.jsonc 99 0
A waybar2/modules/almanta.sh 67 0
A waybar2/modules/jetbrains_menu.sh 77 0
A waybar2/modules/tailscale.sh 69 0
A waybar2/modules/weather.sh 79 0
A waybar2/style.css 106 0
hypr2/hyprland.confadded
@@ -0,0 +1,436 @@
1
+
2
+# #######################################################################################
3
+# AUTOGENERATED HYPRLAND CONFIG.
4
+# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS.
5
+# #######################################################################################
6
+
7
+
8
+# This is an example Hyprland config file.
9
+# Refer to the wiki for more information.
10
+# https://wiki.hypr.land/Configuring/
11
+
12
+# Please note not all available settings / options are set here.
13
+# For a full list, see the wiki
14
+
15
+# You can split this configuration into multiple files
16
+# Create your files separately and then link them to this file like this:
17
+# source = ~/.config/hypr/myColors.conf
18
+
19
+
20
+################
21
+### MONITORS ###
22
+################
23
+
24
+# See https://wiki.hypr.land/Configuring/Monitors/
25
+# Left to right: 1080p, 1440p, 4K
26
+monitor=HDMI-A-1,1920x1080@100,0x0,1
27
+monitor=DP-2,2560x1440@59.95,1920x0,1
28
+monitor=DP-1,3840x2160@60,4480x0,1.5
29
+
30
+
31
+###################
32
+### MY PROGRAMS ###
33
+###################
34
+
35
+# See https://wiki.hypr.land/Configuring/Keywords/
36
+
37
+# Set programs that you use
38
+$terminal = alacritty
39
+$fileManager = dolphin
40
+$applauncher = wofi --show drun
41
+
42
+
43
+#################
44
+### AUTOSTART ###
45
+#################
46
+
47
+# Autostart necessary processes (like notifications daemons, status bars, etc.)
48
+# Or execute your favorite apps at launch like this:
49
+
50
+# exec-once = $terminal
51
+# exec-once = nm-applet &
52
+# exec-once = waybar & hyprpaper & firefox
53
+
54
+exec-once = waybar
55
+exec-once = nm-applet --indicator
56
+exec-once = env XDG_CURRENT_DESKTOP=Unity jetbrains-toolbox --minimize
57
+exec-once = swww-daemon
58
+exec-once = sleep 0.5 && swww img "/home/mfwolffe/Pictures/moby-couch-2.jpg"
59
+exec-once = wl-paste --watch cliphist store
60
+
61
+
62
+#############################
63
+### ENVIRONMENT VARIABLES ###
64
+#############################
65
+
66
+# See https://wiki.hypr.land/Configuring/Environment-variables/
67
+
68
+env = XCURSOR_SIZE,24
69
+env = HYPRCURSOR_SIZE,24
70
+
71
+
72
+###################
73
+### PERMISSIONS ###
74
+###################
75
+
76
+# See https://wiki.hypr.land/Configuring/Permissions/
77
+# Please note permission changes here require a Hyprland restart and are not applied on-the-fly
78
+# for security reasons
79
+
80
+# ecosystem {
81
+#   enforce_permissions = 1
82
+# }
83
+
84
+# permission = /usr/(bin|local/bin)/grim, screencopy, allow
85
+# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
86
+# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
87
+
88
+
89
+#####################
90
+### LOOK AND FEEL ###
91
+#####################
92
+
93
+# Refer to https://wiki.hypr.land/Configuring/Variables/
94
+
95
+# https://wiki.hypr.land/Configuring/Variables/#general
96
+general {
97
+    gaps_in = 5
98
+    gaps_out = 20
99
+
100
+    border_size = 2
101
+
102
+    # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors
103
+    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
104
+    col.inactive_border = rgba(595959aa)
105
+
106
+    # Set to true enable resizing windows by clicking and dragging on borders and gaps
107
+    resize_on_border = false
108
+
109
+    # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on
110
+    allow_tearing = false
111
+
112
+    layout = dwindle
113
+}
114
+
115
+# https://wiki.hypr.land/Configuring/Variables/#decoration
116
+decoration {
117
+    rounding = 10
118
+    rounding_power = 2
119
+
120
+    # Change transparency of focused and unfocused windows
121
+    active_opacity = 1.0
122
+    inactive_opacity = 1.0
123
+
124
+    shadow {
125
+        enabled = true
126
+        range = 4
127
+        render_power = 3
128
+        color = rgba(1a1a1aee)
129
+    }
130
+
131
+    # https://wiki.hypr.land/Configuring/Variables/#blur
132
+    blur {
133
+        enabled = true
134
+        size = 3
135
+        passes = 1
136
+
137
+        vibrancy = 0.1696
138
+    }
139
+}
140
+
141
+# https://wiki.hypr.land/Configuring/Variables/#animations
142
+animations {
143
+    enabled = yes, please :)
144
+
145
+    # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
146
+    #        NAME,           X0,   Y0,   X1,   Y1
147
+    bezier = easeOutQuint,   0.23, 1,    0.32, 1
148
+    bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
149
+    bezier = linear,         0,    0,    1,    1
150
+    bezier = almostLinear,   0.5,  0.5,  0.75, 1
151
+    bezier = quick,          0.15, 0,    0.1,  1
152
+
153
+    # Default animations, see https://wiki.hypr.land/Configuring/Animations/
154
+    #           NAME,          ONOFF, SPEED, CURVE,        [STYLE]
155
+    animation = global,        1,     10,    default
156
+    animation = border,        1,     5.39,  easeOutQuint
157
+    animation = windows,       1,     4.79,  easeOutQuint
158
+    animation = windowsIn,     1,     4.1,   easeOutQuint, popin 87%
159
+    animation = windowsOut,    1,     1.49,  linear,       popin 87%
160
+    animation = fadeIn,        1,     1.73,  almostLinear
161
+    animation = fadeOut,       1,     1.46,  almostLinear
162
+    animation = fade,          1,     3.03,  quick
163
+    animation = layers,        1,     3.81,  easeOutQuint
164
+    animation = layersIn,      1,     4,     easeOutQuint, fade
165
+    animation = layersOut,     1,     1.5,   linear,       fade
166
+    animation = fadeLayersIn,  1,     1.79,  almostLinear
167
+    animation = fadeLayersOut, 1,     1.39,  almostLinear
168
+    animation = workspaces,    1,     1.94,  almostLinear, fade
169
+    animation = workspacesIn,  1,     1.21,  almostLinear, fade
170
+    animation = workspacesOut, 1,     1.94,  almostLinear, fade
171
+    animation = zoomFactor,    1,     7,     quick
172
+}
173
+
174
+# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
175
+# "Smart gaps" / "No gaps when only"
176
+# uncomment all if you wish to use that.
177
+# workspace = w[tv1], gapsout:0, gapsin:0
178
+# workspace = f[1], gapsout:0, gapsin:0
179
+# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
180
+# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
181
+# windowrule = bordersize 0, floating:0, onworkspace:f[1]
182
+# windowrule = rounding 0, floating:0, onworkspace:f[1]
183
+
184
+# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
185
+dwindle {
186
+    pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
187
+    preserve_split = true # You probably want this
188
+}
189
+
190
+# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
191
+master {
192
+    new_status = master
193
+}
194
+
195
+# https://wiki.hypr.land/Configuring/Variables/#misc
196
+misc {
197
+    force_default_wallpaper = 0
198
+    disable_hyprland_logo = true
199
+}
200
+
201
+
202
+#############
203
+### INPUT ###
204
+#############
205
+
206
+# https://wiki.hypr.land/Configuring/Variables/#input
207
+input {
208
+    kb_layout = us
209
+    kb_variant =
210
+    kb_model =
211
+    kb_options =
212
+    kb_rules =
213
+
214
+    follow_mouse = 1
215
+
216
+    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
217
+
218
+    touchpad {
219
+        natural_scroll = false
220
+    }
221
+}
222
+
223
+# See https://wiki.hypr.land/Configuring/Gestures
224
+gesture = 3, horizontal, workspace
225
+
226
+# Example per-device config
227
+# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
228
+device {
229
+    name = epic-mouse-v1
230
+    sensitivity = -0.5
231
+}
232
+
233
+
234
+###################
235
+### KEYBINDINGS ###
236
+###################
237
+
238
+# See https://wiki.hypr.land/Configuring/Keywords/
239
+$mainMod = SUPER # Sets "Windows" key as main modifier
240
+
241
+# ======= Basic Operations =======
242
+bindd = $mainMod, RETURN, 		Opens terminal, 								exec, $terminal
243
+bindd = $mainMod SHIFT, RETURN, Open alacritty with fortsh, 					exec, alacritty -e /usr/bin/fortsh
244
+bindd = $mainMod, SPACE, 		Application launcher, 							exec, $applauncher
245
+bindd = $mainMod, Q, 			Close active window, 							killactive,
246
+bindd = $mainMod, slash, 		Toggle split mode (dwindle), 					togglesplit,
247
+bindd = $mainMod, E, 			Open file manager, 								exec, $fileManager
248
+bindd = $mainMod, V, 			Toggle floating mode, 							togglefloating,
249
+bindd = $mainMod, P, 			Pseudo tile (dwindle), 							pseudo,
250
+bindd = $mainMod SHIFT, R, 		Reload Hyprland config, 						exec, hyprctl reload
251
+bindd = $mainMod SHIFT, E, 		Open logout menu, 							exec, wlogout -b 5 -c 0 -r 0 -m 0
252
+
253
+# ======= Window Actions =======
254
+bindd = $mainMod, Y, 			Pin window (show on all workspaces), 			pin
255
+bindd = $mainMod, F, 			Toggle fullscreen, 								fullscreen
256
+
257
+# Move window towards a direction
258
+bindd = $mainMod SHIFT, up, 	Move window upwards, 		movewindow, u
259
+bindd = $mainMod SHIFT, down, 	Move window downwards, 		movewindow, d
260
+bindd = $mainMod SHIFT, left, 	Move window left, 			movewindow, l
261
+bindd = $mainMod SHIFT, right, 	Move window right, 			movewindow, r
262
+
263
+# Move focus with mainMod + arrow keys
264
+bindd = $mainMod, up, 		Move focus upwards, 		movefocus, u
265
+bindd = $mainMod, down, 	Move focus downwards, 		movefocus, d
266
+bindd = $mainMod, left, 	Move focus left, 			movefocus, l
267
+bindd = $mainMod, right, 	Move focus right, 			movefocus, r
268
+
269
+# ======= Window Grouping =======
270
+bindd = $mainMod, K, 	Toggle window group, 			togglegroup,
271
+bindd = $mainMod, Tab, 	Switch to next in group, 		changegroupactive, f
272
+
273
+# ======= Resize Mode =======
274
+bindd = $mainMod, R, Activate resize mode, submap, resize
275
+submap = resize
276
+bindd = , right, Resize right, resizeactive, 15 0
277
+bindd = , left, Resize left, resizeactive, -15 0
278
+bindd = , up, Resize up, resizeactive, 0 -15
279
+bindd = , down, Resize down, resizeactive, 0 15
280
+bindd = , l, Resize right, resizeactive, 15 0
281
+bindd = , h, Resize left, resizeactive, -15 0
282
+bindd = , k, Resize up, resizeactive, 0 -15
283
+bindd = , j, Resize down, resizeactive, 0 15
284
+bindd = , escape, Exit resize mode, submap, reset
285
+submap = reset
286
+
287
+# Quick resize (without entering resize mode)
288
+bindd = $mainMod CTRL, up, 		Resize up (small), 		resizeactive, 0 -25
289
+bindd = $mainMod CTRL, down, 	Resize down (small), 	resizeactive, 0 25
290
+bindd = $mainMod CTRL, left, 	Resize left (small), 	resizeactive, -25 0
291
+bindd = $mainMod CTRL, right, 	Resize right (small), 	resizeactive, 25 0
292
+
293
+bindd = $mainMod CTRL SHIFT, up, 	Resize up (medium), 	resizeactive, 0 -55
294
+bindd = $mainMod CTRL SHIFT, down, 	Resize down (medium), 	resizeactive, 0 55
295
+bindd = $mainMod CTRL SHIFT, left, 	Resize left (medium), 	resizeactive, -55 0
296
+bindd = $mainMod CTRL SHIFT, right, Resize right (medium), 	resizeactive, 55 0
297
+
298
+bindd = $mainMod ALT CTRL, up, 		Resize up (large), 		resizeactive, 0 -85
299
+bindd = $mainMod ALT CTRL, down, 	Resize down (large), 	resizeactive, 0 85
300
+bindd = $mainMod ALT CTRL, left, 	Resize left (large), 	resizeactive, -85 0
301
+bindd = $mainMod ALT CTRL, right, 	Resize right (large), 	resizeactive, 85 0
302
+
303
+# Mouse resize/move
304
+bindm = $mainMod, mouse:273, resizewindow
305
+bindm = $mainMod, mouse:272, movewindow
306
+
307
+# ======= Gap Toggles =======
308
+bindd = $mainMod, 		G, Remove gaps, 		exec, hyprctl --batch "keyword general:gaps_out 0;keyword general:gaps_in 0"
309
+bindd = $mainMod SHIFT, G, Restore gaps, 		exec, hyprctl --batch "keyword general:gaps_out 20;keyword general:gaps_in 5"
310
+
311
+# ======= Utilities =======
312
+bindd = $mainMod SHIFT, V, 	Open clipboard manager, 	exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
313
+bindd = $mainMod, N, 		Open notes picker, 			exec, hyprctl dispatch workspace special:notes; hyprctl dispatch exec "$terminal -e fish -c 'viewnotes'"
314
+bindd = $mainMod, W, 		Reload Waybar, 				exec, killall -SIGUSR2 waybar
315
+bindd = $mainMod, L, 		Lock screen, 				exec, swaylock-fancy -e -K -p 10
316
+
317
+# ======= Workspaces =======
318
+# Switch workspaces with mainMod + [0-9]
319
+bindd = $mainMod, 1, Switch to workspace 1,  workspace, 1
320
+bindd = $mainMod, 2, Switch to workspace 2,  workspace, 2
321
+bindd = $mainMod, 3, Switch to workspace 3,  workspace, 3
322
+bindd = $mainMod, 4, Switch to workspace 4,  workspace, 4
323
+bindd = $mainMod, 5, Switch to workspace 5,  workspace, 5
324
+bindd = $mainMod, 6, Switch to workspace 6,  workspace, 6
325
+bindd = $mainMod, 7, Switch to workspace 7,  workspace, 7
326
+bindd = $mainMod, 8, Switch to workspace 8,  workspace, 8
327
+bindd = $mainMod, 9, Switch to workspace 9,  workspace, 9
328
+bindd = $mainMod, 0, Switch to workspace 10, workspace, 10
329
+
330
+# Scroll through workspaces
331
+bindd = $mainMod, COMMA,  		Prev workspace, 	workspace, e-1
332
+bindd = $mainMod, PERIOD, 		Next workspace, 	workspace, e+1
333
+bindd = $mainMod, mouse_up, 	Prev workspace, 	workspace, e-1
334
+bindd = $mainMod, mouse_down, 	Next workspace, 	workspace, e+1
335
+
336
+# Move window and follow to workspace with CTRL + [0-9]
337
+bindd = $mainMod CTRL, 1, Move window to workspace 1 (follow),  movetoworkspace, 1
338
+bindd = $mainMod CTRL, 2, Move window to workspace 2 (follow),  movetoworkspace, 2
339
+bindd = $mainMod CTRL, 3, Move window to workspace 3 (follow),  movetoworkspace, 3
340
+bindd = $mainMod CTRL, 4, Move window to workspace 4 (follow),  movetoworkspace, 4
341
+bindd = $mainMod CTRL, 5, Move window to workspace 5 (follow),  movetoworkspace, 5
342
+bindd = $mainMod CTRL, 6, Move window to workspace 6 (follow),  movetoworkspace, 6
343
+bindd = $mainMod CTRL, 7, Move window to workspace 7 (follow),  movetoworkspace, 7
344
+bindd = $mainMod CTRL, 8, Move window to workspace 8 (follow),  movetoworkspace, 8
345
+bindd = $mainMod CTRL, 9, Move window to workspace 9 (follow),  movetoworkspace, 9
346
+bindd = $mainMod CTRL, 0, Move window to workspace 10 (follow), movetoworkspace, 10
347
+
348
+# Move window silently (don't follow) with SHIFT + [0-9]
349
+bindd = $mainMod SHIFT, 1, Move window to workspace 1 (silent),  movetoworkspacesilent, 1
350
+bindd = $mainMod SHIFT, 2, Move window to workspace 2 (silent),  movetoworkspacesilent, 2
351
+bindd = $mainMod SHIFT, 3, Move window to workspace 3 (silent),  movetoworkspacesilent, 3
352
+bindd = $mainMod SHIFT, 4, Move window to workspace 4 (silent),  movetoworkspacesilent, 4
353
+bindd = $mainMod SHIFT, 5, Move window to workspace 5 (silent),  movetoworkspacesilent, 5
354
+bindd = $mainMod SHIFT, 6, Move window to workspace 6 (silent),  movetoworkspacesilent, 6
355
+bindd = $mainMod SHIFT, 7, Move window to workspace 7 (silent),  movetoworkspacesilent, 7
356
+bindd = $mainMod SHIFT, 8, Move window to workspace 8 (silent),  movetoworkspacesilent, 8
357
+bindd = $mainMod SHIFT, 9, Move window to workspace 9 (silent),  movetoworkspacesilent, 9
358
+bindd = $mainMod SHIFT, 0, Move window to workspace 10 (silent), movetoworkspacesilent, 10
359
+
360
+# ======= Special Workspaces (Scratchpads) =======
361
+bindd = $mainMod, Z, 		Toggle zenn scratchpad, 		togglespecialworkspace, zenn
362
+bindd = $mainMod, T, 		Toggle terminal scratchpad, 	togglespecialworkspace, term
363
+bindd = $mainMod, H, 		Toggle guides scratchpad, 		togglespecialworkspace, guid
364
+bindd = $mainMod, D, 		Toggle discord scratchpad, 		togglespecialworkspace, disc
365
+bindd = $mainMod, A, 		Toggle audacity scratchpad, 	togglespecialworkspace, adct
366
+bindd = $mainMod, O, 		Toggle ticktick scratchpad, 	togglespecialworkspace, tick
367
+bindd = $mainMod, B, 		Toggle bitwarden scratchpad, 	togglespecialworkspace, bitt
368
+bindd = $mainMod, M, 		Toggle music scratchpad, 		togglespecialworkspace, spot
369
+bindd = $mainMod, minus, 	Toggle default scratchpad, 		togglespecialworkspace, special
370
+bindd = $mainMod SHIFT, minus, Send to scratchpad, 			movetoworkspacesilent, special
371
+
372
+# ======= Volume Control =======
373
+bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
374
+bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
375
+bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
376
+bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
377
+
378
+# ======= Playback Control =======
379
+bindl = , XF86AudioNext, exec, playerctl next
380
+bindl = , XF86AudioPause, exec, playerctl play-pause
381
+bindl = , XF86AudioPlay, exec, playerctl play-pause
382
+bindl = , XF86AudioPrev, exec, playerctl previous
383
+
384
+# ======= Brightness =======
385
+bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
386
+bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
387
+
388
+# ======= Screenshots (hyprshot) =======
389
+bind = , Print, exec, hyprshot -m output
390
+bind = SHIFT, Print, exec, hyprshot -m region
391
+bind = CTRL, Print, exec, hyprshot -m window
392
+bind = CTRL SHIFT, 4, exec, hyprshot -m region
393
+
394
+# ======= Bind Settings =======
395
+binds {
396
+    allow_workspace_cycles = 1
397
+    workspace_back_and_forth = 1
398
+    workspace_center_on = 1
399
+    movefocus_cycles_fullscreen = true
400
+    window_direction_monitor_fallback = true
401
+}
402
+
403
+##############################
404
+### WINDOWS AND WORKSPACES ###
405
+##############################
406
+
407
+# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
408
+# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
409
+
410
+# Example windowrule
411
+# windowrule = float,class:^(kitty)$,title:^(kitty)$
412
+
413
+# Ignore maximize requests from apps. You'll probably like this.
414
+windowrule = suppressevent maximize, class:.*
415
+
416
+# Fix some dragging issues with XWayland
417
+windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
418
+
419
+# ======= Scratchpad Workspace Rules =======
420
+# Auto-launch apps when scratchpad is first toggled
421
+workspace = special:disc, on-created-empty:discord
422
+workspace = special:term, on-created-empty:alacritty
423
+workspace = special:spot, on-created-empty:spotify
424
+workspace = special:adct, on-created-empty:audacity
425
+workspace = special:tick, on-created-empty:ticktick
426
+workspace = special:zenn, on-created-empty:zen-browser
427
+workspace = special:bitt, on-created-empty:bitwarden-desktop
428
+
429
+# Force apps to stay in their scratchpads
430
+windowrule = workspace special:disc, class:^(discord|Discord)$
431
+# windowrule = workspace special:term, class:^(Alacritty)$
432
+windowrule = workspace special:spot, class:^(Spotify|spotify)$
433
+windowrule = workspace special:adct, class:^(Audacity|audacity)$
434
+windowrule = workspace special:tick, class:^(TickTick|ticktick)$
435
+windowrule = workspace special:bitt, class:^(Bitwarden|bitwarden)$
436
+windowrule = workspace special:zenn, class:^(zen|zen-alpha|Zen Browser)$
waybar2/config.jsoncadded
@@ -0,0 +1,99 @@
1
+{
2
+    "layer": "top",
3
+    "position": "top",
4
+    "height": 30,
5
+    "spacing": 4,
6
+
7
+    "modules-left": [
8
+        "hyprland/workspaces"
9
+    ],
10
+    "modules-center": [
11
+        "custom/weather",
12
+        "hyprland/window"
13
+    ],
14
+    "modules-right": [
15
+        "custom/tailscale",
16
+        "custom/almanta",
17
+        "pulseaudio",
18
+        "network",
19
+        "cpu",
20
+        "memory",
21
+        "clock",
22
+        "custom/jetbrains",
23
+        "tray"
24
+    ],
25
+
26
+    "hyprland/workspaces": {
27
+        "format": "{id}",
28
+        "on-click": "activate"
29
+    },
30
+
31
+    "hyprland/window": {
32
+        "max-length": 50
33
+    },
34
+
35
+    "clock": {
36
+        "format": "{:%H:%M}",
37
+        "format-alt": "{:%Y-%m-%d %H:%M}",
38
+        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
39
+    },
40
+
41
+    "cpu": {
42
+        "format": "{usage}% CPU",
43
+        "tooltip": false
44
+    },
45
+
46
+    "memory": {
47
+        "format": "{}% MEM"
48
+    },
49
+
50
+    "network": {
51
+        "format-wifi": "{essid} ({signalStrength}%)",
52
+        "format-ethernet": "{ipaddr}",
53
+        "format-disconnected": "Disconnected",
54
+        "tooltip-format": "{ifname}: {ipaddr}"
55
+    },
56
+
57
+    "pulseaudio": {
58
+        "format": "{volume}% VOL",
59
+        "format-muted": "MUTED",
60
+        "on-click": "spotify",
61
+        "on-click-right": "pavucontrol"
62
+    },
63
+
64
+    "tray": {
65
+        "spacing": 10
66
+    },
67
+
68
+    "custom/almanta": {
69
+        "format": "{}",
70
+        "return-type": "json",
71
+        "interval": 20,
72
+        "exec": "~/.config/waybar/modules/almanta.sh",
73
+        "on-click": "alacritty -e ssh espadon@almanta",
74
+        "tooltip": true
75
+    },
76
+
77
+    "custom/jetbrains": {
78
+        "format": "JB",
79
+        "tooltip": "Open JetBrains Toolbox",
80
+        "on-click": "jetbrains-toolbox"
81
+    },
82
+
83
+    "custom/weather": {
84
+        "format": "{}",
85
+        "return-type": "json",
86
+        "interval": 1800,
87
+        "exec": "~/.config/waybar/modules/weather.sh",
88
+        "tooltip": true
89
+    },
90
+
91
+    "custom/tailscale": {
92
+        "format": "{}",
93
+        "return-type": "json",
94
+        "interval": 30,
95
+        "exec": "~/.config/waybar/modules/tailscale.sh",
96
+        "on-click": "alacritty -e bash -c 'tailscale status; read -p \"Press Enter to close...\"'",
97
+        "tooltip": true
98
+    }
99
+}
waybar2/modules/almanta.shadded
@@ -0,0 +1,67 @@
1
+#!/usr/bin/env bash
2
+# Simple working version that avoids complex quoting
3
+set -euo pipefail
4
+
5
+HOST="espadon@almanta"
6
+SSH_OPTS=(-T -o BatchMode=yes -o ConnectTimeout=3 -o ConnectionAttempts=1)
7
+
8
+# Test connectivity
9
+if ! ssh "${SSH_OPTS[@]}" "$HOST" "echo 'test'" >/dev/null 2>&1; then
10
+  echo '{"text":"⚬ almanta: down","tooltip":"SSH connection failed","class":"down"}'
11
+  exit 0
12
+fi
13
+
14
+# Get metrics with very simple commands
15
+get_load() {
16
+  ssh "${SSH_OPTS[@]}" "$HOST" "cut -d' ' -f1 /proc/loadavg" 2>/dev/null || echo "?"
17
+}
18
+
19
+get_disk() {
20
+  ssh "${SSH_OPTS[@]}" "$HOST" "df / | tail -1 | awk '{print \$5}' | tr -d '%'" 2>/dev/null || echo "?"
21
+}
22
+
23
+get_memory() {
24
+  ssh "${SSH_OPTS[@]}" "$HOST" "free | grep '^Mem:' | awk '{printf \"%.0f\", (\$3/\$2)*100}'" 2>/dev/null || echo "?"
25
+}
26
+
27
+get_service() {
28
+  # Check for web services
29
+  for service in nginx httpd apache2; do
30
+    if ssh "${SSH_OPTS[@]}" "$HOST" "systemctl is-active --quiet $service" 2>/dev/null; then
31
+      echo "$service|active"
32
+      return
33
+    elif ssh "${SSH_OPTS[@]}" "$HOST" "systemctl list-unit-files | grep -q '^$service\.service'" 2>/dev/null; then
34
+      echo "$service|inactive" 
35
+      return
36
+    fi
37
+  done
38
+  echo "web|unknown"
39
+}
40
+
41
+get_uptime() {
42
+  ssh "${SSH_OPTS[@]}" "$HOST" "uptime -p" 2>/dev/null || echo ""
43
+}
44
+
45
+# Gather all metrics
46
+load=$(get_load)
47
+disk=$(get_disk) 
48
+mem=$(get_memory)
49
+up=$(get_uptime)
50
+
51
+# Get service info
52
+service_info=$(get_service)
53
+IFS='|' read -r svc web <<<"$service_info"
54
+
55
+# Build output - escape newlines properly for JSON
56
+text="⚬ ${svc:-web}  L:$load  M:$mem%  D:$disk%"
57
+tip="almanta (${svc:-—}): ${web:-unknown}\\nload(1m): $load\\nmemory: $mem%\\ndisk /: $disk%\\n$up"
58
+
59
+# Determine class
60
+class="ok"
61
+[ "${web:-unknown}" != "active" ] && class="warn"
62
+[[ "$mem" =~ ^[0-9]+$ ]] && [ "$mem" -ge 90 ] && class="warn"  
63
+[[ "$disk" =~ ^[0-9]+$ ]] && [ "$disk" -ge 90 ] && class="warn"
64
+
65
+# Use jq for proper JSON encoding to handle all special characters
66
+jq -cn --arg text "$text" --arg tooltip "$tip" --arg class "$class" \
67
+  '{text:$text, tooltip:$tooltip, class:$class}'
waybar2/modules/jetbrains_menu.shadded
@@ -0,0 +1,77 @@
1
+#!/usr/bin/env bash
2
+# JetBrains menu for Waybar
3
+# Left click shows IDEs from .desktop files (Toolbox, Flatpak, distro installs)
4
+# Right click (configured in Waybar) opens jetbrains-toolbox
5
+
6
+set -euo pipefail
7
+
8
+# Pick a menu program
9
+if command -v wofi >/dev/null 2>&1; then
10
+  MENU_CMD=(wofi --dmenu -i -p "JetBrains")
11
+elif command -v rofi >/dev/null 2>&1; then
12
+  MENU_CMD=(rofi -dmenu -i -p "JetBrains")
13
+else
14
+  command -v notify-send >/dev/null 2>&1 && notify-send "JetBrains" "Install wofi or rofi for the menu."
15
+  exit 1
16
+fi
17
+
18
+# Directories where .desktop files commonly live
19
+dirs=(
20
+  "$HOME/.local/share/applications"
21
+  "$HOME/.local/share/flatpak/exports/share/applications"
22
+  "/var/lib/flatpak/exports/share/applications"
23
+  "/usr/share/applications"
24
+)
25
+
26
+# Gather JetBrains desktop entries (Toolbox uses jetbrains-*.desktop, Flatpak uses com.jetbrains.*)
27
+mapfile -t files < <(
28
+  for d in "${dirs[@]}"; do
29
+    [[ -d "$d" ]] || continue
30
+    find "$d" -maxdepth 1 -type f \( -name 'jetbrains-*.desktop' -o -name 'com.jetbrains*.desktop' \) -print
31
+  done | awk '!seen[$0]++'
32
+)
33
+
34
+if (( ${#files[@]} == 0 )); then
35
+  if command -v jetbrains-toolbox >/dev/null 2>&1; then
36
+    command -v notify-send >/dev/null 2>&1 && notify-send "JetBrains" "No IDE entries found. Opening Toolbox…"
37
+    nohup jetbrains-toolbox >/dev/null 2>&1 &
38
+    exit 0
39
+  else
40
+    command -v notify-send >/dev/null 2>&1 && notify-send "JetBrains" "No JetBrains IDEs detected."
41
+    exit 0
42
+  fi
43
+fi
44
+
45
+# Build "Name|||desktop-id" lines so we can sort but keep mapping
46
+mapfile -t lines < <(
47
+  for f in "${files[@]}"; do
48
+    id="$(basename "$f" .desktop)"
49
+    name="$(grep -m1 '^Name=' "$f" | cut -d= -f2-)"
50
+    [[ -n "$name" ]] || name="$id"
51
+    printf '%s|||%s\n' "$name" "$id"
52
+  done | sort -f
53
+)
54
+
55
+# Show menu of just the names
56
+selection="$(printf '%s\n' "${lines[@]}" | sed 's/|||.*//' | "${MENU_CMD[@]}")"
57
+[[ -n "$selection" ]] || exit 0
58
+
59
+id="$(printf '%s\n' "${lines[@]}" | awk -F'\|\|\|' -v sel="$selection" '$1==sel{print $2; exit}')"
60
+
61
+# Launch via gtk-launch (preferred), else fall back to Exec= line
62
+if command -v gtk-launch >/dev/null 2>&1; then
63
+  setsid gtk-launch "$id" >/dev/null 2>&1 &
64
+  exit 0
65
+fi
66
+
67
+# Fallback: run the Exec= command from the .desktop file
68
+desktop_file=""
69
+for d in "${dirs[@]}"; do
70
+  [[ -f "$d/$id.desktop" ]] && desktop_file="$d/$id.desktop" && break
71
+done
72
+[[ -z "$desktop_file" ]] && exit 1
73
+
74
+exec_line="$(grep -m1 '^Exec=' "$desktop_file" | cut -d= -f2-)"
75
+# Strip desktop placeholders like %f %u etc.
76
+exec_line="${exec_line//%[fFuUdDnNickvm]/}"
77
+nohup bash -lc "$exec_line" >/dev/null 2>&1 &
waybar2/modules/tailscale.shadded
@@ -0,0 +1,69 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+# Get tailscale status
5
+status_output=$(tailscale status 2>&1) || {
6
+    echo '{"text":"TS: down","tooltip":"Tailscale not running","class":"disconnected"}'
7
+    exit 0
8
+}
9
+
10
+# Check if we're connected (if status command worked, we have output)
11
+if [[ -z "$status_output" ]] || echo "$status_output" | grep -qi "stopped\|not running"; then
12
+    echo '{"text":"TS: off","tooltip":"Tailscale is not running","class":"disconnected"}'
13
+    exit 0
14
+fi
15
+
16
+# Get current hostname
17
+my_hostname=$(tailscale status --self --json 2>/dev/null | jq -r '.Self.HostName // empty' 2>/dev/null) || my_hostname=""
18
+
19
+# Count online devices (lines that don't contain "offline")
20
+online_count=$(echo "$status_output" | grep -v "^#" | grep -v "offline" | grep -c "^[0-9]" 2>/dev/null) || online_count=0
21
+total_count=$(echo "$status_output" | grep -v "^#" | grep -c "^[0-9]" 2>/dev/null) || total_count=0
22
+
23
+# Build tooltip with device list
24
+tooltip="Tailnet Devices ($online_count/$total_count online)"
25
+tooltip+=$'\n'"─────────────────────────────"
26
+
27
+while IFS= read -r line; do
28
+    # Skip comments and empty lines
29
+    [[ "$line" =~ ^# ]] && continue
30
+    [[ -z "$line" ]] && continue
31
+
32
+    # Parse: IP hostname user OS status...
33
+    ip=$(echo "$line" | awk '{print $1}')
34
+    hostname=$(echo "$line" | awk '{print $2}')
35
+    os=$(echo "$line" | awk '{print $4}')
36
+
37
+    # Skip if not a valid IP line
38
+    [[ ! "$ip" =~ ^100\. ]] && continue
39
+
40
+    # Check if online or offline
41
+    if echo "$line" | grep -q "offline"; then
42
+        status_icon="○"
43
+        # Extract last seen info (already includes "ago")
44
+        last_seen=$(echo "$line" | grep -oP 'last seen \K[^,]+' | sed 's/ *$//' || echo "")
45
+        device_info="$status_icon $hostname ($os) - offline"
46
+        [[ -n "$last_seen" ]] && device_info="$status_icon $hostname ($os) - $last_seen"
47
+    else
48
+        status_icon="●"
49
+        device_info="$status_icon $hostname ($os) - $ip"
50
+    fi
51
+
52
+    # Mark current device
53
+    if [[ "$hostname" == "$my_hostname" ]]; then
54
+        device_info="$device_info [this device]"
55
+    fi
56
+
57
+    tooltip+=$'\n'"$device_info"
58
+done <<< "$status_output"
59
+
60
+# Determine class based on status
61
+if [[ "$online_count" -gt 0 ]]; then
62
+    class="connected"
63
+else
64
+    class="partial"
65
+fi
66
+
67
+# Output JSON
68
+jq -cn --arg text "TS: $online_count" --arg tooltip "$tooltip" --arg class "$class" \
69
+    '{text:$text, tooltip:$tooltip, class:$class}'
waybar2/modules/weather.shadded
@@ -0,0 +1,79 @@
1
+#!/bin/bash
2
+
3
+cachedir=~/.cache/rbn
4
+cachefile=${0##*/}-$1
5
+
6
+if [ ! -d $cachedir ]; then
7
+    mkdir -p $cachedir
8
+fi
9
+
10
+if [ ! -f $cachedir/$cachefile ]; then
11
+    touch $cachedir/$cachefile
12
+fi
13
+
14
+# Save current IFS
15
+SAVEIFS=$IFS
16
+# Change IFS to new line.
17
+IFS=$'\n'
18
+
19
+cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile")))
20
+if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then
21
+    data=($(curl -s https://en.wttr.in/$1\?0qnT 2>&1))
22
+    echo ${data[0]} | cut -f1 -d, > $cachedir/$cachefile
23
+    echo ${data[1]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile
24
+    echo ${data[2]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile
25
+fi
26
+
27
+weather=($(cat $cachedir/$cachefile))
28
+
29
+# Restore IFSClear
30
+IFS=$SAVEIFS
31
+
32
+temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]])+\.\./\1 to /g')
33
+
34
+#echo ${weather[1]##*,}
35
+
36
+# https://fontawesome.com/icons?s=solid&c=weather
37
+case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in
38
+"clear" | "sunny")
39
+    condition=""
40
+    ;;
41
+"partly cloudy")
42
+    condition="杖"
43
+    ;;
44
+"cloudy")
45
+    condition=""
46
+    ;;
47
+"overcast")
48
+    condition=""
49
+    ;;
50
+"mist" | "fog" | "freezing fog")
51
+    condition=""
52
+    ;;
53
+"patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "rain")
54
+    condition=""
55
+    ;;
56
+"moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower")
57
+    condition=""
58
+    ;;
59
+"patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers")
60
+    condition="ﭽ"
61
+    ;;
62
+"blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers")
63
+    condition="流"
64
+    ;;
65
+"blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers")
66
+    condition="ﰕ"
67
+    ;;
68
+"thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder")
69
+    condition=""
70
+    ;;
71
+*)
72
+    condition=""
73
+    echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
74
+    ;;
75
+esac
76
+
77
+#echo $temp $condition
78
+
79
+echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
waybar2/style.cssadded
@@ -0,0 +1,106 @@
1
+* {
2
+    font-family: monospace;
3
+    font-size: 13px;
4
+}
5
+
6
+window#waybar {
7
+    background-color: rgba(40, 42, 54, 0.9);
8
+    color: #f8f8f2;
9
+    border-bottom: 2px solid rgba(51, 204, 255, 0.5);
10
+}
11
+
12
+#workspaces button {
13
+    padding: 0 8px;
14
+    background-color: transparent;
15
+    color: #6272a4;
16
+    border-bottom: 2px solid transparent;
17
+}
18
+
19
+#workspaces button:hover {
20
+    background-color: rgba(68, 71, 90, 0.5);
21
+}
22
+
23
+#workspaces button.active {
24
+    color: #33ccff;
25
+    border-bottom: 2px solid #33ccff;
26
+}
27
+
28
+#workspaces button.urgent {
29
+    background-color: #ff5555;
30
+}
31
+
32
+#window {
33
+    color: #f8f8f2;
34
+}
35
+
36
+#clock,
37
+#cpu,
38
+#memory,
39
+#network,
40
+#pulseaudio,
41
+#tray,
42
+#custom-almanta,
43
+#custom-jetbrains,
44
+#custom-tailscale {
45
+    padding: 0 10px;
46
+}
47
+
48
+#custom-almanta {
49
+    color: #50fa7b;
50
+}
51
+
52
+#custom-jetbrains {
53
+    color: #ff79c6;
54
+}
55
+
56
+#custom-weather {
57
+    color: #8be9fd;
58
+}
59
+
60
+#custom-almanta.warn {
61
+    color: #ffb86c;
62
+}
63
+
64
+#custom-almanta.down {
65
+    color: #ff5555;
66
+}
67
+
68
+#clock {
69
+    color: #33ccff;
70
+}
71
+
72
+#cpu {
73
+    color: #00ff99;
74
+}
75
+
76
+#memory {
77
+    color: #bd93f9;
78
+}
79
+
80
+#network {
81
+    color: #8be9fd;
82
+}
83
+
84
+#network.disconnected {
85
+    color: #ff5555;
86
+}
87
+
88
+#pulseaudio {
89
+    color: #f1fa8c;
90
+}
91
+
92
+#pulseaudio.muted {
93
+    color: #6272a4;
94
+}
95
+
96
+#custom-tailscale {
97
+    color: #50fa7b;
98
+}
99
+
100
+#custom-tailscale.partial {
101
+    color: #ffb86c;
102
+}
103
+
104
+#custom-tailscale.disconnected {
105
+    color: #ff5555;
106
+}