2531c32d8beeca16a998fd5a6ab4742eb564198f

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add hyprland, uwsm, and waybar configs

Diff

This diff is truncated to protect this page.

  1diff --git a/dot_config/hypr/hyprland.conf.tmpl b/dot_config/hypr/hyprland.conf.tmpl
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..46bc22848800ae4be0c06fe82c82285c7e2ff8a6
  4--- /dev/null
  5+++ b/dot_config/hypr/hyprland.conf.tmpl
  6@@ -0,0 +1,284 @@
  7+# vim: set ft=hyprlang:
  8+# See https://wiki.hyprland.org/Configuring/Monitors/
  9+{{ range $id, $settings := .hyprland.monitors }}monitor = {{ $id }}, {{ $settings }}
 10+{{ end }}
 11+
 12+# See https://wiki.hyprland.org/Configuring/Keywords/
 13+# Set programs that you use
 14+$terminal = ghostty
 15+$fileManager = dolphin
 16+$menu = rofi -show drun
 17+$animation_speed = 1.5
 18+
 19+# Autostart necessary processes (like notifications daemons, status bars, etc.)
 20+# Or execute your favorite apps at launch like this:
 21+
 22+# exec-once = $terminal
 23+# exec-once = nm-applet &
 24+# exec-once = waybar & hyprpaper & firefox
 25+exec-once = waybar -c ~/.config/waybar/config.jsonc
 26+exec-once = hyprpm reload -n
 27+
 28+# LOOK AND FEEL
 29+# Refer to https://wiki.hyprland.org/Configuring/Variables/
 30+
 31+# https://wiki.hyprland.org/Configuring/Variables/#general
 32+general {
 33+    layout = hy3
 34+    gaps_in = 0
 35+    gaps_out = 0
 36+    border_size = 2
 37+
 38+    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
 39+    col.active_border = rgba(504945ff)
 40+    col.inactive_border = rgba(282828ff)
 41+
 42+    # Set to true enable resizing windows by clicking and dragging on borders and gaps
 43+    resize_on_border = false
 44+
 45+    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
 46+    allow_tearing = true
 47+}
 48+
 49+plugin {
 50+  hy3 {
 51+    # policy controlling what happens when a node is removed from a group,
 52+    # leaving only a group
 53+    # 0 = remove the nested group
 54+    # 1 = keep the nested group
 55+    # 2 = keep the nested group only if its parent is a tab group
 56+    node_collapse_policy = 2
 57+
 58+    # offset from group split direction when only one window is in a group
 59+    group_inset = 10
 60+
 61+    # if a tab group will automatically be created for the first window spawned in a workspace
 62+    tab_first_window = false
 63+
 64+    # tab group settings
 65+    tabs {
 66+      # height of the tab bar
 67+      height = 26
 68+
 69+      # padding between the tab bar and its focused node
 70+      padding = 0
 71+      # the tab bar should animate in/out from the top instead of below the window
 72+      from_top = true
 73+      radius = 0
 74+      blur = false
 75+      no_gaps_when_only = true
 76+
 77+      # Window title text
 78+      text_center = false
 79+      text_font = IosevkaTerm NFP
 80+      text_height = 14
 81+      # left padding
 82+      text_padding = 8
 83+
 84+      # active tab bar segment colors
 85+      col.active = rgba(504945ff)
 86+      col.border.active = rgba(504945ff)
 87+      col.text.active = rgba(ebdbb2ff)
 88+
 89+      # urgent tab bar segment colors
 90+      col.urgent = rgba(d79921ff)
 91+      col.border.urgent = rgba(d79921ff)
 92+      col.text.urgent = rgba(282828ff)
 93+
 94+      # inactive tab bar segment colors
 95+      col.inactive = rgba(282828ff)
 96+      col.border.inactive = rgba(282828ff)
 97+      col.text.inactive = rgba(a89984ff)
 98+    }
 99+  }
100+}
101+
102+# https://wiki.hyprland.org/Configuring/Variables/#decoration
103+decoration {
104+    rounding = 0
105+    active_opacity = 1.0
106diff --git a/dot_config/uwsm/env b/dot_config/uwsm/env
107new file mode 100644
108index 0000000000000000000000000000000000000000..a0d32b908cd4fb31c56966bca284ba0c6c3b609f
109--- /dev/null
110+++ b/dot_config/uwsm/env
111@@ -0,0 +1,36 @@
112+# Localization
113+export LANG="en_US.UTF-8"
114+export LC_ALL="en_DK.UTF-8"
115+
116+# System config
117+export PATH="$HOME/.local/bin:$PATH:$GOBIN:$HOME/.cargo/bin"
118+export XDG_CONFIG_HOME="$HOME/.config"
119+export XDG_CURRENT_DESKTOP=Hyprland
120+export XDG_SESSION_TYPE=wayland
121+export XDG_SESSION_DESKTOP=Hyprland
122+
123+# Hyprland config
124+export HYPRLAND_NO_SD_NOTIFY=1
125+export HYPRLAND_NO_SD_VARS=1
126+export AQ_MGPU_NO_EXPLICIT=1
127+
128+# Toolkit settings
129+export GDK_BACKEND=wayland,x11,*
130+export XCURSOR_THEME=Breeze_Light
131+export XCURSOR_SIZE=24
132+export HYPRCURSOR_SIZE=24
133+export QT_QPA_PLATFORM=wayland;xcb
134+export QT_QPA_PLATFORMTHEME=qt6ct
135+export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
136+export QT_WAYLAND_FORCE_DPI="physical"
137+export GTK_THEME=Breeze-Dark
138+export SDL_VIDEODRIVER=wayland
139+export CLUTTER_BACKEND=wayland
140+
141+# Mozilla
142+export MOZ_ENABLE_WAYLAND="1"
143+export MOZ_WEBRENDER="1"
144+export MOZ_USE_XINPUT2="1"
145+
146+# Valve shader compiler
147+export RADV_PERFTEST="aco"
148diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc
149new file mode 100644
150index 0000000000000000000000000000000000000000..e1eb3cda5a10fbc95d870eaa29f36aef9a542bf2
151--- /dev/null
152+++ b/dot_config/waybar/config.jsonc
153@@ -0,0 +1,270 @@
154+{
155+	"layer": "top",
156+	"position": "top",
157+	"reload_style_on_change": true,
158+	"modules-left": [
159+		"hyprland/workspaces"
160+	],
161+	"modules-right": [
162+		"custom/arrow_left_end",
163+		"mpris",
164+		"custom/arrow_left",
165+		"pulseaudio",
166+		"custom/arrow_left_alt",
167+		"network",
168+		"custom/arrow_left",
169+		"memory",
170+		"custom/arrow_left_alt",
171+		"cpu",
172+		"custom/arrow_left",
173+		"temperature",
174+		"custom/arrow_left_alt",
175+		"battery",
176+		"custom/arrow_left",
177+		"hyprland/language",
178+		"custom/arrow_left_alt",
179+		"clock#date",
180+		"custom/arrow_left",
181+		"clock#time"
182+	],
183+	"mpris": {
184+		"format": "{player_icon} {dynamic}",
185+		"format-paused": "{status_icon} {dynamic}",
186+		"player-icons": {
187+			"default": ""
188+		},
189+		"status-icons": {
190+			"paused": ""
191+		},
192+		"player": "Deezer"
193+	},
194+	"battery": {
195+		"interval": 10,
196+		"states": {
197+			"warning": 30,
198+			"critical": 10
199+		},
200+		"format-time": "{H}:{M:02}",
201+		"format": "{icon} {capacity}% ({time})",
202+		"format-charging": " {capacity}% ({time})",
203+		"format-charging-full": " {capacity}%",
204+		"format-full": "{icon} {capacity}%",
205+		"format-alt": "{icon} {power}W",
206+		"format-icons": [
207+			"",
208+			"",
209+			"",
210+			"",
211+			""
212+		],
213+		"tooltip": false
214+	},
215+	"clock#time": {
216+		"interval": 1,
217+		"format": "{:%H:%M:%S}",
218+		"tooltip": false
219+	},
220+	"clock#date": {
221+		"interval": 20,
222+		"format": "{:%a %Y-%m-%e}",
223+		"tooltip": true,
224+		"tooltip-format": "<tt><small>{calendar}</small></tt>",
225+		"calendar": {
226+			"mode": "month",
227+			"mode-mon-col": 3,
228+			"weeks-pos": "",
229+			"on-scroll": 1,
230+			"format": {
231+				"months": "<span color='#ebdbb2'><b>{}</b></span>",
232+				"days": "<span color='#ebdbb2'><b>{}</b></span>",
233+				"weekdays": "<span color='#d79921'><b>{}</b></span>",
234+				"today": "<span color='#cc241d'><b><u>{}</u></b></span>"
235+			}
236+		},
237+		"actions": {
238+			"on-click-right": "mode",
239+			"on-click-middle": "shift_reset",
240+			"on-scroll-up": "shift_up",
241+			"on-scroll-down": "shift_down"
242+		}
243+	},
244+	"cpu": {
245+		"interval": 5,
246+		"tooltip": false,
247+		"format": " {usage}%",
248+		"format-alt": " {load}",
249+		"states": {
250+			"warning": 70,
251+			"critical": 90
252+		}
253diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css
254new file mode 100644
255index 0000000000000000000000000000000000000000..a91cd0f62c9084a61277f5a4e28e21ed4d4d217d
256--- /dev/null
257+++ b/dot_config/waybar/style.css
258@@ -0,0 +1,182 @@
259+@keyframes blink-critical {
260+	to {
261+		color: @red;
262+	}
263+}
264+
265+@define-color bg_dark #1d2021;
266+@define-color bg      #282828;
267+@define-color bg_alt  #3c3836;
268+@define-color bg2     #504945;
269+@define-color bg3     #665c54;
270+@define-color bg4     #7c6f64;
271+
272+@define-color gray0   #928374;
273+@define-color gray1   #a89984;
274+
275+@define-color fg      #fbf1c7;
276+@define-color fg1     #ebdbb2;
277+@define-color fg2     #d5c4a1;
278+@define-color fg3     #bdae93;
279+@define-color fg4     #a89984;
280+
281+@define-color red     #cc241d;
282+@define-color green   #98971a;
283+@define-color yellow  #d79921;
284+@define-color blue    #458588;
285+@define-color purple  #b16286;
286+@define-color aqua    #689d6a;
287+@define-color orange  #d65d0e;
288+
289+@define-color red_bright     #fb4934;
290+@define-color green_bright   #b8bb26;
291+@define-color yellow_bright  #fabd2f;
292+@define-color blue_bright    #83a598;
293+@define-color purple_bright  #d3869b;
294+@define-color aqua_bright    #8ec07c;
295+@define-color orange_bright  #fe8019;
296+
297+* {
298+	border: none;
299+	border-radius: 0;
300+	min-height: 0;
301+	margin: 0;
302+	padding: 0;
303+	box-shadow: none;
304+	text-shadow: none;
305+	-gtk-icon-shadow: none;
306+}
307+
308+#waybar {
309+	background: @bg_dark;
310+	color: @fg;
311+	font-family: IosevkaTerm NFP;
312+	font-size: 14pt;
313+}
314+
315+#battery,
316+#privacy,
317+#clock,
318+#cpu,
319+#language,
320+#memory,
321+#network,
322+#pulseaudio,
323+#temperature,
324+#tray,
325+#backlight,
326+#idle_inhibitor,
327+#disk,
328+#user,
329+#mpris {
330+	padding-left: 8pt;
331+	padding-right: 8pt;
332+}
333+
334+#memory.critical,
335+#cpu.critical,
336+#temperature.critical,
337+#battery.critical.discharging {
338+	animation-timing-function: linear;
339+	animation-iteration-count: infinite;
340+	animation-direction: alternate;
341+	animation-name: blink-critical;
342+	animation-duration: 1s;
343+}
344+
345+#network.disconnected,
346+#memory.warning,
347+#cpu.warning,
348+#temperature.warning,
349+#battery.warning.discharging {
350+	color: @yellow_bright;
351+}
352+
353+#workspaces button {
354+	padding-left: 5pt;
355+	padding-right: 4pt;
356+	margin-right: 3pt;
357+	color: @fg;
358diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl
359index 450c566d5830a01b22241ffb5803741fdbab1b31..ce5cd19b85b173e6abccba54dbda977e5d1268d0 100644
360--- a/dot_zshrc.tmpl
361+++ b/dot_zshrc.tmpl
362@@ -103,11 +103,12 @@ eval "$(zoxide init zsh)"
363 
364 if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && [[ $(tty) = /dev/tty1 ]]; then
365 	# hyprland on tty1
366-    exec uwsm start hyprland.desktop
367+	exec uwsm start hyprland.desktop
368 elif [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && [[ $(tty) = /dev/tty1 ]] && uwsm check may-start; then
369 	# sway on tty2
370+	source ~/.config/uwsm/env
371 	exec sway
372 elif [[ $(tty) =~ "/dev/tty[0-9]" ]]; then
373-    # Enable unicode characters in the tty
374-    unicode_start
375+	# Enable unicode characters in the tty
376+	unicode_start
377 fi