Re: Nudge, nudge
GSR - FR <[email protected]> Sat, 19 Feb 2022 00:29:05 +0100
| Newsgroups | gmane.comp.window-managers.sawfish |
|---|---|
| Message-ID | <[email protected]> |
Hi, [email protected] (2022-02-14 at 1930.02 -0800): > There are some times (e.g., Zooming on multiple monitors) when I want to > fine-tune window positions. No worries; this is why I run Sawfish! So I > wrote a bit of simple code: You could use functions from slide-window.jl. :) Set slide-window-increment to 1, or define wrappers like I did ages ago to have multiple versions that use the main "slide-window". Example from ~/.sawfish/lisp/gsr/misc.jl (maybe I should post it?): ---8<--- (define (gsr-slide-window-left step) "Move the window given pixels to the left." (slide-window (current-event-window) (- step) 0)) ... (define-command 'gsr-slide-window-left gsr-slide-window-left #:spec "NX:" #:type `(and (labelled ,(_ "Pixels:") (number 1)))) --->8--- BTW, if the target is having windows touch each other, no gaps, check the pack functions from grow-pack.jl. And non-0 move-snap-epsilon with move-snap-mode set to 'resistance is useful for when using the mouse (or maybe you prefer 'magnetism or 'attraction modes, I prefer the other as it lets you any screen position). Examples from ~/.sawfish/rc: ---8<--- ;; Keyboard movement, big steps (bind-keys window-keymap "H-S-Down" '(gsr-slide-window-down 16)) ... ;; Keyboard movement, small steps (bind-keys window-keymap "H-C-Down" '(gsr-slide-window-down 1)) ... ;; Keyboard "bump into next obstacle" movement (bind-keys window-keymap "H-Down" 'pack-window-down) --->8--- Those mean arrow key with Hyper Shift, Hyper Control or Hyper (pack get used a lot more than step based movements). The 16 is due to the title and button dimensions, so I can arrange title bars in stacks and even offset them to the sides (workflow based around heavy use of packing functions plus shading and shade-hover.jl). Cheers, GSR -- Sawfish ML