Ion3 scripts collection

Here are some scripts for Ion3. All of them are in the public domain unless otherwise mentioned in the source file.

Scripts that have yet to be converted from Ion2 to Ion3 are over-striked. Other scripts may not yet work with the latest release. Please fix any you find that need updating.

Scripts

adapt_menus.lua
Functions for creating a hierarchy of menus for various clients available. Key features are an attempt to organise by type hints (from the window titles) and collapse submenus when they contain only a few items.
app.lua
Start an application if it's not running, but go to it if it's already started. There's also a function to replace query_editfile which will use a running emacs instance (starting it if necessary, of course).
autoprop.lua
Automatically create a winprop for the given client targeted to the given frame. Allows them to be saved and reloaded automatically.
bindsearch.lua
Search the current bindings table by key or by command.
bookmarks.lua
Bookmarks support
cfg_dock2.lua
A dock configuration with lots of added control.
collapse.lua
Collapse frames on a WIonWS into a single frame
ctrl_statusbar.lua
Menu-driven controller for the statusbar. Modules can be enabled/ disabled from the menu, without requiring to edit the configuration file.
cwin_sp.lua
Create per-clientwin scratchpads
document_menus.lua
Navigate the filesystem using ion menus.
enumerate.lua
Adds "X." in front of the client windows, which may make switching between client-windows with MOD+n a little easier .
environment_placement_hook.lua
Linux-only placement hook which detects the presence of an ION_USE_WS environment variable in the processes of new windows, and uses that to determine where to place them.
exec_show.lua
Execute some shell-command (tail, head, grep etc) and display the result.
frame_client_menu.lua
Adds a 'Client windows' submenu to a frame's context menu, the menu contains all the clients in the current frame.
go_frame_or_desk.lua
selects frame in the specified direction. If there is no frame at that location, instead the next workspace in the direction becomes active
goto_multihead.lua
A version of WIonWS.goto_dir that may be useful on multihead setups.
histcompl.lua
History completion support for the line editor
lock_frame.lua
'Lock' selected frames so they don't close via the keyboard.
min_tabs.lua
Show tabs precisely when two or more windows in an ion frame
move_current.lua
Move current window in a frame to another frame in specified direction
mpd.lua
Control a MusicPD server from within Ion
nest_ws.lua
Attach workspaces to windows, to e.g. have a WIonWS inside a WFloatWS, or vice versa
nextact.lua
Go to first found region with activity flag set.
query_url.lua
Open a URL, completing on Opera bookmark file. Should be easy to support other browsers.
rotate_statusbar.lua
Rotate the statusbar between different templates. This will automatically load all of the modules for ion-statusd.
rss_feed.lua
A simple rss-reader script in lua for ion.
rss_feed_hh.lua
Some small improvements to match rss_feed my personal taste.
schedule.lua
Schedule some messages to show up at specified times in the statusbar.
send_to_ws.lua
Quickly send to another workspace.
stock.lua
An applet for retrieving and displaying stock market information from http://finance.yahoo.com. You can set up a portfolio and monitor its intraday performance.
switch_bindings.lua
Switch between key-bindings. You can temporarily disable keybindings and restore them later when necessary.
toggle_named_scratchpad.lua
Toggle (and create) named scratchpads.
wcirculate.lua
Grabbed menu for activation history based cycling of windows.
weather.lua
This script allows you to retreive weather information from one or more weather observation stations and display it in the statusbar.
xinerama_switcher.lua
This is similar to (and base on) go_frame_or_desk.lua but adds the ability to move between screens too. Left/right switch between screens, up/down between workspaces.
xkbion.lua
This script allows you to use independent keyboard layouts for different windows in Ion3. It uses a window property to store the XKB groups, so you can restart Ion without losing settings for each window.
zoom.lua
Simulates larswm-like window zooming.
closeorkill.lua
Kill client on second close try if it did not respond to close
heuristics.lua
Window placement heuristics for tiled workspaces
mp.lua
Mark next mapped window to be attached to a specified object
alt_resize.lua
Possibly more intuitive resizing bindings.

Key bindings

cfg_mouse.lua
Make the mouse pull its weight in ion.
dans_bindings.lua
Keybindings for more intuitive WIonWS navigation.
emacs_bindings.lua
Emacs-like keybindings for Ion
vim_bindings.lua
Vim-like keybindings for Ion queries.

Styles

look_alex.lua
Black tabs, green text and borders.
look_asm.lua
A clean grey-blue theme with not too big tabs.
look_atme.lua
A style which just looks nice.
look_awesome.lua
Inspired by look_clean, comes fully-equipped with big, friendly tabs, tasty single-pixel borders, and a sprinkling of transparency. Makes use of the Terminus font.
look_awesome_sm.lua
A style based on look_awesome above, but with smaller fonts and paddings and no transparency by default. This style makes use of the 'nexus' font for tabs.
look_awesome_yaarg.lua
A style based on look-awesome-sm above, but with darker colours to give a more somber feel.
look_bas.lua
A style which colors fit the mozilla-bb background. It makes use of the techy artwiz font.
look_blue.lua
A blue/gray theme based on look_violet.lua, with a nice clean look.
look_bluecurve.lua
A theme that fits the colors of the bluecurve-theme by Redhat
look_cleanpastel.lua
Similar to stock look-clean* styles, but greenish.
look_cleansteel.lua
The stock look-brownsteel style with borders removed on tiled workspaces for cleaner look.
look_cleanwhite.lua
A bright theme that fits white terminals and white Emacs windows.
look_cool.lua
A style based on look-awesome, made to fit the KDE color scheme "plastic-grey". Made by Steffen Liebergeld (26.08.2004).
look_gtk2.lua
A theme that fits the default GTK+2 colors. It makes use of the terminus and artwiz fonts.
look_minimalist.lua
A simple gold/red style with relatively large frame borders designed to increase usability with the minimal tabs modification.
look_moy.lua
Grey and violet simple theme.
look_ootput.lua
A non-obtrusive style with clear distinctions between active borders and less active borders. This style makes use of the Profont font.
look_qt.lua
A drawing engine configuration file that reads settings from Qt configuration file ~/.qt/qtrc.
look_tiny.lua
A major modification of look_minimalist, aiming to keep everything small while not making anything unattractive.
look_tiny_min_tabs.lua
A major modification of look_minimalist, aiming to keep everything small while not making anything unattractive. For use with min_tabs.

Statusbar

These scripts are for monitoring various internal and system resources and such. You should not attempt to load any of them manually. Instead, put them somewhere on Ion's earch path (e.g. ~/.ion3/) and simply insert one of the meters provide by the script in your statusbar template (in cfg_statusbar.lua) and it will automatically load the appropriate script, either within Ion itself, or in ion-statusd for the system resource monitors.

Internal monitors

statusbar_act.lua
Activity (urgency flag, new unacted-upon transients, etc.) display for the statusbar.
statusbar_external.lua
Show output of external programs or scripts in statusbar. If you are using ion-3ds-20060107 or later, using statusd_exec.lua instead of this old version is suggested.
statusbar_workspace.lua
Show current workspace name in statusbar, or a list of workspace numbers with the active one indicated.
statusbar_wsname.lua
Shows the current workspace name in the statusbar, can also show a list of workspaces and indicate the current one. The current workspace indicator is customizable. This script also allows for per-head workspace information.

Ion-statusd monitors

These monitors are run in ion-statusd. Note that many of them depend on the Linux /proc filesystem and thus will not work on other systems.
statusd_amarok.lua
Ion-statusd monitor reporting the current song or status of amaroK. Uses dcop.
statusd_apm.lua
Ion-statusd monitor reporting APM status; works on OpenBSD 4.0 by executing external program every minute. Now with hints for battery state and external A/C connection.
statusd_apm2.lua
Ion-statusd monitor reporting APM status; works on FreeBSD by executing apm as an external program every minute. Added hints for a bit more color. Even though this is apm2, save it as statusd_apm.lua.
statusd_batt.lua
Ion-statusd monitor reporting battery status; works with apm.
statusd_bsdbatt.lua
Ion-statusd monitor for FreeBSD ACPI CMBATT status. Uses the sysctl interface.
statusd_cpufreq.lua
Ion-statusd monitor reporting current CPU speed in KHz, MHz, or GHz. Uses the /proc filesystem and cpufreq.
statusd_cpuspeed.lua
Ion-statusd monitor reporting current CPU speed; works with apm.
statusd_dgs.lua
Ion-statusd monitor reporting on any games waiting for a move on www.dragongoserver.net.
statusd_exec.lua
Show output of external programs or scripts in statusbar. Uses non-blocking reads and can be used with both continously outputting and periodically run programs. Allows highlighting with regexp matching.
statusd_fortune.lua
Ion-statusd monitor displaying fortunes.
statusd_iface.lua
Ion-statusd monitor reporting currently used network interface.
statusd_inetaddr.lua
Ion-statusd monitor reporting current IP address from ifconfig.
statusd_info.lua
Ion-statusd monitor reporting current CPU, RAM, and swap usage. Depends on top and free.
statusd_iwinfo.lua
Ion-statusd monitor reporting minimal wireless info.
statusd_laptopstatus.lua
Ion-statusd monitor reporting CPU speed & temperature and battery status; works with acpi.
statusd_linuxbatt.lua
Ion-statusd monitor reporting battery percentage and status using the Linux /proc/acpi interface.
statusd_maildir.lua
Ion-statusd monitor showing mailcount of a Maildir.
statusd_moc.lua
Ion-statusd monitor reporting moc information and status.
statusd_mocmon.lua
Ion-statusd monitor reporting moc information. This is actually just a modification of statusd_xmmsip.lua using the idea of non-blocking I/O as shown in statusd_mocp.lua.
statusd_mocp.lua
Ion-statusd monitor reporting moc status. This is a stripped down, non-blocking I/O version of the above. It is useful with rotate_statusbar.lua.
statusd_mpd.lua
Ion-statusd monitor reporting mpd information and status.
statusd_netmon.lua
Ion-statusd network monitor reporting network activity.
statusd_orpheus.lua
Ion-statusd monitor reporting song currently being played by orpheus.
statusd_pytone.lua
Ion-statusd monitor reporting song currently being played by pytone.
statusd_sysmon.lua
Ion-statusd monitor for reporting various system resources.
statusd_ticker.lua
Ion-statusd monitor which scrolls the output of specified programs.
statusd_uname.lua
Ion-statusd monitor for reporting uname. It is primarily a simple example of how to use statusd.popen_bgread() with coroutines for non-blocking I/O.
statusd_uptime.lua
Ion-statusd monitor reporting the system uptime.
statusd_volume.lua
Ion-statusd monitor reporting sound volume values (currently, master and pcm). Depends on aumix.
statusd_volume2.lua
Ion-stadusd monitor reporting master sound volume and state (on or muted). Depends on amixer. Despite being named "statusd_volume2.lua", the script needs to be relabeled "statusd_volume.lua" to work.
statusd_xmms.lua
Ion-statusd monitor reporting song currently selected in xmms' playlist.
statusd_xmmsip.lua
Ion-statusd monitor(s) reporting information from a xmms-infopipe-plugin's pipe. Can be customized in various ways.

Instructions

Downloading a copy

This scripts collection is a darcs repository. You can download a copy of the repository by first installing darcs and then running the command
darcs get http://iki.fi/tuomov/repos/ion-scripts-3/
This will get you a fully functional copy of the repository in the directory ion-scripts-3.

To update a previously downloaded repository, use darcs pull. The command darcs changes can be used to view the list of changes, and there is also an RSS feed of the most recent changes.

Contributing

If you have any scripts that you would like to see added here, or would like to improve upon the existing scripts, please use the following procedure:
  1. Get a copy of the repository as explained above.
  2. Repeat as many times as you want to:
    1. Make your changes and put new files in the proper directories inside your copy of the repository. Use the command darcs add filename to put newly added files under version control.
    2. Update this index.html to link to any added files, in alphabetical order.
    3. Record your changes to your local copy of the repository with the command darcs record -a.

      The first time you do this, darcs will prompt for your email address. The preferred format is Your real name <user@host>. The address should not be visible on a linked-to page unencrypted. The name of the patch is a short one-line summary of your changes.

      Because I use an UTF-8 locale, you must also run this command in an UTF-8 locale or stick to plain ASCII in your input, because darcs stubbornly does not support locales with some of the developers instead preferring an UTF-8 monoculture that we will be suffering from for ages to come. Yes, I have considered switching to another VCS until this problem is resolved… Maybe one day I'll get around to it.

  3. Send your patches to me by email with the command darcs send. I will apply them to the online repository if they look okay.

    If you can't for some reason send this way, use the -o option and send the output normally as an attachment. Please begin the subject line with 'darcs patch'.

For more help on using darcs, see the darcs manual.