Krolyxon
Commit f130f7e

Branches

Refs →

auroraf130f7e

Hyprland: switch to .lua files since .conf is getting deprecated

For the most part everything has been ported to .lua smoothly, the
screen rotation keybind doesn't work for now, i'll fix that later.
But everything else seems to be working fine.

Have gotten rid of split-monitor-workspaces for now to see if i really
need it in my current workflow, if need occurs, install this:
https://github.com/zjeffer/split-monitor-workspaces
Author
krolyxon
Date
2026-08-13 21:12 +0530
Parent
19f3cf8
Commit
f130f7e92715d76633e6739ca02d67aadd49cc3b

+460 −347

14 files changed

  1. D .config/hypr/hyprland.conf +0 −87
  2. A .config/hypr/hyprland.lua +100 −0
  3. D .config/hypr/source/appearance.conf +0 −77
  4. A .config/hypr/source/appearance.lua +93 −0
  5. D .config/hypr/source/environment_variables.conf +0 −25
  6. A .config/hypr/source/environment_variables.lua +34 −0
  7. D .config/hypr/source/input.conf +0 −27
  8. A .config/hypr/source/input.lua +36 −0
  9. D .config/hypr/source/keybinds.conf +0 −118
  10. A .config/hypr/source/keybinds.lua +151 −0
  11. D .config/hypr/source/permissions.conf +0 −12
  12. A .config/hypr/source/permissions.lua +41 −0
  13. M .config/mimeapps.list +4 −0
  14. M .config/shell/profile +1 −1
D .config/hypr/hyprland.conf View
@@ -1,87 +0,0 @@
1−source = $HOME/.cache/wal/colors-hyprland.conf
2−autogenerated = 0
3−
4−# 1. PROGRAMS
5−$terminal = foot
6−$menu = fuzzel
7−$browser = zen-browser
8−
9−# 2. AUTOSTART
10−exec-once = (hyprpm reload -n & kanshi & waybar & swaync & gammastep & hypridle)
11−exec-once = ~/.local/bin/setwall -n
12−exec-once = systemctl --user start hyprpolkitagent
13−
14−plugin {
15− hyprsplit {
16− num_workspaces = 10
17− persistent_workspaces = true
18− }
19−}
20−
21−# 3. ENVIRONMENT VARIABLES
22−source = ~/.config/hypr/source/environment_variables.conf
23−
24−
25−# 4. PLUGIN SETTINGS
26−plugin {
27− split-monitor-workspaces {
28− count = 10
29− keep_focused = 1
30− enable_notifications = 0
31− enable_persistent_workspaces = 1
32− }
33−}
34−
35−# 5. PERMISSIONS
36−source = ~/.config/hypr/source/permissions.conf
37−
38−
39−# 6. LOOK AND FEEL
40−source = ~/.config/hypr/source/appearance.conf
41−
42−# 7. INPUT
43−source = ~/.config/hypr/source/input.conf
44−
45−# 8. KEYBINDINGS
46−source = ~/.config/hypr/source/keybinds.conf
47−
48−
49−##############################
50−### WINDOWS AND WORKSPACES ###
51−##############################
52−
53−# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
54−# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
55−
56−# Example windowrules that are useful
57−
58−windowrule {
59− # Ignore maximize requests from all apps. You'll probably like this.
60− name = suppress-maximize-events
61− match:class = .*
62−
63− suppress_event = maximize
64−}
65−
66−windowrule {
67− # Fix some dragging issues with XWayland
68− name = fix-xwayland-drags
69− match:class = ^$
70− match:title = ^$
71− match:xwayland = true
72− match:float = true
73− match:fullscreen = false
74− match:pin = false
75−
76− no_focus = true
77−}
78−
79−# Hyprland-run windowrule
80−windowrule {
81− name = move-hyprland-run
82−
83− match:class = hyprland-run
84−
85− move = 20 monitor_h-120
86− float = yes
87−}
A .config/hypr/hyprland.lua View
@@ -0,0 +1,100 @@
1+
2+terminal = "foot"
3+menu = "fuzzel"
4+browser = "librewolf"
5+mainMod = "SUPER"
6+
7+-- -----------------------------------------------------
8+-- Path to home
9+-- -----------------------------------------------------
10+HOME = os.getenv("HOME")
11+
12+
13+-- Theme (pywal)
14+require(os.getenv("HOME") .. "/.cache/wal/colors.lua")
15+
16+
17+-- -----------------------------------------------------
18+-- Autostart
19+-- -----------------------------------------------------
20+
21+hl.on("hyprland.start", function()
22+ hl.exec_cmd("hyprpm reload -n")
23+ hl.exec_cmd("kanshi")
24+ hl.exec_cmd("waybar")
25+ hl.exec_cmd("swaync")
26+ hl.exec_cmd("gammastep")
27+ hl.exec_cmd("hypridle")
28+ hl.exec_cmd(os.getenv("HOME") .. "/.local/bin/setwall -n")
29+ hl.exec_cmd("systemctl --user start hyprpolkitagent")
30+end)
31+
32+--------------------------------------------------
33+-- Plugins
34+--------------------------------------------------
35+
36+-- hl.config({
37+-- plugin = {
38+-- hyprsplit = {
39+-- num_workspaces = 10,
40+-- persistent_workspaces = true,
41+-- },
42+--
43+-- ["split-monitor-workspaces"] = {
44+-- count = 10,
45+-- keep_focused = true,
46+-- enable_notifications = false,
47+-- enable_persistent_workspaces = true,
48+-- },
49+-- },
50+-- })
51+
52+-- -----------------------------------------------------
53+-- SOURCE FILES
54+-- -----------------------------------------------------
55+require("source.environment_variables")
56+require("source.permissions")
57+require("source.appearance")
58+require("source.input")
59+require("source.keybinds")
60+
61+
62+--------------------------------------------------
63+-- Window rules
64+--------------------------------------------------
65+
66+hl.window_rule({
67+ name = "suppress-maximize-events",
68+
69+ match = {
70+ class = ".*",
71+ },
72+
73+ suppress_event = "maximize",
74+})
75+
76+hl.window_rule({
77+ name = "fix-xwayland-drags",
78+
79+ match = {
80+ class = "^$",
81+ title = "^$",
82+ xwayland = true,
83+ float = true,
84+ fullscreen = false,
85+ pin = false,
86+ },
87+
88+ no_focus = true,
89+})
90+
91+hl.window_rule({
92+ name = "move-hyprland-run",
93+
94+ match = {
95+ class = "hyprland-run",
96+ },
97+
98+ move = "20 monitor_h-120",
99+ float = true,
100+})
D .config/hypr/source/appearance.conf View
@@ -1,77 +0,0 @@
1−general {
2− gaps_in = 2
3− gaps_out = 2
4− border_size = 2
5− resize_on_border = false
6− allow_tearing = false
7− # col.active_border = $color14 $color0 $color0 $color14 45deg # Gradient border
8− col.active_border = $color14 $color14 $color14 $color14 45deg
9− col.inactive_border = $color0 $color0 $color0 $color0 45deg
10− layout = master
11−}
12−
13−decoration {
14− # rounding = 8
15−
16−
17− # blur {
18− # enabled = true
19− # size = 3
20− # passes = 1
21− # }
22−
23−
24− blur {
25− enabled = true
26− size = 3
27− passes = 3
28− new_optimizations = true
29− vibrancy = 0.1696
30− ignore_opacity = true
31− }
32−}
33−
34−animations {
35− enabled = false
36− bezier = myBezier, 0.05, 0.9, 0.1, 1.05
37− animation = windows, 1, 2, myBezier
38− animation = windowsOut, 1, 2, default, popin 80%
39− animation = border, 1, 10, default
40− animation = borderangle, 1, 8, default
41− animation = fade, 1, 7, default
42− animation = workspaces, 1, 1, default
43−}
44−
45−# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
46−# "Smart gaps" / "No gaps when only"
47−# uncomment all if you wish to use that.
48−# workspace = w[tv1], gapsout:0, gapsin:0
49−# workspace = f[1], gapsout:0, gapsin:0
50−# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
51−# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
52−# windowrule = bordersize 0, floating:0, onworkspace:f[1]
53−# windowrule = rounding 0, floating:0, onworkspace:f[1]
54−
55−# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
56−dwindle {
57− preserve_split = true # You probably want this
58−}
59−
60−# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
61−master {
62− new_status = master
63− new_on_top = true
64−
65−}
66−
67−# https://wiki.hypr.land/Configuring/Variables/#misc
68−misc {
69− force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
70− disable_hyprland_logo = true# If true disables the random hyprland logo / anime girl background. :(
71− disable_splash_rendering = true
72− mouse_move_enables_dpms = true
73− key_press_enables_dpms = true
74− vrr = 0 # Disable adaptive sync
75−}
76−
77−
A .config/hypr/source/appearance.lua View
@@ -0,0 +1,93 @@
1+-- source/appearance.lua
2+
3+
4+hl.config({
5+ --------------------------------------------------
6+ -- General
7+ --------------------------------------------------
8+ general = {
9+ gaps_in = 2,
10+ gaps_out = 2,
11+ border_size = 2,
12+
13+ resize_on_border = false,
14+ allow_tearing = false,
15+
16+ layout = "master",
17+
18+ -- Pywal colors
19+ -- active_border = "$color14 $color14 $color14 $color14 45deg",
20+ -- inactive_border = "$color0 $color0 $color0 $color0 45deg",
21+
22+ -- Gradient example
23+ -- active_border = "$color14 $color0 $color0 $color14 45deg",
24+ },
25+
26+ --------------------------------------------------
27+ -- Decoration
28+ --------------------------------------------------
29+ decoration = {
30+ -- rounding = 8,
31+
32+ blur = {
33+ enabled = true,
34+ size = 3,
35+ passes = 3,
36+ new_optimizations = true,
37+ vibrancy = 0.1696,
38+ ignore_opacity = true,
39+ },
40+ },
41+
42+ --------------------------------------------------
43+ -- Animations
44+ --------------------------------------------------
45+ animations = {
46+ enabled = false,
47+
48+ bezier = {
49+ {
50+ name = "myBezier",
51+ points = {0.05, 0.9, 0.1, 1.05},
52+ },
53+ },
54+
55+ animation = {
56+ {"windows", 1, 2, "myBezier"},
57+ {"windowsOut", 1, 2, "default", "popin 80%"},
58+ {"border", 1, 10, "default"},
59+ {"borderangle", 1, 8, "default"},
60+ {"fade", 1, 7, "default"},
61+ {"workspaces", 1, 1, "default"},
62+ },
63+ },
64+
65+ --------------------------------------------------
66+ -- Dwindle
67+ --------------------------------------------------
68+ dwindle = {
69+ preserve_split = true,
70+ },
71+
72+ --------------------------------------------------
73+ -- Master
74+ --------------------------------------------------
75+ master = {
76+ new_status = "master",
77+ new_on_top = true,
78+ },
79+
80+ --------------------------------------------------
81+ -- Misc
82+ --------------------------------------------------
83+ misc = {
84+ force_default_wallpaper = -1,
85+ disable_hyprland_logo = true,
86+ disable_splash_rendering = true,
87+
88+ mouse_move_enables_dpms = true,
89+ key_press_enables_dpms = true,
90+
91+ vrr = 0,
92+ },
93+})
D .config/hypr/source/environment_variables.conf View
@@ -1,25 +0,0 @@
1−# See https://wiki.hypr.land/Configuring/Environment-variables/
2−env = HYPRSHOT_DIR,/home/krolyxon/pix/ss/
3−env = XCURSOR_SIZE,24
4−env = HYPRCURSOR_SIZE,24
5−# env = GTK_THEME,Tokyonight-Dark
6−
7−# XDG Specifications
8−env = XDG_CURRENT_DESKTOP,Hyprland
9−env = XDG_SESSION_TYPE,wayland
10−env = XDG_SESSION_DESKTOP,Hyprland
11−
12−# Toolkit
13−env = GDK_BACKEND,wayland,x11,* # GTK: Use Wayland if available; if not, try X11 and then any other GDK backend.
14−env = QT_QPA_PLATFORM,wayland;xcb # Qt: Use Wayland if available, fall back to X11 if not
15−env = SDL_VIDEODRIVER,Wayland # Run SDL2 applications on Wayland. Remove or set to x11 if games that provide older versions of SDL cause compatibility issues
16−env = CLUTTER_BACKEND,wayland # Clutter applications to try and use the Wayland backend
17−
18−# Force NVIDIA as primary GPU
19−# env = __NV_PRIME_RENDER_OFFLOAD,1
20−# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
21−# env = __VK_LAYER_NV_optimus,NVIDIA_only
22−# env = GBM_BACKEND,nvidia-drm
23−# env = WLR_NO_HARDWARE_CURSORS,1
24−# env = LIBVA_DRIVER_NAME,nvidia
25−
A .config/hypr/source/environment_variables.lua View
@@ -0,0 +1,34 @@
1+-- source/environment_variables.lua
2+
3+--------------------------------------------------
4+-- Environment Variables
5+--------------------------------------------------
6+local envs = {
7+ HYPRSHOT_DIR = "/home/krolyxon/pix/ss/",
8+ XCURSOR_SIZE = "24",
9+ HYPRCURSOR_SIZE = "24",
10+
11+ XDG_CURRENT_DESKTOP = "Hyprland",
12+ XDG_SESSION_TYPE = "wayland",
13+ XDG_SESSION_DESKTOP = "Hyprland",
14+
15+ GDK_BACKEND = "wayland,x11,*",
16+ QT_QPA_PLATFORM = "wayland;xcb",
17+ SDL_VIDEODRIVER = "Wayland",
18+ CLUTTER_BACKEND = "wayland",
19+}
20+
21+for k, v in pairs(envs) do
22+ hl.env(k, v)
23+end
24+
25+--------------------------------------------------
26+-- NVIDIA (uncomment if needed)
27+--------------------------------------------------
28+
29+-- hl.env("__NV_PRIME_RENDER_OFFLOAD", "1")
30+-- hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
31+-- hl.env("__VK_LAYER_NV_optimus", "NVIDIA_only")
32+-- hl.env("GBM_BACKEND", "nvidia-drm")
33+-- hl.env("WLR_NO_HARDWARE_CURSORS", "1")
34+-- hl.env("LIBVA_DRIVER_NAME", "nvidia")
D .config/hypr/source/input.conf View
@@ -1,27 +0,0 @@
1−# https://wiki.hypr.land/Configuring/Variables/#input
2−input {
3− kb_layout = us
4− kb_variant =
5− kb_model =
6− kb_options =
7− kb_rules =
8−
9− follow_mouse = 1
10−
11− sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
12−
13− touchpad {
14− natural_scroll = false
15− }
16−
17− repeat_delay = 300
18− repeat_rate = 50
19−}
20−
21−# Example per-device config
22−# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
23−device {
24− name = epic-mouse-v1
25− sensitivity = -0.5
26−}
27−
A .config/hypr/source/input.lua View
@@ -0,0 +1,36 @@
1+-- source/input.lua
2+
3+--------------------------------------------------
4+-- Global Input
5+--------------------------------------------------
6+
7+hl.config({
8+ input = {
9+ kb_layout = "us",
10+ kb_variant = "",
11+ kb_model = "",
12+ kb_options = "",
13+ kb_rules = "",
14+
15+ follow_mouse = 1,
16+
17+ -- -1.0 .. 1.0
18+ sensitivity = 0,
19+
20+ touchpad = {
21+ natural_scroll = false,
22+ },
23+
24+ repeat_delay = 300,
25+ repeat_rate = 50,
26+ },
27+})
28+
29+--------------------------------------------------
30+-- Per-device Configuration
31+--------------------------------------------------
32+
33+hl.device({
34+ name = "epic-mouse-v1",
35+ sensitivity = -0.5,
36+})
D .config/hypr/source/keybinds.conf View
@@ -1,118 +0,0 @@
1−###################
2−### KEYBINDINGS ###
3−###################
4−
5−# See https://wiki.hypr.land/Configuring/Keywords/
6−$mainMod = SUPER # Sets "Windows" key as main modifier
7−
8−# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
9−bind = $mainMod, Return, exec, $terminal
10−bind = $mainMod SHIFT, X, killactive,
11−bind = $mainMod SHIFT, Q, exit,
12−bind = $mainMod, F, Fullscreen
13−bind = $mainMod SHIFT, F, Fullscreen, 1
14−# bind = $mainMod SHIFT, R, togglefloating,
15−# Smart Float: Toggle float -> Resize to 90% -> Center
16−bind = $mainMod SHIFT, R, exec, if hyprctl -j activewindow | jq -e '.floating | not'; then hyprctl --batch "dispatch togglefloating; dispatch resizeactive exact 90% 90%; dispatch centerwindow"; else hyprctl dispatch togglefloating; fi
17−bind = $mainMod, R, exec, $menu
18−#bind = $mainMod SHIFT, P, pseudo, # dwindle
19−binde = $mainMod, tab, cyclenext, prev
20−bind = $mainMod, b, exec, killall waybar || waybar
21−bind = $mainMod, grave, exec, fuzzelunicode
22−bind = $mainMod, escape, exec, sysact
23−
24−# Applications
25−bind = $mainMod, W, exec, $browser
26−bind = ,PRINT, exec, hypr_screenshot.sh
27−bind = $mainMod SHIFT, P, exec, hypr_screenshot.sh
28−
29−# Music Controls
30−bind = $mainMod, m, exec, $terminal -e zsh -i -c "ncmpcpp"
31−bind = $mainMod, p, exec, mpc toggle
32−binde = $mainMod, period, exec, mpc seek +10
33−binde = $mainMod, comma, exec, mpc seek -10
34−bind = $mainMod SHIFT, period, exec, mpc next
35−bind = $mainMod SHIFT, comma, exec, mpc prev
36−
37−# Swap current focused window with master
38−bind = $mainMod, space, layoutmsg, swapwithmaster
39−
40−# Resize windows with h/j/k/l
41−binde = $mainMod, h, resizeactive, -30 0
42−binde = $mainMod, l, resizeactive, 30 0
43−binde = $mainMod, k, resizeactive, 0 -30
44−binde = $mainMod, j, resizeactive, 0 30
45−
46−# Switch workspaces with mainMod + [0-9]
47−bind = $mainMod, 1, split-workspace, 1
48−bind = $mainMod, 2, split-workspace, 2
49−bind = $mainMod, 3, split-workspace, 3
50−bind = $mainMod, 4, split-workspace, 4
51−bind = $mainMod, 5, split-workspace, 5
52−bind = $mainMod, 6, split-workspace, 6
53−bind = $mainMod, 7, split-workspace, 7
54−bind = $mainMod, 8, split-workspace, 8
55−bind = $mainMod, 9, split-workspace, 9
56−bind = $mainMod, 0, split-workspace, 10
57−
58−# Move active window to a workspace with mainMod + SHIFT + [0-9]
59−bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1
60−bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2
61−bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3
62−bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4
63−bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5
64−bind = $mainMod SHIFT, 6, split-movetoworkspacesilent, 6
65−bind = $mainMod SHIFT, 7, split-movetoworkspacesilent, 7
66−bind = $mainMod SHIFT, 8, split-movetoworkspacesilent, 8
67−bind = $mainMod SHIFT, 9, split-movetoworkspacesilent, 9
68−bind = $mainMod SHIFT, 0, split-movetoworkspacesilent, 10
69−
70−# Example special workspace (scratchpad)
71−bind = $mainMod, S, togglespecialworkspace, magic
72−bind = $mainMod SHIFT, S, movetoworkspace, special:magic
73−
74−# Scratchpad like DWM
75−workspace = special:h, on-created-empty: $terminal
76−bind = $mainMod SHIFT, Return, togglespecialworkspace, h
77−
78−
79−# Accessibility: Zoom
80−cursor:zoom_disable_aa = true
81−# Zoom In
82−binded = SUPER, equal, Zoom In, exec, sh -c "hyprctl keyword cursor:zoom_factor \"$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {print $2 * 1.25}')\""
83−# Zoom Out
84−binded = SUPER, minus, Zoom Out, exec, sh -c "hyprctl keyword cursor:zoom_factor \"$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {val = $2 / 1.25; if (val < 1.0) val = 1.0; print val}')\""
85−# Reset Zoom
86−bindld = SUPER, BACKSPACE, Reset Zoom, exec, hyprctl keyword cursor:zoom_factor 1.0
87−
88−# Screen Rotate
89−bindld = $mainMod CTRL, comma, Rotate Screen Anti-Clockwise, exec, hypr_screen_rotate.sh +90
90−bindld = $mainMod CTRL, period, Rotate Screen Clockwise, exec, hypr_screen_rotate.sh -90
91−
92−# --- Hyprshade (Visual Filters) ---
93−bindd = $mainMod CTRL, S, Shader Menu, exec, hypr_shader_menu.sh
94−bindld = $mainMod CTRL, X, Disable Shader, exec, hyprshade off
95−bindld = $mainMod CTRL, V, Vibrant Shader, exec, hyprshade on vibrance
96−
97−# Scroll through existing workspaces with mainMod + scroll
98−bind = $mainMod, mouse_down, workspace, e+1
99−bind = $mainMod, mouse_up, workspace, e-1
100−
101−# Move/resize windows with mainMod + LMB/RMB and dragging
102−bindm = $mainMod, mouse:272, movewindow
103−bindm = $mainMod, mouse:273, resizewindow
104−
105−# Laptop multimedia keys for volume and LCD brightness
106−bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
107−bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
108−bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
109−bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
110−bindel = , XF86MonBrightnessDown, exec, ~/.local/bin/brictl -
111−bindel = , XF86MonBrightnessUp, exec, ~/.local/bin/brictl +
112−
113−
114−# Requires playerctl
115−bindl = , XF86AudioNext, exec, playerctl next
116−bindl = , XF86AudioPause, exec, playerctl play-pause
117−bindl = , XF86AudioPlay, exec, playerctl play-pause
118−bindl = , XF86AudioPrev, exec, playerctl previous
A .config/hypr/source/keybinds.lua View
@@ -0,0 +1,151 @@
1+---------------------
2+---- KEYBINDINGS ----
3+---------------------
4+-- See https://wiki.hypr.land/Configuring/Basics/Binds/ for more
5+
6+hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
7+hl.bind(mainMod .. " + SHIFT + X", hl.dsp.window.close())
8+hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.exit())
9+hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
10+hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" }))
11+
12+-- bind = $mainMod SHIFT, R, togglefloating,
13+-- Smart Float: Toggle float -> Resize to 90% -> Center
14+hl.bind(
15+ mainMod .. "+ SHIFT + R",
16+ hl.dsp.exec_cmd([[
17+ if hyprctl activewindow | grep -q 'floating: 0'; then
18+ W=$(hyprctl monitors -j | jq '.[] | select(.focused) | ((.width / .scale) * 0.9) | floor')
19+ H=$(hyprctl monitors -j | jq '.[] | select(.focused) | ((.height / .scale) * 0.9) | floor')
20+ hyprctl --batch "dispatch hl.dsp.window.float({action='set'}); dispatch hl.dsp.window.resize({x=${W}, y=${H}, relative=false})"
21+ hyprctl dispatch "hl.dsp.window.center()"
22+ else
23+ hyprctl dispatch "hl.dsp.window.float({action='unset'})"
24+ fi
25+ ]]),
26+ { description = "Smart Float" }
27+)
28+
29+
30+hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
31+-- bind = $mainMod SHIFT, P, pseudo, # dwindle
32+-- (left commented out to mirror the original file)
33+hl.bind(mainMod .. " + Tab", hl.dsp.window.cycle_next({ next = false }), { repeating = true })
34+hl.bind(mainMod .. " + b", hl.dsp.exec_cmd("killall waybar || waybar"))
35+hl.bind(mainMod .. " + grave", hl.dsp.exec_cmd("fuzzelunicode"))
36+hl.bind(mainMod .. " + escape", hl.dsp.exec_cmd("sysact"))
37+
38+-- Applications
39+hl.bind(mainMod .. " + W", hl.dsp.exec_cmd(browser))
40+hl.bind("PRINT", hl.dsp.exec_cmd("hypr_screenshot.sh"))
41+hl.bind(mainMod .. " + SHIFT + P", hl.dsp.exec_cmd("hypr_screenshot.sh"))
42+
43+-- Music Controls
44+hl.bind(mainMod .. " + m", hl.dsp.exec_cmd(terminal .. " -e zsh -i -c \"ncmpcpp\""))
45+hl.bind(mainMod .. " + p", hl.dsp.exec_cmd("mpc toggle"))
46+hl.bind(mainMod .. " + period", hl.dsp.exec_cmd("mpc seek +10"), { repeating = true })
47+hl.bind(mainMod .. " + comma", hl.dsp.exec_cmd("mpc seek -10"), { repeating = true })
48+hl.bind(mainMod .. " + SHIFT + period", hl.dsp.exec_cmd("mpc next"))
49+hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.exec_cmd("mpc prev"))
50+
51+-- Swap current focused window with master
52+hl.bind(mainMod .. " + space", hl.dsp.layout("swapwithmaster"))
53+
54+-- Resize windows with h/j/k/l
55+hl.bind(mainMod .. " + h", hl.dsp.window.resize({ x = -30, y = 0, relative = true}), { repeating = true })
56+hl.bind(mainMod .. " + l", hl.dsp.window.resize({ x = 30, y = 0, relative = true}), { repeating = true })
57+hl.bind(mainMod .. " + k", hl.dsp.window.resize({ x = 0, y = -30, relative = true }), { repeating = true })
58+hl.bind(mainMod .. " + j", hl.dsp.window.resize({ x = 0, y = 30, relative = true }), { repeating = true })
59+
60+
61+-- -----------------------------------------------------
62+-- Workspace switching
63+-- -----------------------------------------------------
64+
65+for i = 1, 10 do
66+ local key = i % 10 -- 10 maps to key 0
67+
68+ -- Switch to workspace
69+ hl.bind(
70+ mainMod .. " + " .. key,
71+ hl.dsp.focus({ workspace = i })
72+ )
73+
74+ -- Move active window to workspace
75+ hl.bind(
76+ mainMod .. " + SHIFT + " .. key,
77+ hl.dsp.window.move({ workspace = i, follow = false })
78+ )
79+end
80+
81+-- Example special workspace (scratchpad)
82+hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
83+hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
84+
85+-- Scratchpad like DWM
86+hl.workspace_rule({ workspace = "special:h", on_created_empty = terminal })
87+hl.bind(mainMod .. " + SHIFT + Return", hl.dsp.workspace.toggle_special("h"))
88+
89+-- --- Accessibility: Zoom ---
90+hl.config({ cursor = { zoom_disable_aa = true } })
91+
92+hl.bind(
93+ "SUPER + equal",
94+ function()
95+ local z = hl.get_config("cursor.zoom_factor")
96+ hl.config({ cursor = { zoom_factor = z * 1.25 } })
97+ end,
98+ { description = "Zoom In", repeating = true }
99+)
100+
101+hl.bind(
102+ "SUPER + minus",
103+ function()
104+ local z = hl.get_config("cursor.zoom_factor")
105+ local nz = z / 1.25
106+ if nz < 1.0 then nz = 1.0 end
107+ hl.config({ cursor = { zoom_factor = nz } })
108+ end,
109+ { description = "Zoom Out", repeating = true }
110+)
111+
112+hl.bind(
113+ "SUPER + BACKSPACE",
114+ function()
115+ hl.config({ cursor = { zoom_factor = 1.0 } })
116+ end,
117+ { description = "Reset Zoom", locked = true }
118+)
119+
120+-- Screen Rotate
121+hl.bind(mainMod .. " + CTRL + comma", hl.dsp.exec_cmd("hypr_screen_rotate.sh +90"),
122+ { locked = true, desc = "Rotate Screen Anti-Clockwise" })
123+hl.bind(mainMod .. " + CTRL + period", hl.dsp.exec_cmd("hypr_screen_rotate.sh -90"),
124+ { locked = true, desc = "Rotate Screen Clockwise" })
125+
126+-- --- Hyprshade (Visual Filters) ---
127+hl.bind(mainMod .. " + CTRL + S", hl.dsp.exec_cmd("hypr_shader_menu.sh"), { desc = "Shader Menu" })
128+hl.bind(mainMod .. " + CTRL + X", hl.dsp.exec_cmd("hyprshade off"), { locked = true, desc = "Disable Shader" })
129+hl.bind(mainMod .. " + CTRL + V", hl.dsp.exec_cmd("hyprshade on vibrance"), { locked = true, desc = "Vibrant Shader" })
130+
131+-- Scroll through existing workspaces with mainMod + scroll
132+hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
133+hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
134+
135+-- Move/resize windows with mainMod + LMB/RMB and dragging
136+hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
137+hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
138+
139+-- Laptop multimedia keys for volume and LCD brightness
140+hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
141+hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
142+hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true })
143+hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
144+hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("~/.local/bin/brictl -"), { locked = true, repeating = true })
145+hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("~/.local/bin/brictl +"), { locked = true, repeating = true })
146+
147+-- Requires playerctl
148+hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
149+hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
150+hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
151+hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
D .config/hypr/source/permissions.conf View
@@ -1,12 +0,0 @@
1−ecosystem {
2− enforce_permissions = 1
3−}
4−
5−permission = /usr/(bin|local/bin)/grim, screencopy, allow
6−permission = /usr/(bin|local/bin)/hyprlock, screencopy, allow
7−permission = /usr/(bin|local/bin)/hyprpicker , screencopy, allow
8−permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
9−permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
10−permission = ${lib.escapeRegex (lib.getExe config.programs.hyprlock.package)}, screencopy, allow
11−
12−
A .config/hypr/source/permissions.lua View
@@ -0,0 +1,41 @@
1+hl.config({
2+ ecosystem = {
3+ enforce_permissions = true,
4+ },
5+})
6+
7+hl.permission({
8+ binary = "/usr/(bin|local/bin)/grim",
9+ type = "screencopy",
10+ mode = "allow",
11+})
12+
13+hl.permission({
14+ binary = "/usr/(bin|local/bin)/hyprlock",
15+ type = "screencopy",
16+ mode = "allow",
17+})
18+
19+hl.permission({
20+ binary = "/usr/(bin|local/bin)/hyprpicker",
21+ type = "screencopy",
22+ mode = "allow",
23+})
24+
25+hl.permission({
26+ binary = "/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland",
27+ type = "screencopy",
28+ mode = "allow",
29+})
30+
31+hl.permission({
32+ binary = "/usr/(bin|local/bin)/hyprpm",
33+ type = "plugin",
34+ mode = "allow",
35+})
36+
37+hl.permission({
38+ binary = "${lib.escapeRegex (lib.getExe config.programs.hyprlock.package)}",
39+ type = "screencopy",
40+ mode = "allow",
41+})
M .config/mimeapps.list View
@@ -14,6 +14,10 @@ x-scheme-handler/lbry=lbry.desktop
1414 inode/directory=file.desktop
1515 x-scheme-handler/tonsite=org.telegram.desktop.desktop
1616 x-scheme-handler/tuta=tutanota-desktop.desktop
17+x-scheme-handler/http=librewolf.desktop
18+x-scheme-handler/https=librewolf.desktop
19+text/html=librewolf.desktop
20+application/xhtml+xml=librewolf.desktop
1721
1822 [Added Associations]
1923 x-scheme-handler/tonsite=org.telegram.desktop.desktop;
M .config/shell/profile View
@@ -3,7 +3,7 @@
33 export EDITOR="nvim"
44 export TERMINAL="foot"
55 export TERMINAL_PROG="foot"
6−export BROWSER="zen-browser"
6+export BROWSER="librewolf"
77
88 export XDG_CONFIG_HOME="$HOME/.config"
99 export XDG_DATA_HOME="$HOME/.local/share"