Commit graph

30 commits

Author SHA1 Message Date
Tiago Cunha
9fc72f5c49 Sprinkle some const. 2012-06-05 22:32:02 +01:00
Tiago Cunha
9e2f9895c3 No point having static here. 2012-06-05 22:32:02 +01:00
Tiago Cunha
a10363decb Technically, it's a tree, now. 2012-06-05 22:32:02 +01:00
Tiago Cunha
d37bb62834 Move a few spaces to the right place.
The format should only be manipulated by the bar_fmt function or the
user. Thus, delete extra space when outputting the window name and move
the strlcat(3) call that appends four spaces where it belongs. Inside
the window title conditional.

Noticed by LordReg.
2012-06-05 22:32:02 +01:00
Tiago Cunha
ae4071ff80 Limit window name to 64 characters by default. 2012-06-05 22:32:01 +01:00
Tiago Cunha
98fcba2bdb Support maximum length in the character pairs.
The specified length is used to limit the number of characters outputted
by the sequence. Thus, it's now possible to limit, for instance, the
window name length.

This fixes Flyspray bug #243.
2012-06-05 22:32:01 +01:00
Tiago Cunha
e8dd19c1f7 Warn the user if format is too long. 2012-06-05 22:32:01 +01:00
Tiago Cunha
96db1bf3c0 The screen number can be fetched from the region. 2012-06-05 22:32:01 +01:00
Tiago Cunha
8ce185e7ff Add the ability to format the status-bar output.
Introduced the new bar_format configuration file keyword that allows to
customize the status-bar by providing character sequences that are
replaced accordingly, effectively supplanting the enabled options. The
default output is retained, though.

Idea taken from tmux(1).
2012-06-05 22:32:01 +01:00
Tiago Cunha
d97dc68f36 Zap superfluous calls to bar_update.
Remove scattered calls to bar_update when switching workspaces and
cycling layouts, which are preceded by a focus function call. They
already are (as they should be) responsible for doing that.
2012-06-05 22:30:56 +01:00
Tiago Cunha
141dfdbda8 Refresh status-bar after moving a window. 2012-06-05 22:30:56 +01:00
Tiago Cunha
900f61bbbb Kill references before focusing on a new window.
Like the other focusing functions, make focus_prev call kill_refs before
trying to focus on a new window. This way, the current window references
are cleared like it should be when the very last window is destroyed.

Otherwise, the status-bar output will contain (while its alarm does not
expire) the class hint of the to be removed window.
2012-06-05 22:30:56 +01:00
Tiago Cunha
a7cda44d81 Don't call the status-bar wrapper function.
The update functions already check if the window related enabled options
are set. Just call it directly, instead. As a consequence, the wrapper
function can now be deleted.
2012-06-05 22:30:06 +01:00
Tiago Cunha
3ce4ba02b4 Reuse class hint in the status-bar.
The window's class hint is already retrieved by the manage_window
function, which is called when a new application is spawned. Therefore,
use it when displaying the application's class and name, instead of
fetching them again with XGetClassHint(3).

Besides, its error checking was incorrect, since it also returns zero on
error.
2012-06-05 22:30:06 +01:00
Tiago Cunha
21a44b58c7 Remove unused variable. 2012-06-05 22:30:06 +01:00
Tiago Cunha
999734e380 Fix a few style nits. 2012-06-05 22:30:06 +01:00
Reginald Kennedy
a658878aea Add new options to change focus behavior on window open and close.
ok marco
2012-06-06 00:36:49 +08:00
Reginald Kennedy
b7d49e02ee Fix input focus not being set in max_stack mode on new mapped windows.
ok marco
2012-06-06 00:04:14 +08:00
Reginald Kennedy
27902d3ddd Fix missing charset warnings with a less-constrained fallback font entry. 2012-05-26 18:32:08 +08:00
David Hill
325fce8801 convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym 2012-05-16 00:22:59 -04:00
Reginald Kennedy
4501b122e6 Fix segfault caused by workspaces above 10 not being initialized. 2012-04-20 14:18:21 +08:00
Reginald Kennedy
b8de26993f Increase workspace hard limit to 22.
Add new keybindings for workspaces 11 through 22.
Defaults for ws_n and mvws_n are NOD+(F1-F12) and MOD+Shift+(F1-F12),
respectively.

Add a new configuration option 'workspace_limit' to make it possible for
the user to adjust the number of available workspaces.  Default is 10.

ok marco
2012-04-08 06:56:13 +08:00
Marco Peereboom
f7f28f5248 fix a real issue of an uninitialized variable, found by clang and we are now clang clean 2012-02-17 10:57:29 -06:00
Marco Peereboom
c57f45c70c couple unused vars and bad pointer checks, from clang 2012-02-17 10:27:40 -06:00
Marco Peereboom
0cf556e889 fix 2 clang -analyze warnings 2012-02-17 10:20:06 -06:00
Marco Peereboom
4ca58fe44e make osx compile again 2012-02-16 09:22:47 -06:00
Lawrence Teo
0f35da6cb6 Adjust copyright years and authors list on man page. 2012-02-15 23:45:50 -05:00
Marco Peereboom
ff78cd9edd try multiple config files 2012-02-15 17:26:10 -06:00
Marco Peereboom
e468d771f6 try scrotwm.conf when spectrwm.conf isn't found 2012-02-15 16:14:56 -06:00
Marco Peereboom
e83f3b7908 rename scrotwm to spectrwm 2012-02-15 14:09:13 -06:00
Renamed from scrotwm.c (Browse further)