summaryrefslogtreecommitdiff
path: root/init.scm
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2022-12-19 23:02:38 +0100
committerSamuel Fadel <samuel@nihil.ws>2022-12-19 23:02:38 +0100
commit291a0b72fbeaf757056fbb7fba0376262360d877 (patch)
tree6e5bee2e5f4dc2d8b0832f638f55ae52ba7bafab /init.scm
parent86d7067f5d27d7c97e9a1de8c4103e139af66c40 (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.scm38
1 files changed, 19 insertions, 19 deletions
diff --git a/init.scm b/init.scm
index 8f3d023..b712add 100644
--- a/init.scm
+++ b/init.scm
@@ -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)))