mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
chore(config): add workspace rules and tablet mapping, fix tldraw launch
This commit is contained in:
1 parent
40f107c81f
commit
8a510bec89
9 files changed
+75
-10
No files matched your search
@@ -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\"")
|
||||
|
||||
|
||||
@@ -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" })
|
||||
@@ -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.
|
||||
@@ -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", {
|
||||
|
||||
Reference in new issue
Block a user