Skip to content

Commit 563ff4e

Browse files
committed
feat: migrate Hyprland config from hyprlang to Lua
Converts all source files from .conf (hyprlang) to .lua for Hyprland's native Lua config mode. - hyprland.lua: new Lua entry point; hyprland.conf kept as stub - source/*.lua: all modules rewritten in Lua syntax - source/animations/*.lua: all animation presets converted - edit_here/: user-editable Lua overrides replace .conf equivalents - hypr_lua_proxy.py: asyncio command-socket proxy that translates old-style dispatch strings (workspace N, movetoworkspace, etc.) into valid Lua expressions; event socket handled by socat - waybar_autostart.sh: starts proxy + socat relay before launching waybar; race-safe socket detection retries until Hyprland socket is ready - dusky_waybars.sh: uses systemd-run --setenv to inject proxy signature - keybindings.sh: graceful notice for __lua dispatcher (non-replayable) - rofi_mako.sh: replace hyprctl dispatch exec with uwsm-app - dusky_session.sh: Lua dispatch syntax for exit and workspace - spotify_toggle.sh: Lua dispatch syntax for special workspace - dusky_config.yaml: CC reload feedback, Lua config badge, waybar fix - matugen/config.toml: add hyprctl reload post_hook to hyprland_lua template so border/decoration colors update on wallpaper change - matugen/templates/razer_sync.sh: sync theme color to Razer keyboard via Polychromatic; skips silently if not installed or no device found
1 parent 0030cb1 commit 563ff4e

124 files changed

Lines changed: 4426 additions & 1404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ==============================================================================
2+
# USER CONFIGURATION OVERLAY
3+
# ==============================================================================
4+
# This file sources all your custom configuration files.
5+
# Edit the specific files in 'source/' to apply your changes.
6+
# ==============================================================================
7+
8+
source = ~/.config/hypr/edit_here/source/monitors.conf
9+
source = ~/.config/hypr/edit_here/source/keybinds.conf
10+
source = ~/.config/hypr/edit_here/source/appearance.conf
11+
source = ~/.config/hypr/edit_here/source/autostart.conf
12+
source = ~/.config/hypr/edit_here/source/plugins.conf
13+
source = ~/.config/hypr/edit_here/source/window_rules.conf
14+
source = ~/.config/hypr/edit_here/source/workspace_rules.conf
15+
source = ~/.config/hypr/edit_here/source/environment_variables.conf
16+
source = ~/.config/hypr/edit_here/source/input.conf
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- =============================================================================
2+
-- USER CONFIGURATION OVERLAY
3+
-- =============================================================================
4+
-- This file sources all your custom configuration files.
5+
-- Edit the specific files in 'source/' to apply your changes.
6+
-- =============================================================================
7+
8+
local src = os.getenv("HOME") .. "/.config/hypr/edit_here/source/"
9+
10+
dofile(src .. "monitors.lua")
11+
dofile(src .. "keybinds.lua")
12+
dofile(src .. "appearance.lua")
13+
dofile(src .. "autostart.lua")
14+
dofile(src .. "plugins.lua")
15+
dofile(src .. "window_rules.lua")
16+
dofile(src .. "workspace_rules.lua")
17+
dofile(src .. "environment_variables.lua")
18+
dofile(src .. "input.lua")
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# ==============================================================================
2+
# USER CONFIGURATION: appearance.conf
3+
# ==============================================================================
4+
# Add your custom settings for appearance here.
5+
# These will override or add to the defaults found in ~/.config/hypr/source/appearance.conf
6+
# This file can also be edited with dusky appearance from the rofi menu or from dusky control center
7+
# ==============================================================================
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# THEME SOURCE
11+
# -------------------------------------------------------------------------------------------------
12+
# Sourcing colors generated by Matugen
13+
source = ~/.config/matugen/generated/hyprland-colors.conf
14+
15+
# -------------------------------------------------------------------------------------------------
16+
# 1. GENERAL APPEARANCE
17+
# Control gaps, borders, and layout behavior.
18+
# See: https://wiki.hyprland.org/Configuring/Variables/#general
19+
# -------------------------------------------------------------------------------------------------
20+
general {
21+
# --- Gaps & Borders ---
22+
gaps_in = 6 # Gap between windows
23+
gaps_out = 12 # Gap between windows and monitor edges
24+
gaps_workspaces = 0 # Gap between workspaces (when sliding)
25+
border_size = 2 # Size of window borders
26+
27+
# --- Colors ---
28+
# Uses variables from the sourced matugen file
29+
col.active_border = $primary
30+
col.inactive_border = $inverse_on_surface
31+
32+
# --- Behavior ---
33+
# RESIZING: Set to true. This allows you to resize windows by clicking and dragging
34+
# on the gaps/border area, rather than hitting the exact 2px pixel border.
35+
resize_on_border = false
36+
37+
# TEARING: Allows lower latency in games.
38+
# NOTE: To use this, you must also apply 'windowrulev2 = immediate, class:^(game_class)$'
39+
allow_tearing = true
40+
41+
# Default layout engine
42+
layout = dwindle
43+
44+
# --- Snapping ---
45+
# Controls how floating windows snap to each other and edges
46+
snap {
47+
enabled = false
48+
window_gap = 10 # Min gap (px) before snapping to another window
49+
monitor_gap = 10 # Min gap (px) before snapping to monitor edge
50+
border_overlap = false # If true, windows snap with overlapping borders
51+
}
52+
}
53+
54+
# -------------------------------------------------------------------------------------------------
55+
# 2. DECORATION
56+
# Shadows, Blur, Opacity, and Rounding.
57+
# See: https://wiki.hyprland.org/Configuring/Variables/#decoration
58+
# -------------------------------------------------------------------------------------------------
59+
decoration {
60+
# --- Rounding ---
61+
rounding = 6
62+
rounding_power = 6.0
63+
64+
# --- Opacity ---
65+
active_opacity = 0.8
66+
inactive_opacity = 0.6
67+
fullscreen_opacity = 1.0
68+
69+
# --- Dimming ---
70+
dim_inactive = true
71+
dim_strength = 0.2
72+
dim_special = 0.8 # Stronger dimming for special workspace
73+
74+
# --- Shadows ---
75+
# Enabled because your hardware (12700H) can easily handle it.
76+
shadow {
77+
enabled = true
78+
range = 35
79+
render_power = 2 # 1-4. Higher is faster falloff (sharper looking)
80+
sharp = false # If true, renders a sharp shadow (retro style)
81+
scale = 1.0 # Scale of the shadow (1.0 = window size)
82+
color = rgba(1a1a1aee)
83+
# color = $primary
84+
# offset = 0 0 # Displaces shadow (x, y)
85+
}
86+
87+
# --- Blur ---
88+
# Enabled for aesthetic depth.
89+
blur {
90+
enabled = true
91+
size = 4 # Radius
92+
passes = 2 # Quality (2 is a good balance of perf/looks)
93+
new_optimizations = true
94+
ignore_opacity = true # Blurs behind transparent windows even if opacity is high
95+
xray = true
96+
97+
# Texture & Quality
98+
noise = 0.0217
99+
contrast = 0.8916 # Contrast modulation for blur
100+
brightness = 0.8172 # Brightness modulation for blur
101+
vibrancy = 0.1696 # Saturation of blurred colors
102+
103+
# Specifics
104+
popups = false # Whether to blur right-click menus/popups
105+
}
106+
107+
# --- Shaders ---
108+
# screen_shader = ~/.config/hypr/shaders/grayscale_advanced.glsl
109+
}
110+
111+
# -------------------------------------------------------------------------------------------------
112+
# 3. ANIMATIONS
113+
# See: https://wiki.hyprland.org/Configuring/Animations/
114+
# -------------------------------------------------------------------------------------------------
115+
116+
source = ~/.config/hypr/source/animations/active/active.conf
117+
118+
# -------------------------------------------------------------------------------------------------
119+
# 4. LAYOUTS
120+
# -------------------------------------------------------------------------------------------------
121+
dwindle {
122+
preserve_split = true
123+
# smart_split = false # If true, splits based on mouse position.
124+
# smart_resizing = false # If true, resizing direction is determined by mouse pos.
125+
}
126+
127+
master {
128+
new_status = master
129+
}
130+
131+
# -------------------------------------------------------------------------------------------------
132+
# 5. MISCELLANEOUS & PERFORMANCE
133+
# See: https://wiki.hyprland.org/Configuring/Variables/#misc
134+
# -------------------------------------------------------------------------------------------------
135+
misc {
136+
force_default_wallpaper = 1 # Set to 0 to enable the anime mascot
137+
disable_hyprland_logo = true
138+
disable_splash_rendering = true
139+
}
140+
141+
# -------------------------------------------------------------------------------------------------
142+
# 6. BINDS (Visual specific)
143+
# -------------------------------------------------------------------------------------------------
144+
binds {
145+
allow_pin_fullscreen = true
146+
}
147+
148+
# debug {
149+
# overlay = true
150+
# }
151+
# -------------------------------------------------------------------------------------------------
152+
# 7. SMART GAPS (Single Window Override)
153+
# Applied automatically when only 1 window is tiled or fullscreened on a workspace.
154+
# -------------------------------------------------------------------------------------------------
155+
$single_window_gap = 10
156+
workspace = w[tv1], gapsout:$single_window_gap, gapsin:0
157+
workspace = f[1], gapsout:$single_window_gap, gapsin:0
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
-- =============================================================================
2+
-- USER CONFIGURATION: appearance.lua
3+
-- =============================================================================
4+
-- Add your custom appearance settings here.
5+
-- These will override or add to the defaults found in
6+
-- ~/.config/hypr/source/appearance.lua
7+
-- This file can also be edited with:
8+
-- dusky appearance (from the Rofi menu or Dusky Control Center)
9+
-- =============================================================================
10+
11+
local home = os.getenv("HOME")
12+
13+
-- THEME SOURCE: Load colors generated by Matugen
14+
dofile(home .. "/.config/matugen/generated/hyprland-colors.lua")
15+
16+
-- -------------------------------------------------------------------------------------------------
17+
-- 1. GENERAL APPEARANCE — override defaults
18+
-- -------------------------------------------------------------------------------------------------
19+
hl.config({
20+
general = {
21+
gaps_in = 6,
22+
gaps_out = 12,
23+
gaps_workspaces = 0,
24+
border_size = 2,
25+
26+
-- Colors from Matugen (globals set by hyprland-colors.lua above)
27+
col = {
28+
active_border = primary,
29+
inactive_border = inverse_on_surface,
30+
},
31+
32+
resize_on_border = false,
33+
allow_tearing = true,
34+
layout = "dwindle",
35+
36+
snap = {
37+
enabled = false,
38+
window_gap = 10,
39+
monitor_gap = 10,
40+
border_overlap = false,
41+
},
42+
},
43+
})
44+
45+
-- -------------------------------------------------------------------------------------------------
46+
-- 2. DECORATION
47+
-- -------------------------------------------------------------------------------------------------
48+
hl.config({
49+
decoration = {
50+
rounding = 6,
51+
rounding_power = 6.0,
52+
53+
active_opacity = 0.8,
54+
inactive_opacity = 0.6,
55+
fullscreen_opacity = 1.0,
56+
57+
dim_inactive = true,
58+
dim_strength = 0.2,
59+
dim_special = 0.8,
60+
61+
shadow = {
62+
enabled = true,
63+
range = 35,
64+
render_power = 2,
65+
sharp = false,
66+
scale = 1.0,
67+
color = "rgba(1a1a1aee)",
68+
},
69+
70+
blur = {
71+
enabled = true,
72+
size = 4,
73+
passes = 2,
74+
new_optimizations = true,
75+
ignore_opacity = true,
76+
xray = true,
77+
78+
noise = 0.0217,
79+
contrast = 0.8916,
80+
brightness = 0.8172,
81+
vibrancy = 0.1696,
82+
83+
popups = false,
84+
},
85+
},
86+
})
87+
88+
-- -------------------------------------------------------------------------------------------------
89+
-- 3. ANIMATIONS — load the currently active preset
90+
-- -------------------------------------------------------------------------------------------------
91+
dofile(home .. "/.config/hypr/source/animations/active/active.lua")
92+
93+
-- -------------------------------------------------------------------------------------------------
94+
-- 4. LAYOUTS
95+
-- -------------------------------------------------------------------------------------------------
96+
hl.config({
97+
dwindle = { preserve_split = true },
98+
master = { new_status = "master" },
99+
})
100+
101+
-- -------------------------------------------------------------------------------------------------
102+
-- 5. MISCELLANEOUS & PERFORMANCE
103+
-- -------------------------------------------------------------------------------------------------
104+
hl.config({
105+
misc = {
106+
force_default_wallpaper = 1,
107+
disable_hyprland_logo = true,
108+
disable_splash_rendering = true,
109+
},
110+
})
111+
112+
-- -------------------------------------------------------------------------------------------------
113+
-- 6. BINDS (Visual specific)
114+
-- -------------------------------------------------------------------------------------------------
115+
hl.config({
116+
binds = { allow_pin_fullscreen = true },
117+
})
118+
119+
-- -------------------------------------------------------------------------------------------------
120+
-- 7. SMART GAPS (Single Window Override)
121+
-- Applied automatically when only 1 window is tiled or fullscreened on a workspace.
122+
-- -------------------------------------------------------------------------------------------------
123+
local single_window_gap = 10
124+
hl.workspace_rule({ workspace = "w[tv1]", gaps_out = single_window_gap, gaps_in = 0 })
125+
hl.workspace_rule({ workspace = "f[1]", gaps_out = single_window_gap, gaps_in = 0 })
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ==============================================================================
2+
# USER CONFIGURATION: autostart.conf
3+
# ==============================================================================
4+
# Add your custom settings for autostart here.
5+
# These will override or add to the defaults found in ~/.config/hypr/source/autostart.conf
6+
# ==============================================================================
7+
8+
# Set pipewire buffer size to 128
9+
exec-once = pw-metadata -n settings 0 clock.force-quantum 128
10+
11+
# Autostart solaar
12+
exec-once = solaar --window=hide
13+
14+
# Create the headless output (it will be HEADLESS-2 based on your logs)
15+
exec-once = hyprctl output create headless
16+
17+
# Start Sunshine as a child process so it inherits the socket signature
18+
exec-once = bash -c "sleep 2 && sunshine"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-- =============================================================================
2+
-- USER CONFIGURATION: autostart.lua
3+
-- =============================================================================
4+
-- Add your custom autostart entries here.
5+
-- These will override or add to the defaults found in
6+
-- ~/.config/hypr/source/autostart.lua
7+
-- =============================================================================
8+
9+
local home = os.getenv("HOME")
10+
11+
-- Set pipewire buffer size to 128 (reduces audio latency)
12+
hl.on("hyprland.start", function()
13+
hl.exec_cmd("pw-metadata -n settings 0 clock.force-quantum 128")
14+
end)
15+
16+
-- Autostart solaar (Logitech peripheral manager) — hidden in tray
17+
hl.on("hyprland.start", function()
18+
hl.exec_cmd("solaar --window=hide")
19+
end)
20+
21+
-- Create a headless virtual output (used for Sunshine/Moonlight streaming)
22+
-- It will appear as HEADLESS-2 based on your monitor config
23+
hl.on("hyprland.start", function()
24+
hl.exec_cmd("hyprctl output create headless")
25+
end)
26+
27+
-- Start Sunshine as a child process so it inherits the Hyprland socket signature
28+
hl.on("hyprland.start", function()
29+
hl.exec_cmd("bash -c 'sleep 2 && sunshine'")
30+
end)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ==============================================================================
2+
# USER CONFIGURATION: default_apps.conf
3+
# ==============================================================================
4+
# Override default applications here.
5+
# These variables are sourced at the very top of hyprland.conf so they
6+
# are available for use in all other configuration files.
7+
# ==============================================================================
8+
9+
$terminal = kitty
10+
$fileManager = nemo
11+
$menu = rofi -show drun
12+
$browser = firefox
13+
$textEditor = gnome-text-editor
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- =============================================================================
2+
-- USER CONFIGURATION: default_apps.lua
3+
-- =============================================================================
4+
-- Override default applications here.
5+
-- These globals are set before all other config files load, so they are
6+
-- available everywhere.
7+
-- =============================================================================
8+
9+
terminal = "kitty"
10+
fileManager = "nemo"
11+
menu = "rofi -show drun"
12+
browser = "firefox"
13+
textEditor = "gnome-text-editor"

0 commit comments

Comments
 (0)