summaryrefslogtreecommitdiff
path: root/artix/home/.config/hypr/hyprland.lua
diff options
context:
space:
mode:
authorNantha Sorubakanthan <nantha@mielota.com>2026-05-15 18:36:24 +0200
committerNantha Sorubakanthan <nantha@mielota.com>2026-05-16 09:41:40 +0200
commit1a7a5090b84d9eb8ff6a4f5dc0c833d4b9e717b0 (patch)
treea1c263d989a863962aa21628af371c0e2c43ee34 /artix/home/.config/hypr/hyprland.lua
parent63ca893729aa0436c9eeab96e0934b143dc53d17 (diff)
???
Diffstat (limited to 'artix/home/.config/hypr/hyprland.lua')
-rw-r--r--artix/home/.config/hypr/hyprland.lua175
1 files changed, 175 insertions, 0 deletions
diff --git a/artix/home/.config/hypr/hyprland.lua b/artix/home/.config/hypr/hyprland.lua
new file mode 100644
index 0000000..b270bde
--- /dev/null
+++ b/artix/home/.config/hypr/hyprland.lua
@@ -0,0 +1,175 @@
+if 1 then
+ hl.monitor({ output = "HDMI-A-1", mode = "2560x1440@100", position = "0x0", scale = "1", })
+else
+ hl.monitor({ output = "eDP-1", mode = "1920x1080@60", position = "0x0", scale = "1", })
+ hl.monitor({ output = "HDMI-A-1", mode = "preferred", position = "auto", scale = "1", mirror = "eDP-1" })
+end
+
+
+local terminal = os.getenv("TERMINAL")
+local browser = os.getenv("BROWSER")
+local menu = "exec $(tofi-drun -c ~/.config/tofi.ini)"
+
+hl.on("hyprland.start", function()
+ hl.exec_cmd("dunst")
+ hl.exec_cmd("waybar")
+ hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland")
+ hl.exec_cmd("/usr/lib/hyprpolkitagent/hyprpolkitagent")
+ hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme \"Adwaita-dark\"")
+ hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme \"prefer-dark\"")
+end)
+
+hl.env("GDK_BACKEND", "wayland,x11,*")
+hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
+hl.env("XDG_SESSION_TYPE", "wayland")
+hl.env("XDG_SESSION_DESKTOP", "Hyprland")
+
+hl.config({
+ general = {
+ gaps_in = 0,
+ gaps_out = 0,
+ border_size = 0,
+ col = {
+ active_border = { colors = { "rgba(33ccffee)", "rgba(00ff99ee)" }, angle = 45 },
+ inactive_border = "rgba(595959aa)",
+ },
+ resize_on_border = false,
+ allow_tearing = false,
+ layout = "dwindle",
+ },
+
+ decoration = {
+ rounding = 0,
+ rounding_power = 0,
+ active_opacity = 1.0,
+ inactive_opacity = 1.0,
+ shadow = { enabled = false, },
+ blur = { enabled = false, },
+ },
+
+ animations = { enabled = false, },
+})
+
+hl.config({ dwindle = { preserve_split = true, }, })
+hl.config({ master = { new_status = "master", }, })
+hl.config({ scrolling = { fullscreen_on_one_column = true, }, })
+
+hl.config({
+ misc = {
+ force_default_wallpaper = 0,
+ disable_hyprland_logo = true,
+ disable_splash_rendering = true,
+ background_color = "#000000"
+ },
+})
+
+
+hl.config({
+ input = {
+ kb_layout = "fr",
+ kb_variant = "",
+ kb_model = "pc105",
+ kb_options = "",
+ kb_rules = "",
+
+ follow_mouse = 1,
+
+ sensitivity = 0, -- -1.0 - 1.0, 0 means no modification.
+
+ touchpad = {
+ natural_scroll = true,
+ },
+ },
+})
+
+hl.gesture({
+ fingers = 3,
+ direction = "horizontal",
+ action = "workspace"
+})
+
+hl.device({
+ name = "epic-mouse-v1",
+ sensitivity = -0.5,
+})
+
+
+local mainMod = "SUPER"
+
+hl.bind(mainMod .. " + A", hl.dsp.window.fullscreen())
+hl.bind(mainMod .. " + C", hl.dsp.window.close())
+hl.bind(mainMod .. " + D", hl.dsp.exec_cmd("hyprpicker -naq"))
+hl.bind(mainMod .. " + F", hl.dsp.exec_cmd(browser))
+hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
+hl.bind(mainMod .. " + M",
+ hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
+hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
+hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
+hl.bind(mainMod .. " + return", hl.dsp.exec_cmd("~/.local/bin/spawn-alacritty-cwd"))
+hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
+hl.bind(mainMod .. " + U", hl.dsp.exec_cmd("pkill waybar ; waybar"))
+hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
+
+hl.bind(mainMod .. " + h", hl.dsp.focus({ direction = "left" }))
+hl.bind(mainMod .. " + j", hl.dsp.focus({ direction = "right" }))
+hl.bind(mainMod .. " + k", hl.dsp.focus({ direction = "up" }))
+hl.bind(mainMod .. " + l", hl.dsp.focus({ direction = "down" }))
+
+for i = 1, 10 do
+ local key = i % 11
+ hl.bind(mainMod .. " + code:" .. key + 9, hl.dsp.focus({ workspace = i }))
+ hl.bind(mainMod .. " + SHIFT + code:" .. key + 9, hl.dsp.window.move({ workspace = i }))
+end
+
+hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
+hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
+
+hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
+hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
+
+hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"),
+ { locked = true, repeating = true })
+hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
+ { locked = true, repeating = true })
+hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
+ { locked = true, repeating = true })
+hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
+ { locked = true, repeating = true })
+hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
+hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
+hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
+hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
+hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
+hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
+
+
+local suppressMaximizeRule = hl.window_rule({
+ -- Ignore maximize requests from all apps. You'll probably like this.
+ name = "suppress-maximize-events",
+ match = { class = ".*" },
+ suppress_event = "maximize",
+})
+
+-- suppressMaximizeRule:set_enabled(false)
+
+hl.window_rule({
+ name = "fix-xwayland-drags",
+ match = {
+ class = "^$",
+ title = "^$",
+ xwayland = true,
+ float = true,
+ fullscreen = false,
+ pin = false,
+ },
+
+ no_focus = true,
+})
+
+hl.window_rule({
+ name = "move-hyprland-run",
+ match = { class = "hyprland-run" },
+
+ move = "20 monitor_h-120",
+ float = true,
+})