aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-10-18 21:08:50 -0700
committerGravatar Tom Willemse2022-10-18 21:10:13 -0700
commit19c5507dbc260e32b1e9932b54818900f1a43c97 (patch)
tree01bc6f2c20f04f4db74664182dc92b5f1d7bc41c
parent6cb426f3970c292773324f9a70ef0b841e0a2418 (diff)
downloadhlwm-run-or-raise-master.tar.gz
hlwm-run-or-raise-master.zip
Add simple READMEHEADmaster
-rw-r--r--README.org29
1 files changed, 29 insertions, 0 deletions
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..052905c
--- /dev/null
+++ b/README.org
@@ -0,0 +1,29 @@
+#+title: Run-or-raise for Herbstluftwm
+#+options: toc:nil num:nil
+
+A script that switches between windows matching the same window class. If no such window can be found, treat the rest of the command line as the command to start.
+
+* Requirements
+
+This script depends on [[https://scsh.net/][scsh]], [[https://herbstluftwm.org/][herbstluftwm]], [[http://tripie.sweb.cz/utils/wmctrl/][wmctrl]], and [[https://code.ryuslash.org/util/tom/hlwm-switch-to-window/][hlwm-switch-to-window]].
+
+* Installation
+
+Put the =hlwm-run-or-raise= script anywhere in your =$PATH=.
+
+* Usage
+
+Call the =hlwm-run-or-raise= script with 2 or more arguments:
+
+- class :: The first argument is the class of the window to look for. This is a regular expression, so that multiple classes can be specified at once. This is matched against the =WM_CLASS= window property (see the output of =xprop=).
+- command :: Any other command-line arguments are used to start the program that should create a window with the given class.
+
+** Examples
+
+This call will switch between any windows with the class “Emacs”, or start the program =emacsclient --create-frame= if no windows with that class can be found.
+
+: hlwm-run-or-raise Emacs emacsclient --create-frame
+
+This call will switch between windows with any of the classes “URxvt”, “Hyper”, or “kitty”. If no window with any of those classes is found, the program =kitty= is called to create one.
+
+: hlwm-run-or-raise "\(URxvt\|Hyper\|kitty\)" kitty