move to example files for custom config

This commit is contained in:
2026-10-14 17:40:01 +02:00
parent 30ee4caad9
commit d825277ed5
17 changed files with 99 additions and 31 deletions
+1 -1
View File
@@ -1 +1 @@
custom/*.lua
+9
View File
@@ -0,0 +1,9 @@
-- Machine-specific autostart. Loaded after hyprland/autostart.lua.
-- Usage: cp autostart.example autostart.lua (autostart.lua is ignored by git)
-- https://wiki.hypr.land/Configuring/Autostart/
-- hl.on("hyprland.start", function()
-- hl.exec_cmd("some-program")
-- end)
-- vim: ft=lua
-6
View File
@@ -1,6 +0,0 @@
-- User-specific autostart. Loaded after hyprland/autostart.lua.
hl.on("hyprland.start", function()
hl.exec_cmd("dbus-update-activation-environment --systemd --all")
hl.exec_cmd("systemctl --user start hyprland-session.target")
end)
+7
View File
@@ -0,0 +1,7 @@
-- Machine-specific environment variables. Loaded after hyprland/environments.lua.
-- Usage: cp environments.example environments.lua (environments.lua is ignored by git)
-- https://wiki.hypr.land/Configuring/Environment-variables/
-- hl.env("XCURSOR_SIZE", "24")
-- vim: ft=lua
-1
View File
@@ -1 +0,0 @@
-- User-specific environment variables. Loaded after hyprland/environments.lua.
+8
View File
@@ -0,0 +1,8 @@
-- Machine-specific input config (kb_layout, per-device, gestures). Loaded after hyprland/inputs.lua.
-- Usage: cp inputs.example inputs.lua (inputs.lua is ignored by git)
-- List your devices with: hyprctl devices
-- https://wiki.hypr.land/Configuring/Variables/#input
-- hl.device({ name = "my-mouse-name", sensitivity = -0.5 })
-- vim: ft=lua
-3
View File
@@ -1,3 +0,0 @@
-- User-specific input config (kb_layout, per-device, gestures). Loaded after hyprland/inputs.lua.
hl.device({ name = "logitech-g-pro--1", sensitivity = -0.8 })
+7
View File
@@ -0,0 +1,7 @@
-- Machine-specific keybinds. Loaded after hyprland/keybinds.lua.
-- Usage: cp keybinds.example keybinds.lua (keybinds.lua is ignored by git)
-- https://wiki.hypr.land/Configuring/Binds/
-- hl.bind("SUPER + B", hl.dsp.exec_cmd("firefox"))
-- vim: ft=lua
-1
View File
@@ -1 +0,0 @@
-- User-specific keybinds. Loaded after hyprland/keybinds.lua.
+9
View File
@@ -0,0 +1,9 @@
-- Machine-specific monitors. Loaded after hyprland/monitors.lua.
-- Usage: cp monitors.example monitors.lua (monitors.lua is ignored by git)
-- List your outputs with: hyprctl monitors all
-- https://wiki.hypr.land/Configuring/Monitors/
-- hl.monitor({ output = "eDP-1", mode = "1920x1080@60", position = "auto", scale = 1 })
-- hl.monitor({ output = "DP-1", mode = "2560x1440@144", position = "auto", scale = 1, vrr = 1 })
-- vim: ft=lua
-6
View File
@@ -1,6 +0,0 @@
-- User-specific monitor overrides. Loaded after hyprland/monitors.lua.
hl.monitor({ output = "eDP-1", mode = "2256x1504@60", position = "auto", scale = 1.33, bitdepth = 10, vrr = 1 })
hl.monitor({ output = "DP-3", mode = "3440x1440@99", position = "auto", scale = 1, bitdepth = 10, vrr = 1 })
hl.monitor({ output = "DP-4", mode = "4096x2160@120", position = "auto", scale = 1.33, bitdepth = 10, vrr = 1 })
+15
View File
@@ -0,0 +1,15 @@
-- Machine-specific window rules.
-- https://wiki.hypr.land/Configuring/Window-Rules/
-- Uncomment these lines to enable window rules for these apps:
-- require("custom/windowrules/godot")
-- Rules for an app used only on this machine can go directly here:
-- hl.window_rule({
-- name = "float-myapp",
-- match = { class = "myapp" },
-- float = true,
-- center = true,
-- })
-- vim: ft=lua
-2
View File
@@ -1,2 +0,0 @@
-- User-specific windowrules. Loaded after hyprland/windowrules.lua.
require("custom/windowrules/godot")
@@ -0,0 +1,7 @@
-- Machine-specific workspace rules.
-- Usage: cp workspacerules.example workspacerules.lua (workspacerules.lua is ignored by git)
-- https://wiki.hypr.land/Configuring/Workspace-Rules/
-- hl.workspace_rule({ workspace = "1", monitor = "eDP-1", persistent = true, default_name = "web" })
-- vim: ft=lua
-4
View File
@@ -1,4 +0,0 @@
hl.workspace_rule({ workspace = "1", monitor = "eDP-1", persistent = true, default_name = "web" })
--hl.workspace_rule({ workspace = "2", monitor = "eDP-1", persistent = true, default_name = "code" })
-- hl.workspace_rule({ workspace = "3", monitor = "eDP-1", persistent = true, default_name = "chat" })
-- hl.workspace_rule({ workspace = "4", monitor = "eDP-1", persistent = true, default_name = "game" })
+18 -7
View File
@@ -5,8 +5,19 @@
-- Do not edit files in `hyprland/` (shared defaults across all -- Do not edit files in `hyprland/` (shared defaults across all
-- users). Put any changes in the matching file under `custom/`, -- users). Put any changes in the matching file under `custom/`,
-- which is loaded after and overrides the defaults. -- which is loaded after and overrides the defaults.
--
-- `custom/*.lua` files are machine-specific and ignored by git.
-- Create one by copying its template: cp custom/X.example custom/X.lua
-- Missing custom files are simply skipped.
-- ############################################################## -- ##############################################################
-- Load a module only if its file exists (errors inside it still surface).
local function optional(module)
if package.searchpath(module, package.path) then
require(module)
end
end
-- Defaults (do not edit) -- -- Defaults (do not edit) --
require("hyprland/monitors") require("hyprland/monitors")
require("hyprland/environments") require("hyprland/environments")
@@ -18,13 +29,13 @@ require("hyprland/keybinds")
require("hyprland/windowrules") require("hyprland/windowrules")
-- Custom -- -- Custom --
require("custom/autostart") optional("custom/autostart")
require("custom/monitors") optional("custom/monitors")
require("custom/environments") optional("custom/environments")
require("custom/inputs") optional("custom/inputs")
require("custom/keybinds") optional("custom/keybinds")
require("custom/windowrules") optional("custom/windowrules")
require("custom/workspacerules") optional("custom/workspacerules")
-- For Noctalia Color templates -- For Noctalia Color templates
require("noctalia").apply_theme() require("noctalia").apply_theme()
+18
View File
@@ -48,6 +48,24 @@ stow .
all the files should now be simlinked to your $HOME folder all the files should now be simlinked to your $HOME folder
### Machine-specific Hyprland config
`~/.config/hypr/hyprland/` holds the shared defaults, don't edit them.
To tweak a single machine (monitors, devices, keybinds…), copy the matching template in `~/.config/hypr/custom/`:
```
cd ~/.config/hypr/custom
cp monitors.example monitors.lua
```
`custom/*.lua` files are ignored by git and loaded after the defaults; missing ones are simply skipped.
Per-app window rules are shared in `custom/windowrules/<app>.lua`. Enable the ones you want in your `custom/windowrules.lua`:
```lua
require("custom/windowrules/godot")
```
### Theme switcher ### Theme switcher
user the <kbd>SUPER</kbd> + <kbd>T</kbd> shortcut to switch between light and dark theme user the <kbd>SUPER</kbd> + <kbd>T</kbd> shortcut to switch between light and dark theme