• Jerkface (any/all)@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    2 months ago

    I’ve used ion, ratpoison, i3, sawfish, and other tiling window managers for fifteen or more years, all totaled up. There is a great deal of pressure to use a modern desktop environment and it’s a lot of work maintaining my janky bespoke desktop environment functions necessary for a few critical applications. I use KDE’s tiling features and keyboard shortcuts, but it’s a double edged sword because I have to disable all window manager bindings in (for example) Blender and emacs to avoid shadowing important features. Actually, I have re-implemented a lot of my custom KDE shortcuts as emacs bindings as well, so they still work when emacs has the focus. Here’s one:

    (cl-flet ((switch-to (name)
    	    (lambda ()
    	      (interactive)
    	      (shell-command (concat "wmctrl -a " name)))))
      (global-set-key (kbd "s-1") (switch-to "librewolf"))
      (global-set-key (kbd "s-2") (switch-to "konsole"))
      (global-set-key (kbd "s-3") (switch-to "signal"))
      (global-set-key (kbd "s-4") (switch-to "darktable"))
      (global-set-key (kbd "s-5") (switch-to "emacs")))
    
    • Jerkface (any/all)@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      2 months ago

      why have I made that anonymous function interactive??

      Edit: Oh I think anything you bind to a key has to be interactive.