A tiling window manager
1.\" This program is free software; you can redistribute it and/or modify it
2.\" under the terms of the GNU General Public License as published by the Free
3.\" Software Foundation; either version 2 of the License, or (at your option)
4.\" any later version.
5.\"
6.\" This program is distributed in the hope that it will be useful, but WITHOUT
7.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
9.\" more details.
10.\"
11.\" You should have received a copy of the GNU General Public License along with
12.\" this program; if not, write to the Free Software Foundation, Inc., 59 Temple
13.\" Place, Suite 330, Boston, MA 02111-1307 USA.
14.\"
15.\"
16.\" This manpage is written using the mdoc macro language.
17.\" Examples of formatters which support mdoc are groff[1] and mandoc[2].
18.\" An mdoc language reference is available[3].
19.\"
20.\" [1] https://gnu.org/software/groff/
21.\" [2] http://mdocml.bsd.lv/
22.\" [3] http://mdocml.bsd.lv/mdoc.7.html
23.\"
24.Dd Aug 22, 2019
25.Dt SDORFEHS 1
26.Os
27.Sh NAME
28.Nm sdorfehs
29.Nd window manager without mouse dependency
30.Sh SYNOPSIS
31.Nm
32.Op Fl hv
33.Nm
34.Op Fl d Ar dpy
35.Op Fl s Ar num
36.Op Fl f Ar file
37.Nm
38.Op Fl d Ar dpy
39.Op Fl s Ar num
40.Op Fl i
41.Fl c Ar command Op Fl c Ar command ...
42.Sh DESCRIPTION
43.Nm
44is a window manager without fat library dependencies, fancy graphics or
45dependence on a mouse.
46.Pp
47The screen can be split into non-overlapping frames.
48All windows are kept maximized inside their frames.
49.Pp
50All interaction with the window manager is done through keystrokes.
51.Nm
52has a prefix map to minimize key clobbering.
53.Pp
54The options are as follows:
55.Bl -tag -width Bs
56.It Fl c Ar command
57Send
58.Nm
59a command.
60There must be a
61.Nm
62instance running as window manager for the given display/screen for this to
63work.
64Do not forget to quote the command if it contains spaces.
65For example:
66.Pp
67.Dl Nm Fl c Qq Ar "echo hello world"
68.It Fl d Ar display
69Set the X display to use or send commands to.
70.It Fl f Ar filename
71Specify an alternate configuration file.
72If this is not given,
73.Nm
74will try
75.Pa $HOME/.config/sdorfehs/config
76and execute each command when starting up.
77.It Fl h
78Show summary of options.
79.It Fl i
80Execute commands given with
81.Fl c
82in interactive mode.
83That means it will behave exactly as if called with
84.Ic C\-a \&:
85like prompting for missing arguments and things like that.
86.It Fl s Ar number
87Only use the specified screen.
88.El
89.Sh KEY BINDINGS
90To avoid conflicts with other programs, all default
91.Nm
92key bindings start with an escape key which, by default, is
93.Ic C\-a
94(Control\-a).
95Some important default key bindings:
96.Bl -tag -width Ds
97.It Ic C\-a \&?
98Show key bindings
99.It Ic C\-a a
100Send a Control\-a to the current window
101.It Ic C\-a c
102Start an X terminal
103.It Ic C\-a n
104Switch to next window
105.It Ic C\-a p
106Switch to previous window
107.It Ic C\-a 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
108Switch to window number 0 | 1 | 2 | ...
109.It Ic C\-a k
110Close the current window
111.It Ic C\-a K
112XKill the current application
113.It Ic C\-a s | S
114Split the current frame into two vertical | horizontal ones
115.It Ic C\-a Tab | Left | Up | Right | Down
116Switch to the next | left | top | right | bottom frame.
117.It Ic C\-a Q
118Make the current frame the only one
119.It Ic C\-a \&:
120Execute a
121.Nm
122command
123.It Ic C\-a F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12
124Switch to vscreen number 0 | 1 | 2 | ...
125.El
126.Pp
127Further default key bindings can be found in parentheses after the
128commands in the next section.
129.Sh COMMANDS AND DEFAULT ALIASES
130.Bl -tag -width Ds
131.It Ic abort
132.Pq Ic C\-a C\-g
133Do nothing and that successfully.
134.Po
135Useful if you pressed
136.Ic C\-a
137in error
138.Pc .
139.It Ic addhook Ar event command
140Add a hook: run
141.Ar command
142whenever
143.Ar event
144is called.
145Possible events are:
146.Bl -tag -width Ds
147.It Cm deletewindow
148Run after a window is withdrawn.
149.It Cm key
150Run whenever a top level key is pressed (by default
151.Ic C\-a ) .
152.It Cm newwindow
153Run after a new window is mapped.
154.It Cm quit
155Run before exiting
156.Nm .
157.It Cm restart
158Run before restarting
159.Nm .
160.It Cm switchframe
161Run after a frame actually switched, but before the window in it is
162focused.
163.It Cm switchscreen
164Run when the user switches to a different screen.
165.It Cm switchvscreen
166Run when the user switches to a different virtual screen.
167.It Cm switchwin
168Run after a new window is selected.
169(With dedication, it may already be inactive again, if it was put into
170another frame)
171.El
172.It Ic alias Ar alias command
173Add
174.Ar alias
175as new way to call
176.Ar command .
177.It Ic bind Ar key command
178alias for
179.Qq Ic definekey Li root Ar key command
180.It Ic banish
181.Pq Ic C\-a b
182Banish the rat cursor to the lower right corner of the screen.
183.It Ic banishrel
184Banish the rat cursor to the lower right corner of the current window.
185If there isn't a window in the current frame, it banishes the rat cursor
186to the lower right corner of the frame.
187.It Ic chdir Op Ar directory
188If the optional argument is given, change the current directory of
189.Nm
190to
191.Ar directory .
192If nothing is given, change it to the value of the environment variable
193.Qq Ev HOME .
194.It Ic clrunmanaged
195Clears the unmanaged window list.
196.It Ic cnext
197Like
198.Ic next
199but switch to the next window with another resource class than the
200current one.
201(That means the next window belonging to another type of application
202than the current one.)
203.It Ic cprev
204Like
205.Ic prev
206but switch to the previous window with another resource class than the
207current one.
208(That means the previous window belonging to another type of application
209than the current one.)
210.It Ic colon Ar sdorfehs\-command Pq Ic C\-a \&:
211Execute
212.Ar sdorfehs\-command
213interactively.
214(i.e. ask for possible missing arguments.)
215.It Ic cother
216Like
217.Ic other
218but switch to the window of the current vscreen that was last accessed and
219has another resource class but is not currently visible.
220.It Ic curframe Pq Ic C\-a F
221Show a bar marking the current frame.
222.It Ic definekey Ar keymap key command
223Add a new key binding in
224.Ar keymap
225for
226.Ar key
227to execute
228.Ar command .
229Default keymaps are
230.Li top
231normally only containing
232.Ic C\-a ,
233which reads a key from
234.Li root ,
235containing all the normal commands.
236.Pp
237Note that you have to describe ":" by "colon", "!" by "exclam" and so on.
238If you cannot guess a name of a key, try either
239.Ic C\-a Ar key
240and look at the error message, or try
241.Ic :describekey Li root
242and pressing the key.
243.It Ic dedicate Op Cm 0 | 1
244Consider the current frame dedicated/chaste
245.Pq Cm 1
246or promiscuous
247.Pq Cm 0 .
248.Pp
249A dedicated frame will not accept new windows.
250When new windows are to be focused, they will be opened in a non-dedicated
251frame instead.
252.Pp
253If no argument is given, toggle the current dedicateness.
254By default no windows are dedicated.
255.It Ic delete Pq Ic C\-a k
256Close the current window.
257.It Ic delkmap Ar keymap
258Deletes the keymap named
259.Ar keymap ,
260that was generated with
261.Ic newkmap .
262The keymaps
263.Li top
264(or whatever was specified by
265.Ic set Ar topkmap )
266and
267.Li root
268cannot be deleted.
269.It Ic describekey Ar keymap
270Grab the next key.
271Similar to
272.Ic readkey ,
273.Ic describekey
274shows only the command in
275.Ar keymap ,
276that would be executed by
277.Ic readkey .
278.It Ic echo Ar text
279Show
280.Ar text
281as
282.Nm
283message.
284.It Ic escape Ar key
285Update the default escape key to
286.Ar key .
287.Pp
288Strictly speaking it updates the
289.Ic readkey Li root
290command in the keymap
291.Li top
292to
293.Ar key ,
294the
295.Ic other
296binding
297in
298.Li root
299to
300.Ar key ,
301and
302.Ic meta
303binding in
304.Li root
305to
306.Ar key
307without modifiers or
308.Ic "C\-" Ns Ar key
309if
310.Ar key
311has no modifiers.
312(If
313.Ic set Ar topkmap
314was called with an argument other than
315.Ar top
316that will be used instead of
317.Ar top . )
318.It Ic exchangedown Pq Ic C\-a C\-Down
319Exchange the window in the current frame with the window in the frame
320below the current frame.
321.It Ic exchangeleft Pq Ic C\-a C\-Left
322Exchange the window in the current frame with the window in the frame
323left of the current frame.
324.It Ic exchangeright Pq Ic C\-a C\-Right
325Exchange the window in the current frame with the window in the frame
326right of the current frame.
327.It Ic exchangeup Pq Ic C\-a C\-Up
328Exchange the window in the current frame with the window in the frame
329above the current frame.
330.It Ic exec Ar shell\-command Pq Ic C\-a \&!
331Spawn a shell executing
332.Ar shell\-command .
333.It Ic execa Ar shell\-command
334Spawn a shell executing
335.Ar shell\-command ,
336without remembering the current frame, so that _NET_WM_PID declaring
337programs will be placed into the frame active when they open a window
338instead of the frame active when
339.Nm
340gets this command.
341.It Ic execf Ar frame shell\-command
342Spawn a shell executing
343.Ar shell\-command ,
344showing _NET_WM_PID supporting programs in the given frame instead of
345the frame selected when this program is run.
346.It Ic execv Ar vscreen shell\-command
347Spawn a shell within a specific vscreen
348.Ar vscreen ,
349executing
350.Ar shell\-command
351as in the 'exec' command (i.e., using "sh -c"). This is not likely to work
352well with 'winaddcurvscreen' set to 1 anywhere in the configuration file.
353.It Ic execw Ar shell\-command
354Spawn a shell executing
355.Ar shell\-command ,
356but wait for it to finish. This should behave the same as
357.Ar exec
358but will wait for completion. Use timeout(1) if it might hang, or
359.Nm
360will hang itself waiting for completion. Use the 'exec' shell builtin as the
361first word in the command string to get similar behavior to
362.Ar execa
363owing to the forked pid remaining stable and known to
364.Nm .
365.It Ic fdump Op Ar screenno
366Output the defining data for all frames of the current screen, or
367for screen number
368.Ar screenno
369if this is specified.
370.It Ic focus Pq Ic C\-a Tab
371Focus the next frame.
372.It Ic focuslast
373Switch to the last selected focus.
374.It Ic focusleft Pq Ic C\-a Left
375Switch to the frame to the left of the current one.
376.It Ic focusdown Pq Ic C\-a Down
377Switch to the frame beneath the current one.
378.It Ic focusright Pq Ic C\-a Right
379Switch to the frame to the right of the current one.
380.It Ic focusprev
381Focus the previous frame.
382.It Ic focusup Pq Ic C\-a Up
383Switch to the frame above the current one.
384.It Ic frestore Ar frames
385Replace the current frames with the ones specified in
386.Ar frames
387in the format as generated by
388.Ic fdump .
389.It Ic fselect Oo Ar frameno Oc Pq Ic C\-a f
390If an argument is supplied, switch to a frame given by number
391.Ar frameno .
392.Pp
393If no argument is given, show a frame selector in each frame and wait for
394a key to be pressed.
395If the key matches an existing frame selector, this frame gets focused.
396.Pp
397Frame selectors are by default the numbers starting with zero, but they
398can be changed by
399.Ic set Ns
400ting
401.Ar framesels .
402.It Ic getenv Ar variable
403Output the value of the environment variable
404.Ar variable .
405.It Ic getsel
406Paste the current X Selection into the current window.
407.It Ic gravity Op Cm nw | w | sw | n | c | s | ne | e | se
408Change how in its frame the current window is aligned.
409.It Ic help Op Ar keymap
410If the optional parameter
411.Ar keymap
412is given, list all keybindings in this keymap, otherwise list all key
413bindings in keymap
414.Li root .
415.It Ic hsplit Oo Ar l Ns Li / Ns Ar p | Oo Li \- Oc Ns Ar pixels Oc Pq Ic C\-a S
416Split the current frame into left frame and a right frame.
417If no parameter is given, split in halves.
418If two numbers separated by a slash
419.Pq Ql "/"
420are given, the left one is
421.Ar l
422times the
423.Ar p Ns
424th
425part and the right one
426.Pq Ar p Li \- Ar l
427times the
428.Ar p Ns
429th
430part of the prior width.
431Otherwise the right half is
432.Ar pixels
433wide or the left one is
434.Ar pixels
435wide, depending whether there is
436.Ql \-
437in front of the number or not.
438.It Ic inext
439Like
440.Ic next
441but switch to the next window with the same resource class as the
442current one.
443(That means the next window belonging to the same application
444as the current one.)
445.It Ic info Pq Ic C\-a i
446Output the current the width, height, window number and window name of
447the current window.
448.Po
449What name means is chosen by
450.Dq Ic set Ar winname .
451.Pc
452.It Ic iprev
453Like
454.Ic prev
455but switch to the previous window with the same resource class as the
456current one.
457(That means the previous window belonging to the same application as the
458current one.)
459.It Ic iother
460Like
461.Ic other
462but switch to the window of the current vscreen that was last accessed and
463has the same resource class but is not currently visible.
464.It Ic kill Pq Ic C\-a K
465Close the X-connection of the X-client responsible for the current window.
466.It Ic lastmsg Pq Ic C\-a m
467Reshow the last message.
468.It Ic link Ar key Op Ar keymap
469Do what
470.Ar key
471is bound to in the keymap
472.Ar keymap
473if supplied.
474Otherwise what
475.Ar key
476is bound to in keymap
477.Li root .
478.It Ic listhook Ar event
479List all commands specified with
480.Ic addhook
481to be executed when even
482.Ar event
483occurs.
484.It Ic meta Oo Ar key Oc Pq Ic C\-a t
485Send the escape key (that which normally is
486.Ic C\-a )
487to the current window.
488If a
489.Ar key
490is specified, this is sent instead.
491Note that some applications by default ignore the synthetic key that is
492sent using this command as it is considered a security hole.
493xterm is one such application.
494.It Ic newkmap Ar keymap
495Generate a new keymap named
496.Ar keymap .
497This keymap can be used to add new key-command mappings to it with
498.Ic definekey
499and can be called with
500.Ic readkey .
501.It Ic next Pq Ic C\-a Return | C\-a n | C\-a space
502Switch to the next window in the current vscreen.
503.It Ic nextscreen Pq Ic C\-a N
504Switch to the next screen. (If you have multiple physical ones.)
505.It Ic number Ar new Op Ar old
506Give the number
507.Ar new
508to the window with the number
509.Ar old
510or the current window.
511.It Ic only Pq Ic C\-a Q
512Remove all frames on the current screen except the current frame and
513maximize this one to the size of the whole screen.
514.It Ic other Pq Ic C\-a C\-a
515Switch to the window of the current vscreen that was last
516accessed but is not currently visible.
517.It Ic prev Pq Ic C\-a p
518Switch to the previous window in the current vscreen.
519.It Ic prevscreen Pq Ic C\-a P
520Switch to the previous screen. (If you have multiple physical ones.)
521.It Ic prompt Op Ar prompt
522.Nm
523will ask the user for input, showing
524.Ar prompt
525(or a single colon, if no argument is given) and output the input the
526user has made.
527Note that this command probably does not make much sense in interactive
528mode.
529.It Ic putsel Ar x\-selection
530Replace the X selection with the text
531.Ar x\-selection .
532It can be inserted into the current window with
533.Ic getsel .
534.It Ic quit
535Quit
536.Nm .
537.It Ic ratinfo
538Display the x y coordinates of the rat cursor relative to the screen.
539.It Ic ratrelinfo
540Display the x y coordinates of the rat cursor relative to the current
541window or current frame if no window is focused
542.It Ic ratwarp Ar x y
543Move the rat cursor to the position
544.Ar ( x , y ) .
545.It Ic ratrelwarp Ar deltax deltay
546Move the rat cursor to
547.Ar ( deltax , deltay ) ,
548relative to the current position.
549.It Ic ratclick Op Ar button
550Simulate a rat click with
551.Ar button
552(button 1=left button if none given).
553.It Ic rathold Cm ( up | down ) Op Ar button
554Simulate pressing|releasing rat button
555.Ar button
556(1=left button if none given).
557.It Ic readkey Ar keymap
558Grab the next key pressed, and execute the command associated to this key
559in
560.Ar keymap .
561To show it is waiting for a key,
562.Nm
563will change the rat cursor to a square if
564.Va waitcursor
565is set.
566This command is perhaps best described with its usage in the default
567configuration: by pressing
568.Ic C\-a ,
569which is the only key in the keymap
570top ,
571the command
572.Qq Ic readkey Ar root
573is executed.
574The next key then executes the command in keymap
575.Li root
576belonging to
577this command.
578.It Ic redisplay Pq Ic C\-a l
579Extend the current window to the whole size of its current frame and
580redisplay it.
581(Useful to redisplay normal windows or bring transient windows to the
582full size of the frame as only normal windows are maximized by
583.Nm )
584.It Ic redo Pq Ic C\-a U
585Revert the last
586.Ic undo
587of frame changes.
588.It Ic remhook Ar event command
589Remove command
590.Ar command
591from the list of commands to be called when event
592.Ar event
593is hit.
594(The command has to specified, as an event can have multiple commands
595attached to it.)
596Use
597.Qq Ic listhook Ar hook
598to get a list of all attached commands.
599.It Ic remove Pq Ic C\-a R
600Remove the current frame and extend some frames around to fill the
601remaining gap.
602.It Ic resize Oo Ar deltax deltay Oc Pq Ic C\-a r
603If
604.Ar deltax
605and
606.Ar deltay
607are supplied, resize the current frame by that (i.e. move the bottom
608right corner by the given offsets and then move this frame and resize
609adjacent frames to make the frames fill the whole screen again.)
610.Pp
611If in interactive mode no arguments are supplied, resize the current
612frame interactively:
613.Pp
614.Bl -tag -offset 2n -width "C-f, Right, l" -compact
615.It Ic Return
616finish resizing
617.It Ic C\-g , Escape
618abort resizing
619.It Ic C\-n , Down , j
620grow vertically
621.It Ic C\-p , Up , k
622shrink vertically
623.It Ic C\-f , Right , l
624grow horizontally
625.It Ic C\-b , Left , h
626shrink horizontally
627.It Ic s
628shrink to size of current window
629.El
630.Pp
631While resizing interactively, changes are in multiples of the amount
632of pixels given by
633.Ic set Cm resizeunit
634(by default 10).
635.It Ic restart
636Restart
637.Nm .
638.It Ic sdump
639Output the list of all screens.
640The screens are separated by commas.
641Each screen is shown as 6 values: its number, its x-coordinate, its
642y-coordinate, its width, its height and if it is currently selected
643(1=true, 0=false).
644.It Ic select ( Cm \- | Ar name | Ar number ) Pq Ic C\-a \&'
645If a number is given, switch to the window with number
646.Ar number .
647If a name is given, switch to the window in the current vscreen with
648name
649.Ar name .
650Blank the current frame, if
651.Cm \-
652is given.
653.It Ic set Op Ar variable Op Ar value
654If no argument is given, output all
655.Nm
656variables and their values.
657.Pp
658If one argument is given, output the value of
659.Nm
660variable
661.Ar variable .
662Otherwise set
663.Ar variable
664to
665.Ar value .
666What values are valid depends on the variable.
667See the section
668.Sx VARIABLES
669later in this document for details.
670.It Ic setenv Ar variable value
671Set the environment variable
672.Ar variable
673to
674.Ar value .
675.Po
676Environment variables will be passed to all programs started from
677.Nm .
678.Pc
679.It Ic sfdump
680Output all frames similar to
681.Ic fdump ,
682but not limited to one screen, but all screens at once and with the
683screen number after each frame.
684.It Ic sfrestore Ar frames
685Replace the current frames with the ones specified in
686.Ar frames
687in the format as generated by
688.Ic sfdump .
689.It Ic shrink
690Shrink the current frame to the size of the current window with in.
691.It Ic split Oo Ar split Oc Pq Ic C\-a s
692alias for
693.Ic vsplit
694.It Ic source Ar file
695Read
696.Ar file
697and execute each line as
698.Nm
699command.
700.It Ic sselect Ar screennumber
701Switch to the screen
702.Ar screennumber .
703(If you have multiple physical ones.)
704.It Ic smove Oo Ar screen Oc
705Move the current window to the current frame and vscreen on screen
706.Ar screen
707and focus it.
708.It Ic stick
709Mark the current window as sticky in its current frame, making it
710unavailable to other frames when selecting an available window.
711.It Ic swap Ar dest-frame Oo Ar src-frame Oc Pq Ic C\-a x
712Exchange the window in
713.Ar src\-frame
714(or the current frame if there is no second argument) with the window
715.Ar dest\-frame
716(or ask interactively which frame to swap with if there is no argument).
717.It Ic title Ar newname Pq Ic C\-a A
718Overwrite the title of the current window with
719.Ar newname .
720All following
721.Nm
722commands will only know the window under the new name.
723.It Ic unalias Ar alias
724Remove the alias
725.Ar alias .
726.It Ic unbind Ar key
727alias for
728.Dl Ic undefinekey Ar root key
729.It Ic undefinekey Ar keymap key
730Remove the binding for
731.Ar key
732from
733.Ar keymap .
734.It Ic undo Pq Ic C\-a _ , C\-a u
735Un\-do the last change to the frameset.
736(Like splitting, resizing, deleting, ...)
737.Pp
738The amount of steps that can be undone is specified by the variable
739.Va maxundos .
740.It Ic unmanage Op Ar name
741Add
742.Ar name
743to the list of unmanaged windows.
744Thus, windows of this name will not be managed but allowed to choose
745their position themselves.
746.Pp
747In non\-interactive mode calling it without arguments will print the list.
748.Pp
749The list can be cleared again by calling
750.Ic clrunmanaged .
751.It Ic unsetenv Ar variable
752Remove variable
753.Ar variable
754from the list of environment variables.
755.It Ic unstick
756No longer consider the current window as sticky in its current frame,
757making it again available to appear in other frames.
758.It Ic verbexec Ar cmdline
759Spawn a shell executing
760.Ar cmdline
761after showing a message with the command.
762.It Ic version Pq Ic C\-a v
763Output version and compile time information.
764.It Ic vmove Oo Ar vscreen Oc
765Move the current window to the current frame on vscreen
766.Ar vscreen
767and switch to it. Specify by either name or number.
768.It Ic vnext
769Switch to next vscreen.
770.It Ic vother
771Switch to the last-accessed vscreen before the current one.
772.It Ic vprev
773Switch to previous vscreen.
774.It Ic vrename
775Rename current vscreen.
776.It Ic vscreens
777Output a list of all vscreens with their number.
778.It Ic vselect Ar vscreen
779Select the vscreen named
780.Ar vscreen .
781.It Ic vsplit Oo Ar l Ns Li / Ns Ar p | Ar "pixels-from-top" | Li \- Ns Ar "pixels-from-bottom" Oc Pq Ic C\-a s
782Split the current frame into upper frame and a lower frame.
783If no parameter is given, split in halves.
784If two numbers separated by a slash
785.Pq Dq Li /
786are given, the upper one is
787.Ar l
788times the
789.Ar p Ns
790th part and the lower one
791.Pq Ar p Li \- Ar l
792times the
793.Ar p Ns
794th
795part of the prior height.
796Otherwise the lower one is
797.Ar "pixels from bottom"
798wide or the upper one
799.Ar "pixels from top"
800high, depending whether there is a
801.Dq Li \-
802in front of the number or not.
803.It Ic windows Oo Ar format Oc Pq Ic C\-a w
804In interactive mode,
805show the list of all windows in the current vscreen for the duration
806specified by the variable
807.Va msgwait .
808If
809.Va msgwait
810was zero, toggle between indefinitely showing and not showing.
811.Pp
812The messages are shown in columns or rows depending on the value of
813.Va winliststyle
814in the format set by
815.Ic set Ar winfmt .
816The following substitutions happen in format:
817.Pp
818.Bl -tag -offset 2n -width 2n -compact
819.It Li %a
820application name (resource name)
821.It Li %c
822resource class
823.It Li %f
824frame number
825.It Li %g
826gravity of the window
827.It Li %h
828height of the window
829.It Li %H
830unit to resize the window vertically (height_inc)
831.It Li %i
832X Window ID
833.It Li %p
834process ID
835.It Li %l
836last access number
837.It Li %M
838string
839.Li Maxsize ,
840if it specifies a maximum size
841.It Li %n
842window number
843.It Li %s
844window status
845.Po
846.Ql *
847is active window,
848.Ql +
849would be chosen by
850.Ic other ,
851.Ql \-
852otherwise
853.Pc
854.It Li %S
855screen number
856.It Li %t
857window name
858.Po see
859.Ic set Ar winname
860.Pc ,
861.It Li \&%T
862the string
863.Dq Li Transient ,
864if it is a transient window
865.It Li %w
866width of the window
867.It Li %W
868unit to resize the window horizontally (width_inc)
869.It Li %x
870xrandr screen number
871.It Li %%
872litteral
873.Ql %
874.El
875.Pp
876Additionally there can be a positive decimal integer number between the
877percent sign and the format string to specify the length this value
878should be truncated to if longer.
879.Po
880For example:
881.Li %20t
882.Pc
883.Pp
884In non\-interactive mode, output the list of windows in the current vscreen
885line by line.
886The format string can be overwritten by the optional parameter
887.Ar format .
888.El
889.Sh VARIABLES
890.Nm
891variables can be shown and set with
892.Ic set .
893The following variables are supported:
894.Bl -tag -width Ds
895.It Cm barborder Ar pixels
896Selects how thick the frame around
897.Nm Ap
898s
899bar, prompt, and message windows is.
900.Pp
901Default is
902.Li 1 .
903.It Cm barbordercolor Ar color
904The color of the bar, prompt, and message windows
905.Nm
906creates.
907.Pp
908Default is
909.Li black .
910.It Cm bargravity Li nw | w | sw | n | c | s | ne | e | se
911Select the location where message and prompt bars appear.
912.Pp
913Default is
914.Li nw .
915.It Cm barinpadding Li 0 | 1
916If there is padding, determines whether the bar appears at the edge of
917the screen
918.Pq Li 1
919or at the edge of the window area
920.Pq Li 0 .
921.Pp
922Default is
923.Li 1 .
924.It Cm barpadding Ar x y
925Set horizontal padding of
926.Nm
927windows to
928.Ar x
929and vertical padding to
930.Ar y .
931.Pp
932Default is
933.Li 14 10 .
934.It Cm barsticky Li 0 | 1
935When set to
936.Li 1 ,
937the bar remains on screen at all times and when messages or lists are not
938being shown, it displays the output of the current window information
939formatted with
940.Ic stickyfmt .
941.Pp
942Default is
943.Li 1 .
944.It Cm bgcolor Ar color
945The background color of the windows
946.Nm
947creates.
948.Pp
949Default is
950.Li black .
951.It Cm border Ar pixels
952Selects how thick the frame around windows is.
953.Pp
954Default is
955.Li 1 .
956.It Cm bwcolor Ar color
957The border color of unfocused windows.
958.Pp
959Default is
960.Li black .
961.It Cm fgcolor Ar color
962The foreground color of the windows
963.Nm
964creates.
965.Pp
966Default is
967.Li #eeeee .
968.It Cm font Ar font
969Make
970.Nm
971use font
972.Ar font .
973.It Cm framefmt Ar format
974Choose the default format for the window label shown when selecting
975a different frame.
976.Pp
977Default is
978.Li Frame %f (%Wx%H) .
979.It Cm framemsgwait Ar seconds
980The duration the
981.Ql Current frame
982indicator is shown.
983If
984.Ar seconds
985is zero, wait until the next interactive command.
986If
987.Ar seconds
988is
989.Li -1 ,
990don't show any message.
991.It Cm framesels Ar selectors
992Override the frame selectors
993.Ic fselect
994uses.
995The first character is the selector for the first frame,
996the second character is the selector for the second frame and so on.
997.Pp
998Using this variable, one can directly access more than 10 frames.
999.Pp
1000Default is an empty string, which is equivalent to "0123456789".
1001.It Cm fwcolor Ar color
1002The border color of the focused window.
1003.Pp
1004Default is
1005.Li black .
1006.It Cm gap Ar pixels
1007Specify the number of pixels surrounding each frame, except for the outer
1008edges which border the screen or its padding.
1009.Pp
1010Default is
1011.Li 20 .
1012.It Cm historysize Ar number
1013Specify maximum number of values kept in input history.
1014.Pp
1015Default is
1016.Li 20 .
1017.It Cm winaddcurvscreen Li 0 | 1
1018When set to
1019.Pq Li 1 ,
1020new windows will always start in whatever the current vscreen,
1021ignoring vscreen of the origin process.
1022.Pp
1023Default is
1024.Li 0 .
1025.It Cm ignoreresizehints Li 0 | 1
1026When set to
1027.Pq Li 1 ,
1028window resize hints will be ignored, forcing windows to be the exact
1029sizes of their containing frame.
1030.Pp
1031Default is
1032.Li 0 .
1033.It Cm inputwidth Ar pixels
1034Determine the width of the input window.
1035.Pp
1036Default is
1037.Li 200 .
1038.It Cm maxsizegravity Li nw | w | sw | n | c | s | ne | e | se
1039Set the default gravity new self-maximized windows will get.
1040Possible values are the same as in the
1041.Ic gravity
1042command, which changes the gravity of an existing window: cardinal
1043points or numbers 1 to 9.
1044.Pp
1045Default is
1046.Li c .
1047.It Cm maxundos Ar number
1048The maximal amount of step
1049.Nm
1050can undo with the
1051.Ic undo
1052command.
1053.Pp
1054Default is 20.
1055.It Cm msgwait Ar seconds
1056The duration the message window is shown.
1057If
1058.Ar seconds
1059is zero, wait infinitely.
1060.Pp
1061Default is 3.
1062.It Cm onlyborder Li 0 | 1
1063Determine whether to show borders and gaps
1064.Pq Li 1
1065or not
1066.Pq Li 0
1067when there is only one frame on the screen.
1068.Pp
1069Default is
1070.Li 1 .
1071.It Cm padding Ar left top right bottom
1072Set how much space at the borders of the screen will not be used.
1073.Pp
1074Default is
1075.Li 20 20 20 20 .
1076.It Cm resizefmt Ar format
1077Choose the default format for the window label shown when interactively
1078resizing a window.
1079.Pp
1080Default is
1081.Li Resize frame (%Wx%H)
1082which shows the window width and height divided by any
1083.Li PResizeInc
1084hints, which for terminals will show the number of columns and lines.
1085.It Cm resizeunit Ar pixels
1086Set the amount of pixels interactive
1087.Ic resize
1088will add/subtract in each step.
1089.Pp
1090Default is 5.
1091.It Cm rudeness Ar number
1092Show or set what kind of windows are allowed to jostle into the
1093foreground.
1094.sp
1095.Ar number
1096is a bitwise OR of the following values:
1097.Pp
1098.Bl -tag -offset 2n -width 2n -compact
1099.It 1
1100Transient windows may raise.
1101.It 2
1102Normal windows may raise.
1103.It 4
1104New transient windows end up in the foreground.
1105.It 8
1106New normal windows end up in the foreground.
1107.It 16
1108Window raise from different vscreen will be permitted.
1109.El
1110.Pp
1111Default is all allowed except vscreen switch, i.e.\& 15.
1112.It Cm startupmessage Li 0 | 1
1113Decide whether to show a greeting message at startup.
1114.Pp
1115The default is
1116.Li 1 .
1117.It Cm stickyfmt Ar format
1118Choose the default format for current window information shown in the
1119bar when the
1120.Ic barsticky
1121setting is enabled.
1122.Pp
1123Default is
1124.Li %t .
1125.It Cm topkmap Ar kmap
1126Make
1127.Ar kmap
1128the top keymap
1129.Nm
1130grabs directly.
1131.Pp
1132The default value is
1133.Li top .
1134.It Cm transgravity Li nw | w | sw | n | c | s | ne | e | se
1135Set the default gravity new transient windows will get.
1136Possible values are the same as in the
1137.Ic gravity
1138command, which changes the gravity of an existing window: cardinal
1139points or numbers 1 to 9.
1140.Pp
1141Default is
1142.Li c .
1143.It Cm vscreens Ar number
1144Set the number of virtual screens (vscreens).
1145.Pp
1146Default is
1147.Li 12 .
1148.It Cm warp Li 0 | 1
1149Decide if focusing a window moves the rat cursor to the place it had
1150been last time this window was focused, or not.
1151.Pp
1152Default is
1153.Li 0
1154(off).
1155.It Cm wingravity Li nw | w | sw | n | c | s | ne | e | se
1156Set the default gravity new normal windows will get.
1157Possible values are the same as in the
1158.Ic gravity
1159command, which changes the gravity of an existing window: cardinal
1160points or numbers 1 to 9.
1161.Pp
1162Default is
1163.Li nw .
1164.It Cm waitcursor Li 0 | 1
1165Determine whether to change the rat cursor when waiting for a key
1166.Pq Li 1
1167or not
1168.Pq Li 0
1169See
1170.Ic readkey
1171and
1172.Ic describekey .
1173.Pp
1174Default is
1175.Li 1 .
1176.It Cm winfmt Ar format
1177Choose the default format for the
1178.Ic windows
1179command.
1180.Pp
1181Default is
1182.Li %n%s%t .
1183.It Cm winliststyle Li row | column
1184Determines whether windows are shown in rows or in columns.
1185.Pp
1186Default is column.
1187.It Cm winname Li title | name | class
1188Choose what is considered the "name" of the window by
1189.Nm :
1190.Pp
1191.Bl -tag -width Ds -compact
1192.It title
1193The title of the window.
1194.It name
1195The resource name of the window.
1196.It class
1197The resource class i.e. the name of the application.
1198.El
1199.Pp
1200Default is
1201.Li title .
1202.El
1203.Sh FILES
1204.Bl -tag -compact
1205.It Pa ~/.config/sdorfehs/config
1206Configuration file read at startup time, if present.
1207.Pp
1208.It Pa ~/.config/sdorfehs/control
1209Unix socket which accepts remote control commands sent by
1210.Nm Fl c .
1211.Pp
1212.It Pa ~/.config/sdorfehs/bar
1213FIFO/named pipe which accepts input to show on the sticky bar when
1214.Ic barsticky
1215is enabled.
1216.El
1217.Sh EXIT STATUS
1218.Ex -std
1219.Sh AUTHORS
1220.An -nosplit
1221.Nm
1222is maintained by
1223.An joshua stein Aq Mt jcs@jcs.org
1224and is derived from ratpoison which was originally written by
1225.An Shawn Betts Aq Mt sabetts@gmail.com .