Commit graph

1305 commits

Author SHA1 Message Date
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
Reginald Kennedy
d720496250 Fix bar_format '++' should output as a literal '+'. 2019-07-05 14:43:57 +08:00
Edd Barrett
51416d8a84 Make it clear that the example baraction script is for OpenBSD. 2019-06-18 21:32:30 +08:00
Edd Barrett
24194fd29f Fix the example baraction script for OpenBSD-current.
The iostat(8) output now includes a "sp" field.

From the man page:
> sp      % of CPU time spent spinning
2019-06-18 21:32:30 +08:00
Reginald Kennedy
b9053600c8 Keep -g greatness again. 2019-05-22 22:26:05 +08:00
Reginald Kennedy
24edfadf80 Keep -g greatness.
Resolves #251
2019-05-22 22:17:14 +08:00
Reginald Kennedy
01f0fb8f17 Pay homage and maintain backwards compatibility. 2019-05-22 11:35:14 +08:00
David Hill
a0c595fde4 Enable xinput2 on OpenBSD 2019-05-22 11:35:14 +08:00
Reginald Kennedy
f3d7a4d5e8 [travis] Fix build failure. Ubuntu Xenial is missing libxcb-xinput-dev.
For now, disable xinput support when build testing.
2019-04-11 15:46:57 -05:00
David Hill
08f66329ac [travis] enable 2019-04-11 15:46:57 -05:00
Reginald Kennedy
e2c42a9de9 Tweak get_binding_keycode() fix.
Bail the loop if the unsigned counter gets reduced modulo to 0.
2019-01-21 11:35:35 +08:00
Sebastian Schwarz
84c356dfe6 Fix infinite loop due to unsigned integer overflow.
In get_binding_keycode() a uint8_t loop variable was incremented in a
for loop.  The variable would overflow right before the loop's
condition was met.  Therefore the loop would never terminate.

To avoid the infinite loop the condition has to be checked before the
increment operation and not afterwards.
2019-01-13 22:21:50 +01:00
Reginald Kennedy
c1479cfd78 Fix binding keysyms should be bound according to keyboard layout order.
xcb_key_symbols_get_keycode() returns a list of keycodes that is ordered
by keycode value instead of keyboard layout order.  If a keysym resolves
to multiple keycodes, the first keycode in the returned array may be from
the wrong layout.

For example, if the current keymap has two layouts: 'us, us(dvorak)', 'p'
will resolve to keycode 27 of the secondary 'dvorak' layout instead of
keycode 33 of the primary 'us' layout.

Instead of using xcb_key_symbols_get_keycode() to resolve keysyms to
keycodes, search each keysym column in the key map until there is a hit.
2019-01-11 04:15:29 +08:00
Björn Ketelaars
8801799618 Extend disable_border option with always.
Setting `disable_border = always` removes border from lone tiled
windows, regardless of the bar being enabled/disabled. This is an
addition to an existing feature, and does not change existing behaviour.
2019-01-11 03:39:34 +08:00
Reginald Kennedy
4c589aeb7d Silence clang static analyzer warnings. 2019-01-10 19:03:30 +08:00
David Hill
fa700434ef Update to latest pledge(2).
From bket@openbsd
2019-01-08 15:53:12 -06:00
Jaap Boender
6326e0c4cb Changes to build with NetBSD (#231) 2019-01-07 16:36:57 +00:00
bket
8fd58c53b3 Silence warning reported by the clang static analyzer. (#234) 2019-01-07 16:34:06 +00:00
William Orr
d619f904b9 Add initial pledge(2) support on OpenBSD (#217)
On other platforms, this will be a no-op. Fixes #164.
2019-01-07 15:25:43 +00:00
Andrea Bolognani
69385ecedb linux: Install more files
We're already installing most supporting data along with the
application itself, but we have been skipping additional
documentation (such as the license and release notes) and most
importantly the default configuration file.
2018-12-06 11:53:30 +08:00
Björn Ketelaars
30f82ac5ea Remove unused function.
find_frame_window() has been introduced as part of commit da92f07e, and
has never been used.
2018-12-04 21:21:41 +08:00
Andrea Bolognani
b365987d38 CHANGELOG: Add hystorical releases
For each release, the date it taken from the corresponding
git tag; the one exception is 2.4.0, where the tag was created
months after the commit it points to.

Information about releases is taken from [1] and minimally
edited to work in the new context, along with being fixed when
necessary.

While every single release from 1.0.0 onwards is now accounted
for, several of them lack detailed information: tracking
existing release notes about them or writing them from scratch
is left as an exercise to the reader.

[1] https://sourceforge.net/projects/scrotwm/files/
2018-09-10 18:50:27 +08:00
Andrea Bolognani
b736ec1363 CHANGELOG: Fix and tweak existing entries
Reflow the most recent entry to fit into 80 columns, make sure
there are two empty lines between entries, and fix the release
date for spectrwm 3.0.0 (the tag was created on May 2, despite
the "releases" page on GitHub claiming otherwise).
2018-09-10 18:50:27 +08:00
Marco Peereboom
0e2ff74207 Prepare for release 3.2.0. 2018-09-07 14:17:52 -05:00
Reginald Kennedy
4cf85d24d3 Update CHANGELOG.md to 3.2.0. 2018-09-08 03:10:18 +08:00
Reginald Kennedy
f9bf40a23f Disable xinput2 for all but Linux and FreeBSD. 2018-09-08 01:07:31 +08:00
Reginald Kennedy
6331a294b3 Add new configurable status bar workspace list indicator.
Enable by adding +L to bar_format.

Add new bar_format character sequence: +L

Add new conf option: workspace_indicator

Closes #113 and closes #170
2018-09-07 22:49:22 +08:00
Reginald Kennedy
d781d4e881 Add new actions to directly switch layout:
layout_vertical
	layout_horizontal
	layout_max
Unbound by default.

Add "max" alias for "fullscreen" layout option and adjust man page.

Closes #210
2018-09-07 21:40:47 +08:00
Reginald Kennedy
712efd1c36 Add new ws_empty_move action.
Switches to the first empty workspace and moves the current window.
Unbound by default.
2018-09-07 12:29:37 +08:00
Reginald Kennedy
f9c4156217 Fix warp pointer issue when Coordinate Transformation Matrix is used.
Requires libxcb >= 1.9 and xinput2.

Fix screenchange should only be called if RandR is supported.

Fixes #208
2018-09-07 12:29:37 +08:00
Reginald Kennedy
9d64ae3a7c Fix bar focus color on screenchange.
Fixes #131
2018-09-07 12:29:37 +08:00
Reginald Kennedy
49297ff971 Use maximum screen depth when creating frame/bar windows.
Add refresh rate checks to appropriately limit move/resize update rate.

Change all times in debug output to hexadecimal.
2018-09-07 12:29:27 +08:00
Reginald Kennedy
1ed5783be7 Fix some styling. 2018-09-07 11:16:49 +08:00
Reginald Kennedy
2c745681f7 Trim some fat from swm_hack.
Add XOpenDisplay intercept to preload atoms.
Looking up/creating atoms when handling XCreateWindow can cause
deadlocks and other unexpected behavior in some applications.  Instead,
preload the atoms on XOpenDisplay.
2018-09-07 11:16:27 +08:00