Commit graph

1338 commits

Author SHA1 Message Date
Valentin Boettcher
c7f4640932 rename to workspace auto pin 2020-06-13 16:16:27 +02:00
5031b15fc9 implement workspace pinning
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
2020-06-13 16:10:01 +02:00
Reginald Kennedy
0863f7fe00 Add missing options to example conf. 2020-06-04 04:38:06 +08:00
Reginald Kennedy
6de5f2b0bc Add optional startup parameters.
-c file
	Specify a configuration file to load.
-v
	Print version and exit.
2020-06-02 21:37:14 -05:00
Reginald Kennedy
cd3029a09a Fix withdrawn window handling.
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.
2020-06-02 21:36:10 -05:00
Reginald Kennedy
ca9a7658a1 Fix EWMH _NET_WM_DESKTOP should be removed on withdrawn windows. 2020-06-02 21:36:10 -05:00
Reginald Kennedy
1a5bc8e907 Increase bar hard limits to better accomodate complex markup sequences. 2020-06-02 06:27:55 +08:00
Reginald Kennedy
9b734061ad Fix SIGHUP restart. 2020-06-02 03:29:30 +08:00
Reginald Kennedy
995db3a731 Improve startup error handling.
Instead of exiting on bad conf values, continue loading and display
the first error in the status bar.
2020-06-01 22:52:26 +08:00
Reginald Kennedy
985528ad57 Fix keyboard_mapping fallback issue.
When the keyboard_mapping option fails to load the specified path, the
restored default bindings should take into account the current value of
modkey.
2020-05-25 15:41:57 +08:00
Reginald Kennedy
68d7f0b3b9 The bar section buffers need to also be larger. 2020-05-25 01:39:15 +08:00
Reginald Kennedy
844720651c Increase buffer size used when bar_action_expand is enabled.
Fix some style (9) styling.
2020-05-24 19:38:44 +08:00
Loïc C. Reynier
05b8c4870e Update spectrwm_fr.conf 2020-05-14 04:21:33 +08:00
Reginald Kennedy
0e6b5fd965 Add note to man page. 2020-05-11 14:48:31 +08:00
Reginald Kennedy
67a7adb5bf Add note to man page stating that the keyboard_mapping option can be set
to /dev/null to only clear bindings.
2020-04-22 07:15:03 +08:00
Helmut Grohne
ceaf8699f8 linux: Accept user-provided pkg-config command
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.
2020-04-18 03:47:13 +08:00
Andrea Bolognani
f0584c7fdd linux: Install examples
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.
2020-04-18 03:47:00 +08:00
Andrea Bolognani
24e934f725 Fix man warning
This is reported by man(1) as

  mdoc warning: Empty input line #213

Spotted by Lintian.
2020-04-17 13:26:28 -05:00
Andrea Bolognani
14fff5e76f CHANGELOG: Fix spacing between releases
There are supposed to be two empty lines between releases.
2020-04-17 13:26:09 -05:00
Andrea Bolognani
978bff1e3d Exclude .travis.yml from release archives 2020-04-17 13:25:52 -05:00
Reginald Kennedy
dd7b85eaa2 Add new restart_of_day action.
Same as restart but configuration file is loaded in full.
Unbound by default.

Closes #172
2020-02-21 10:30:28 -06:00
Reginald Kennedy
50ff69768e Fix border color issue when clicking to focus a window on an unfocused region. 2020-02-21 16:09:13 +08:00
Reginald Kennedy
56a1c842cb Fix clientmessage: _NET_ACTIVE_WINDOW.
Window should be activated (uniconified and focused) even when on an
unmapped workspace.

Fixes #242
2020-02-21 16:09:13 +08:00
Reginald Kennedy
a485f9a628 Fix focus issue when moving transient and related windows between workspaces.
Fixes #283
2020-02-21 16:09:13 +08:00
Andrea Bolognani
5bc8f0105b baraction: Simplify update loop
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'.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
1ffd2881b9 baraction: Improve portability
The script uses a couple of non-POSIX constructs that are
thankfully fairly easy to replace with more portable alternatives.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
e8f7e415f0 baraction: Shuffle functions around
Keep the order of definition in sync with the order of usage.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
beef2db2ca baraction: Rename print_apm() to print_bat()
It fits better with the output of the function, and is also a
more OS neutral name.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
43e7a3d20a baraction: Drop argument to print_mem()
It's not used.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
97b3f52ea8 baraction: Improve formatting of CPU speed
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.
2020-02-16 20:23:54 +08:00
Andrea Bolognani
9c77876ca8 baraction: Fix apm data caching
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.
2020-02-16 20:23:54 +08:00
Reginald Kennedy
9aa60a8035 Add note on clearing default bindings to BINDINGS section of man page. 2020-02-03 00:32:30 +08:00
Björn Ketelaars
2657c691df Fix width calculation of a Xft glyph
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).
2020-02-02 22:37:12 +08:00
Björn Ketelaars
d12e52f950 Add workaround to man page for OS ignoring LD_PRELOAD 2020-01-08 23:38:34 +08:00
Andrea Bolognani
40b4e0d795 linux: Add baraction script 2019-12-20 08:31:35 +08:00
Reginald Kennedy
b96a53b680 Fix changelog. 2019-12-19 21:28:40 +08:00
Reginald Kennedy
3d694d8354 Fix pr#256 pledge() too early.
expand_tilde() may be called multiple times.
2019-12-19 19:59:13 +08:00
Marco Peereboom
a86f709be2 Prepare for release v3.3.0 2019-12-17 15:47:13 -06:00
Marco Peereboom
21266623b1 Fix copyright 2019-12-17 15:45:18 -06:00
Reginald Kennedy
6352cdbc3e Cleanup unneeded get_screen() calls. 2019-11-29 17:53:35 +08:00
Björn Ketelaars
e59f1c84bc Link libswmhack against libX11
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.
2019-11-29 15:55:16 +08:00
Björn Ketelaars
7c5196d990 Address warnings found by static code code analysis
Warnings:
- unread variables
- shadowed declarations
- clarify calculations
- possible null pointer dereferences
2019-11-29 15:55:03 +08:00
Reginald Kennedy
31b9f31828 Fix install perms of libswmhack.so in Linux Makefile. 2019-10-25 08:58:21 +08:00
Reginald Kennedy
71e41a8cd9 Fix cygwin compile issues. 2019-10-18 08:10:20 +08:00
Björn Ketelaars
64bee8acfc Reduce number of pledge(2) promises (OpenBSD only)
Restrict spectrwm even further following work from matthieu@ on font
caches: https://undeadly.org/cgi?action=article;sid=20180717074543
2019-09-24 07:30:53 -05:00
Björn Ketelaars
4aba2b2b6e Silence (Clang) static analyzer warnings.
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
2019-08-13 19:38:58 +01:00
Charlie Root
44bd4da463 Fix buffer overflow in bar_strlcat_esc 2019-08-14 01:46:29 +08:00
Reginald Kennedy
a30bbbbdd6 Add support for XDG Base Directory Specification.
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
2019-08-05 09:01:06 +01:00
cmanv
bdca10de91 Multi-section status bar, unicode icons, font and color text markup 2019-07-31 08:38:12 +01:00
Björn Ketelaars
ff1909e7f4 pledge() earlier 2019-07-25 18:04:32 +01:00