Launcher¶
Overview¶
Launcher that combines modes/tagging of subtle with a browser search bar.
{{lightbox(contrib/launcher, Launcher)}}
Make sure that levenshtein.rb is also in the PATH otherwise launcher will not work
Features¶
- Call methods defined in your subtle config
- Search for stuff via Google (Chrome/Opera/Firefox)
- Point your browser directly to an uri
- Launch programs in path
- Create tags on the fly with #tag
- Create views on the fly with @view
- Set modes on the fly with + = full, ^ = float and * = stick
- Tab completion for programs, views, tags and methods
Keys¶
Keys | Action |
---|---|
Up, Down | Cycle through history (per runtime) |
ESC | 1) Hide/exit launcher 2) Stop reverse history search |
Enter | Run command |
^R | Start reverse history search |
Install¶
Currently there is no package available and you need either to clone the repository:
Or download the latest archive:
These scripts may work, if you encounter any problems please ask in the usual places.
Usage¶
Either call it like ruby launcher.rb
from commandline or add following loader and grab to your subtle config.
{{hide}}begin
require "#{ENV["HOME"]}/path/to/launcher.rb"
rescue LoadError => error
puts error
end
grab "W-x" do
Subtle::Contrib::Launcher.run
end
Configuration¶
Per default, the launcher uses fixed as font and loads entries from /usr/bin. This can be changed after requiring the launcher.rb
and before running it for the first time.
Fonts¶
{{hide}}begin
require "#{ENV["HOME"]}/path/to/launcher.rb"
# Set fonts
Subtle::Contrib::Launcher.fonts = [
"xft:DejaVu Sans Mono:pixelsize=80:antialias=true",
"xft:DejaVu Sans Mono:pixelsize=12:antialias=true"
]
rescue LoadError => error
puts error
end
Paths¶
{{hide}}begin
require "#{ENV["HOME"]}/path/to/launcher.rb"
# Set paths
Subtle::Contrib::Launcher.paths = [ "/usr/bin", "~/bin" ]
rescue LoadError => error
puts error
end
Examples¶
Insert | Description |
---|---|
:urxvt | Call methods defined in the config |
g subtle wm | Change to browser view and search for subtle wm via Google |
urxvt @editor | Open urxvt on view @editor with dummy tag |
urxvt @editor #work | Open urxvt on view @editor with tag work |
urxvt #work | Open urxvt and tag with tag work |
urxvt -urgentOnBell | Open urxvt with the urgentOnBell option |
+urxvt | Open urxvt and set full mode |
^urxvt | Open urxvt and set floating mode |
*urxvt | Open urxvt and set sticky mode |
urx<hit tab> | Open urxvt (tab completion) |