diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index 3b642bf..db42a12 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -134,4 +134,6 @@ }, "workbench.colorTheme": "Monokai Pro Light", "workbench.editor.editorActionsLocation": "hidden", + "editor.overtypeCursorStyle": "block-outline", + "editor.cursorStyle": "block", } \ No newline at end of file diff --git a/.config/helix/config.toml b/.config/helix/config.toml index b57ab35..7ae8300 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -16,3 +16,7 @@ separator = "|" [editor.soft-wrap] enable = true + +[keys.normal] +j = "move_visual_line_up" +k = "move_visual_line_down" diff --git a/.config/hypr/hypr/.vscode/settings.json b/.config/hypr/hypr/.vscode/settings.json new file mode 100644 index 0000000..b61381a --- /dev/null +++ b/.config/hypr/hypr/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "editor.lineNumbers": "relative", + "Lua.workspace.library": [ + "/usr/share/hypr/stubs" + ] +} \ No newline at end of file diff --git a/.config/hypr/hypr/hypridle.conf b/.config/hypr/hypr/hypridle.conf new file mode 100644 index 0000000..b7c0681 --- /dev/null +++ b/.config/hypr/hypr/hypridle.conf @@ -0,0 +1,27 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' # to avoid having to press a key twice to turn on the display. +} + +# listener { +# timeout = 150 # 2.5min. +# on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. +# on-resume = brightnessctl -r # monitor backlight restore. +# } + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 330 # 5.5min + on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })' # screen off when timeout has passed + on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' # screen on when activity is detected after timeout has fired. +} + +#listener { +# timeout = 2700 # 45min +# on-timeout = systemctl suspend # suspend pc +#} diff --git a/.config/hypr/hypr/hyprland.conf b/.config/hypr/hypr/hyprland.conf new file mode 120000 index 0000000..48a61f5 --- /dev/null +++ b/.config/hypr/hypr/hyprland.conf @@ -0,0 +1 @@ +../../dotfiles/.config/hypr/hyprland.conf \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland.conf.deprecated b/.config/hypr/hypr/hyprland.conf.deprecated new file mode 120000 index 0000000..48a61f5 --- /dev/null +++ b/.config/hypr/hypr/hyprland.conf.deprecated @@ -0,0 +1 @@ +../../dotfiles/.config/hypr/hyprland.conf \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland.lua b/.config/hypr/hypr/hyprland.lua new file mode 100644 index 0000000..3111718 --- /dev/null +++ b/.config/hypr/hypr/hyprland.lua @@ -0,0 +1,14 @@ +require("hyprland.general") +require("hyprland.monitors") +require("hyprland.autostart") +require("hyprland.environment") +require("hyprland.animations") +require("hyprland.layout") +require("hyprland.input") +require("hyprland.binds") + +require("hyprland.rules.windows") +require("hyprland.rules.workspaces") +require("hyprland.rules.layers") + +require("hyprland.listeners") \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/animations.lua b/.config/hypr/hypr/hyprland/animations.lua new file mode 100644 index 0000000..468fb2c --- /dev/null +++ b/.config/hypr/hypr/hyprland/animations.lua @@ -0,0 +1,38 @@ +hl.config({ + animations = { + enabled = true + } +}) + + + +hl.curve("custom", { type = "bezier", points = {{ 0.05, 0.09 }, { 0.1, 1.05 }}}) + +-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +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} } }) +hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } }) + +-- Default springs +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 = "windows", enabled = true, speed = 2, bezier = "custom" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 4, bezier = "easeOutQuint", style = "popin 80%" }) + +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +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 = 7, 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 = 3, bezier = "default" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) + +hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 2, bezier = "easeOutQuint", style = "fade"}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/autostart.lua b/.config/hypr/hypr/hyprland/autostart.lua new file mode 100644 index 0000000..8cb5c5a --- /dev/null +++ b/.config/hypr/hypr/hyprland/autostart.lua @@ -0,0 +1,20 @@ +local programs = require("hyprland.variables.programs") +local workspaces = require("hyprland.variables.workspaces") + +-- TODO: Convert as many of these as possible to systemd units + +hl.on("hyprland.start", function () + hl.exec_cmd("swayosd-server") + + hl.exec_cmd(programs.terminal, { workspace = workspaces.special.term .. " silent"}) + hl.exec_cmd(programs.browser .. " 'ext+container:name=Meta&url=https://web.whatsapp.com' 'ext+container:name=Wasteside&url=https://mail.google.com'", { workspace = workspaces.special.social .. " silent"}) + hl.exec_cmd("gnome-calendar", { workspace = workspaces.special.social .. " silent"}) + hl.exec_cmd(programs.terminal .. " -e spotify_player", { workspace = workspaces.special.media .. " silent"}) + hl.exec_cmd(programs.terminal .. " -e wiremix", { workspace = workspaces.special.media .. " silent"}) + hl.exec_cmd("clickup", { workspace = workspaces.special.todo .. " silent"}) + hl.exec_cmd(programs.file_manager, { workspace = workspaces.special.files .. " silent"}) + hl.exec_cmd("localsend", { workspace = workspaces.special.files .. " silent"}) + + hl.exec_cmd("ratbagctl list") + hl.exec_cmd("~/code/ha-notifications/ha-notifications") +end) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/binds.lua b/.config/hypr/hypr/hyprland/binds.lua new file mode 100644 index 0000000..21e0179 --- /dev/null +++ b/.config/hypr/hypr/hyprland/binds.lua @@ -0,0 +1,96 @@ +local programs = require("hyprland.variables.programs") + +hl.config({ + binds = { + hide_special_on_workspace_change = true + } +}) + +local mainMod = "SUPER" + +hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(programs.terminal)) +hl.bind(mainMod .. " + B", hl.dsp.exec_cmd(programs.browser)) +hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(programs.launcher)) +hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(programs.launcher)) +hl.bind(mainMod .. " + Q", hl.dsp.window.close()) +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen()) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(programs.file_manager)) +hl.bind(mainMod .. " + V", hl.dsp.exec_cmd("vicinae vicinae://launch/clipboard/history")) +hl.bind(mainMod .. " + X", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + P", hl.dsp.window.pin()) +hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit")) +hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("hyprshot -m region")) +hl.bind(mainMod .. " + SHIFT + ALT + S", hl.dsp.exec_cmd("hyprshot -m window")) +hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m active")) +hl.bind(mainMod .. " + SHIFT + B", hl.dsp.exec_cmd("pkill waybar && hyprctl dispatch exec waybar")) +hl.bind(mainMod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprpicker | wl-copy")) +hl.bind(mainMod .. " + END", hl.dsp.exec_cmd("wlogout -b 6 -L 1100 -T 650 -B 650")) +hl.bind(mainMod .. " + N", hl.dsp.exec_cmd(programs.notepad)) + +-- Moving focus with mainMod + arrow keys +hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" })) + +-- Moving windows with mainMod + SHIFT + arrow keys +hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" })) +hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" })) +hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" })) +hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" })) + +local workspaces = require("hyprland.variables.workspaces") + +-- Switch workspaces of primary monitor with mainMod + [1-7] +for i, workspace in ipairs(workspaces.primary) do + hl.bind(mainMod .. " + " .. i, hl.dsp.focus({ workspace = workspace })) +end + +-- Switch workspaces of secondary monitor with mainMod + [F1-F7] +for i, workspace in ipairs(workspaces.secondary) do + hl.bind(mainMod .. " + F" .. i, hl.dsp.focus({ workspace = workspace })) +end + +-- Move active window to a workspace with mainMod + SHIFT + [1-7] (primary monitor) +for i, workspace in ipairs(workspaces.primary) do + hl.bind(mainMod .. " + SHIFT + " .. i, hl.dsp.window.move({ workspace = workspace })) +end + +-- Move active window to a workspace with mainMod + SHIFT + [F1-F7] (secondary monitor) +for i, workspace in ipairs(workspaces.secondary) do + hl.bind(mainMod .. " + SHIFT + F" .. i, hl.dsp.window.move({ workspace = workspace })) +end + +-- Special workspaces are bound to F8-F12 (aliased to G1-G5 on my keyboard) +local order = { workspaces.special.term, workspaces.special.social, workspaces.special.media, workspaces.special.todo, workspaces.special.files } +for i, workspace in ipairs(order) do + local specialWorkspace = string.match(workspace, "special:(.+)") + local fkey = 12 - (i - 1) + hl.bind(mainMod .. " + F" .. fkey, hl.dsp.focus({ monitor = "DP-1"})) + hl.bind(mainMod .. " + F" .. fkey, hl.dsp.workspace.toggle_special(specialWorkspace)) + hl.bind(mainMod .. " + SHIFT + F" .. fkey, hl.dsp.window.move({ workspace = workspace })) +end + +-- Special workspace for recording +hl.bind(mainMod .. " + R", hl.dsp.focus({ workspace = workspaces.recording })) +hl.bind(mainMod .. " + SHIFT + R", hl.dsp.window.move({ workspace = workspaces.recording })) + +-- 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 }) + +-- Media controls +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("swayosd-client --output-volume raise"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("swayosd-client --output-volume lower"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("swayosd-client --output-volume mute-toggle"), { locked = true, repeating = true }) + + +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { 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(mainMod .. "+ L", hl.dsp.exec_cmd("loginctl lock-session")) + +hl.bind(mainMod .. " + page_up", hl.dsp.exec_cmd("~/.config/hypr/scripts/random-wallpaper.sh"), { locked = true }) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/environment.lua b/.config/hypr/hypr/hyprland/environment.lua new file mode 100644 index 0000000..863dda2 --- /dev/null +++ b/.config/hypr/hypr/hyprland/environment.lua @@ -0,0 +1,4 @@ +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("XDG_SESSION_TYPE", "wayland") +hl.env("HYPRSHOT_DIR", "/home/paul/screenshots") \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/general.lua b/.config/hypr/hypr/hyprland/general.lua new file mode 100644 index 0000000..06a9bd7 --- /dev/null +++ b/.config/hypr/hypr/hyprland/general.lua @@ -0,0 +1,56 @@ +local colors = require("hyprland.variables.colors") + +hl.config({ + general = { + gaps_in = 5, + gaps_out = { top = 10, right = 20, bottom = 20, left = 20 }, + + border_size = 2, + + -- https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col = { + active_border = { colors = { colors.primary.from, colors.primary.to }, angle = 45 }, + }, + + -- Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false, + + -- Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false, + + -- Use dwindle per default, changed on a per-workspace basis in the workspace rules below + layout = "dwindle" + }, + + decoration = { + rounding = 10, + rounding_power = 2, + + -- Change transparency of focused and unfocused windows + active_opacity = 1.0, + inactive_opacity = 1.0, + + dim_special = 0.7, + + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = 0xee1a1a1a, + }, + + blur = { + enabled = true, + size = 3, + passes = 1, + + vibrancy = 0.1696, + }, + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + close_special_on_empty = false, + } +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/input.lua b/.config/hypr/hypr/hyprland/input.lua new file mode 100644 index 0000000..c20c982 --- /dev/null +++ b/.config/hypr/hypr/hyprland/input.lua @@ -0,0 +1,20 @@ +hl.config({ + cursor = { + no_hardware_cursors = 0, + }, + + input = { + kb_layout = "de", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + + numlock_by_default = true, + + follow_mouse = 2, + sensitivity = 0 + }, + + gestures = {} +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/layout.lua b/.config/hypr/hypr/hyprland/layout.lua new file mode 100644 index 0000000..1df03e5 --- /dev/null +++ b/.config/hypr/hypr/hyprland/layout.lua @@ -0,0 +1,46 @@ +hl.config({ + dwindle = { + preserve_split = true, + + smart_split = false, -- No splitting based on cursor position + force_split = 2, -- Always split to the right + }, + + master = { + new_status = "slave", -- New windows are added as slaves + + mfact = 0.7, + orientation = "right" + } +}) + +-- I needed to create a custom layout, because I can only configure the master layout's +-- orientation globally, and this layout is used specifically for a vertical monitor. +local focus_split = 0.66 +hl.layout.register("vertical", { + recalculate = function(ctx) + local n = #ctx.targets + if n == 0 then return end + + -- First, we place the first target in the focus area + local focus_area = ctx:split(ctx.area, "bottom", focus_split) + ctx.targets[1]:place(focus_area) + + -- Then we split the remaining area into equal parts for the other targets (left-to-right) + local remaining_area = ctx:split(ctx.area, "top", 1 - focus_split) + local remaining = n - 1 + + for i, target in ipairs(ctx.targets) do + if i == 1 then goto continue end -- Skip the first target, it's already placed + + local remaining_split = 1 / remaining + local target_area = ctx:split(remaining_area, "left", remaining_split) + + remaining_area = ctx:split(remaining_area, "right", 1 - remaining_split) + remaining = remaining - 1 + + target:place(target_area) + ::continue:: + end + end +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/listeners.lua b/.config/hypr/hypr/hyprland/listeners.lua new file mode 100644 index 0000000..f249f37 --- /dev/null +++ b/.config/hypr/hypr/hyprland/listeners.lua @@ -0,0 +1,23 @@ + +-- Since the Bitwarden modal is a Firefox window (and its name only changes some +-- time after opening), it cannot be centered/floated by a window rule, as these +-- effects are static and need to be known at the time of window creation. +-- This listener instead detects when the title of a Firefox window changes to the +-- one Bitwarden uses, and then applies the floating and centering effects at that time. +hl.on("window.title", function (w) + if w.class ~= "firefox" then return end + + local title = w.title + + if string.find(title, "Extension: (Bitwarden Password Manager)", 1, true) then + if w.floating then return end + hl.dispatch(hl.dsp.window.float({ window = w})) + hl.dispatch(hl.dsp.window.resize({ window = w, x = 800, y = 800 })) + hl.dispatch(hl.dsp.window.center({ window = w })) + end +end) + +-- On every boot, change the lock screen wallpaper +hl.on("hyprland.start", function () + hl.dispatch(hl.dsp.exec_cmd("~/.config/hypr/scripts/random-wallpaper.sh")) +end) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/monitors.lua b/.config/hypr/hypr/hyprland/monitors.lua new file mode 100644 index 0000000..ab01498 --- /dev/null +++ b/.config/hypr/hypr/hyprland/monitors.lua @@ -0,0 +1,31 @@ +local monitors = require("hyprland.variables.monitors") + +hl.monitor({ + output = monitors.primary, + mode = "3440x1440@144", + position = "auto", + scale = "auto" +}) + +hl.monitor({ + output = monitors.secondary, + mode = "1920x1080", + position = "-1080x-550", + scale = 1, + transform = 1 +}) + +hl.monitor({ + output = monitors.tv, + mode = "3440x1440", + position = "auto", + scale = "auto" +}) + +-- Recommended rule for quickly plugging in random monitors: +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = 1 +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/rules/layers.lua b/.config/hypr/hypr/hyprland/rules/layers.lua new file mode 100644 index 0000000..72345a5 --- /dev/null +++ b/.config/hypr/hypr/hyprland/rules/layers.lua @@ -0,0 +1,34 @@ +hl.layer_rule({ + name = "notifications", + match = { namespace = "notifications" }, + + animation = "slide" +}) + +hl.layer_rule({ + name = "no-anim-for-selection", + match = { namespace = "selection" }, + + no_anim = true +}) + +hl.layer_rule({ + name = "blur-waybar", + match = { namespace = "waybar" }, + + blur = true, +}) + +hl.layer_rule({ + name = "blur-tofi", + match = { namespace = "tofi" }, + + blur = true, +}) + +hl.layer_rule({ + name = "blur-swayosd", + match = { namespace = "swayosd" }, + + blur = true, +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/rules/windows.lua b/.config/hypr/hypr/hyprland/rules/windows.lua new file mode 100644 index 0000000..632f09f --- /dev/null +++ b/.config/hypr/hypr/hyprland/rules/windows.lua @@ -0,0 +1,118 @@ +local colors = require("hyprland.variables.colors") + +-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ +-- and https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ + +-- Example window rules that are useful + +hl.window_rule({ + -- Ignore maximize requests from all apps. You'll probably like this. + name = "suppress-maximize-events", + match = { class = ".*" }, + + suppress_event = "maximize", +}) + +hl.window_rule({ + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + + no_focus = true, +}) + +hl.window_rule({ + name = "nofloat-xfreerdp", + match = { class = "^(xfreerdp)$" }, + + tile = true +}) + +hl.window_rule({ + name = "float-audio-settings", + match = { class = "org.pulseaudio.pavucontrol" }, + + float = true, + size = { 500, 1000 }, + move = { 2841, 61 }, + pin = true +}) + +hl.window_rule({ + name = "float-bluetooth-settings", + match = { title = "overskride" }, + + float = true, + size = { 765, 765 }, + move = { 2653, 44 }, + pin = true +}) + +hl.window_rule({ + name = "pinned-bordercolor", + match = { pin = true }, + + border_color = { colors = { colors.secondary.from, colors.secondary.to }, angle = 45 }, +}) + +hl.window_rule({ + name = "float-waydroid", + match = { initial_class = "Waydroid" }, + + float = true, + size = { 576, 1024 } +}) + +hl.window_rule({ + name = "float-waydroid-apps", + match = { initial_class = "waydroid\\..*" }, + + float = true, + size = { 576, 1024 } +}) + +hl.window_rule({ + name = "vicinae", + match = { initial_class = "vicinae" }, + + float = true, + pin = true, + stay_focused = true, + dim_around = true, + no_anim = true +}) + +hl.window_rule({ + name = "center-clickup-command-bar", + match = { title = "ClickUp Command Bar" }, + + center = true, + float = true, + stay_focused = true, +}) + +hl.window_rule({ + name = "libreoffice-import-modal", + match = { initial_class = "soffice", initial_title = "Text Import.*" }, + + float = true, + size = { 800, 400 }, + stay_focused = true, + dim_around = true, + move = { 1320, 520 } +}) + +hl.window_rule({ + name = "focus-bitwarden", + match = { class = "firefox", title = "Extension: \\(Bitwarden Password Manager\\).*" }, + + stay_focused = true, + dim_around = true, +}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/rules/workspaces.lua b/.config/hypr/hypr/hyprland/rules/workspaces.lua new file mode 100644 index 0000000..7fb0fd6 --- /dev/null +++ b/.config/hypr/hypr/hyprland/rules/workspaces.lua @@ -0,0 +1,31 @@ +local workspaces = require("hyprland.variables.workspaces") +local monitors = require("hyprland.variables.monitors") + +-- Assign workspaces to monitors +for _, workspace in ipairs(workspaces.primary) do + hl.workspace_rule({ workspace = workspace, monitor = monitors.primary }) +end + +-- Secondary monitor workspaces should have a gap at the top if only one window +-- is present, to make it more readable (vertical setup). +for _, workspace in ipairs(workspaces.secondary) do + hl.workspace_rule({ workspace = workspace, monitor = monitors.secondary, layout = "lua:vertical" }) +end + + + +-- Set gaps for special workspaces +for _, workspace in pairs(workspaces.special) do + hl.workspace_rule({ workspace = workspace, gaps_out = 64 }) +end + +-- Configure layouts +hl.workspace_rule({ workspace = workspaces.primary[1], layout = "master"}) +hl.workspace_rule({ workspace = workspaces.special.term, layout = "master"}) + +-- Set defaults +hl.workspace_rule({ workspace = workspaces.primary[1], default = true }) +hl.workspace_rule({ workspace = workspaces.secondary[1], default = true }) + +-- Special monitor for recording in 16:9 aspect ration on the widescreen monitor +hl.workspace_rule({ workspace = workspaces.recording, layout = "dwindle", gaps_out = {left = 758, bottom = 164, right = 758, top = 164}, monitor = monitors.primary}) \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/variables/colors.lua b/.config/hypr/hypr/hyprland/variables/colors.lua new file mode 100644 index 0000000..a6d33a2 --- /dev/null +++ b/.config/hypr/hypr/hyprland/variables/colors.lua @@ -0,0 +1,13 @@ +local M = {} + +M.primary = { + from = "rgba(33ccffee)", + to = "rgba(00ff99ee)" +} + +M.secondary = { + from = "rgb(cc34a4)", + to = "rgb(4b2d70)" +} + +return M \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/variables/monitors.lua b/.config/hypr/hypr/hyprland/variables/monitors.lua new file mode 100644 index 0000000..b210902 --- /dev/null +++ b/.config/hypr/hypr/hyprland/variables/monitors.lua @@ -0,0 +1,8 @@ +local M = {} + +M.primary = "DP-1" +M.secondary = "DP-2" + +M.tv = "HDMI-A-1" + +return M \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/variables/programs.lua b/.config/hypr/hypr/hyprland/variables/programs.lua new file mode 100644 index 0000000..b2290f5 --- /dev/null +++ b/.config/hypr/hypr/hyprland/variables/programs.lua @@ -0,0 +1,9 @@ +local M = {} + +M.terminal = "alacritty" +M.browser = "firefox" +M.launcher = "vicinae toggle" +M.file_manager = "nautilus --new-window" +M.notepad = "gnome-text-editor -in" + +return M \ No newline at end of file diff --git a/.config/hypr/hypr/hyprland/variables/workspaces.lua b/.config/hypr/hypr/hyprland/variables/workspaces.lua new file mode 100644 index 0000000..4f16122 --- /dev/null +++ b/.config/hypr/hypr/hyprland/variables/workspaces.lua @@ -0,0 +1,17 @@ +local M = {} + +M.special = { + term = "special:term", + social = "special:social", + media = "special:media", + todo = "special:todo", + files = "special:files" +} + +M.primary = { "1", "2", "3", "4", "5", "6", "7" } + +M.secondary = { "11", "12", "13", "14", "15", "16", "17" } + +M.recording = "name:recording" + +return M \ No newline at end of file diff --git a/.config/hypr/hypr/hyprlock.conf b/.config/hypr/hypr/hyprlock.conf new file mode 100644 index 0000000..d6194d1 --- /dev/null +++ b/.config/hypr/hypr/hyprlock.conf @@ -0,0 +1,91 @@ +# BACKGROUND +background { + monitor = DP-1 + path = ~/.config/hypr/wallpaper/current.jpg + blur_passes = 0 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +background { + monitor = DP-2 + color = rgba(0, 0, 0, 1) +} + +# GENERAL +general { + no_fade_in = false + grace = 10 + disable_loading_bar = false +} + +# Time +label { + monitor = DP-1 + text = cmd[update:1000] echo "$(date +"%H:%M")" + color = rgba(216, 222, 233, .75) + font_size = 60 + font_family = Verdana Bold + position = 0, 450 + halign = center + valign = center +} + +# Date +label { + monitor = DP-1 + text = cmd[update:1000] echo "$(date +"%d. %b %Y")" + color = rgba(216, 222, 233, .75) + font_size = 15 + font_family = Verdana + position = 0, 380 + halign = center + valign = center +} + +# Password Input +input-field { + monitor = DP-1 + size = 320, 55 + outline_thickness = 0 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + outer_color = rgba(255, 255, 255, 0) + inner_color = rgba(255, 255, 255, 0.1) + font_color = rgb(200, 200, 200) + rounding = 16 + fade_on_empty = true + font_family = SF Pro Display + placeholder_text = + hide_input = false + position = 0, -600 + halign = center + valign = center +} + +# Force unlock hint on second monitor +label { + monitor = DP-2 + text = Locked. To force unlock, send SIGUSR1 to hyprlock using a TTY. + color = rgba(216, 222, 233, .75) + font_size = 12 + font_family = Verdana + position = 0, -875 + halign = center + valign = center +} + +# Current wallpaper label +label { + monitor = DP-2 + text = cmd[] echo "Current wallpaper: $(basename "$(readlink ~/.config/hypr/wallpaper/current.jpg)")" + color = rgba(216, 222, 233, .75) + font_size = 12 + font_family = Verdana + position = 0, -900 + halign = center + valign = center +} \ No newline at end of file diff --git a/.config/hypr/hypr/hyprpaper.conf b/.config/hypr/hypr/hyprpaper.conf new file mode 120000 index 0000000..057f52a --- /dev/null +++ b/.config/hypr/hypr/hyprpaper.conf @@ -0,0 +1 @@ +../../dotfiles/.config/hypr/hyprpaper.conf \ No newline at end of file diff --git a/.config/hypr/hypr/img/gnome-background-lock.webp b/.config/hypr/hypr/img/gnome-background-lock.webp new file mode 100644 index 0000000..aa45f0f Binary files /dev/null and b/.config/hypr/hypr/img/gnome-background-lock.webp differ diff --git a/.config/hypr/hypr/img/gnome-background.webp b/.config/hypr/hypr/img/gnome-background.webp new file mode 100644 index 0000000..aa45f0f Binary files /dev/null and b/.config/hypr/hypr/img/gnome-background.webp differ diff --git a/.config/hypr/hypr/presets b/.config/hypr/hypr/presets new file mode 120000 index 0000000..2e74c82 --- /dev/null +++ b/.config/hypr/hypr/presets @@ -0,0 +1 @@ +../../dotfiles/.config/hypr/presets \ No newline at end of file diff --git a/.config/hypr/hypr/scripts/random-wallpaper.sh b/.config/hypr/hypr/scripts/random-wallpaper.sh new file mode 100755 index 0000000..c44d66e --- /dev/null +++ b/.config/hypr/hypr/scripts/random-wallpaper.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +cd ~/.config/hypr/wallpaper + +ln -sf "$(find candidates/ -maxdepth 1 -type f | shuf -n1)" current.jpg + +# Update hyprlock (if running) by sending SIGUSR2 (doesnt work currently, maybe because of symlink). +# https://wiki.hypr.land/Hypr-Ecosystem/hyprlock/#user-signals +pkill -USR2 hyprlock \ No newline at end of file diff --git a/.config/hypr/hypr/scripts/songdetail.sh b/.config/hypr/hypr/scripts/songdetail.sh new file mode 120000 index 0000000..7f1f72e --- /dev/null +++ b/.config/hypr/hypr/scripts/songdetail.sh @@ -0,0 +1 @@ +../../../dotfiles/.config/hypr/scripts/songdetail.sh \ No newline at end of file diff --git a/.config/hypr/hypr/wallpaper/candidates b/.config/hypr/hypr/wallpaper/candidates new file mode 120000 index 0000000..0cb5706 --- /dev/null +++ b/.config/hypr/hypr/wallpaper/candidates @@ -0,0 +1 @@ +source/nature \ No newline at end of file diff --git a/.config/hypr/hypr/wallpaper/current.jpg b/.config/hypr/hypr/wallpaper/current.jpg new file mode 120000 index 0000000..edbbae6 --- /dev/null +++ b/.config/hypr/hypr/wallpaper/current.jpg @@ -0,0 +1 @@ +candidates/190 - S2CCnyp.jpg \ No newline at end of file diff --git a/.config/hypr/hypr/xdph.conf b/.config/hypr/hypr/xdph.conf new file mode 100644 index 0000000..34018fc --- /dev/null +++ b/.config/hypr/hypr/xdph.conf @@ -0,0 +1,3 @@ +screencopy { + # custom_picker_binary = "/home/paul/code/hyprland-share-picker/test-replacement" +} \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/darkman.service b/.config/systemd/user/default.target.wants/darkman.service new file mode 120000 index 0000000..4b9f58d --- /dev/null +++ b/.config/systemd/user/default.target.wants/darkman.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/darkman.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/udiskie.service b/.config/systemd/user/default.target.wants/udiskie.service new file mode 120000 index 0000000..535352a --- /dev/null +++ b/.config/systemd/user/default.target.wants/udiskie.service @@ -0,0 +1 @@ +/home/paul/.config/systemd/user/udiskie.service \ No newline at end of file diff --git a/.config/systemd/user/dunst.service b/.config/systemd/user/dunst.service new file mode 100644 index 0000000..9d8cbb8 --- /dev/null +++ b/.config/systemd/user/dunst.service @@ -0,0 +1,12 @@ +[Unit] +Description=Dunst notification daemon +Documentation=man:dunst(1) +PartOf=graphical-session.target +After=graphical-session.target + +[Service] +Type=dbus +BusName=org.freedesktop.Notifications +ExecStart=/usr/bin/dunst +ExecReload=/usr/bin/dunstctl reload +Slice=session.slice diff --git a/.config/systemd/user/graphical-session.target.wants/hypridle.service b/.config/systemd/user/graphical-session.target.wants/hypridle.service new file mode 120000 index 0000000..55da293 --- /dev/null +++ b/.config/systemd/user/graphical-session.target.wants/hypridle.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hypridle.service \ No newline at end of file diff --git a/.config/systemd/user/graphical-session.target.wants/hyprpaper.service b/.config/systemd/user/graphical-session.target.wants/hyprpaper.service new file mode 120000 index 0000000..a5b7405 --- /dev/null +++ b/.config/systemd/user/graphical-session.target.wants/hyprpaper.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hyprpaper.service \ No newline at end of file diff --git a/.config/systemd/user/graphical-session.target.wants/hyprpolkitagent.service b/.config/systemd/user/graphical-session.target.wants/hyprpolkitagent.service new file mode 120000 index 0000000..ad39210 --- /dev/null +++ b/.config/systemd/user/graphical-session.target.wants/hyprpolkitagent.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hyprpolkitagent.service \ No newline at end of file diff --git a/.config/systemd/user/graphical-session.target.wants/vicinae.service b/.config/systemd/user/graphical-session.target.wants/vicinae.service new file mode 120000 index 0000000..c7d5b87 --- /dev/null +++ b/.config/systemd/user/graphical-session.target.wants/vicinae.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/vicinae.service \ No newline at end of file diff --git a/.config/systemd/user/graphical-session.target.wants/waybar.service b/.config/systemd/user/graphical-session.target.wants/waybar.service new file mode 120000 index 0000000..c2a0b64 --- /dev/null +++ b/.config/systemd/user/graphical-session.target.wants/waybar.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/waybar.service \ No newline at end of file diff --git a/.config/systemd/user/udiskie.service b/.config/systemd/user/udiskie.service new file mode 100644 index 0000000..831f273 --- /dev/null +++ b/.config/systemd/user/udiskie.service @@ -0,0 +1,9 @@ +[Unit] +Description=Handle automounting of usb devices + +[Service] +Type=simple +ExecStart=/usr/bin/udiskie + +[Install] +WantedBy=default.target diff --git a/.zshrc b/.zshrc index 989cbe6..6a0b695 100644 --- a/.zshrc +++ b/.zshrc @@ -18,6 +18,8 @@ DISABLE_UNTRACKED_FILES_DIRTY="true" # Add wisely, as too many plugins slow down shell startup. plugins=(git zsh-autosuggestions zsh-syntax-highlighting fast-syntax-highlighting pip docker uv zsh-uv-env colorize copyfile) +autoload zmv + source $ZSH/oh-my-zsh.sh # User configuration