-
Notifications
You must be signed in to change notification settings - Fork 5
/
zwm.conf
160 lines (139 loc) · 6.66 KB
/
zwm.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
; ----------- ZWM Configuration File -------------
;
; This configuration file is used to customize the Zee Window Manager (ZWM) settings.
; It allows you to define window appearance, behavior, and key bindings for various actions.
; Command to run on startup
; Use the exec directive to specify programs that should be started when ZWM is launched.
; For single command: use -> exec = "command"
; You can also specify additional arguments as a list.
exec = ["polybar", "-c", ".config/polybar/config.ini"]
; Available Variables:
; These variables control the appearance and behavior of the window manager.
;
; - border_width: defines the width of the window borders in pixels.
border_width = 2
; - active_border_color: specifies the color of the border for the active (focused) window.
active_border_color = 0x4a4a48
; - normal_border_color: specifies the color of the border for inactive (unfocused) windows.
normal_border_color = 0x30302f
; - window_gap: sets the gap between windows in pixels.
window_gap = 10
; - virtual_desktops: sets the number of virtual desktops available.
virtual_desktops = 7
; - focus_follow_pointer: If false, the window is focused on click.
; If true, the window is focused when the cursor enters it.
focus_follow_pointer = true
; Custom window rules
; Custom window rules allow you to define specific behaviors for windows based on their window class.
;
; Syntax:
; rule = wm_class("window class name"), state(tiled|floated), desktop(1..N)
;
; Explanation:
; - wm_class: The window class name used to identify the window. Use the 'xprop' tool to find the wm_class of a window.
; - state: Specifies whether the window should be tiled or floated.
; - tiled: The window will be tiled, clearly.
; - floated: The window will be floated, clearly.
; - desktop: The virtual desktop number where the window should be placed. Use -1 if you do not want to set it to a specific desktop.
;
; Example:
; rule = wm_class("firefox"), state(tiled), desktop(-1)
; This rule sets "firefox" window to be tiled and does not change its virtual desktop.
rule = wm_class("emacs"), state(tiled), desktop(-1)
; Key Bindings:
; Define keyboard shortcuts to perform various actions.
; The syntax for defining key bindings is:
; bind = modifier + key -> action/function
; If two modifiers are used, combine them with a pipe (|). For example, alt + shift is written as alt|shift.
; Colon Syntax:
; Some functions require additional arguments to specify details of the action.
; These arguments are provided using a colon syntax, where the function and its argument
; are separated by a colon.
; Example: func(switch_desktop:1) means "switch to desktop 1".
; Example: func(resize:grow) means "grow the size of the window".
; Example: func(layout:master) means "toggle master layout".
; Available Modifiers:
; - super: The "Windows" key or "Command" key on a Mac.
; - alt: The "Alt" key.
; - shift: The "Shift" key.
; - ctrl: The "Control" key.
;
; Available Actions:
; These actions specify what happens when a key binding is triggered.
; - run(...): Executes a specified process.
; - Example: bind = super + return -> run("alacritty")
; - To run a process with arguments, use a list:
; Example: bind = super + p -> run(["rofi", "-show", "drun"])
;
; - func(...): Calls a predefined function. The following functions are available:
; - kill: Kills the focused window.
; - switch_desktop: Switches to a specified virtual desktop.
; - fullscreen: Toggles fullscreen mode for the focused window.
; - swap: Swaps the focused window with its sibling.
; - transfer_node: Moves the focused window to another virtual desktop.
; - layout: Toggles the specified layout (master, default, stack).
; - traverse: (In stack layout only) Moves focus to the window above or below.
; - flip: Changes the window's orientation; if the window is primarily vertical, it becomes horizontal, and vice versa.
; - cycle_window: Moves focus to the window in the specified direction (up, down, left, right).
; - cycle_desktop: Cycles through the virtual desktops (left, right).
; - resize: Adjusts the size of the focused window (grow, shrink).
; - reload_config: Reloads the configuration file without restarting ZWM.
; - shift_window: Shift floating window position to the specified direction (up, down, left, right).
; - gap_handler: Increase or decrease window gaps (GROW, SHRINK).
; Define key bindings
; run processes on some keys
bind = super + return -> run("alacritty")
bind = super + space -> run("dmenu_run")
bind = super + p -> run(["rofi", "-show", "drun"])
; kill the focused window
bind = super + w -> func(kill)
; switch to specific virtual desktops
bind = super + 1 -> func(switch_desktop:1)
bind = super + 2 -> func(switch_desktop:2)
bind = super + 3 -> func(switch_desktop:3)
bind = super + 4 -> func(switch_desktop:4)
bind = super + 5 -> func(switch_desktop:5)
bind = super + 6 -> func(switch_desktop:6)
bind = super + 7 -> func(switch_desktop:7)
; resize the focused window
bind = super + l -> func(resize:grow)
bind = super + h -> func(resize:shrink)
; change the gaps between windows
bind = super + i -> func(gap_handler:grow)
bind = super + d -> func(gap_handler:shrink)
; toggle fullscreen mode
bind = super + f -> func(fullscreen)
; swap the focused window with its sibling
bind = super + s -> func(swap)
; cycle focus between windows
bind = super + up -> func(cycle_window:up)
bind = super + right -> func(cycle_window:right)
bind = super + left -> func(cycle_window:left)
bind = super + down -> func(cycle_window:down)
; shift floating window position to the specified direction
bind = shift + up -> func(shift_window:up)
bind = shift + right -> func(shift_window:right)
bind = shift + left -> func(shift_window:left)
bind = shift + down -> func(shift_window:down)
; cycle through virtual desktops
bind = super|shift + left -> func(cycle_desktop:left)
bind = super|shift + right -> func(cycle_desktop:right)
; transfer the focused window to another virtual desktop
bind = super|shift + 1 -> func(transfer_node:1)
bind = super|shift + 2 -> func(transfer_node:2)
bind = super|shift + 3 -> func(transfer_node:3)
bind = super|shift + 4 -> func(transfer_node:4)
bind = super|shift + 5 -> func(transfer_node:5)
bind = super|shift + 6 -> func(transfer_node:6)
bind = super|shift + 7 -> func(transfer_node:7)
; change the layout
bind = super|shift + m -> func(layout:master)
bind = super|shift + s -> func(layout:stack)
bind = super|shift + d -> func(layout:default)
; traverse the stack layout
bind = super|shift + k -> func(traverse:up)
bind = super|shift + j -> func(traverse:down)
; flip the orientation of the window
bind = super|shift + f -> func(flip)
; reload the configuration file
bind = super|shift + r -> func(reload_config)