Skip to content

Commit

Permalink
remove documentation from main script
Browse files Browse the repository at this point in the history
  • Loading branch information
ronjouch committed May 20, 2013
1 parent fdcdf9a commit ba8b8e3
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions marathon
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
#! /bin/sh
#
# Licenced under the WTFPL, 2012, [email protected]
# marathon tries to be smart about running or focusing apps
# if "app" isn't running, "marathon app" runs "app", else it just focuses "app"
#
# INSTALLATION
# 0. Install wmctrl
# 1. Put marathon somewhere accessible system-wide,
# e.g. sudo ln -s ./marathon /bin/marathon
# 2. Bind "marathon command" to some keyboard shortcut:
# GNOME -> the "Keyboard" applet of the GNOME System Settings
# LXDE -> your lxde-rc.xml
#
# TODO
# - Proper handling of WM_CLASSES, currently it just assumes the class will
# contain the executable name. Works for all my apps though.
# - If app runs and focused, then minimize it
# - Use xdotool, looks simpler but couldn't get my way around WM_CLASSES
# See documentation in README.md. License:WTFPL, 2012-2013, [email protected]

runningInstancesOfExec=$(ps aux | grep -v grep | grep -v marathon | grep -c $1);
# USEFUL DEBUG STUFF
# focusedWindowId=$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}'); #debug
# zenity --info --text "$1, $runningInstancesOfExec, $focusedWindowId"; #debug
# focusedWindowId=$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}'); # useful for debug
# zenity --info --text "$1, $runningInstancesOfExec, $focusedWindowId"; # useful for debug

if [ $runningInstancesOfExec -gt 0 ]
then
Expand Down

0 comments on commit ba8b8e3

Please sign in to comment.