diff --git a/.config/hypr/.gitignore b/.config/hypr/.gitignore index 64d1b86..8b13789 100644 --- a/.config/hypr/.gitignore +++ b/.config/hypr/.gitignore @@ -1 +1 @@ -weather_api_key.json + diff --git a/.config/hypr/.luarc.json b/.config/hypr/.luarc.json new file mode 100644 index 0000000..f2aac1f --- /dev/null +++ b/.config/hypr/.luarc.json @@ -0,0 +1,10 @@ +{ + "workspace": { + "library": [ + "/usr/share/hypr/stubs" + ] + }, + "diagnostics": { + "globals": ["hl"] + } +} \ No newline at end of file diff --git a/.config/hypr/conf.d/autostart.conf b/.config/hypr/conf.d/autostart.conf deleted file mode 100644 index 3aa188d..0000000 --- a/.config/hypr/conf.d/autostart.conf +++ /dev/null @@ -1,3 +0,0 @@ -exec-once = dbus-update-activation-environment --systemd --all -exec-once = systemctl --user start hyprland-session.target -exec-once = qs -c noctalia-shell diff --git a/.config/hypr/conf.d/environments.conf b/.config/hypr/conf.d/environments.conf deleted file mode 100644 index f204e9a..0000000 --- a/.config/hypr/conf.d/environments.conf +++ /dev/null @@ -1,6 +0,0 @@ -# See https://wiki.hypr.land/Configuring/Environment-variables/ - -#env = XCURSOR_SIZE,24 -#env = QT_QPA_PLATFORM,wayland -#env = QT_AUTO_SCREEN_SCALE_FACTOR,0 -#env = QT_QPA_PLATFORMTHEME,qt6ct diff --git a/.config/hypr/conf.d/inputs.conf b/.config/hypr/conf.d/inputs.conf deleted file mode 100644 index 337a04e..0000000 --- a/.config/hypr/conf.d/inputs.conf +++ /dev/null @@ -1,26 +0,0 @@ -# https://wiki.hypr.land/Configuring/Variables/#input -input { - kb_layout = fr - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = false - } -} - -# See https://wiki.hypr.land/Configuring/Gestures -gesture = 3, horizontal, workspace - -# Example per-device config -# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more -device { - name = logitech-g-pro--1 - sensitivity = -0.8 -} diff --git a/.config/hypr/conf.d/keybinds.conf b/.config/hypr/conf.d/keybinds.conf deleted file mode 100644 index 07af4c2..0000000 --- a/.config/hypr/conf.d/keybinds.conf +++ /dev/null @@ -1,104 +0,0 @@ -# See https://wiki.hypr.land/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier - -$terminal = kitty -$fileManager = nautilus -$ipc = qs -c noctalia-shell ipc call - - -# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more -bind = CTRL ALT, T, exec, $terminal -bind = $mainMod, SPACE, exec, $ipc launcher toggle -bind = $mainMod, C, killactive, -bind = $mainMod, M, exit, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, F, fullscreen, -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, U, layoutmsg, togglesplit # dwindle -bind = $mainMod, H, layoutmsg, swapsplit - -# Move focus with mainMod + arrow keys -bind = $mainMod, left, movefocus, l -bind = $mainMod, right, movefocus, r -bind = $mainMod, up, movefocus, u -bind = $mainMod, down, movefocus, d - -# Move focus with mainMod + IJKL -bind = $mainMod, J, movefocus, l -bind = $mainMod, L, movefocus, r -bind = $mainMod, I, movefocus, u -bind = $mainMod, K, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Switch workspaces with mainMod + [0-9] (AZERTY FIX) -bind = $mainMod, ampersand, workspace, 1 -bind = $mainMod, eacute, workspace, 2 -bind = $mainMod, quotedbl, workspace, 3 -bind = $mainMod, apostrophe, workspace, 4 -bind = $mainMod, parenleft, workspace, 5 -bind = $mainMod, minus, workspace, 6 -bind = $mainMod, egrave, workspace, 7 -bind = $mainMod, underscore, workspace, 8 -bind = $mainMod, ccedilla, workspace, 9 -bind = $mainMod, agrave, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] (AZERTY FIX) -bind = $mainMod SHIFT, ampersand, movetoworkspace, 1 -bind = $mainMod SHIFT, eacute, movetoworkspace, 2 -bind = $mainMod SHIFT, quotedbl, movetoworkspace, 3 -bind = $mainMod SHIFT, apostrophe, movetoworkspace, 4 -bind = $mainMod SHIFT, parenleft, movetoworkspace, 5 -bind = $mainMod SHIFT, minus, movetoworkspace, 6 -bind = $mainMod SHIFT, egrave, movetoworkspace, 7 -bind = $mainMod SHIFT, underscore, movetoworkspace, 8 -bind = $mainMod SHIFT, ccedilla, movetoworkspace, 9 -bind = $mainMod SHIFT, agrave, movetoworkspace, 10 - -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- - -# Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous - -bind = , XF86Calculator, exec, gnome-calculator - -# Interface (noctalia-shell) -bind = $mainMod, T, exec, $ipc darkMode toggle -bind = $mainMod SHIFT, L, exec, $ipc lockScreen lock - -bindl = , Print, exec, $ipc plugin:screenshot takeScreenshot region -bindl = CTRL, Print, exec, $ipc plugin:screenshot takeScreenshot screen - -bindl = , switch:Lid Switch, exec, ~/.config/hypr/scripts/lidClosed.sh diff --git a/.config/hypr/conf.d/look-and-feel.conf b/.config/hypr/conf.d/look-and-feel.conf deleted file mode 100644 index d38e768..0000000 --- a/.config/hypr/conf.d/look-and-feel.conf +++ /dev/null @@ -1,92 +0,0 @@ -# Refer to https://wiki.hypr.land/Configuring/Variables/ -disable_splash_rendering = true -# https://wiki.hypr.land/Configuring/Variables/#general -general { - gaps_in = 5 - gaps_out = 10 - - border_size = 2 - - # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors - #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - #col.inactive_border = rgba(595959aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = dwindle -} - -# https://wiki.hypr.land/Configuring/Variables/#decoration -decoration { - rounding = 12 - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = true - range = 30 - render_power = 5 - offset = 0 5 - color = rgba(00000070) - } - - # https://wiki.hypr.land/Configuring/Variables/#blur - blur { - enabled = false - size = 3 - passes = 1 - - vibrancy = 0.1696 - } -} - -animations { - enabled = true - - - animation = windowsIn, 1, 3, default - animation = windowsOut, 1, 3, default - animation = border, 1, 3, default - animation = borderangle, 1, 3, default - animation = fade, 1, 3, default - animation = workspaces, 1, 5, default - animation = windowsMove, 1, 4, default -} - -# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ -# "Smart gaps" / "No gaps when only" -# uncomment all if you wish to use that. -# workspace = w[tv1], gapsout:0, gapsin:0 -# workspace = f[1], gapsout:0, gapsin:0 -# windowrule = bordersize 0, floating:0, onworkspace:w[tv1] -# windowrule = rounding 0, floating:0, onworkspace:w[tv1] -# windowrule = bordersize 0, floating:0, onworkspace:f[1] -# windowrule = rounding 0, floating:0, onworkspace:f[1] - -# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more -dwindle { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this -} - -# See https://wiki.hypr.land/Configuring/Master-Layout/ for more -master { - new_status = master - mfact = 0.5 -} - -# https://wiki.hypr.land/Configuring/Variables/#misc -misc { - force_default_wallpaper = true # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( -} - -xwayland { - force_zero_scaling = true -} diff --git a/.config/hypr/conf.d/monitors.conf b/.config/hypr/conf.d/monitors.conf deleted file mode 100644 index 72e7762..0000000 --- a/.config/hypr/conf.d/monitors.conf +++ /dev/null @@ -1,4 +0,0 @@ -# See https://wiki.hypr.land/Configuring/Monitors/ -monitor = eDP-1, 2256x1504@60, auto, 1.33, bitdepth, 10, vrr, 1 -monitor = DP-3, 3440x1440@99, auto, 1, bitdepth, 10, vrr, 1 -monitor = , preferred,auto,auto diff --git a/.config/hypr/conf.d/permissions.conf b/.config/hypr/conf.d/permissions.conf deleted file mode 100644 index e1adeba..0000000 --- a/.config/hypr/conf.d/permissions.conf +++ /dev/null @@ -1,11 +0,0 @@ -# See https://wiki.hypr.land/Configuring/Permissions/ -# Please note permission changes here require a Hyprland restart and are not applied on-the-fly -# for security reasons - -# ecosystem { -# enforce_permissions = 1 -# } - -# permission = /usr/(bin|local/bin)/grim, screencopy, allow -# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow -# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow diff --git a/.config/hypr/conf.d/programs.conf b/.config/hypr/conf.d/programs.conf deleted file mode 100644 index 07159cc..0000000 --- a/.config/hypr/conf.d/programs.conf +++ /dev/null @@ -1,6 +0,0 @@ -# See https://wiki.hypr.land/Configuring/Keywords/ - -# Set programs that you use -#$terminal = kitty -#$fileManager = dolphin -#$menu = wofi --show drun diff --git a/.config/hypr/conf.d/windowrules.conf b/.config/hypr/conf.d/windowrules.conf deleted file mode 100644 index 6bcbda6..0000000 --- a/.config/hypr/conf.d/windowrules.conf +++ /dev/null @@ -1,63 +0,0 @@ -windowrule { - name = floating-window - match:class = (Imprimer l'image|Cider|org.gnome.Calculator|org.gnome.Loupe) - - float = true -} - -windowrule { - name = kitty-term - match:class = kitty - - size = (monitor_w*0.50) (monitor_h*0.47) - float = true - center = true -} - -windowrule { - name = floating-messages - match:class = (signal|org.telegram.desktop) - - size = (monitor_w*0.27) (monitor_h*0.7) - move = (monitor_w*0.70) (monitor_h*0.15) - float = true - pin = true -} - -windowrule { - name = filesystems - match:class = DevTools|Tous les fichiers|org.gnome.Nautilus - - float = true - center = true - size = (monitor_w*0.48) (monitor_h*0.5) -} - -windowrule { - name = reaper - match:class = REAPER - - move = cursor - float = true -} - -windowrule { - name = reaper-title - match:class = REAPER - match:title = ^(menu)$ - - no_initial_focus = true -} - -windowrule { - name = pip - match:class = zen - match:title = Picture-in-Picture - - center = true - size = 1280 720 - float = true - pin = true -} - -# exec-once = ~/.config/hypr/scripts/resize-window.sh diff --git a/.config/hypr/custom/autostart.lua b/.config/hypr/custom/autostart.lua new file mode 100644 index 0000000..6804dc9 --- /dev/null +++ b/.config/hypr/custom/autostart.lua @@ -0,0 +1,6 @@ +-- 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) \ No newline at end of file diff --git a/.config/hypr/custom/environments.lua b/.config/hypr/custom/environments.lua new file mode 100644 index 0000000..cc262ec --- /dev/null +++ b/.config/hypr/custom/environments.lua @@ -0,0 +1 @@ +-- User-specific environment variables. Loaded after hyprland/environments.lua. diff --git a/.config/hypr/custom/inputs.lua b/.config/hypr/custom/inputs.lua new file mode 100644 index 0000000..b46bd45 --- /dev/null +++ b/.config/hypr/custom/inputs.lua @@ -0,0 +1,3 @@ +-- User-specific input config (kb_layout, per-device, gestures). Loaded after hyprland/inputs.lua. + +hl.device({ name = "logitech-g-pro--1", sensitivity = -0.8 }) \ No newline at end of file diff --git a/.config/hypr/custom/keybinds.lua b/.config/hypr/custom/keybinds.lua new file mode 100644 index 0000000..314a7b0 --- /dev/null +++ b/.config/hypr/custom/keybinds.lua @@ -0,0 +1 @@ +-- User-specific keybindings. Loaded after hyprland/keybinds.lua. diff --git a/.config/hypr/custom/monitors.lua b/.config/hypr/custom/monitors.lua new file mode 100644 index 0000000..88bf07c --- /dev/null +++ b/.config/hypr/custom/monitors.lua @@ -0,0 +1,4 @@ +-- 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 }) \ No newline at end of file diff --git a/.config/hypr/custom/windowrules.lua b/.config/hypr/custom/windowrules.lua new file mode 100644 index 0000000..fb7ba9d --- /dev/null +++ b/.config/hypr/custom/windowrules.lua @@ -0,0 +1,14 @@ +-- User-specific window rules. Loaded after hyprland/windowrules.lua. + +hl.window_rule({ + name = "reaper", + match = { class = "REAPER" }, + move = {"cursor_x-(window_w*0.5))", "(cursor_y-(window_h*0.5))"}, + float = true, +}) + +hl.window_rule({ + name = "reaper-title", + match = { class = "REAPER", title = "^(menu)$" }, + no_initial_focus = true, +}) \ No newline at end of file diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf deleted file mode 100644 index a26a187..0000000 --- a/.config/hypr/hyprland.conf +++ /dev/null @@ -1,68 +0,0 @@ - -# ####################################################################################### -# MY SUPER HYPRLAND CONFIG. -# ####################################################################################### - -# Refer to the wiki for more information. -# https://wiki.hypr.land/Configuring/ - -################ -### MONITORS ### -################ - -source = ~/.config/hypr/conf.d/monitors.conf - -################### -### MY PROGRAMS ### -################### - -source = ~/.config/hypr/conf.d/programs.conf - -################# -### AUTOSTART ### -################# - -source = ~/.config/hypr/conf.d/autostart.conf - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -source = ~/.config/hypr/conf.d/environments.conf - -################### -### PERMISSIONS ### -################### - -source = ~/.config/hypr/conf.d/permissions.conf - -##################### -### LOOK AND FEEL ### -##################### - -source = ~/.config/hypr/conf.d/look-and-feel.conf - -############# -### INPUT ### -############# - -source = ~/.config/hypr/conf.d/inputs.conf - -################### -### KEYBINDINGS ### -################### - -source = ~/.config/hypr/conf.d/keybinds.conf - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -source = ~/.config/hypr/conf.d/windowrules.conf - -###################### -### NOCTALIA THEME ### -###################### - -source = ~/.config/hypr/noctalia/noctalia-colors.conf - diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua new file mode 100644 index 0000000..d143c40 --- /dev/null +++ b/.config/hypr/hyprland.lua @@ -0,0 +1,30 @@ +-- ############################################################## +-- MY SUPER HYPRLAND CONFIG. +-- https://wiki.hypr.land/Configuring/ +-- +-- Do not edit files in `hyprland/` (shared defaults across all +-- users). Put any changes in the matching file under `custom/`, +-- which is loaded after and overrides the defaults. +-- ############################################################## + +-- Defaults (do not edit) -- +require("hyprland/monitors") +require("hyprland/environments") +require("hyprland/autostart") +require("hyprland/permissions") +require("hyprland/look-and-feel") +require("hyprland/inputs") +require("hyprland/keybinds") +require("hyprland/windowrules") + +-- Custom -- +require("custom/autostart") +require("custom/monitors") +require("custom/environments") +require("custom/inputs") +require("custom/keybinds") +require("custom/windowrules") + +-- Noctalia generates a hyprlang colours file; load it last so it overrides above. +-- dofile() because it is a .conf, not a Lua module. +-- dofile(os.getenv("HOME") .. "/.config/hypr/noctalia/noctalia-colors.conf") diff --git a/.config/hypr/hyprland/autostart.lua b/.config/hypr/hyprland/autostart.lua new file mode 100644 index 0000000..7fb2908 --- /dev/null +++ b/.config/hypr/hyprland/autostart.lua @@ -0,0 +1,6 @@ +-- https://wiki.hypr.land/Configuring/Autostart/ +-- Shared defaults — do not edit. Add user-specific autostart in custom/autostart.lua. + +hl.on("hyprland.start", function() + hl.exec_cmd("qs -c noctalia-shell") +end) diff --git a/.config/hypr/hyprland/environments.lua b/.config/hypr/hyprland/environments.lua new file mode 100644 index 0000000..2112256 --- /dev/null +++ b/.config/hypr/hyprland/environments.lua @@ -0,0 +1,2 @@ +-- https://wiki.hypr.land/Configuring/Environment-variables/ +-- Shared defaults — do not edit. Add user-specific env vars in custom/environments.lua. diff --git a/.config/hypr/hyprland/inputs.lua b/.config/hypr/hyprland/inputs.lua new file mode 100644 index 0000000..25a00dc --- /dev/null +++ b/.config/hypr/hyprland/inputs.lua @@ -0,0 +1,20 @@ +-- https://wiki.hypr.land/Configuring/Variables/#input +-- Shared defaults — do not edit. Add user-specific input config in custom/inputs.lua. + +hl.config({ + input = { + kb_layout = "fr", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + follow_mouse = 1, + sensitivity = 0, + touchpad = { + natural_scroll = false, + }, + }, +}) + +-- https://wiki.hypr.land/Configuring/Gestures +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) diff --git a/.config/hypr/hyprland/keybinds.lua b/.config/hypr/hyprland/keybinds.lua new file mode 100644 index 0000000..d48589a --- /dev/null +++ b/.config/hypr/hyprland/keybinds.lua @@ -0,0 +1,87 @@ +-- https://wiki.hypr.land/Configuring/Binds/ +-- Shared defaults — do not edit. Add user-specific keybindings in custom/keybinds.lua. + +local mainMod = "SUPER" +local terminal = "kitty" +local fileMgr = "nautilus" +local ipc = "qs -c noctalia-shell ipc call" + +hl.bind("CTRL + ALT + T", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd(ipc .. " launcher toggle")) +hl.bind(mainMod .. " + C", hl.dsp.window.close()) +hl.bind(mainMod .. " + M", hl.dsp.exit()) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileMgr)) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ state = "toggle" })) +hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) +hl.bind(mainMod .. " + U", hl.dsp.layout("togglesplit")) +hl.bind(mainMod .. " + H", hl.dsp.layout("swapsplit")) + +-- Focus: arrow keys + IJKL +for _, m in ipairs({ + { "left", "l" }, { "right", "r" }, { "up", "u" }, { "down", "d" }, + { "J", "l" }, { "L", "r" }, { "I", "u" }, { "K", "d" }, +}) do + hl.bind(mainMod .. " + " .. m[1], hl.dsp.focus({ direction = m[2] })) +end + +-- Workspaces 1..10: digit + AZERTY keysym, plus SHIFT to move active window +local azerty = { + "ampersand", "eacute", "quotedbl", "apostrophe", "parenleft", + "minus", "egrave", "underscore", "ccedilla", "agrave", +} +for i = 1, 10 do + local digit = (i == 10) and "0" or tostring(i) + hl.bind(mainMod .. " + " .. digit, hl.dsp.focus({ workspace = i })) + hl.bind(mainMod .. " + " .. azerty[i], hl.dsp.focus({ workspace = i })) + hl.bind(mainMod .. " + SHIFT + " .. azerty[i], hl.dsp.window.move({ workspace = i })) +end + +-- Special workspace (scratchpad) +hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic")) +hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" })) + +-- Mouse scroll between workspaces +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Mouse drag / resize +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- Volume / brightness: locked + repeating +for _, b in ipairs({ + { "XF86AudioRaiseVolume", "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" }, + { "XF86AudioLowerVolume", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" }, + { "XF86AudioMute", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" }, + { "XF86AudioMicMute", "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" }, + { "XF86MonBrightnessUp", "brightnessctl -e4 -n2 set 5%+" }, + { "XF86MonBrightnessDown", "brightnessctl -e4 -n2 set 5%-" }, +}) do + hl.bind(b[1], hl.dsp.exec_cmd(b[2]), { locked = true, repeating = true }) +end + +-- Media player: locked only +for _, b in ipairs({ + { "XF86AudioNext", "playerctl next" }, + { "XF86AudioPause", "playerctl play-pause" }, + { "XF86AudioPlay", "playerctl play-pause" }, + { "XF86AudioPrev", "playerctl previous" }, +}) do + hl.bind(b[1], hl.dsp.exec_cmd(b[2]), { locked = true }) +end + +hl.bind("XF86Calculator", hl.dsp.exec_cmd("gnome-calculator")) + +-- Noctalia IPC +hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(ipc .. " darkMode toggle")) +hl.bind(mainMod .. " + SHIFT + L", hl.dsp.exec_cmd(ipc .. " lockScreen lock")) +hl.bind("Print", hl.dsp.exec_cmd(ipc .. " plugin:screenshot takeScreenshot region"), { locked = true }) +hl.bind("CTRL + Print", hl.dsp.exec_cmd(ipc .. " plugin:screenshot takeScreenshot screen"), { locked = true }) + +-- Lid switch +hl.bind( + "switch:Lid Switch", + hl.dsp.exec_cmd(os.getenv("HOME") .. "/.config/hypr/scripts/lidClosed.sh"), + { locked = true } +) diff --git a/.config/hypr/hyprland/look-and-feel.lua b/.config/hypr/hyprland/look-and-feel.lua new file mode 100644 index 0000000..a655825 --- /dev/null +++ b/.config/hypr/hyprland/look-and-feel.lua @@ -0,0 +1,65 @@ +-- https://wiki.hypr.land/Configuring/Variables/ +-- Shared defaults — do not edit. No custom/look-and-feel.lua override exists; add one if needed. + +hl.config({ + general = { + gaps_in = 5, + gaps_out = 10, + border_size = 2, + resize_on_border = false, + allow_tearing = false, + layout = "dwindle", + }, + + decoration = { + rounding = 12, + active_opacity = 1.0, + inactive_opacity = 1.0, + shadow = { + enabled = true, + range = 30, + render_power = 5, + offset = "0 5", + color = "rgba(00000070)", + }, + blur = { + enabled = false, + size = 3, + passes = 1, + vibrancy = 0.1696, + }, + }, + + animations = { + enabled = true, + }, + + dwindle = { + preserve_split = true, + }, + + master = { + new_status = "master", + mfact = 0.5, + }, + + misc = { + disable_splash_rendering = true, + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, + + xwayland = { + force_zero_scaling = true, + }, +}) + +-- Animations: each animation is its own hl.animation() call. +-- See https://wiki.hypr.land/Configuring/Animations/ +hl.animation({ leaf = "windowsIn", enabled = true, speed = 3, bezier = "default" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 3, bezier = "default" }) +hl.animation({ leaf = "border", enabled = true, speed = 3, bezier = "default" }) +hl.animation({ leaf = "borderangle", enabled = true, speed = 3, bezier = "default" }) +hl.animation({ leaf = "fade", enabled = true, speed = 3, bezier = "default" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 5, bezier = "default" }) +hl.animation({ leaf = "windowsMove", enabled = true, speed = 4, bezier = "default" }) diff --git a/.config/hypr/hyprland/monitors.lua b/.config/hypr/hyprland/monitors.lua new file mode 100644 index 0000000..086b6b5 --- /dev/null +++ b/.config/hypr/hyprland/monitors.lua @@ -0,0 +1,4 @@ +-- https://wiki.hypr.land/Configuring/Monitors/ +-- Shared defaults — do not edit. Add user-specific monitor config in custom/monitors.lua. + +hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" }) diff --git a/.config/hypr/hyprland/permissions.lua b/.config/hypr/hyprland/permissions.lua new file mode 100644 index 0000000..14afb0d --- /dev/null +++ b/.config/hypr/hyprland/permissions.lua @@ -0,0 +1,9 @@ +-- https://wiki.hypr.land/Configuring/Permissions/ +-- Shared defaults — do not edit. No custom/permissions.lua override exists; add one if needed. +-- Permission changes require a Hyprland restart, not a reload. + +-- hl.config({ ecosystem = { enforce_permissions = 1 } }) + +-- hl.permission({ path = "/usr/(bin|local/bin)/grim", capability = "screencopy", action = "allow" }) +-- hl.permission({ path = "/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", capability = "screencopy", action = "allow" }) +-- hl.permission({ path = "/usr/(bin|local/bin)/hyprpm", capability = "plugin", action = "allow" }) diff --git a/.config/hypr/hyprland/windowrules.lua b/.config/hypr/hyprland/windowrules.lua new file mode 100644 index 0000000..849db6f --- /dev/null +++ b/.config/hypr/hyprland/windowrules.lua @@ -0,0 +1,42 @@ +-- https://wiki.hypr.land/Configuring/Window-Rules/ +-- Shared defaults — do not edit. Add user-specific window rules in custom/windowrules.lua. + +hl.window_rule({ + name = "floating-window", + match = { class = "(Imprimer l'image|org.gnome.Calculator|org.gnome.Loupe)" }, + float = true, +}) + +hl.window_rule({ + name = "kitty-term", + match = { class = "kitty" }, + size = "(monitor_w*0.50) (monitor_h*0.47)", + float = true, + center = true, +}) + +hl.window_rule({ + name = "floating-messages", + match = { class = "(signal|org.telegram.desktop)" }, + size = "(monitor_w*0.27) (monitor_h*0.7)", + move = "(monitor_w*0.70) (monitor_h*0.15)", + float = true, + pin = true, +}) + +hl.window_rule({ + name = "filesystems", + match = { class = "DevTools|Tous les fichiers|org.gnome.Nautilus" }, + float = true, + center = true, + size = "(monitor_w*0.48) (monitor_h*0.5)", +}) + +hl.window_rule({ + name = "pip", + match = { class = "zen", title = "Picture-in-Picture" }, + center = true, + size = "1280 720", + float = true, + pin = true, +})