diff --git a/btop/btop.conf b/btop/btop.conf index 861077f..b7601f5 100644 --- a/btop/btop.conf +++ b/btop/btop.conf @@ -68,7 +68,7 @@ update_ms = 1000 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. -proc_sorting = "memory" +proc_sorting = "cpu direct" #* Reverse sorting order, True or False. proc_reversed = false diff --git a/hypr/.luarc.json b/hypr/.luarc.json new file mode 100644 index 0000000..3ce1aab --- /dev/null +++ b/hypr/.luarc.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "runtime.version": "Lua 5.4", + "workspace.library": [ + "/usr/share/hypr/stubs" + ], + "diagnostics.globals": [ + "hl" + ] +} diff --git a/hypr/catppuccin-hyprland b/hypr/catppuccin-hyprland deleted file mode 160000 index c388ac5..0000000 --- a/hypr/catppuccin-hyprland +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c388ac55563ddeea0afe9df79d4bfff0096b146b diff --git a/hypr/catppuccin-hyprlock b/hypr/catppuccin-hyprlock deleted file mode 160000 index f650895..0000000 --- a/hypr/catppuccin-hyprlock +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f650895064ae80db7c0e095829fce83fd85d0b26 diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf deleted file mode 100644 index 5ac20b5..0000000 --- a/hypr/hyprland.conf +++ /dev/null @@ -1,18 +0,0 @@ - -# narls hyprland dotfiles - -source = ~/.config/hypr/modules/monitors.conf - -source = ~/.config/hypr/modules/programs.conf - -source = ~/.config/hypr/modules/autostart.conf - -source = ~/.config/hypr/modules/env.conf - -source = ~/.config/hypr/modules/theme.conf - -source = ~/.config/hypr/modules/input.conf - -source = ~/.config/hypr/modules/keybinds.conf - -source = ~/.config/hypr/modules/window_rules.conf diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua new file mode 100644 index 0000000..2f9024f --- /dev/null +++ b/hypr/hyprland.lua @@ -0,0 +1,36 @@ +-- narls hyprland dotfiles +-- +-- Hyprland 0.55+ reads this file instead of hyprland.conf. Every part lives in +-- lua/, and each require() is its own scope: an error in one file does not stop +-- the others from loading. +-- +-- Order matters only in two places: palette must exist before anything paints +-- with it, and monitors must exist before the lid handler binds to them. Both +-- are handled by the requires below, top to bottom. + +-- what the desktop looks like +require("lua/palette") +require("lua/look") +require("lua/animations") + +-- what it runs on +require("lua/env") +require("lua/monitors") +require("lua/lid") +require("lua/input") + +-- what it runs +require("lua/apps") +require("lua/autostart") + +-- how windows behave +require("lua/rules/windows") +require("lua/rules/layers") + +-- how it is driven +require("lua/binds/apps") +require("lua/binds/windows") +require("lua/binds/workspaces") +require("lua/binds/shell") +require("lua/binds/media") +require("lua/binds/capture") diff --git a/hypr/lid_state.conf b/hypr/lid_state.conf index 8b13789..e8e4907 100644 --- a/hypr/lid_state.conf +++ b/hypr/lid_state.conf @@ -1 +1 @@ - +monitor=eDP-1, disable diff --git a/hypr/lua/animations.lua b/hypr/lua/animations.lua new file mode 100644 index 0000000..9568833 --- /dev/null +++ b/hypr/lua/animations.lua @@ -0,0 +1,47 @@ +-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +-- +-- Quick and clean. Motion should get out of the way, not perform. +-- +-- An earlier pass overdid it: a 1.56 overshoot on every window, an 88% popin +-- scale, and a borderangle looping forever so the focused border was in +-- constant motion. The bounce is dialled back to a hint, the popin barely +-- scales, and the border angle does not animate at all. + +hl.config({ + animations = { + enabled = true, + }, +}) + +-- ------------------------------------------------------------------- curves +hl.curve("snap", { type = "bezier", points = { { 0.16, 1.00 }, { 0.30, 1.00 } } }) +hl.curve("overshoot", { type = "bezier", points = { { 0.34, 1.12 }, { 0.64, 1.00 } } }) +hl.curve("hard", { type = "bezier", points = { { 0.55, 0.00 }, { 0.90, 0.35 } } }) +hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) + +-- --------------------------------------------------------------------- tree +-- speed is in ds (1ds = 100ms). Unset leaves inherit their parent. +hl.animation({ leaf = "global", enabled = true, speed = 4, bezier = "snap" }) +hl.animation({ leaf = "border", enabled = true, speed = 5, bezier = "snap" }) + +hl.animation({ leaf = "windows", enabled = true, speed = 4, bezier = "snap" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 4, bezier = "overshoot", style = "popin 96%" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 2.6, bezier = "hard", style = "popin 97%" }) +hl.animation({ leaf = "windowsMove", enabled = true, speed = 3.6, bezier = "snap" }) + +hl.animation({ leaf = "fade", enabled = true, speed = 3, bezier = "snap" }) +hl.animation({ leaf = "fadeIn", enabled = true, speed = 2.4, bezier = "snap" }) +hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.8, bezier = "hard" }) +hl.animation({ leaf = "fadeSwitch", enabled = true, speed = 2, bezier = "snap" }) +hl.animation({ leaf = "fadeShadow", enabled = true, speed = 3, bezier = "snap" }) +hl.animation({ leaf = "fadeDim", enabled = true, speed = 2.4, bezier = "snap" }) + +hl.animation({ leaf = "layers", enabled = true, speed = 3, bezier = "snap" }) +hl.animation({ leaf = "layersIn", enabled = true, speed = 3, bezier = "snap", style = "slide" }) +hl.animation({ leaf = "layersOut", enabled = true, speed = 2, bezier = "hard", style = "slide" }) + +hl.animation({ leaf = "workspaces", enabled = true, speed = 3, bezier = "snap", style = "slidevert" }) +hl.animation({ leaf = "workspacesIn", enabled = true, speed = 3, bezier = "snap", style = "slidevert" }) +hl.animation({ leaf = "workspacesOut", enabled = true, speed = 2.4, bezier = "hard", style = "slidevert" }) + +hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 3, bezier = "snap", style = "slidevert" }) diff --git a/hypr/lua/apps.lua b/hypr/lua/apps.lua new file mode 100644 index 0000000..47f2412 --- /dev/null +++ b/hypr/lua/apps.lua @@ -0,0 +1,16 @@ +-- The programs the binds reach for. Exported so lua/binds/* name them once. + +return { + terminal = "alacritty", + fileManager = "nautilus", + menu = "fuzzel", + + -- clipboard history picker + clipboard = "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy", + + -- pdf picker + pdfs = "pdfs-prompt --dmenu --menu 'fuzzel --dmenu --width 60'", + + -- bluetooth menu + bluetooth = "fluxo bt menu", +} diff --git a/hypr/lua/autostart.lua b/hypr/lua/autostart.lua new file mode 100644 index 0000000..4413800 --- /dev/null +++ b/hypr/lua/autostart.lua @@ -0,0 +1,25 @@ +-- https://wiki.hypr.land/Configuring/Basics/Autostart/ +-- +-- Everything that used to be exec-once now runs off the start event. + +hl.on("hyprland.start", function() + -- Takemi shell — bar, popouts, notifications, OSD, power menu and lock + -- screen. Config lives in ~/.config/quickshell. It owns + -- org.freedesktop.Notifications, so dunst must stay masked + -- (systemctl --user mask dunst.service). + hl.exec_cmd("uwsm app -- qs") + + hl.exec_cmd("uwsm app -- nm-applet --indicator") + hl.exec_cmd("uwsm app -- hyprpaper") + + -- clipboard history, text and images + hl.exec_cmd("wl-paste --type text --watch cliphist store") + hl.exec_cmd("wl-paste --type image --watch cliphist store") + + -- hl.exec_cmd("uwsm app -- nextcloud --background") + -- hl.exec_cmd("uwsm app -- rclone mount google_drive: ~/gdrive") + -- hl.exec_cmd("uwsm app -- protonvpn-app") + -- hl.exec_cmd("uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized") + -- hl.exec_cmd("uwsm app -- /usr/lib/xdg-desktop-portal-hyprland") + -- hl.exec_cmd("sleep 5 && ~/.config/hypr/scripts/replay-ctrl.sh start") +end) diff --git a/hypr/lua/binds/apps.lua b/hypr/lua/binds/apps.lua new file mode 100644 index 0000000..b11079c --- /dev/null +++ b/hypr/lua/binds/apps.lua @@ -0,0 +1,14 @@ +-- Launching things. +-- https://wiki.hypr.land/Configuring/Basics/Binds/ + +local apps = require("lua/apps") +local mod = "SUPER" -- Sets "Windows" key as main modifier + +hl.bind(mod .. " + RETURN", hl.dsp.exec_cmd(apps.terminal), { description = "terminal" }) +hl.bind(mod .. " + E", hl.dsp.exec_cmd(apps.fileManager), { description = "file manager" }) +hl.bind(mod .. " + SPACE", hl.dsp.exec_cmd(apps.menu), { description = "app launcher" }) +hl.bind(mod .. " + M", hl.dsp.exec_cmd(apps.pdfs), { description = "pdf picker" }) +hl.bind(mod .. " + B", hl.dsp.exec_cmd(apps.bluetooth), { description = "bluetooth menu" }) + +-- Clipboard history. On release so the picker does not inherit the held ALT. +hl.bind("ALT + m", hl.dsp.exec_cmd(apps.clipboard), { release = true, description = "clipboard history" }) diff --git a/hypr/lua/binds/capture.lua b/hypr/lua/binds/capture.lua new file mode 100644 index 0000000..9561b4a --- /dev/null +++ b/hypr/lua/binds/capture.lua @@ -0,0 +1,19 @@ +-- Screenshots, replay buffer, webcam. Everything that records something. + +local scripts = os.getenv("HOME") .. "/.config/hypr/scripts/" + +-- ------------------------------------------------------------- screenshots +-- PRINT selects a region, CTRL grabs the focused window, SHIFT saves to disk +-- instead of the clipboard. +hl.bind("PRINT", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy')) +hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd('grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +\'%Y-%m-%d_%H-%M-%S\').png')) +hl.bind("CTRL + PRINT", hl.dsp.exec_cmd(scripts .. "screenshot_window.sh copy")) +hl.bind("CTRL + SHIFT + PRINT", hl.dsp.exec_cmd(scripts .. "screenshot_window.sh save")) + +-- ------------------------------------------------------- replay and camera +-- On release, so the shortcut is not caught mid-chord. +local on_release = { release = true } + +hl.bind("ALT + z", hl.dsp.exec_cmd(scripts .. "replay-ctrl.sh toggle"), on_release) +hl.bind("ALT + SHIFT + z", hl.dsp.exec_cmd(scripts .. "replay-ctrl.sh save"), on_release) +hl.bind("ALT + SHIFT + c", hl.dsp.exec_cmd(scripts .. "droidcam-ctrl.sh toggle"), on_release) diff --git a/hypr/lua/binds/media.lua b/hypr/lua/binds/media.lua new file mode 100644 index 0000000..3d21505 --- /dev/null +++ b/hypr/lua/binds/media.lua @@ -0,0 +1,20 @@ +-- Laptop multimedia keys: volume, mic, brightness, transport. +-- `locked` keeps them working over the lock screen. + +-- Volume and brightness repeat when held. +local held = { locked = true, repeating = true } + +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("fluxo vol up 5"), held) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("fluxo vol down 5"), held) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("fluxo vol mute"), held) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("fluxo mic mute"), held) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s +10%"), held) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 10%-"), held) + +-- Transport. Requires playerctl. +local locked = { locked = true } + +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), locked) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), locked) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), locked) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), locked) diff --git a/hypr/lua/binds/shell.lua b/hypr/lua/binds/shell.lua new file mode 100644 index 0000000..b58cbf8 --- /dev/null +++ b/hypr/lua/binds/shell.lua @@ -0,0 +1,13 @@ +-- Takemi shell (quickshell) IPC. Config lives in ~/.config/quickshell. + +local mod = "SUPER" + +local function shell(call, opts) + hl.bind(opts.key, hl.dsp.exec_cmd("qs ipc call shell " .. call), { description = opts.description }) +end + +shell("lock", { key = mod .. " + CTRL + L", description = "lock screen" }) +shell("power", { key = mod .. " + P", description = "power menu" }) +shell("toggleDnd", { key = mod .. " + SHIFT + N", description = "toggle do not disturb" }) +shell("clearNotifications", { key = mod .. " + CTRL + SHIFT + N", description = "clear notifications" }) +shell("reloadConfig", { key = mod .. " + SHIFT + R", description = "reload shell config" }) diff --git a/hypr/lua/binds/windows.lua b/hypr/lua/binds/windows.lua new file mode 100644 index 0000000..87c05e6 --- /dev/null +++ b/hypr/lua/binds/windows.lua @@ -0,0 +1,30 @@ +-- Focus, layout and groups — everything that acts on the window under you. + +local mod = "SUPER" + +-- ------------------------------------------------------------------- window +hl.bind(mod .. " + SHIFT + Q", hl.dsp.window.close()) +hl.bind(mod .. " + V", hl.dsp.window.float()) +hl.bind(mod .. " + F", hl.dsp.window.fullscreen()) +-- hl.bind(mod .. " + t", hl.dsp.layout("togglesplit")) -- dwindle + +-- -------------------------------------------------------------------- focus +local directions = { h = "l", l = "r", k = "u", j = "d" } + +for key, direction in pairs(directions) do + hl.bind(mod .. " + " .. key, hl.dsp.focus({ direction = direction })) + hl.bind(mod .. " + SHIFT + " .. key:upper(), hl.dsp.window.move({ direction = direction, group_aware = true })) +end + +-- ------------------------------------------------------------------- groups +hl.bind(mod .. " + n", hl.dsp.group.toggle()) +hl.bind("ALT + Tab", hl.dsp.group.next()) +-- hl.bind("ALT + Tab", hl.dsp.group.prev()) + +-- -------------------------------------------------------------------- mouse +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- ----------------------------------------------------------------- keyboard +-- cycle keyboard layout (dvorak-intl <-> us-intl), see lua/input.lua +hl.bind(mod .. " + ALT + SPACE", hl.dsp.exec_cmd("hyprctl switchxkblayout all next")) diff --git a/hypr/lua/binds/workspaces.lua b/hypr/lua/binds/workspaces.lua new file mode 100644 index 0000000..aa15e3e --- /dev/null +++ b/hypr/lua/binds/workspaces.lua @@ -0,0 +1,22 @@ +-- Workspaces, including the two scratchpads. + +local mod = "SUPER" + +-- Switch with mod + [0-9], move the active window with mod + SHIFT + [0-9]. +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i })) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +-- Scroll through existing workspaces with mod + scroll +hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Scratchpads: S holds anything virtual, D holds chat. +local special = { S = "virtual", D = "discord" } + +for key, name in pairs(special) do + hl.bind(mod .. " + " .. key, hl.dsp.workspace.toggle_special(name)) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = "special:" .. name })) +end diff --git a/hypr/lua/env.lua b/hypr/lua/env.lua new file mode 100644 index 0000000..87fcf9f --- /dev/null +++ b/hypr/lua/env.lua @@ -0,0 +1,31 @@ +-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ +-- +-- Note: this session starts through uwsm, which would rather have these in +-- ~/.config/uwsm/env (toolkit, cursor, GPU) and ~/.config/uwsm/env-hyprland +-- (HYPR*, AQ_*). They are kept here for now so the config stays self-contained. + +-- cursor +hl.env("HYPRCURSOR_THEME", "Bibata-Modern-Classic") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("XCURSOR_THEME", "Bibata-Modern-Classic") +hl.env("XCURSOR_SIZE", "24") + +-- session +hl.env("XDG_CURRENT_DESKTOP", "Hyprland") + +-- toolkits +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") +hl.env("MOZ_ENABLE_WAYLAND", "1") +hl.env("ELECTRON_OZONE_PLATFORM_HINT", "wayland") + +-- AMD graphics / video acceleration +hl.env("LIBVA_DRIVER_NAME", "radeonsi") +hl.env("VDPAU_DRIVER", "radeonsi") +hl.env("AMD_VULKAN_ICD", "RADV") + +-- misc +hl.env("EDITOR", "nvim") + +-- hl.env("INTEL_DEBUG", "noccs") +-- hl.env("WLR_DRM_NO_ATOMIC", "1") +-- hl.env("debug:full_cm_proto", "true") diff --git a/hypr/lua/input.lua b/hypr/lua/input.lua new file mode 100644 index 0000000..48f4bf2 --- /dev/null +++ b/hypr/lua/input.lua @@ -0,0 +1,32 @@ +-- https://wiki.hypr.land/Configuring/Basics/Variables/#input + +hl.config({ + input = { + -- index 0 = dvorak-intl (default), index 1 = us-intl + -- switch with $mainMod ALT, SPACE (see lua/binds/windows.lua) + kb_layout = "us,us", + kb_variant = "dvorak-intl,intl", + kb_model = "", + kb_rules = "", + kb_options = "caps:backspace", + + follow_mouse = 0, + + accel_profile = "flat", + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = false, + }, + }, +}) + +-- Layouts are inherited from the global input block so that layout switching +-- applies to these too. Only bind resolution differs here. +-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ +for _, name in ipairs({ + "at-translated-set-2-keyboard", + "topre-corporation-hhkb-professional", +}) do + hl.device({ name = name, resolve_binds_by_sym = true }) +end diff --git a/hypr/lua/lid.lua b/hypr/lua/lid.lua new file mode 100644 index 0000000..def67d6 --- /dev/null +++ b/hypr/lua/lid.lua @@ -0,0 +1,129 @@ +-- Laptop lid handling. +-- +-- One rule, applied from several triggers: +-- +-- panel off <=> lid is shut AND something else is plugged in +-- +-- Both halves are re-checked every time, so the session can never end up with +-- zero outputs. Undocking with the lid shut brings the panel back; booting +-- alone after a docked shutdown just works, because nothing about the previous +-- session is remembered. +-- +-- That last part is the fix for the old design: scripts/lid_handler.sh wrote a +-- lid_state.conf that got sourced on the next start, so a laptop that was shut +-- while docked came up believing it still had an external display and blanked +-- its own panel. Lid state now comes from the kernel instead, and the external +-- check is a live one. + +local monitors = require("lua/monitors") + +-- ------------------------------------------------------------- reading state + +-- The kernel's own view of the hinge. Present on this machine as +-- /proc/acpi/button/lid/LID/state; the device name differs per vendor, hence +-- the glob. Returns nil if the file is missing or unparseable. +local function acpi_lid_closed() + local pipe = io.popen("cat /proc/acpi/button/lid/*/state 2>/dev/null") + if not pipe then + return nil + end + + local out = pipe:read("a") or "" + pipe:close() + + if out:find("closed", 1, true) then + return true + elseif out:find("open", 1, true) then + return false + end + return nil +end + +-- Whatever the last switch event said, used only when ACPI has nothing for us. +local last_switch_closed = nil + +local function lid_closed() + local acpi = acpi_lid_closed() + if acpi ~= nil then + return acpi + end + return last_switch_closed == true +end + +-- ---------------------------------------------------------------- reconciling + +-- nil until the first decision, so the first pass always applies. +local panel_off = nil + +-- `ignore` is the output being unplugged: during monitor.removed it can still +-- be listed, and counting it would keep the panel switched off. +local function reconcile(ignore) + -- Nothing enumerated yet means we are still parsing the config on a cold + -- start. Leave the defaults from lua/monitors.lua alone and wait for the + -- start event. + local all = hl.get_monitors() + if #all == 0 then + return + end + + local externals = 0 + for _, mon in ipairs(monitors.externals_present()) do + if mon.name ~= ignore then + externals = externals + 1 + end + end + + local want_off = lid_closed() and externals > 0 + + if want_off == panel_off then + return + end + + -- First decision of the session, and it agrees with what lua/monitors.lua + -- already applied: nothing actually moved, so no daemon needs poking. + local settled = panel_off == nil and not want_off + panel_off = want_off + + if want_off then + monitors.disable_builtin() + else + monitors.enable_builtin() + end + monitors.apply_external() + + -- Quickshell follows monitor hotplug by itself; only the wallpaper daemon + -- needs a kick. + if not settled then + hl.exec_cmd("systemctl restart --user hyprpaper") + end +end + +-- ------------------------------------------------------------------ triggers + +hl.bind("switch:on:Lid Switch", function() + last_switch_closed = true + reconcile() +end, { locked = true }) + +hl.bind("switch:off:Lid Switch", function() + last_switch_closed = false + reconcile() +end, { locked = true }) + +-- Docking and undocking. Removal passes the output that is going away. +hl.on("monitor.added", function() + reconcile() +end) + +hl.on("monitor.removed", function(mon) + reconcile(mon and mon.name) +end) + +-- Cold start: outputs are not up yet at this point, so this settles once they +-- are. On `hyprctl reload` the start event does not fire again, but the +-- monitor list is already populated, so run it inline too. +hl.on("hyprland.start", function() + reconcile() +end) + +reconcile() diff --git a/hypr/lua/look.lua b/hypr/lua/look.lua new file mode 100644 index 0000000..005c041 --- /dev/null +++ b/hypr/lua/look.lua @@ -0,0 +1,102 @@ +-- Takemi — Persona 5 flavoured theme, matched to ~/.config/quickshell. +-- +-- Everything static about how the desktop is painted. Motion lives next door +-- in lua/animations.lua. + +local c = require("lua/palette") + +hl.config({ + -- https://wiki.hypr.land/Configuring/Basics/Variables/ + general = { + gaps_in = 5, + gaps_out = { top = 6, right = 8, bottom = 8, left = 8 }, + + border_size = 2, + + col = { + active_border = c.activeBorder, + inactive_border = c.outline, + }, + + 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 = { + -- Persona 5 has no rounded corners. Neither do we. + rounding = 0, + + -- Fully opaque, both states. Flat ink on flat ground. + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { + enabled = true, + range = 18, + render_power = 3, + offset = { 0, 4 }, + color = "rgba(000000ee)", + color_inactive = "rgba(00000088)", + }, + + -- Off. Blur is the signature of the glass-and-frost look, which is the + -- opposite of what this theme is doing — every surface here is opaque, + -- flat and hard-edged. With nothing translucent left to blur it also + -- costs three render passes for no visible result. + blur = { + enabled = false, + }, + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + -- 0 = off, 1 = always, 2 = fullscreen only (G7 is a 240Hz VRR panel) + vrr = 0, + font_family = "FiraCode Nerd Font", + background_color = c.base, + focus_on_activate = true, + }, + + group = { + col = { + border_active = c.activeBorder, + border_inactive = c.outline, + }, + + groupbar = { + font_family = "JetBrainsMono Nerd Font", + font_size = 11, + + height = 24, + gradients = false, + + -- --- Active tab --- + col = { + active = c.accent, + inactive = c.surface, + }, + text_color = c.ink, + + -- --- Inactive tab --- + text_color_inactive = c.muted, + + indicator_height = 3, + }, + }, + + -- https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ + dwindle = { + preserve_split = true, + }, + + -- https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ + master = { + new_status = "master", + }, +}) diff --git a/hypr/lua/monitors.lua b/hypr/lua/monitors.lua new file mode 100644 index 0000000..86f0083 --- /dev/null +++ b/hypr/lua/monitors.lua @@ -0,0 +1,57 @@ +-- https://wiki.hypr.land/Configuring/Basics/Monitors/ +-- +-- Declares every display once and exports the table, so lua/lid.lua can turn +-- the laptop panel on and off without duplicating any of these numbers. +-- +-- Load-time behaviour is deliberately dumb: the built-in panel is always +-- enabled here. Deciding to switch it off needs to know whether anything else +-- is actually plugged in, and during a cold start the outputs are not +-- enumerated yet — so that decision lives in lua/lid.lua, which re-runs it on +-- every lid and hotplug event. Worst case the panel flickers on for a moment +-- while docked; the alternative failure is a black screen. + +local M = {} + +M.laptop = "eDP-1" + +M.external = { + -- samsung home monitor. Other modes it has run at, if you ever need them: + -- "2560x1440@144", "1920x1080@144", "1280x720@240" + { output = "desc:Samsung Electric Company LC27G7xT H4ZRA00734", mode = "2560x1440@240", position = "-2560x0", scale = 1 }, +} + +M.builtin = { output = M.laptop, mode = "1920x1080@60", position = "0x0", scale = 1 } + +-- Anything not declared above falls back to Hyprland's auto placement, so a +-- borrowed projector or a monitor at the office still lights up. + +function M.apply_external() + for _, mon in ipairs(M.external) do + hl.monitor(mon) + end +end + +function M.enable_builtin() + hl.monitor(M.builtin) +end + +function M.disable_builtin() + hl.monitor({ output = M.laptop, disabled = true }) +end + +-- Every connected output except the laptop panel. Empty during early startup, +-- which callers have to treat as "do not know yet", never as "nothing here". +function M.externals_present() + local found = {} + for _, mon in ipairs(hl.get_monitors()) do + if mon.name ~= M.laptop then + table.insert(found, mon) + end + end + return found +end + +M.enable_builtin() +M.apply_external() + +return M diff --git a/hypr/lua/palette.lua b/hypr/lua/palette.lua new file mode 100644 index 0000000..95ababd --- /dev/null +++ b/hypr/lua/palette.lua @@ -0,0 +1,51 @@ +-- Takemi palette — kept in step with ~/.config/quickshell/config/Theme.qml. +-- +-- Crimson, black, white. Nothing else carries hue. +-- +-- Returned as a table, so every module that paints something does +-- local c = require("lua/palette") +-- and there is exactly one place the colours are written. + +local c = {} + +-- ----------------------------------------------------------------- THE KNOB +-- The one colour in this setup. Change this line and the window borders, +-- group indicators and focus states all recolour with it. +-- +-- Keep it in step with `readonly property color accent` in +-- ~/.config/quickshell/config/Theme.qml, which is what colours the shell. +-- Those are the only two places the colour is written. +c.accent = "rgb(ff2d40)" + +c.accentDim = "rgb(8f1826)" +c.accentSoft = "rgb(ff6b78)" + +-- ------------------------------------------------------------------ neutrals +c.ink = "rgb(000000)" + +c.base = "rgb(0a0a0c)" +c.mantle = "rgb(0d0d10)" +c.surface = "rgb(141418)" +c.surfaceAlt = "rgb(1c1c22)" +c.overlay = "rgb(26262e)" +c.outline = "rgb(3a3a44)" + +c.text = "rgb(ffffff)" +c.subtext = "rgb(c8c8ce)" +c.muted = "rgb(6b6b70)" + +-- Retired hues, kept as aliases so existing references resolve. The shell has +-- no teal any more — the wallpaper is the colour in the composition. +c.primary = c.text +c.primaryDim = "rgb(9a9aa2)" +c.glow = c.accent +c.blue = c.primaryDim +c.deep = c.surfaceAlt +c.warn = c.accentSoft +c.ok = c.text + +-- Crimson into its own shadow, on the diagonal. The accent is the only hue +-- here — a gradient into a second colour is what put blue in the border. +c.activeBorder = { colors = { c.accent, c.accentDim }, angle = 135 } + +return c diff --git a/hypr/lua/rules/layers.lua b/hypr/lua/rules/layers.lua new file mode 100644 index 0000000..53080f8 --- /dev/null +++ b/hypr/lua/rules/layers.lua @@ -0,0 +1,13 @@ +-- https://wiki.hypr.land/Configuring/Basics/Window-Rules/#layer-rules +-- +-- Quickshell surfaces (bar, popouts, OSD) and the fuzzel launcher. Note +-- decoration.blur is off in lua/look.lua, so these only take effect if blur is +-- switched back on. + +for _, namespace in ipairs({ "bottom", "top", "launcher" }) do + hl.layer_rule({ + match = { namespace = namespace }, + blur = true, + ignore_alpha = 0.5, + }) +end diff --git a/hypr/lua/rules/windows.lua b/hypr/lua/rules/windows.lua new file mode 100644 index 0000000..c580800 --- /dev/null +++ b/hypr/lua/rules/windows.lua @@ -0,0 +1,74 @@ +-- https://wiki.hypr.land/Configuring/Basics/Window-Rules/ +-- +-- Rules are evaluated top to bottom and the last match wins, so order matters. +-- Named rules are all evaluated before anonymous ones. + +-- ========================================== +-- MATCHERS +-- ========================================== +-- Dialogs and utility apps that should float in the center +local DIALOG_TITLES = "^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory.*|Save As.*|Save File.*|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress|Open Files.*|Anmelden.*|File Upload.*|TRuDI-Export laden)$" +local DIALOG_CLASSES = "^(pavucontrol|blueman-manager|nm-connection-editor|org.pulseaudio.pavucontrol|io.narl.proton-drive-linux-prompt)$" + +local STEAM = "^(steam)$" +local GAMESCOPE = "^(gamescope)$" + +-- ========================================== +-- GENERAL & FIXES +-- ========================================== +-- Ignore maximize requests from apps. You'll probably like this. +-- hl.window_rule({ match = { class = ".*" }, suppress_event = "maximize" }) + +-- Fix some dragging issues with XWayland +-- hl.window_rule({ +-- match = { class = "^$", title = "^$", xwayland = true, float = true, fullscreen = false, pin = false }, +-- no_focus = true, +-- }) +hl.window_rule({ match = { class = "^$", title = "^$" }, no_blur = true }) + +-- ========================================== +-- FLOATING & CENTERED DIALOGS +-- ========================================== +-- Float, size, center, no blur — one rule per matcher instead of four. +for _, match in ipairs({ { title = DIALOG_TITLES }, { class = DIALOG_CLASSES } }) do + hl.window_rule({ + match = match, + float = true, + size = { 800, 600 }, + center = true, + no_blur = true, + }) +end + +-- ========================================== +-- WORKSPACE ASSIGNMENTS +-- ========================================== +-- hl.window_rule({ match = { class = "^(firefox)$" }, workspace = "1" }) +-- hl.window_rule({ match = { class = "^(kitty)$" }, workspace = "2" }) +-- hl.window_rule({ match = { class = "^(Code)$" }, workspace = "3" }) +hl.window_rule({ match = { class = GAMESCOPE }, workspace = "1" }) + +-- Special workspaces +hl.window_rule({ match = { class = "^(Spotify|spotify)$" }, workspace = "special:virtual" }) +hl.window_rule({ match = { class = "^(discord|vesktop)$" }, workspace = "special:discord" }) + +-- ========================================== +-- STEAM & GAMING +-- ========================================== +-- hl.window_rule({ match = { class = STEAM, title = "^(Steam)$" }, workspace = "3 silent" }) + +-- Fixed sizes for specific Steam windows +hl.window_rule({ match = { class = STEAM, title = "^(Friends List)$" }, size = { 400, 800 } }) +hl.window_rule({ match = { class = STEAM, title = "^(Steam Settings)$" }, size = { 1000, 800 } }) +hl.window_rule({ match = { class = STEAM, title = "^(Add Non-Steam Game)$" }, size = { 1000, 800 } }) + +-- Float and disable blur for Steam windows that aren't the main window +hl.window_rule({ + match = { class = STEAM, title = "negative:^(Steam)$" }, + float = true, + no_blur = true, + -- center = true, +}) + +-- Allow tearing for games started with Gamescope +hl.window_rule({ match = { class = GAMESCOPE }, immediate = true }) diff --git a/hypr/modules/autostart.conf b/hypr/modules/autostart.conf deleted file mode 100644 index 70ee5ba..0000000 --- a/hypr/modules/autostart.conf +++ /dev/null @@ -1,21 +0,0 @@ - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# Takemi shell — bar, popouts, notifications, OSD, power menu and lock screen. -# Config lives in ~/.config/quickshell. It owns org.freedesktop.Notifications, -# so dunst must stay masked (systemctl --user mask dunst.service). -exec-once = uwsm app -- qs - -# exec-once = uwsm app -- waybar -# exec-once = uwsm app -- hyprpanel -# exec-once = uwsm app -- nextcloud --background -exec-once = uwsm app -- nm-applet --indicator -# exec-once = uwsm app -- rclone mount google_drive: ~/gdrive -# exec-once = uwsm app -- protonvpn-app -exec-once = uwsm app -- hyprpaper -# exec-once = uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null -# exec-once = sleep 5 && ~/.config/hypr/scripts/replay-ctrl.sh start -# exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland -exec-once = wl-paste --type text --watch cliphist store # Stores only text data -exec-once = wl-paste --type image --watch cliphist store # Stores only image data diff --git a/hypr/modules/env.conf b/hypr/modules/env.conf deleted file mode 100644 index f762335..0000000 --- a/hypr/modules/env.conf +++ /dev/null @@ -1,18 +0,0 @@ - -# See https://wiki.hyprland.org/Configuring/Environment-variables/ - -# env = INTEL_DEBUG,noccs -# env = WLR_DRM_NO_ATOMIC,1 -env = HYPRCURSOR_THEME,Bibata-Modern-Classic -env = HYPRCURSOR_SIZE,24 -env = XCURSOR_SIZE,24 -env = XCURSOR_THEME,Bibata-Modern-Classic -env = XDG_CURRENT_DESKTOP,Hyprland -# env = debug:full_cm_proto,true -env = QT_QPA_PLATFORMTHEME,qt6ct -env = LIBVA_DRIVER_NAME,radeonsi -env = VDPAU_DRIVER,radeonsi -env = AMD_VULKAN_ICD,RADV -env = MOZ_ENABLE_WAYLAND,1 -env = ELECTRON_OZONE_PLATFORM_HINT,wayland -env = EDITOR,nvim diff --git a/hypr/modules/input.conf b/hypr/modules/input.conf deleted file mode 100644 index 6d06e3f..0000000 --- a/hypr/modules/input.conf +++ /dev/null @@ -1,32 +0,0 @@ - -# https://wiki.hyprland.org/Configuring/Variables/#input -input { - # index 0 = dvorak-intl (default), index 1 = us-intl - # switch with $mainMod ALT, SPACE (see keybinds.conf) - kb_layout = us,us - kb_variant = dvorak-intl,intl - kb_model = - kb_rules = - kb_options = caps:backspace - - follow_mouse = 0 - - accel_profile = flat - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = false - } -} - -# Layouts are inherited from the global input block so that layout -# switching applies to these too. Only bind resolution differs here. -device { - name = at-translated-set-2-keyboard - resolve_binds_by_sym = 1 -} - -device { - name = topre-corporation-hhkb-professional - resolve_binds_by_sym = 1 -} diff --git a/hypr/modules/keybinds.conf b/hypr/modules/keybinds.conf deleted file mode 100644 index 578ce7e..0000000 --- a/hypr/modules/keybinds.conf +++ /dev/null @@ -1,103 +0,0 @@ - -$mainMod = SUPER # Sets "Windows" key as main modifier - -bindl=,switch:on:Lid Switch,exec,~/.config/hypr/scripts/lid_handler.sh close -bindl=,switch:off:Lid Switch,exec,~/.config/hypr/scripts/lid_handler.sh open - -bindr = ALT, m, exec, cliphist list | fuzzel --dmenu | cliphist decode | wl-copy -bind = , PRINT, exec, grim -g "$(slurp)" - | wl-copy -bind = SHIFT, PRINT, exec, grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png -bind = CTRL, PRINT, exec, ~/.config/hypr/scripts/screenshot_window.sh copy -bind = CTRL SHIFT, PRINT, exec, ~/.config/hypr/scripts/screenshot_window.sh save -bindr = ALT SHIFT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh save -bindr = ALT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh toggle -bindr = ALT SHIFT, c, exec, ~/.config/hypr/scripts/droidcam-ctrl.sh toggle - -# general binds -bind = $mainMod, M, exec, pdfs-prompt --dmenu --menu 'fuzzel --dmenu --width 60' -bind = $mainMod, B, exec, fluxo bt menu -bind = $mainMod, RETURN, exec, $terminal -bind = $mainMod SHIFT, Q, killactive, -bind = $mainMod CTRL, L, exec, qs ipc call shell lock -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, F, fullscreen, -bind = $mainMod, SPACE, exec, $menu -bind = $mainMod, P, exec, qs ipc call shell power - -# Takemi shell -bind = $mainMod SHIFT, N, exec, qs ipc call shell toggleDnd -bind = $mainMod CTRL SHIFT, N, exec, qs ipc call shell clearNotifications -bind = $mainMod SHIFT, R, exec, qs ipc call shell reloadConfig -# cycle keyboard layout (dvorak-intl <-> us-intl) -bind = $mainMod ALT, SPACE, exec, hyprctl switchxkblayout all next -# bind = $mainMod, t, togglesplit, # dwindle -bind = $mainMod, n, togglegroup - -# Move focus with mainMod + arrow keys -bind = $mainMod, h, movefocus, l -bind = $mainMod, l, movefocus, r -bind = $mainMod, k, movefocus, u -bind = $mainMod, j, movefocus, d - -bind = $mainMod SHIFT, H, movewindoworgroup, l -bind = $mainMod SHIFT, L, movewindoworgroup, r -bind = $mainMod SHIFT, K, movewindoworgroup, u -bind = $mainMod SHIFT, J, movewindoworgroup, 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 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# groups -# bind = ALT, Tab, changegroupactive, prev -bind = ALT, Tab, changegroupactive, next - - -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, virtual -bind = $mainMod SHIFT, S, movetoworkspace, special:virtual -bind = $mainMod, D, togglespecialworkspace, discord -bind = $mainMod SHIFT, D, movetoworkspace, special:discord - -# 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, fluxo vol up 5 -bindel = ,XF86AudioLowerVolume, exec, fluxo vol down 5 -bindel = ,XF86AudioMute, exec, fluxo vol mute -bindel = ,XF86AudioMicMute, exec, fluxo mic mute -bindel = ,XF86MonBrightnessUp, exec, brightnessctl s +10% -bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- - -# Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous diff --git a/hypr/modules/monitors.conf b/hypr/modules/monitors.conf deleted file mode 100644 index 21f0dc5..0000000 --- a/hypr/modules/monitors.conf +++ /dev/null @@ -1,13 +0,0 @@ - -# laptop screen -monitor = eDP-1, 1920x1080@60, 0x0, 1 -# samsung home monitor -# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 1280x720@240, 0x0, 1 -monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@240, -2560x0, 1 -# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@144, 0x0, 1 -# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 1920x1080@144, 0x0, 1 -# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@60, 0x0, 1 - - -# lid_state fallback -source = ~/.config/hypr/lid_state.conf diff --git a/hypr/modules/programs.conf b/hypr/modules/programs.conf deleted file mode 100644 index d9f29d3..0000000 --- a/hypr/modules/programs.conf +++ /dev/null @@ -1,7 +0,0 @@ - -# See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use -$terminal = alacritty -$fileManager = nautilus -$menu = fuzzel diff --git a/hypr/modules/takemi.conf b/hypr/modules/takemi.conf deleted file mode 100644 index 22369df..0000000 --- a/hypr/modules/takemi.conf +++ /dev/null @@ -1,39 +0,0 @@ -# Takemi palette — kept in step with ~/.config/quickshell/config/Theme.qml. -# -# Crimson, black, white. Nothing else carries hue. - -# ----------------------------------------------------------------- THE KNOB -# The one colour in this setup. Change this line and the window borders, -# group indicators and focus states all recolour with it. -# -# Keep it in step with `readonly property color accent` in -# ~/.config/quickshell/config/Theme.qml, which is what colours the shell. -# Those are the only two places the colour is written. -$accent = rgb(ff2d40) - -$accentDim = rgb(8f1826) -$accentSoft = rgb(ff6b78) - -# ------------------------------------------------------------------ neutrals -$ink = rgb(000000) - -$base = rgb(0a0a0c) -$mantle = rgb(0d0d10) -$surface = rgb(141418) -$surfaceAlt = rgb(1c1c22) -$overlay = rgb(26262e) -$outline = rgb(3a3a44) - -$text = rgb(ffffff) -$subtext = rgb(c8c8ce) -$muted = rgb(6b6b70) - -# Retired hues, kept as aliases so existing references resolve. The shell has -# no teal any more — the wallpaper is the colour in the composition. -$primary = $text -$primaryDim = rgb(9a9aa2) -$glow = $accent -$blue = $primaryDim -$deep = $surfaceAlt -$warn = $accentSoft -$ok = $text diff --git a/hypr/modules/theme.conf b/hypr/modules/theme.conf deleted file mode 100644 index 0355402..0000000 --- a/hypr/modules/theme.conf +++ /dev/null @@ -1,137 +0,0 @@ -# Takemi — Persona 5 flavoured theme, matched to ~/.config/quickshell. -source = ~/.config/hypr/modules/takemi.conf - -# Refer to https://wiki.hyprland.org/Configuring/Variables/ - -# https://wiki.hyprland.org/Configuring/Variables/#general -general { - gaps_in = 5 - gaps_out = 6, 8, 8, 8 - - border_size = 2 - - # Crimson into its own shadow, on the diagonal. The accent is the only hue - # here — a gradient into a second colour is what put blue in the border. - col.active_border = $accent $accentDim 135deg - col.inactive_border = $outline - - resize_on_border = false - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = dwindle -} - -# https://wiki.hyprland.org/Configuring/Variables/#decoration -decoration { - # Persona 5 has no rounded corners. Neither do we. - rounding = 0 - - # Fully opaque, both states. Flat ink on flat ground. - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = true - range = 18 - render_power = 3 - offset = 0 4 - color = rgba(000000ee) - color_inactive = rgba(00000088) - } - - # https://wiki.hyprland.org/Configuring/Variables/#blur - # - # Off. Blur is the signature of the glass-and-frost look, which is the - # opposite of what this theme is doing — every surface here is opaque, flat - # and hard-edged. With nothing translucent left to blur it also costs three - # render passes for no visible result. - blur { - enabled = false - } -} - -# https://wiki.hyprland.org/Configuring/Animations/ -# Quick and clean. Motion should get out of the way, not perform. -# -# The previous pass overdid it: a 1.56 overshoot on every window, an 88% popin -# scale, and a borderangle looping forever so the focused border was in constant -# motion. The bounce is dialled back to a hint, the popin barely scales, and the -# border angle no longer animates at all. -animations { - enabled = yes, please :) - - bezier = snap, 0.16, 1.00, 0.30, 1.00 - bezier = overshoot, 0.34, 1.12, 0.64, 1.00 - bezier = hard, 0.55, 0.00, 0.90, 0.35 - bezier = linear, 0, 0, 1, 1 - - animation = global, 1, 4, snap - animation = border, 1, 5, snap - - animation = windows, 1, 4, snap - animation = windowsIn, 1, 4, overshoot, popin 96% - animation = windowsOut, 1, 2.6, hard, popin 97% - animation = windowsMove, 1, 3.6, snap - - animation = fade, 1, 3, snap - animation = fadeIn, 1, 2.4, snap - animation = fadeOut, 1, 1.8, hard - animation = fadeSwitch, 1, 2, snap - animation = fadeShadow, 1, 3, snap - animation = fadeDim, 1, 2.4, snap - - animation = layers, 1, 3, snap - animation = layersIn, 1, 3, snap, slide - animation = layersOut, 1, 2, hard, slide - - animation = workspaces, 1, 3, snap, slidevert - animation = workspacesIn, 1, 3, snap, slidevert - animation = workspacesOut, 1, 2.4, hard, slidevert - - animation = specialWorkspace, 1, 3, snap, slidevert -} - -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -master { - new_status = master -} - -dwindle { - preserve_split = true -} - -# https://wiki.hyprland.org/Configuring/Variables/#misc -misc { - force_default_wallpaper = 0 - disable_hyprland_logo = true - # 0 = off, 1 = always, 2 = fullscreen only (G7 is a 240Hz VRR panel) - vrr = 2 - font_family = FiraCode Nerd Font - background_color = $base - focus_on_activate = true -} - -group { - col.border_active = $accent $accentDim 135deg - col.border_inactive = $outline - - groupbar { - font_family = JetBrainsMono Nerd Font - font_size = 11 - - height = 24 - gradients = false - - # --- Active Tab --- - col.active = $accent - text_color = $ink - - # --- Inactive Tab --- - col.inactive = $surface - text_color_inactive = $muted - - indicator_height = 3 - } -} diff --git a/hypr/modules/window_rules.conf b/hypr/modules/window_rules.conf deleted file mode 100644 index 208bcd6..0000000 --- a/hypr/modules/window_rules.conf +++ /dev/null @@ -1,89 +0,0 @@ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# ========================================== -# VARIABLES -# ========================================== -# Dialogs and utility apps that should float in the center -$dialog_titles = ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory.*|Save As.*|Save File.*|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress|Open Files.*|Anmelden.*|File Upload.*|TRuDI-Export laden)$ -$dialog_classes = ^(pavucontrol|blueman-manager|nm-connection-editor|org.pulseaudio.pavucontrol|io.narl.proton-drive-linux-prompt)$ - -# App classes -$steam = ^(steam)$ -$gamescope = ^(gamescope)$ - - -# ========================================== -# GENERAL & FIXES -# ========================================== -# Ignore maximize requests from apps. You'll probably like this. -# windowrule = suppress_event maximize, match:class .* - -# Fix some dragging issues with XWayland -# windowrule = no_focus 1, match:class ^$, match:title ^$, match:xwayland 1, match:floating 1, match:fullscreen 0, match:pinned 0 -windowrule = no_blur 1, match:class ^$, match:title ^$ - - -# ========================================== -# FLOATING & CENTERED DIALOGS -# ========================================== -# Make them float -windowrule = float 1, match:title $dialog_titles -windowrule = float 1, match:class $dialog_classes - -# Set to 800x600 -windowrule = size 800 600, match:title $dialog_titles -windowrule = size 800 600, match:class $dialog_classes - -# Center them on the screen -windowrule = center 1, match:title $dialog_titles -windowrule = center 1, match:class $dialog_classes - -# Disable blur -windowrule = no_blur 1, match:title $dialog_titles -windowrule = no_blur 1, match:class $dialog_classes - - -# ========================================== -# WORKSPACE ASSIGNMENTS -# ========================================== -# Normal Workspaces -# windowrule = workspace 1, match:class ^(firefox)$ -# windowrule = workspace 2, match:class ^(kitty)$ -# windowrule = workspace 3, match:class ^(Code)$ -windowrule = workspace 1, match:class $gamescope - -# Special Workspaces -windowrule = workspace special:virtual, match:class ^(Spotify|spotify)$ -windowrule = workspace special:discord, match:class ^(discord|vesktop)$ - - -# ========================================== -# APP-SPECIFIC RULES: STEAM & GAMING -# ========================================== -# windowrule = workspace 3 silent, match:class $steam, match:title ^(Steam)$ - -# Fixed sizes for specific Steam windows -windowrule = size 400 800, match:title ^(Friends List)$, match:class $steam -windowrule = size 1000 800, match:title ^(Steam Settings)$, match:class $steam -windowrule = size 1000 800, match:title ^(Add Non-Steam Game)$, match:class $steam - -# Float and disable blur for Steam windows that aren't the main window -windowrule = float 1, match:class $steam, match:title negative:^(Steam)$ -windowrule = no_blur 1, match:class $steam, match:title negative:^(Steam)$ -# windowrule = center 1, match:class $steam, match:title negative:^(Steam)$ - -# Allow tearing for games started with Gamescope -windowrule = immediate 1, match:class $gamescope - - -# Layer rules - -# waybar blur -layerrule = blur on, match:namespace bottom -layerrule = blur on, match:namespace top -layerrule = ignore_alpha 0.5, match:namespace bottom -layerrule = ignore_alpha 0.5, match:namespace top -# launcher blur -layerrule = blur on, match:namespace launcher -layerrule = ignore_alpha 0.5, match:namespace launcher diff --git a/hypr/scripts/lid_handler.sh b/hypr/scripts/lid_handler.sh deleted file mode 100755 index b036241..0000000 --- a/hypr/scripts/lid_handler.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# ~/.config/hypr/scripts/lid_handler.sh - -# The file that tells Hyprland to keep the lid off during reloads -LID_STATE_FILE="$HOME/.config/hypr/lid_state.conf" - -restart_ui() { - # The Quickshell bar follows monitor hotplug on its own, so only the - # wallpaper daemon needs a kick. - systemctl restart --user hyprpaper -} - -if [[ "$1" == "close" ]]; then - # Check if ANY external monitor is connected and active - if hyprctl monitors all | grep -qE "Monitor (DP|HDMI|Type-C)-"; then - - # Prevent laptop screen from turning on during manual config reloads - echo "monitor=eDP-1, disable" > "$LID_STATE_FILE" - - # Extract the CURRENT live settings of all external monitors using jq - # This grabs the active resolution, refresh rate, position, and scale. - LIVE_MONITORS=$(hyprctl -j monitors | jq -c '.[] | select(.name != "eDP-1")') - - # 3. Disable the laptop screen - hyprctl keyword monitor "eDP-1, disable" - - # 4. Re-apply the live settings to external monitors so they don't reset - echo "$LIVE_MONITORS" | while read -r mon_json; do - NAME=$(echo "$mon_json" | jq -r '.name') - WIDTH=$(echo "$mon_json" | jq -r '.width') - HEIGHT=$(echo "$mon_json" | jq -r '.height') - REFRESH=$(echo "$mon_json" | jq -r '.refreshRate') - X=$(echo "$mon_json" | jq -r '.x') - Y=$(echo "$mon_json" | jq -r '.y') - SCALE=$(echo "$mon_json" | jq -r '.scale') - - # Formats it exactly as Hyprland expects: DP-1, 1920x1080@240, 0x0, 1 - hyprctl keyword monitor "$NAME, ${WIDTH}x${HEIGHT}@${REFRESH}, ${X}x${Y}, $SCALE" - done - - # restart ui - restart_ui - fi - -elif [[ "$1" == "open" ]]; then - # Clear the override file so the laptop screen is allowed to turn on again - echo "" > "$LID_STATE_FILE" - - # Let Hyprland reload itself. - # This automatically re-enables eDP-1 based on your hardcoded hyprland.conf! - hyprctl reload - - restart_ui -fi diff --git a/nvim b/nvim index 8d657d0..2cbfe69 160000 --- a/nvim +++ b/nvim @@ -1 +1 @@ -Subproject commit 8d657d0f8d2830c99f8117a8d7a94a4b2bdda7b0 +Subproject commit 2cbfe6946ae8da69fe7bc464cad9cac2aa906bd9