forked from ronjouch/marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove documentation from main script
- Loading branch information
Showing
1 changed file
with
3 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|