Re: Spatial groups concept discussion
Roland Everaert <[email protected]> Mon, 14 Mar 2022 09:37:35 +0000
| Newsgroups | gmane.comp.window-managers.stumpwm.devel |
|---|---|
| Message-ID | <AoAfYIvbdF-vD9Igngu-LfqnJjEt_QDRIkRYgGWd-IS2NkeK9l4I6AZCn-OEZ3769Vtu1-cNMBM-T5u628QWaLLav-FaaUwUN-nU8v6sZ08=@protonmail.com> |
Russel, > Roland, > > On Mon, Mar 14, 2022 at 08:19:09AM +0000, Roland Everaert wrote: > > > Regarding keybings, (un)fortunately, I live in a hybrid-world, the > > > > machine I use for my job is a windows machine provided by the > > > > customer, so I have to account for the Windows world, hence C-n et > > > > al. doesn't feels natural to me for a very long time. > > Xkeymacs. http://xkeymacs.osdn.jp/ > > Reskin your OS to use reasonable keybindings. I will have to look at it, thanks > > > Maybe you could propose predefined keybindings in addition to the > > > > possibility for the user to define its own. The Nyxt web-browser, a > > > > common lisp based browser, do that quite well. > > Kind of out of scope for me. ;] > > > Below is my keybindings definition: > > > > ;; 1. Undefine all the default keybindings > > > > (undefine-key top-map (kbd "C-Left")) > > > > (undefine-key top-map (kbd "C-Right")) > > > > (undefine-key top-map (kbd "C-Up")) > > > > (undefine-key top-map (kbd "C-Down")) > > > > (undefine-key top-map (kbd "C-S-Left")) > > > > (undefine-key top-map (kbd "C-S-Right")) > > > > (undefine-key top-map (kbd "C-S-Up")) > > > > (undefine-key top-map (kbd "C-S-Down")) > > > > ;; 2. Set my own keybindings > > > > (define-key top-map (kbd "s-Left") "coord-left") > > > > (define-key top-map (kbd "s-Right") "coord-right") > > > > (define-key top-map (kbd "s-Up") "coord-up") > > > > (define-key top-map (kbd "s-Down") "coord-down") > > > > ;; Control-Shift left/right to switch desktop Z > > > > (define-key top-map (kbd "C-s-Left") "coord-taskleft") > > > > (define-key top-map (kbd "C-s-Right") "coord-taskright") > > > > ;; Control-Shift-Up to return to origin 0,0 on current desktop Z > > > > (define-key top-map (kbd "C-s-Up") "coord-taskorigin") > > > > ;; "Pop" back to last desktop position > > > > (define-key top-map (kbd "C-s-Down") "coord-taskpop") > > > > ;; ---------------------------------------------- > > The updated module 0.0.2 now has a function you have to call to > > install my default keybinds. If you omit it, you can just define > > them. No need for undefines. > > So you moved the coordinate navigation from Control-arrows to Windows-key arrows? Indeed. > > I have my music player bound there. ;] > > > As for the multi-head usage, S-Arrows allows to switch between > > > > frames in the same group, so it allows to switch between heads. > > You mean move-focus? That built in likely works. Yes, move-focus. > > Do you configure the multiple heads somewhere, regarding which screen > > is adjacent to the other? (ie: DP2 left of DP1) I used lxrandr to create a configuration file for screen placement, then in my configuration I launch this command: (run-shell-command "gtk-launch lxrandr-autostart") > > > As for frame/windows placement in groups, according to the > > > > documentation, it is possible to define rules, unfortunately, I > > > > never manage to make them works, with the exception of firefox. :( > > Yeah. I mentioned this at one point, where you can define a group > > where all terminals go, or all Firefox windows go. That feels very > > confining to me, cramming all those on one group / screen. > > I meant that on startup I'd love to launch a series of applications in > > fixed locations (group 0,0,0, frame 0, launch urxvt. group 0,0,0, > > frame 1, launch urxvt. and so on). Instead I have a short snippet to > > create my frames and splits, but then I have to manually launch things. > > (defun my-startup () > > (spatial-groups:spatial-gselect "0,0,0") > > (hsplit) > > (resize-frame (current-group) (tile-group-current-frame (current-group)) (- 110 (frame-width (tile-group-current-frame (current-group)))) :width) > > (move-focus :right) > > (hsplit) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (move-focus :right) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (spatial-groups:spatial-gselect "0,1,0") > > (hsplit) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (move-focus :right) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (spatial-groups:spatial-gselect "1,-1,0") > > (hsplit) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (move-focus :right) > > ; (run-shell-command "/usr/bin/urxvt") > > ; (sleep 1) > > (spatial-groups:spatial-gselect "1,0,0") > > ; (run-shell-command "/usr/bin/emacsclient -c") > > ; (sleep 1) > > (spatial-groups:spatial-gselect "0,0,0") ) > > (when initializing (my-startup)) > > If I uncomment the run-shell-command, they stack in the last or > > current frame. I have the same problem :( > > ------------------------------------------------------------------ > > Russell Adams [email protected] > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3