Commit graph

112 commits

Author SHA1 Message Date
kottroll
05d860eda7 rm not needed newlines 2018-03-11 13:35:56 +01:00
Thomas Lübking
e480255a79 remove dead switch from help 2016-11-20 14:08:25 +01:00
Thomas Lübking
507782e5d4 escape special chars in filenames
This follows the escaped chars in bash completion and allows to pass
filenames with spaces etc.
Using quotes would be another option but requires special handling of
"~" and, what's worse, either hand-correcting the cursor position (into
the quoted area) or more completion mumbo-jumbo to handle the quotes.
2016-09-22 21:04:01 +02:00
Thomas Lübking
39b34a9109 fix segfault when completing ~ or .
ie. w/o any / in the given path we'll get an irregular split point and
thus out of bounds array access
2016-09-22 21:03:35 +02:00
Thomas Lübking
baaf477d46 add support for dedicated completion data
This allows to complete random things, useful along the -print flag but
also to limit the commands to those found my menumaker etc.
2016-07-23 16:58:04 +02:00
Thomas Lübking
8094f4d1a9 Allow to center fbrun
While any window can be centered using the apps file, fbrun can serve many
purposes and sometimes (runner) makes sense being centered, sometimes
(button/menu triggered input) near the mouse, sometimes ("application")
regularily placed.

REQUEST: 282
2016-07-23 16:58:04 +02:00
Thomas Lübking
0ca5daf997 limit fbrun history size
the default is 1024-1025, values are read from the FBRUN_HISTORY_SIZE
environment variable
NOTICE: the limit isn't hard, but will typically be n+1 and only n if
the new entry is already present in the last n entries

REQUEST: 202
2016-07-23 16:58:04 +02:00
Thomas Lübking
e85dc01d28 add autocompletion support to fbrun 2016-07-23 16:58:04 +02:00
Thomas Lübking
d741b6fe6e improve fbrun completion
- streamline code
- indicate completion by making use of selection
- fix buggy behavior (notably subsequent completions and FS path
  following)
- support "~" in paths
- support chunk completion
  (ie. "mp[layer] ~/vid[eos/favporn.mp4]" can be completed in both
   tokens; buggy with paths including spaces in non-leafs)

REQUEST: 223
2016-07-23 16:58:04 +02:00
Thomas Lübking
7b8e4413f8 Allow to preselect preset text 2016-04-25 19:04:13 +02:00
Mathias Gumz
0820bcb640 Fix build-system: use xxx_LDADD instead of xxx_LDFLAGS
xxx_LDFLAGS place the libraries like '-lX11' or '-lXft' at the beginning of
the linker command. Some systems were not able to handle the situation and
this lead to a lot of unresolved symbols. Reading the documentation of
automake:

    ... you can use LDADD to do so. This variable is used to specify
    additional objects or libraries to link with; it is inappropriate for
    specifying specific linker flags, you should use AM_LDFLAGS for this
    purpose.

In addition we link against -lm in order to satisfy symbols refering to 'cos'
and 'sin'.
2015-01-04 16:21:02 +01:00
Mathias Gumz
63f9a1637f Clean unused variables 2015-01-03 21:42:24 +01:00
Mathias Gumz
74df62b081 Remove unused code / option from FbRun 2015-01-03 18:39:46 +01:00
Mathias Gumz
376ed523cb Update release version 2015-01-03 14:07:34 +01:00
Mathias Gumz
a3c0b049bf Fix corruption of fbrun-history
This commit fixes issues #72 (brought up + different solution by Mattias
Guns; I received a similar patch by 'Nable 80' via ML and discussed the
issue in #fluxbox with 'Nable 80'), patch #73 (Mattias Guns) and finally
patch #162 (Ulrich Eckhardt; this commit is heavily based upon Ulrich's
work).

The original code was overly complex. It tried to avoid writing
bytes to the disk at the expense of comprehensibility and as a result it
was buggy. I looked at both patches from Mattias and 'Nable 80' which address
the bug with skipping entries in the history-file (my fault: incorrect use
of outfile.ignore(1, '\n')): They provided a proper fix for the problem
but I decided to use Ulrich's code since it improves the whole code by making
it a lot simpler.

So, kudos to all of you.
2015-01-02 17:08:44 +01:00
Mathias Gumz
0e8a27e931 Fix loading fbrun-history
Previous code add one additional entry on loading the history. This
commit is one part of the patch #162 (see [1] and [2]), written
by Ulrich Eckhardt <doomster@knuut.de>.

[1]: https://sourceforge.net/p/fluxbox/patches/162/
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fbrun-bug636632.patch;att=1;bug=636632
2015-01-02 16:45:39 +01:00
Mathias Gumz
e105de7d46 merge Sami Kerola's new build-system 2014-04-11 17:42:40 +02:00
Mathias Gumz
3696562aa8 update of copyright info 2014-02-17 20:14:49 +01:00
Sami Kerola
7541054b29 build-sys: move to non-recursive build
This rather large change will attempts to make 'make' to work better.
See excellent paper 'Recursive Make Considered Harmful' by Peter Miller
for further explanation why several make files is worse than one for
whole project.

Note.  The tests are build with 'make check' rather than defining TEST.

Reference: http://miller.emu.id.au/pmiller/books/rmch/
Reference: http://karelzak.blogspot.co.uk/2013/02/non-recursive-automake.html
2013-05-26 10:38:11 +01:00
Sami Kerola
9e5eddfc3d build-sys: use pkg-config to locate dependencies
This commit alters XRANDR (X Resize And Rotate) extension dependency,
which is expected to have at least version 1.4.  Earlier old versions of
xrandr were supported, at least to some extent.
2013-05-26 10:38:10 +01:00
Sami Kerola
73b7958770 build-sys: include config.h to all files using automake
Do not try to be too smart which compilations need config.h, as most of
them will simply because of the config.h has information about system
capabilities.
2013-05-26 10:38:10 +01:00
Mathias Gumz
ac27c8cb42 Updates copyright date information in some binaries 2013-02-14 19:45:17 +01:00
Sami Kerola
f12e149baf automake: use AM_CPPFLAGS rather than INCLUDES
The INCLUDES macro deprecated in favour of AM_CPPFLAGS.

References: http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
2013-01-03 08:17:27 +01:00
Vladimir A. Pavlov
7a404e7fbc Store XClassHint on stack, not in dynamic memory 2012-12-30 12:27:37 +01:00
Ryan Pavlik
d70bdbe675 Check .empty() instead of .size() == 0
Found with cppcheck.
2012-01-04 07:54:46 +01:00
Ryan Pavlik
f859e78cb2 Exceptions should be caught by reference.
Found using cppcheck.
2012-01-04 07:51:35 +01:00
Ryan Pavlik
3ca61475fb FbRun.cc: Fix on windows where there is no fork 2011-10-31 10:54:09 -05:00
Mathias Gumz
690d926ac4 introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered
version of the content of a string. this helps to reduce the number of
calls to reorder the string before drawing it (as introduced in the patch
from Ken Bloom) and to be more consistent in menus and textboxes (drawing
cursors and underlining text).
2010-09-08 20:17:21 +02:00
Mathias Gumz
df81e1f774 minor cosmetics 2009-05-25 08:04:41 +02:00
Mark Tiefenbruck
aee9889a27 recognize --option in addition to -option for most things 2008-10-04 14:32:20 -07:00
Mark Tiefenbruck
e6570b61f3 add -print option to fbrun to return result to stdout instead of executing it 2008-10-04 14:01:31 -07:00
Mark Tiefenbruck
9c105111d2 remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
markt
8da54ca0eb add some decorations to torn menus, and fix restart without an argument 2007-07-31 23:16:05 +00:00
markt
329fca30fd updates for compiling with gcc 4.3 2007-06-29 17:25:24 +00:00
mathias
6f8a5c7a8d small fix for the /bin/sh issue .. just using /bin/zsh now 2007-06-09 17:44:27 +00:00
mathias
dff2aa3356 fix for the following problem:
on *bsd /bin/sh is not just a symlink to /bin/bash as on most linux's 
  but a real standalone shell. and it behaves differently from "bash -c"
  behavior .. it doesnt exec the command given but waits till the command
  finishes. as a result a lot of "rogue" a flying around. solution is now 

     ( $SHELL or /bin/sh ) -c exec <cmd>
2007-06-06 06:22:37 +00:00
markt
e89d4aa219 getting rid of more useless files in the repo 2007-04-03 22:39:41 +00:00
mathias
e5e76e7761 Cosmetic patch from Slava Semushin 2006-10-30 19:31:15 +00:00
mathias
a15d9af3c7 Cleanup unneeded headers (thanks Slava Semushin) 2006-04-25 06:46:06 +00:00
simonb
cb65dae95f fbrun: Move the cursor to the end when tab completing
+ thanks Jonas Koelker, sf.net rfe #1333003, patch #1475578
2006-04-25 02:42:05 +00:00
simonb
b2105a62c3 fix fbrun positioning code to use hints properly 2006-04-17 14:00:28 +00:00
simonb
78f3b0ada4 fix compiler warnings in fbrun too 2006-04-17 08:04:12 +00:00
mathias
ae05ad9a01 updated copyright info 2006-02-16 06:53:05 +00:00
fluxgen
17c9cafd25 removed unused variable 2005-12-22 23:41:41 +00:00
mathias
ef76b45ab1 - Usage of xft-fonts is prefered, except a font-description starts with '-'
- Removed "antialias"-option completly, to enable/disable "antialias"
  use either  <fontname>:antialias=<bool> in the style or use
  Xft.antialias: <bool> in your .Xdefaults
- Added new styleresources: 
    *.font.effect: <halo|shadow>
    *.font.shadow.x : <int>       - shadow x offset
    *.font.shadow.y : <int>       - shadow y offset
    *.font.shadow.color : <color> - color of shadow
    *.font.halo.color : <color>   - color of halo
- Removed 'shadow' and 'halo' options from fontdefinitions:
    !! Style authors have to update their styles !!
- Simplified XmbFontImp to not try all possible fonts to match locale
- Style authors may specify multiple fonts:
    <font1>|<font2>|<font3>
  if loading of font1 fails, fluxbox probes <font2>, etc. The last font is
  "fixed". Hints for style authors:
    - if xft tries to load a font it will _ALWAYS_ return a valid font,
      it doesnt have to look like the one you want to have, read more
      about it: http://fontconfig.org/fontconfig-user.html
    - export XFT_DEBUG=1  before running fluxbox helps to see
      which fonts are picked.
  eg:
      *.font: Verdana,Arial-12:antialias=true|-artwiz-snap-*-
      if fluxbox is compiled with xft this will NEVER try to
      load "-artwiz-snap-*-" since xft gives for sure a font,
      most likely Verdana or Arial but noone knows. So, if
      fluxbox has no xft support the first fontpattern fails
      and fluxbox tries the next one, which might be successful.
      if everything fails, it will use "fixed"
- Added caching of fonts, fonts are only loaded once.
- Fixed #1090902 (slow utf8 start)
2005-06-03 07:25:48 +00:00
mathias
318d76b47c fix from vadim for fbrun-tabcompletion 2005-05-09 07:20:17 +00:00
mathias
6c057c6903 Fix for #1160244, #1099704, #1094107:
if the xkb-extension is enabled and the user switches between his/her
keyboardlayouts fluxbox's keybhandling doesn't work well anymore because
xkeyevent.state contains also xkb-related flags and thus we have to handle
that with caution.

KeyUtils now contain 'isolateModifierMask()' to really work only on the
modifiers. why not as part of cleanMods() ? because the XLookupString return
false results, eg TextBox's would only print chars from the first
keyboardlayout.
2005-05-06 09:22:53 +00:00
mathias
1789d0c31f copyright date 2005-01-24 18:49:01 +00:00
mathias
6fbe0e44d6 applied patches from openbsd-ports, closed #1105041 (sf)
execl needs a terminating NULL at the end, a '0' would be
    converted to "int 0" on 64bit-systems
2005-01-20 12:30:35 +00:00
mathias
1910d5af46 fix the no-writing-history issue for fbrun 2004-12-24 03:02:48 +00:00