diff options
author | Samuel Fadel <samuel@nihil.ws> | 2022-12-19 23:02:38 +0100 |
---|---|---|
committer | Samuel Fadel <samuel@nihil.ws> | 2022-12-19 23:02:38 +0100 |
commit | 291a0b72fbeaf757056fbb7fba0376262360d877 (patch) | |
tree | 6e5bee2e5f4dc2d8b0832f638f55ae52ba7bafab /init.scm | |
parent | 86d7067f5d27d7c97e9a1de8c4103e139af66c40 (diff) |
Refactoring to reduce repeated code, fix tiling bugs.
* Makefile: Add optimization flag
* init.scm: Use correct indices for workspaces
* schewm.c: Many lines of repeated code removed
Diffstat (limited to 'init.scm')
-rw-r--r-- | init.scm | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -32,7 +32,7 @@ (,(make-key "j") . ,wm-focus-next) ;; Packing (,(make-shift-key "Left") . ,wm-pack-left) - (,(make-shift-key "Right") . ,wm-pack-left) + (,(make-shift-key "Right") . ,wm-pack-right) (,(make-shift-key "Up") . ,wm-pack-top) (,(make-shift-key "Down") . ,wm-pack-bottom) ;; Toggle between normal and tiled in a certain position @@ -50,25 +50,25 @@ (,(make-key "z") . ,wm-toggle-bottom-left) (,(make-key "c") . ,wm-toggle-bottom-right) ;; Set current workspace - (,(make-key "1") . ,(make-callback wm-set-workspace 1)) - (,(make-key "2") . ,(make-callback wm-set-workspace 2)) - (,(make-key "3") . ,(make-callback wm-set-workspace 3)) - (,(make-key "4") . ,(make-callback wm-set-workspace 4)) - (,(make-key "5") . ,(make-callback wm-set-workspace 5)) - (,(make-key "6") . ,(make-callback wm-set-workspace 6)) - (,(make-key "7") . ,(make-callback wm-set-workspace 7)) - (,(make-key "8") . ,(make-callback wm-set-workspace 8)) - (,(make-key "9") . ,(make-callback wm-set-workspace 9)) + (,(make-key "1") . ,(make-callback wm-set-workspace 0)) + (,(make-key "2") . ,(make-callback wm-set-workspace 1)) + (,(make-key "3") . ,(make-callback wm-set-workspace 2)) + (,(make-key "4") . ,(make-callback wm-set-workspace 3)) + (,(make-key "5") . ,(make-callback wm-set-workspace 4)) + (,(make-key "6") . ,(make-callback wm-set-workspace 5)) + (,(make-key "7") . ,(make-callback wm-set-workspace 6)) + (,(make-key "8") . ,(make-callback wm-set-workspace 7)) + (,(make-key "9") . ,(make-callback wm-set-workspace 8)) ;; Send client to workspace - (,(make-shift-key "1") . ,(make-callback wm-set-focused-client-workspace 1)) - (,(make-shift-key "2") . ,(make-callback wm-set-focused-client-workspace 2)) - (,(make-shift-key "3") . ,(make-callback wm-set-focused-client-workspace 3)) - (,(make-shift-key "4") . ,(make-callback wm-set-focused-client-workspace 4)) - (,(make-shift-key "5") . ,(make-callback wm-set-focused-client-workspace 5)) - (,(make-shift-key "6") . ,(make-callback wm-set-focused-client-workspace 6)) - (,(make-shift-key "7") . ,(make-callback wm-set-focused-client-workspace 7)) - (,(make-shift-key "8") . ,(make-callback wm-set-focused-client-workspace 8)) - (,(make-shift-key "9") . ,(make-callback wm-set-focused-client-workspace 9)) + (,(make-shift-key "1") . ,(make-callback wm-set-focused-client-workspace 0)) + (,(make-shift-key "2") . ,(make-callback wm-set-focused-client-workspace 1)) + (,(make-shift-key "3") . ,(make-callback wm-set-focused-client-workspace 2)) + (,(make-shift-key "4") . ,(make-callback wm-set-focused-client-workspace 3)) + (,(make-shift-key "5") . ,(make-callback wm-set-focused-client-workspace 4)) + (,(make-shift-key "6") . ,(make-callback wm-set-focused-client-workspace 5)) + (,(make-shift-key "7") . ,(make-callback wm-set-focused-client-workspace 6)) + (,(make-shift-key "8") . ,(make-callback wm-set-focused-client-workspace 7)) + (,(make-shift-key "9") . ,(make-callback wm-set-focused-client-workspace 8)) ;; Send client to monitor (,(make-shift-key "i") . ,wm-client-monitor-prev) (,(make-shift-key "o") . ,wm-client-monitor-next))) |