Squashed from:
implement unpinning
add docs about unpinning
add pinning to us keymap
disable debugging
initialize do_pin with true
Otherwise the workspaces won't get pinned the first time
only pin if there is a window on the workspace
do not require warp focus
do not require other workspace
suppress unused param warning
make pinning work without clamping, preparation for manual pinning
disable debug
only pin if auto pin is activated
remove unused variable
init pinning for screens on start
revert whitespace change
fix the formatting
ICCCM permits clients to change any property on its withdrawn windows.
If a client maps a withdrawn window again, the window manager should
treat it as new.
When cross-building, it's necessary to use versions of the various
toolchain commands that have been built specifically to target the
desired architecture, and that are named accordingly.
In practice, the make invocation will look something like
$ make CC=aarch64-linux-gnu-gcc \
PKG_CONFIG=aarch64-linux-gnu-pkg-config
However, whereas $(CC) is a built-in make variable and so it
behaves correctly out of the box, for $(PKG_CONFIG) we have to do
some work ourselves.
Along with the various BSDs, basically all Linux distros that
have a spectrwm package include these example files in it, so
let's codify this common practice in the Makefile.
The current loop is a bit awkward for a number of reasons:
* iostat exits after a number of iterations, so to keep the script
going we need to run it in a nested loop;
* we also run iostat concurrently using the |& syntax, which in
addition to being non-portable requires us to set up a cleanup
path so that we don't leave stray processes around when spectrwm
is restarted;
* due to the fact that iostat prints its headers again every 20
records, we have to keep careful track of the number of
iterations - something which has proven to be error-prone.
Once we do away with the idea of iostat driving the update loop, all
of these issues disappear and the code becomes much simpler.
We still cache battery data for 11 seconds, which is the same amount
as before; tweaking it further, if desired, will be trivial now.
This patch is better viewed with 'git show -w'.
If the CPU is throttled to less than 1 GHz, the contents of the
bar will move around a bit; always use 4 digits to print the CPU
frequency so that doesn't happen.
The idea is that it's pointless to collect information about the
battery every single second, so caching has been implemented for
the output of apm; however, the condition has been broken since
3356f1ccd4, which resulted in data being collected every single
second after all.
This fixes the check so that information is collected every 11
seconds, which fits nicely into the 22 second long cycle used to
parse iostat's output.
XftTextExtentsUtf8 computes the pixel extents and stores them in a
XGlyphInfo data type. The true "width" of a Xft glyph is found in the
xOff member of the latter structure.
This fixes the (dis)appearing space when switching workspace (#264).
Starting a tool on OpenBSD from urxvt results in:
$ ncspot
ncspot:/usr/local/lib/libswmhack.so.1.0: undefined symbol 'XKeysymToKeycode'
Linking libswmhack against libX11 fixes this issue.
line 1785 - Wrong type
line 2486 - Division by zero
line 2575 - Uninitialized argument value
line 2583 - Uninitialized argument value
line 2595 - Uninitialized argument value
line 2597 - Uninitialized argument value
line 3468 - Wrong type
line 3730 - Dereference of null pointer
line 6065 - Result of operation is garbage or undefined
line 9374 - Wrong type
line 12446 - Possible null pointer dereference
New conf search order:
1) $XDG_CONFIG_HOME/spectrwm/spectrwm.conf
2) ~/.config/spectrwm/spectrwm.conf
(if $XDG_CONFIG_HOME is either not set or empty)
3) ~/.spectrwm.conf
4) $XDG_CONFIG_DIRS/spectrwm/spectrwm.conf
(each colon-separated directory in $XDG_CONFIG_DIRS)
5) /etc/xdg/spectrwm/spectrwm.conf
(if $XDG_CONFIG_DIRS is either not set or empty)
6) /etc/spectrwm.conf