diff options
-rw-r--r-- | content-org/blog.org | 98 | ||||
-rw-r--r-- | content/blog/2024/fvwm-part-2.md | 101 |
2 files changed, 197 insertions, 2 deletions
diff --git a/content-org/blog.org b/content-org/blog.org index b96a1ba..69c9633 100644 --- a/content-org/blog.org +++ b/content-org/blog.org @@ -8,13 +8,107 @@ #+HUGO_SECTION: blog -* 2024 [60/61] :@blog: +* 2024 [61/62] :@blog: :PROPERTIES: :EXPORT_HUGO_SECTION: blog/2024 :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :image_dir "blog/images" :image_max_width 600 :EXPORT_HUGO_PAIRED_SHORTCODES: image yt :END: + +** DONE Fvwm - day 2 (keyboard control) +CLOSED: [2024-09-03 Tue 22:29] +:PROPERTIES: +:EXPORT_FILE_NAME: fvwm-part-2 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :abstract Adjusting Fvwm to my basic instincts +:END: + +I'm a day in Fvwm, and it's rock solid. +Time to adjust it to my needs +Let's start with keyboard control, as I prefer over using mouse. + +We can open =~/.fvwm/config= and make changes. +The default one is /very/ nicely commented, so it's a pleasure to modify. +Then, all we need is to =restart= the wm and we're ready. + +By default, you can use =C^F1= - =C^F2= to change active desktop. +The problem is that I don't have F-keys on my keyboard and I want to relegate all WM bindings to =super= key (aka "windows" key). +Ergo, I want =Super^1= to =Super^4=. + +First of all, I don't want my =Super= to star terminal - all I needed to do was to comment out +#+begin_src shell +Silent Key Super_R A A Exec exec $[infostore.terminal] +#+end_src + +I will reassign it later on. + +The [[https://www.fvwm.org/Wiki/Config/Bindings/][bindings documentation]] inform us that the binding format is +#+begin_src shell +Key Name Context Modifier Command +#+end_src + +So, what I want to achieve is + +#+begin_src shell +Silent Key 1 A Super GotoDesk 0 0 +#+end_src + +There is no super as modifier as default, but we can use any =mod= key. +It varies between OSes, so we need to check: + +#+begin_src shell + $ xmodmap # + + xmodmap: up to 4 keys per modifier, (keycodes in parentheses): + + shift Shift_L (0x32), Shift_R (0x3e) + lock Caps_Lock (0x42) + control Control_L (0x25), Control_R (0x69) + mod1 Alt_L (0x40), Alt_R (0x6c), Alt_L (0xcc), Meta_L (0xcd) + mod2 Num_Lock (0x4d) + mod3 ISO_Level5_Shift (0xcb) + mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) + mod5 ISO_Level3_Shift (0x5c) +#+end_src + +Therefore, my =super= keys is =mod4= and the bindings will be +#+begin_src shell +Silent Key 1 A 4 GotoDesk 0 0 +Silent Key 2 A 4 GotoDesk 0 1 +Silent Key 3 A 4 GotoDesk 0 2 +Silent Key 4 A 4 GotoDesk 0 3 +#+end_src + +Now, back to the terminal. +I want =Super+Shift+T= to open the terminal +We can join multiple modifiers by simply putting all of them as the mod: + +#+begin_src shell +Silent Key T A 4S Exec exec $[infostore.terminal] +#+end_src + +The terminal command is a variable (=infostore=) because it's used in multiple places. +I'm still using the good, old st, so I modified to + +#+begin_src shell +InfoStoreAdd terminal st +#+end_src + +I also want to have a quick way to run emacs + +#+begin_src shell +Silent Key E A 4 Exec exec emacs +#+end_src + +And to mimic MacOS =Ctrl+shift+Q= to close active window +#+begin_src shell +Silent Key Q A CS Close +#+end_src + +This makes Fvwm very much usable. +My muscle memory is again in use. +It's still far from where I want it to be, but it's getting there. + ** DONE Replies to my last post about Youtube CLOSED: [2024-09-03 Tue 16:03] :PROPERTIES: @@ -39,7 +133,7 @@ I don't have a tablet, and my TV is where my kid plays with his toys. Guess I'll retry all the from the first proposal. I'll remove all algorithms from my YT, and then see what the future will bring. -** DONE Fvwm - part I +** DONE Fvwm - day 1 CLOSED: [2024-09-02 Mon 22:31] :PROPERTIES: :EXPORT_FILE_NAME: fvwm-part-1 diff --git a/content/blog/2024/fvwm-part-2.md b/content/blog/2024/fvwm-part-2.md new file mode 100644 index 0000000..bf5a86f --- /dev/null +++ b/content/blog/2024/fvwm-part-2.md @@ -0,0 +1,101 @@ ++++ +title = "Fvwm - day 2 (keyboard control)" +author = ["MichaĆ Sapka"] +date = 2024-09-03T22:29:00+02:00 +categories = ["blog"] +draft = false +weight = 2001 +image_dir = "blog/images" +image_max_width = 600 +abstract = "Adjusting Fvwm to my basic instincts" ++++ + +I'm a day in Fvwm, and it's rock solid. +Time to adjust it to my needs +Let's start with keyboard control, as I prefer over using mouse. + +We can open `~/.fvwm/config` and make changes. +The default one is _very_ nicely commented, so it's a pleasure to modify. +Then, all we need is to `restart` the wm and we're ready. + +By default, you can use `C^F1` - `C^F2` to change active desktop. +The problem is that I don't have F-keys on my keyboard and I want to relegate all WM bindings to `super` key (aka "windows" key). +Ergo, I want `Super^1` to `Super^4`. + +First of all, I don't want my `Super` to star terminal - all I needed to do was to comment out + +```shell +Silent Key Super_R A A Exec exec $[infostore.terminal] +``` + +I will reassign it later on. + +The [bindings documentation](https://www.fvwm.org/Wiki/Config/Bindings/) inform us that the binding format is + +```shell +Key Name Context Modifier Command +``` + +So, what I want to achieve is + +```shell +Silent Key 1 A Super GotoDesk 0 0 +``` + +There is no super as modifier as default, but we can use any `mod` key. +It varies between OSes, so we need to check: + +```shell +$ xmodmap # + +xmodmap: up to 4 keys per modifier, (keycodes in parentheses): + +shift Shift_L (0x32), Shift_R (0x3e) +lock Caps_Lock (0x42) +control Control_L (0x25), Control_R (0x69) +mod1 Alt_L (0x40), Alt_R (0x6c), Alt_L (0xcc), Meta_L (0xcd) +mod2 Num_Lock (0x4d) +mod3 ISO_Level5_Shift (0xcb) +mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) +mod5 ISO_Level3_Shift (0x5c) +``` + +Therefore, my `super` keys is `mod4` and the bindings will be + +```shell +Silent Key 1 A 4 GotoDesk 0 0 +Silent Key 2 A 4 GotoDesk 0 1 +Silent Key 3 A 4 GotoDesk 0 2 +Silent Key 4 A 4 GotoDesk 0 3 +``` + +Now, back to the terminal. +I want `Super+Shift+T` to open the terminal +We can join multiple modifiers by simply putting all of them as the mod: + +```shell +Silent Key T A 4S Exec exec $[infostore.terminal] +``` + +The terminal command is a variable (`infostore`) because it's used in multiple places. +I'm still using the good, old st, so I modified to + +```shell +InfoStoreAdd terminal st +``` + +I also want to have a quick way to run emacs + +```shell +Silent Key E A 4 Exec exec emacs +``` + +And to mimic MacOS `Ctrl+shift+Q` to close active window + +```shell +Silent Key Q A CS Close +``` + +This makes Fvwm very much usable. +My muscle memory is again in use. +It's still far from where I want it to be, but it's getting there. |