From 8a510bec892f46faea51dfa335295698e649e4dc Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 28 Aug 2026 14:14:20 -0400 Subject: [PATCH] chore(config): add workspace rules and tablet mapping, fix tldraw launch --- dot_config/hypr/bindings.lua | 4 +++- dot_config/hypr/hyprland.lua | 15 +++++++++++++++ dot_config/hypr/input.lua | 29 +++++++++++++++++++++++++++++ dot_config/hypr/looknfeel.lua | 19 ++++++++++++++----- dot_config/kitty/goliath.conf | 3 +++ dot_config/kitty/herdr.conf | 3 ++- dot_config/kitty/kitty.conf | 7 ++++++- dot_config/kitty/tmux.conf | 3 ++- dot_config/mimeapps.list | 2 +- 9 files changed, 75 insertions(+), 10 deletions(-) diff --git a/dot_config/hypr/bindings.lua b/dot_config/hypr/bindings.lua index be5ceff..f6ae03b 100644 --- a/dot_config/hypr/bindings.lua +++ b/dot_config/hypr/bindings.lua @@ -124,7 +124,9 @@ hl.unbind("SUPER + CTRL + ALT + T") -- was: show time o.bind("SUPER + CTRL + ALT + T", "Todoist", "omarchy-launch-or-focus todoist \"gtk-launch todoist\"") hl.unbind("SUPER + CTRL + ALT + W") -- was: toggle weather -o.bind("SUPER + CTRL + ALT + W", "tldraw", "omarchy-launch-or-focus tldraw \"gtk-launch tldraw_offline\"") +-- gtk-launch takes the desktop-entry id: TLDraw.desktop, not tldraw_offline, +-- which does not exist (the old command could only focus, never launch). +o.bind("SUPER + CTRL + ALT + W", "tldraw", "omarchy-launch-or-focus tldraw \"gtk-launch TLDraw\"") o.bind("SUPER + CTRL + ALT + SPACE", "Sticky notes", "omarchy-launch-or-focus sticky \"gtk-launch io.github.faridjaff.StickyNotesCanvas\"") diff --git a/dot_config/hypr/hyprland.lua b/dot_config/hypr/hyprland.lua index 45c9b66..91e2a83 100644 --- a/dot_config/hypr/hyprland.lua +++ b/dot_config/hypr/hyprland.lua @@ -27,3 +27,18 @@ require("default.hypr.toggles") -- Add any other personal Hyprland configuration below. -- o.window("qemu", { workspace = "5" }) + +-- Pin workspaces to monitors. Matched on EDID description for the external +-- display so it survives landing on a different DP connector after re-docking. +hl.workspace_rule({ workspace = "3", monitor = "desc:Apple Computer Inc StudioDisplay 0x984262A7" }) +hl.workspace_rule({ workspace = "4", monitor = "eDP-1" }) + +-- Always open these apps on a fixed workspace and follow them there. Classes +-- come from `hyprctl clients` -- the desktop files' StartupWMClass hints +-- disagree with reality for Beeper (claims BeeperTexts, actually reports +-- Beeper). Add " silent" to a workspace prop to place a window without +-- switching the view to it. +o.window([[^brave-youtube\.com__-Default$]], { workspace = "1" }) +o.window([[^brave-www\.tldraw\.com__-Default$]], { workspace = "3" }) +o.window([[^com\.fastmail\.Fastmail$]], { workspace = "4" }) +o.window([[^Beeper$]], { workspace = "4" }) diff --git a/dot_config/hypr/input.lua b/dot_config/hypr/input.lua index d20be92..76315c2 100644 --- a/dot_config/hypr/input.lua +++ b/dot_config/hypr/input.lua @@ -55,3 +55,32 @@ -- Enable touchpad gestures for moving focus (helpful on scrolling layout). -- hl.gesture({ fingers = 3, direction = "left", action = function() hl.dispatch(hl.dsp.focus({ direction = "l" })) end }) -- hl.gesture({ fingers = 3, direction = "right", action = function() hl.dispatch(hl.dsp.focus({ direction = "r" })) end }) + +-- Tablets / pens. +-- Hyprland maps a tablet across the *whole* monitor layout by default +-- (input.tablet.output is empty), so a pen stretches over eDP-1 + the external +-- display at once. Pin each tablet to a single output instead. +-- Device names come from `hyprctl devices` (the "Tablet" entry, not "Tablet Pad"). + +-- Built-in digitizer of the Flow Z13: it physically *is* the laptop panel. +hl.device({ name = "elan9008:00-04f3:43c7-stylus", output = "eDP-1" }) + +-- Wacom Intuos BT S: pinned to the Studio Display, matched on EDID description +-- so it survives a different DP connector after re-docking. With that display +-- absent, Hyprland maps across the whole layout, which undocked is just eDP-1. +-- +-- The tablet is 152x95mm (16:10) and the display is 16:9, so the active area is +-- cropped to a 152x85.5mm (16:9) band to keep strokes undistorted while still +-- reaching every pixel. The band starts at the top edge, leaving the bottom +-- 9.5mm of the tablet as dead space (the pen there parks at the screen bottom). +hl.device({ + name = "wacom-intuos-bt-s-pen", + output = "desc:Apple Computer Inc StudioDisplay 0x984262A7", + active_area_size = { 152, 85.5 }, + active_area_position = { 0, 0 }, +}) + +-- Left-handed use rotates the tablet 180 degrees: left_handed = true + +-- The 4 ExpressKeys ("Tablet Pad") cannot be bound from Hyprland; only apps +-- that implement the tablet-v2 pad protocol (e.g. Krita) see them. diff --git a/dot_config/hypr/looknfeel.lua b/dot_config/hypr/looknfeel.lua index b0e70b5..84e7fa6 100644 --- a/dot_config/hypr/looknfeel.lua +++ b/dot_config/hypr/looknfeel.lua @@ -49,6 +49,16 @@ -- }, -- }) +-- hyprglass (Apple-style liquid glass) is loaded, but the Spectra theme owns +-- blur now: ~/.config/omarchy/themes/spectra/hyprland.lua enables +-- decoration:blur for windows and a layer_rule for the Quickshell surfaces. +-- Two blur passes over the same surface just costs GPU time, so hyprglass's +-- layer pass stays off here. The namespaces it used to whitelist (waybar, +-- swaync, quickshell:bezel) do not exist under Omarchy 4 anyway -- the shell is +-- Quickshell under omarchy-bar / omarchy-menu / omarchy-notifications / ... +-- To hand the shell surfaces back to hyprglass: set layers.enabled = 1, restore +-- the hg.layer() calls below with the omarchy-* namespaces, and drop those same +-- namespaces from the theme's hl.layer_rule. if hl.plugin.hyprglass then local hg = hl.plugin.hyprglass @@ -61,14 +71,13 @@ if hl.plugin.hyprglass then dark = { brightness = 0.82 }, light = { adaptive_boost = 0.5 }, - layers = { enabled = 1 }, + layers = { enabled = 0 }, }) -- Layer surfaces: each call whitelists the namespace and configures it - hg.layer("waybar", { preset = "subtle", mask_threshold = 0.05 }) - hg.layer("swaync") - hg.layer("quickshell:bezel", { preset = "ui", mask_threshold = 0.3 }) - hg.layer("debug-panel", { exclude = true }) + -- hg.layer("omarchy-bar", { preset = "subtle", mask_threshold = 0.05 }) + -- hg.layer("omarchy-notifications") + -- hg.layer("omarchy-menu", { preset = "ui", mask_threshold = 0.3 }) -- Presets hg.preset("clear", { diff --git a/dot_config/kitty/goliath.conf b/dot_config/kitty/goliath.conf index 3358fce..e9f0162 100644 --- a/dot_config/kitty/goliath.conf +++ b/dot_config/kitty/goliath.conf @@ -26,3 +26,6 @@ map super+up send_text all \x02\x1b[1;5A map super+down send_text all \x02\x1b[1;5B map super+d send_text all \x02d tab_bar_style hidden + +# Colors + transparency from the active Omarchy theme (last include wins) +include ~/.local/state/omarchy/current/theme/kitty.conf diff --git a/dot_config/kitty/herdr.conf b/dot_config/kitty/herdr.conf index c34cc88..5736009 100644 --- a/dot_config/kitty/herdr.conf +++ b/dot_config/kitty/herdr.conf @@ -69,4 +69,5 @@ bold_font auto italic_font auto bold_italic_font auto # END_KITTY_FONTS -include themes/cyberdream.conf +# Colors + transparency from the active Omarchy theme (last include wins) +include ~/.local/state/omarchy/current/theme/kitty.conf diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index 9a93b90..f2d6fdd 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -3,6 +3,8 @@ font_family VictorMono Nerd Font bold_italic_font auto window_padding_width 8 hide_window_decorations yes +# Fallback for themes that ship no opacity; the Omarchy theme include at the +# bottom of this file overrides it (Spectra sets 0.55). background_opacity 0.9 cursor_blink_interval 1 copy_on_select auto @@ -99,4 +101,7 @@ italic_font auto bold_italic_font auto # END_KITTY_FONTS # -include themes/cyberdream.conf +# Colors + transparency come from the active Omarchy theme +# (~/.config/omarchy/themes//kitty.conf). Last include wins, so keep this +# at the bottom. +include ~/.local/state/omarchy/current/theme/kitty.conf diff --git a/dot_config/kitty/tmux.conf b/dot_config/kitty/tmux.conf index 67e27b1..bfcbb80 100644 --- a/dot_config/kitty/tmux.conf +++ b/dot_config/kitty/tmux.conf @@ -96,4 +96,5 @@ bold_font auto italic_font auto bold_italic_font auto # END_KITTY_FONTS -include themes/cyberdream.conf +# Colors + transparency from the active Omarchy theme (last include wins) +include ~/.local/state/omarchy/current/theme/kitty.conf diff --git a/dot_config/mimeapps.list b/dot_config/mimeapps.list index ecc5de5..8f1abf7 100644 --- a/dot_config/mimeapps.list +++ b/dot_config/mimeapps.list @@ -23,7 +23,7 @@ x-scheme-handler/todoist=todoist.desktop x-scheme-handler/openhuman=OpenHuman-handler.desktop application/vnd.microsoft.portable-executable=wine.desktop x-scheme-handler/slack=slack.desktop -x-scheme-handler/mailto=userapp-Evolution-PCEYQ4.desktop +x-scheme-handler/mailto=omamail.desktop x-scheme-handler/anytype=anytype.desktop x-scheme-handler/piebald=piebald-handler.desktop x-scheme-handler/discord-647066573147996160=discord-647066573147996161.desktop