Commit graph

1338 commits

Author SHA1 Message Date
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
Reginald Kennedy
b93a2731b9 Add reference to wiki Installation guide in README.md.
closes #186
2018-08-29 11:44:46 +08:00
LordReg
03301f3580
Rename NEWS.md to CHANGELOG.md 2018-08-17 23:14:19 +08:00
Andrea Bolognani
eda7e76df6 NEWS: Add release notes
Since 3.0.0, release notes for spectrwm are already being
compiled and ultimately published at

  https://github.com/conformal/spectrwm/releases

but it would be useful if they were included in the release
tarball themselves as well.

The contents of the NEWS.md file are taken straight from the
page mentioned above, with only very minor editing.
2018-08-17 08:16:24 -05:00
orbea
e40e0282a7 Whitespace 2018-05-09 08:18:41 +08:00
Reginald Kennedy
c554299020 Additional spectrwm.1 fixes.
Fix sentences that were not starting on a new line.

Fix author section macros.

Cleanup 80 col.
2018-03-29 10:00:04 +08:00
orbea
123016c534 spectrwm.1: Silence mandoc warnings
man: /usr/man/man1/spectrwm.1.gz:231:18: WARNING: new sentence, new line
  man: /usr/man/man1/spectrwm.1.gz:986:71: WARNING: new sentence, new line

  new sentence, new line
  (mdoc) A new sentence starts in the middle of a text line. Start it on a
  new input line to help formatters produce correct spacing

  https://man.openbsd.org/mandoc.1
2018-03-29 09:09:37 +08:00
Matthias von Faber
1291a720e1 Fix config file parsing on musl libc
On the musl libc, autorun, layout and workspace name settings were
always rejected as invalid. As it turns out, parsing those was relying
on sscanf incorrectly matching %Nc as long as there is at least one
character. This is fixed by matching only the initial part of the string
via sscanf and skipping ahead by the amount of bytes consumed. This also
avoids unnecessary zeroing, copying and possible implicit truncation.

Relevant glibc bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=12701
2018-03-28 18:31:43 +08:00
orbea
b34cb01ed6 spectrwm.1: Silence mandoc style warnings.
This silences the following warnings reported by mandoc.

  man: /usr/man/man1/spectrwm.1.gz:653:10: STYLE: no blank before trailing delimiter: Cm M-,
  man: /usr/man/man1/spectrwm.1.gz:655:10: STYLE: no blank before trailing delimiter: Cm M-.
  man: /usr/man/man1/spectrwm.1.gz:657:12: STYLE: no blank before trailing delimiter: Cm M-S-,
  man: /usr/man/man1/spectrwm.1.gz:659:12: STYLE: no blank before trailing delimiter: Cm M-S-.
  man: /usr/man/man1/spectrwm.1.gz:761:10: STYLE: no blank before trailing delimiter: Cm M-]
  man: /usr/man/man1/spectrwm.1.gz:765:12: STYLE: no blank before trailing delimiter: Cm M-S-]
2018-03-28 11:41:10 +08:00
Reginald Kennedy
5804b95a71 Fix pointer offset calculation on move action. 2018-03-21 15:46:08 +08:00
Reginald Kennedy
82e40ed7a7 Fix windows in stacking area sometimes being hidden.
fixes #196
2018-03-03 16:12:48 +08:00
Reginald Kennedy
308f61d58d Cleanup and improve debug output by utilizing C99 __func__. 2018-02-20 22:52:22 +08:00
Andrea Bolognani
9caab3f155 Add keywords to desktop file 2018-02-20 12:11:18 +08:00
Christoph Weiss
cd44d668d6 fix segmentation fault in font creation 2017-12-27 22:41:01 +08:00
Tobias Stoeckmann
ea3e6da622 Fix OOB while reading bar input.
If the status bar script returns NUL as the first character through
stdin, spectrwm is prone to an out of boundary access. Depending on
the memory layout of the machine, it could turn into an OOB write.

The fix is simple: If the string is empty, do not further check for
newline character.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-10-14 16:39:44 +08:00
Reginald Kennedy
1ec03c62be Remove stray empty line and fix typo. 2017-10-13 10:52:39 +08:00
Niclas Zeising
0ba908c6f4 Update config with new color options
Update example configuration file with new options bar_color_selected
and bar_font_color_selected.
Also update the example with dmenu to use the new colors.
Add two other dmenu examples, search and name_workspace, that was added
to the manual with the same commit as the new color options.
2017-10-12 19:14:52 +02:00
Marco Peereboom
81a7846935 whitespace 2017-10-03 13:45:40 -05:00