diff --git a/docs/stumpwm/init.org b/docs/stumpwm/init.org index dbc1000..425111a 100644 --- a/docs/stumpwm/init.org +++ b/docs/stumpwm/init.org @@ -64,9 +64,9 @@ Now, we’ll load a couple of my custom files that will be described below: | bluetooth.lisp | | commands.lisp | | placement.lisp | +| utilities.lisp | | keybindings.lisp | | theme.lisp | -| utilities.lisp | | modeline.lisp | | systemd.lisp | @@ -80,14 +80,14 @@ Now, we’ll load a couple of my custom files that will be described below: #+end_src This is equivalent to the Common Lisp code: -#+RESULTS[ed4f3fe4f7f82b11cd3cd262578abc7146f5807d]: gen-load-files +#+RESULTS[fe73024bcc6bca0f1baa974035b7af2c5d6b3b25]: gen-load-files #+begin_src lisp (load "~/.stumpwm.d/bluetooth.lisp") (load "~/.stumpwm.d/commands.lisp") (load "~/.stumpwm.d/placement.lisp") +(load "~/.stumpwm.d/utilities.lisp") (load "~/.stumpwm.d/keybindings.lisp") (load "~/.stumpwm.d/theme.lisp") -(load "~/.stumpwm.d/utilities.lisp") (load "~/.stumpwm.d/modeline.lisp") (load "~/.stumpwm.d/systemd.lisp") #+end_src diff --git a/docs/stumpwm/keybindings.org b/docs/stumpwm/keybindings.org index 5932f8d..1476e88 100644 --- a/docs/stumpwm/keybindings.org +++ b/docs/stumpwm/keybindings.org @@ -693,6 +693,76 @@ games and the bépo layout most of the time. I’ll use the command (define-key *root-map* (my/kbd "k") '*my-keyboard-layout-keymap*) #+end_src +**** NetworkManager integration +It is possible to have some kind of integration between StumpWM and +NetworkManager. To do so, we have to load the related module, then +create the two keybinds described in [[nm-keybinds]]. +#+name: nm-keybinds +#+caption: ~*my-nm-keybinds*~ +| Keychord | Command | +|----------+---------------------------| +| ~W~ | ~nm-list-wireless-networks~ | + +A call to src_lisp[:exports code]{(ql:quickload :dbus)} is necessary +for this module. Installing the ~dbus~ module in turn requires the +library ~libfixposix~ installed on the user’s machine. On Arch, you can +install it like so using ~paru~: +#+begin_src fish +paru -S libfixposix --noconfirm +#+end_src + +#+begin_src lisp +(ql:quickload :dbus) + +(load-module "stump-nm") + +<> +#+end_src + +**** Binwarp +Binwarp allows the user to control their mouse from the keyboard, +basically eliminating the need for a physical mouse in daily usage of +the workstation (though a physical mouse stays useful for games and +such). +#+begin_src lisp +(load-module "binwarp") +#+end_src + +Next, I’ll define my keybinds for when using Binwarp for emulating +mouse clicks as well as bépo-compatible mouse movements. This new +Binwarp mode is now available from the keybind ~s-m~ at top level. +#+begin_src lisp +(binwarp:define-binwarp-mode my-binwarp-mode "s-m" (:map *top-map*) + ((my/kbd "SPC") "ratclick 1") + ((my/kbd "RET") "ratclick 3") + ((my/kbd "c") "binwarp left") + ((my/kbd "t") "binwarp down") + ((my/kbd "s") "binwarp up") + ((my/kbd "r") "binwarp right") + ((my/kbd "i") "init-binwarp") + ((my/kbd "q") "exit-binwarp")) +#+end_src + +**** Bluetooth +It’s all nice and all, but typing manually the commands with ~s-SPC ;~ +is a bit tiring, so let’s define our Bluetooth keymap which we will +bind to ~s-SPC B~. +#+name: bluetooth-keymap +| Keychord | Command | +|----------+--------------------| +| ~c~ | ~bluetooth-connect~ | +| ~o~ | ~bluetooth-turn-on~ | +| ~O~ | ~bluetooth-turn-off~ | + +#+begin_src lisp +(defvar *my-bluetooth-keymap* + (let ((m (make-sparse-keymap))) + <> + m)) + +(define-key *root-map* (my/kbd "B") '*my-bluetooth-keymap*) +#+end_src + * PRIVATE org functions :noexport: #+name: keybinds-gen #+header: :wrap "src lisp :exports none" :exports none :noweb yes diff --git a/docs/stumpwm/utilities.org b/docs/stumpwm/utilities.org index a5577c1..201573a 100644 --- a/docs/stumpwm/utilities.org +++ b/docs/stumpwm/utilities.org @@ -11,30 +11,6 @@ Part of my configuration is not really related to StumpWM itself, or rather it adds new behaviour StumpWM doesn’t have. ~utilities.lisp~ stores all this code in one place. -*** Binwarp -Binwarp allows the user to control their mouse from the keyboard, -basically eliminating the need for a physical mouse in daily usage of -the workstation (though a physical mouse stays useful for games and -such). -#+begin_src lisp -(load-module "binwarp") -#+end_src - -Next, I’ll define my keybinds for when using Binwarp for emulating -mouse clicks as well as bépo-compatible mouse movements. This new -Binwarp mode is now available from the keybind ~s-m~ at top level. -#+begin_src lisp -(binwarp:define-binwarp-mode my-binwarp-mode "s-m" (:map *top-map*) - ((my/kbd "SPC") "ratclick 1") - ((my/kbd "RET") "ratclick 3") - ((my/kbd "c") "binwarp left") - ((my/kbd "t") "binwarp down") - ((my/kbd "s") "binwarp up") - ((my/kbd "r") "binwarp right") - ((my/kbd "i") "init-binwarp") - ((my/kbd "q") "exit-binwarp")) -#+end_src - *** Bluetooth :PROPERTIES: :header-args:lisp: :mkdirp yes :tangle ~/.stumpwm.d/bluetooth.lisp :noweb yes @@ -183,52 +159,6 @@ then attempt to connect to it. (bluetooth-connect-device choice))))) #+end_src -**** Keybinds -It’s all nice and all, but typing manually the commands with ~s-SPC ;~ -is a bit tiring, so let’s define our Bluetooth keymap which we will -bind to ~s-SPC B~. -#+name: bluetooth-keymap -| Keychord | Command | -|----------+--------------------| -| ~c~ | ~bluetooth-connect~ | -| ~o~ | ~bluetooth-turn-on~ | -| ~O~ | ~bluetooth-turn-off~ | - -#+begin_src lisp -(defvar *my-bluetooth-keymap* - (let ((m (make-sparse-keymap))) - <> - m)) - -(define-key *root-map* (my/kbd "B") '*my-bluetooth-keymap*) -#+end_src - -*** NetworkManager integration -It is possible to have some kind of integration between StumpWM and -NetworkManager. To do so, we have to load the related module, then -create the two keybinds described in [[nm-keybinds]]. -#+name: nm-keybinds -#+caption: ~*my-nm-keybinds*~ -| Keychord | Command | -|----------+---------------------------| -| ~W~ | ~nm-list-wireless-networks~ | - -A call to src_lisp[:exports code]{(ql:quickload :dbus)} is necessary -for this module. Installing the ~dbus~ module in turn requires the -library ~libfixposix~ installed on the user’s machine. On Arch, you can -install it like so using ~paru~: -#+begin_src fish -paru -S libfixposix --noconfirm -#+end_src - -#+begin_src lisp -(ql:quickload :dbus) - -(load-module "stump-nm") - -<> -#+end_src - *** Pinentry Out with GTK2’s pinentry program! Let’s use StumpWM’s! At least that’s what I’d like to say, but unfortunately there is a bug in the text @@ -261,26 +191,6 @@ run all the time, just when I need it. (sb-thread:make-thread (lambda () (slynk:stop-server 4005)))) #+end_src -*** ~swm-ssh~ -This module from the contrib repository scans the user’s ssh -configuration file and offers them a quick way of connecting to their -remote hosts. -#+begin_src lisp -(load-module "swm-ssh") -#+end_src - -The default terminal needs to be set, otherwise the module will try to -call ~urxvtc~ which is not installed on my system. -#+begin_src lisp -(setq swm-ssh:*swm-ssh-default-term* "kitty") -#+end_src - -Now, to call the main command of this module we can define the -following keybind. -#+begin_src lisp -(define-key *root-map* (my/kbd "s") "swm-ssh-menu") -#+end_src - *** Systemd :PROPERTIES: :header-args:lisp: :mkdirp yes :tangle ~/.stumpwm.d/systemd.lisp :noweb yes