Compare commits
3 Commits
3a1899cae1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cfd1a4526a | |||
| aae0275e60 | |||
| 1b86de1ab1 |
7
.luarc.json
Normal file
7
.luarc.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"workspace": {
|
||||
"library": [
|
||||
"/usr/share/hypr/stubs"
|
||||
]
|
||||
}
|
||||
}
|
||||
382
roles/hyprland/files/hypr/hyprland.lua
Normal file
382
roles/hyprland/files/hypr/hyprland.lua
Normal file
@ -0,0 +1,382 @@
|
||||
-- ################
|
||||
-- ### MONITORS ###
|
||||
-- ################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
-- Default fallback for any monitor not explicitly configured below.
|
||||
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" })
|
||||
|
||||
-- Host-specific monitor + workspace config (symlinked to monitors.lua / workspaces.lua)
|
||||
require("monitors")
|
||||
require("workspaces")
|
||||
|
||||
-- ###################
|
||||
-- ### MY PROGRAMS ###
|
||||
-- ###################
|
||||
|
||||
local terminal = "ghostty"
|
||||
local fileManager = "ghostty -e yazi"
|
||||
local menu = "env XDG_CURRENT_DESKTOP=Hyprland wofi --show drun"
|
||||
|
||||
-- #################
|
||||
-- ### AUTOSTART ###
|
||||
-- #################
|
||||
|
||||
-- Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("/usr/lib/hyprpolkitagent/hyprpolkitagent")
|
||||
-- hl.exec_cmd("hyprpanel")
|
||||
hl.exec_cmd("quickshell")
|
||||
hl.exec_cmd("dunst")
|
||||
hl.exec_cmd("firefox")
|
||||
hl.exec_cmd("hyprpaper")
|
||||
-- hl.exec_cmd("gtk-launch deezer-pwa")
|
||||
|
||||
-- gnome keyring secret service
|
||||
hl.exec_cmd(
|
||||
"dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE"
|
||||
)
|
||||
end)
|
||||
|
||||
hl.config({
|
||||
debug = {
|
||||
disable_logs = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- #############################
|
||||
-- ### ENVIRONMENT VARIABLES ###
|
||||
-- #############################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("QT_QPA_PLATFORM", "wayland")
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
|
||||
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
|
||||
hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1")
|
||||
|
||||
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||
hl.env("WLR_NO_HARDWARE_CURSORS", "1")
|
||||
hl.env("CLUTTER_BACKEND", "wayland")
|
||||
hl.env("SDL_VIDEODRIVER", "wayland,x11")
|
||||
hl.env("GDK_BACKEND", "wayland,x11")
|
||||
hl.env("SDL_AUDIODRIVER", "pipewire")
|
||||
|
||||
-- jetbrains
|
||||
hl.env("_JAVA_AWT_WM_NONREPARENTING", "1")
|
||||
|
||||
-- ###################
|
||||
-- ### PERMISSIONS ###
|
||||
-- ###################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/
|
||||
--
|
||||
-- hl.config({ ecosystem = { enforce_permissions = true } })
|
||||
-- hl.permission({ binary = "/usr/(bin|local/bin)/grim", type = "screencopy", mode = "allow" })
|
||||
-- hl.permission({ binary = "/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", type = "screencopy", mode = "allow" })
|
||||
-- hl.permission({ binary = "/usr/(bin|local/bin)/hyprpm", type = "plugin", mode = "allow" })
|
||||
|
||||
-- #####################
|
||||
-- ### LOOK AND FEEL ###
|
||||
-- #####################
|
||||
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 5,
|
||||
gaps_out = 10,
|
||||
|
||||
border_size = 3,
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#variable-types for info about colors
|
||||
col = {
|
||||
active_border = { colors = { "rgba(9b1a1aee)", "rgba(c94040ee)" }, angle = 45 },
|
||||
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/Advanced-and-Cool/Tearing/ before you turn this on
|
||||
allow_tearing = false,
|
||||
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 12,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.96,
|
||||
fullscreen_opacity = 1.0,
|
||||
|
||||
-- Shadows (new nested syntax)
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 20, -- size of the shadow
|
||||
render_power = 3, -- 1–4, higher = faster falloff
|
||||
color = "rgba(0, 0, 0, 0.35)",
|
||||
offset = { 0, 6 }, -- optional: drop slightly downward
|
||||
scale = 1.0,
|
||||
},
|
||||
|
||||
-- Blur (nested)
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 8,
|
||||
passes = 3,
|
||||
new_optimizations = true,
|
||||
noise = 0.02,
|
||||
contrast = 1.00,
|
||||
brightness = 1.00,
|
||||
vibrancy = 0.18,
|
||||
xray = true,
|
||||
},
|
||||
},
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true,
|
||||
no_break_fs_vrr = 1,
|
||||
min_refresh_rate = 60,
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true, -- yes, please :)
|
||||
},
|
||||
})
|
||||
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } })
|
||||
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } })
|
||||
|
||||
-- Spring referenced by the window animations below
|
||||
hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more
|
||||
hl.config({
|
||||
dwindle = {
|
||||
preserve_split = true, -- You probably want this
|
||||
},
|
||||
})
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more
|
||||
hl.config({
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
})
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#misc
|
||||
hl.config({
|
||||
misc = {
|
||||
force_default_wallpaper = 0, -- 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. :(
|
||||
middle_click_paste = false,
|
||||
vrr = 2,
|
||||
},
|
||||
})
|
||||
|
||||
-- #############
|
||||
-- ### INPUT ###
|
||||
-- #############
|
||||
--
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#input
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us,de",
|
||||
kb_variant = "altgr-intl",
|
||||
-- kb_model =
|
||||
-- kb_options = "grp:caps_toggle",
|
||||
-- kb_rules =
|
||||
|
||||
follow_mouse = 2,
|
||||
|
||||
sensitivity = 0, -- -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
-- scroll_method = "on_button_down",
|
||||
-- scroll_button = 274,
|
||||
},
|
||||
})
|
||||
|
||||
-- Example per-device config
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more
|
||||
hl.device({
|
||||
name = "benq-zowie-benq-zowie-gaming-mouse",
|
||||
sensitivity = 0,
|
||||
})
|
||||
|
||||
-- ###################
|
||||
-- ### KEYBINDINGS ###
|
||||
-- ###################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Binds/
|
||||
local mainMod = "SUPER" -- Sets "Super" key as main modifier
|
||||
|
||||
hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(terminal))
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd(fileManager))
|
||||
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + G", hl.dsp.layout("togglesplit")) -- dwindle
|
||||
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized" }))
|
||||
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen" }))
|
||||
hl.bind(mainMod .. " + B", hl.dsp.exec_cmd("firefox"))
|
||||
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("thunderbird"))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("hyprlock"))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
||||
|
||||
-- Move focus with mainMod + arrow keys
|
||||
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "d" }))
|
||||
|
||||
-- Move window with mainMod + SHIFT + arrow keys
|
||||
hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "d" }))
|
||||
hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.window.move({ monitor = "+1" }))
|
||||
hl.bind(mainMod .. " + SHIFT + period", hl.dsp.window.move({ monitor = "-1" }))
|
||||
|
||||
-- Resize
|
||||
hl.bind(mainMod .. " + ALT + left", hl.dsp.window.resize({ x = -20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + right", hl.dsp.window.resize({ x = 20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + up", hl.dsp.window.resize({ x = 0, y = -20, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + down", hl.dsp.window.resize({ x = 0, y = 20, relative = true }), { repeating = true })
|
||||
|
||||
-- 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" }))
|
||||
|
||||
-- Scroll through existing workspaces with mainMod + scroll
|
||||
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
|
||||
-- Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Laptop multimedia keys for volume and LCD brightness
|
||||
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 })
|
||||
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = 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 })
|
||||
|
||||
-- Requires playerctl / Deezer controls
|
||||
hl.bind("CTRL + ALT + K", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh play-pause"))
|
||||
hl.bind("CTRL + ALT + Left", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh previous"))
|
||||
hl.bind("CTRL + ALT + Right", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh next"))
|
||||
hl.bind("CTRL + ALT + Up", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh +5%"))
|
||||
hl.bind("CTRL + ALT + Down", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh -5%"))
|
||||
|
||||
hl.bind("F7", hl.dsp.pass({ window = "class:^(discord)$" }))
|
||||
hl.bind("F8", hl.dsp.pass({ window = "class:^(discord)$" }))
|
||||
|
||||
-- Printscreen: screenshot a selected region (interactive)
|
||||
hl.bind("Print", hl.dsp.exec_cmd("hyprshot -zm region"))
|
||||
|
||||
-- ######################
|
||||
-- ### WINDOW RULES ###
|
||||
-- ######################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ for more
|
||||
|
||||
-- Ignore maximize requests from apps. You'll probably like this.
|
||||
hl.window_rule({
|
||||
name = "suppress-maximize-events",
|
||||
match = { class = ".*" },
|
||||
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
hl.config({
|
||||
xwayland = {
|
||||
enabled = true,
|
||||
use_nearest_neighbor = true,
|
||||
force_zero_scaling = false,
|
||||
create_abstract_socket = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- Fix some dragging issues with XWayland
|
||||
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 = "jetbrains-shortcuts",
|
||||
match = { class = "^(jetbrains-.*|android-studio)$" },
|
||||
|
||||
no_shortcuts_inhibit = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-tile",
|
||||
match = { class = "^(jetbrains-.*|android-studio)$" },
|
||||
|
||||
float = false,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-tab-drag",
|
||||
match = {
|
||||
class = "^(jetbrains-.*|android-studio)$",
|
||||
title = "^(\\s*|Delete|Replace All)$",
|
||||
},
|
||||
|
||||
no_initial_focus = true,
|
||||
stay_focused = true,
|
||||
float = true,
|
||||
center = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-commit-preview",
|
||||
match = {
|
||||
class = "^(jetbrains-.*|android-studio)$",
|
||||
title = "^Commit.*$",
|
||||
},
|
||||
|
||||
float = false,
|
||||
})
|
||||
4
roles/hyprland/files/hypr/monitors/jk-nb.lua
Normal file
4
roles/hyprland/files/hypr/monitors/jk-nb.lua
Normal file
@ -0,0 +1,4 @@
|
||||
-- Generated originally by nwg-displays; ported to Lua.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
|
||||
hl.monitor({ output = "eDP-1", mode = "2880x1800@90.0", position = "0x0", scale = 1.4999999999999996 })
|
||||
7
roles/hyprland/files/hypr/monitors/jk-pc.lua
Normal file
7
roles/hyprland/files/hypr/monitors/jk-pc.lua
Normal file
@ -0,0 +1,7 @@
|
||||
-- Generated originally by nwg-displays; ported to Lua.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
|
||||
hl.monitor({ output = "DP-1", mode = "2560x1440@165.0", position = "6626x876", scale = 1.0, vrr = 2 })
|
||||
hl.monitor({ output = "DP-2", mode = "2560x1440@165.0", position = "4066x876", scale = 1.0 })
|
||||
hl.monitor({ output = "HDMI-A-2", mode = "1920x1080@60.0", position = "9186x396", scale = 1.0, transform = 3 })
|
||||
hl.monitor({ output = "HDMI-A-1", disabled = true })
|
||||
@ -1,5 +1,15 @@
|
||||
# Generated by nwg-displays on 2026-04-20 at 01:17:12. Do not edit manually.
|
||||
|
||||
# hl.monitor({
|
||||
# output = "DP-1",
|
||||
# mode = "2560x1440@165.0",
|
||||
# position = "6626x876",
|
||||
# scale = 1,
|
||||
# bitdepth = 10,
|
||||
# cm = "hdr",
|
||||
# })
|
||||
|
||||
|
||||
monitor=DP-1,2560x1440@165.0,6626x876,1.0,vrr,2
|
||||
monitor=DP-2,2560x1440@165.0,4066x876,1.0
|
||||
monitor=HDMI-A-2,1920x1080@60.0,9186x396,1.0,transform,3
|
||||
|
||||
17
roles/hyprland/files/hypr/workspaces/jk-nb.lua
Normal file
17
roles/hyprland/files/hypr/workspaces/jk-nb.lua
Normal file
@ -0,0 +1,17 @@
|
||||
-- Persistent workspaces + switching binds (single monitor).
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
|
||||
local mainMod = "SUPER"
|
||||
|
||||
for i = 1, 10 do
|
||||
hl.workspace_rule({
|
||||
workspace = tostring(i),
|
||||
persistent = true,
|
||||
default = (i == 1) or nil,
|
||||
})
|
||||
|
||||
local key = i % 10 -- 10 maps to key 0
|
||||
|
||||
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i, follow = false }))
|
||||
end
|
||||
38
roles/hyprland/files/hypr/workspaces/jk-pc.lua
Normal file
38
roles/hyprland/files/hypr/workspaces/jk-pc.lua
Normal file
@ -0,0 +1,38 @@
|
||||
-- Per-monitor persistent workspaces + switching binds.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
|
||||
local mainMod = "SUPER"
|
||||
|
||||
-- workspace id -> monitor assignment
|
||||
local workspaces = {
|
||||
{ id = 1, monitor = "DP-1", default = true },
|
||||
{ id = 2, monitor = "DP-1" },
|
||||
{ id = 3, monitor = "DP-1" },
|
||||
{ id = 4, monitor = "DP-2", default = true },
|
||||
{ id = 5, monitor = "DP-2" },
|
||||
{ id = 6, monitor = "DP-2" },
|
||||
{ id = 7, monitor = "HDMI-A-2" },
|
||||
{ id = 8, monitor = "HDMI-A-2" },
|
||||
{ id = 9, monitor = "HDMI-A-2", default = true },
|
||||
{ id = 10, monitor = "HDMI-A-1", default = true },
|
||||
}
|
||||
|
||||
for _, ws in ipairs(workspaces) do
|
||||
hl.workspace_rule({
|
||||
workspace = tostring(ws.id),
|
||||
monitor = ws.monitor,
|
||||
persistent = true,
|
||||
default = ws.default,
|
||||
})
|
||||
|
||||
local key = ws.id % 10 -- 10 maps to key 0
|
||||
|
||||
-- Focus the monitor, then switch to the workspace on it
|
||||
hl.bind(mainMod .. " + " .. key, function()
|
||||
hl.dispatch(hl.dsp.focus({ monitor = ws.monitor }))
|
||||
hl.dispatch(hl.dsp.focus({ workspace = ws.id }))
|
||||
end)
|
||||
|
||||
-- Move the active window to the workspace silently (don't follow)
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = ws.id, follow = false }))
|
||||
end
|
||||
@ -23,24 +23,26 @@
|
||||
state: link
|
||||
force: true
|
||||
loop:
|
||||
- hyprland.conf
|
||||
# hyprland.conf ported to hyprland.lua (hyprlang deprecated in Hyprland >= 0.55).
|
||||
# hyprlock/hyprpaper stay on hyprlang - they do not support Lua configs yet.
|
||||
- hyprland.lua
|
||||
- hyprlock.conf
|
||||
- hyprpaper.conf
|
||||
- scripts
|
||||
loop_control:
|
||||
loop_var: conf_file
|
||||
|
||||
- name: Symlink host-specific monitors.conf
|
||||
- name: Symlink host-specific monitors.lua
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/monitors_{{ ansible_facts['hostname'] }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/monitors.conf"
|
||||
src: "{{ role_path }}/files/hypr/monitors/{{ ansible_facts['hostname'] }}.lua"
|
||||
dest: "{{ config_dir }}/hypr/monitors.lua"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Symlink host-specific workspaces.conf
|
||||
- name: Symlink host-specific workspaces.lua
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/workspaces_{{ ansible_facts['hostname'] }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/workspaces.conf"
|
||||
src: "{{ role_path }}/files/hypr/workspaces/{{ ansible_facts['hostname'] }}.lua"
|
||||
dest: "{{ config_dir }}/hypr/workspaces.lua"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: Hyprland.dispatch("workspace " + root.workspace.id)
|
||||
// Hyprland >= 0.55 with a Lua config evaluates IPC dispatches as Lua,
|
||||
// so the legacy "workspace N" string no longer parses. Use the Lua dispatcher.
|
||||
onClicked: Hyprland.dispatch("hl.dsp.focus({ workspace = " + root.workspace.id + " })")
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=50000
|
||||
SAVEHOST=50000
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
|
||||
setopt share_history # persist, and share live across open shells
|
||||
# setopt inc_append_history # history of session appended to HISTFILE after session ends
|
||||
setopt extended_history # record timestamps
|
||||
setopt hist_ignore_dups # drop a command identical to the one before it
|
||||
setopt hist_ignore_space # don't record commands typed with a leading space
|
||||
setopt hist_verify # let you edit a !-expansion before it runs
|
||||
setopt inc_append_history # history of session appended to HISTFILE after session ends
|
||||
setopt hist_ignore_dups # drop a command identical to the one before it
|
||||
setopt hist_ignore_space # don't record commands typed with a leading space
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_verify # let you edit a !-expansion before it runs
|
||||
setopt append_history
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
@ -8,7 +8,7 @@ alias zrc="vim ~/.zshrc"
|
||||
alias dotf='vim ~/dotfiles/'
|
||||
|
||||
# TODO relative path
|
||||
alias hyprconf='vim ~/dotfiles/roles/hyprland/files/hypr/hyprland.conf'
|
||||
alias hyprconf='vim ~/dotfiles/roles/hyprland/files/hypr/hyprland.lua'
|
||||
|
||||
alias ls='eza'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user