Hi,
ich habe nun Acti 0.7 über einen Monat lang benutzt und festgestellt, dass ich es fast ausschließlich gebrauche, um Apps zu starten und Skripte, die ebenfalls mit einem Dmenu arbeiten; die Funktion, bereits geöffnete Fenster einer App mit Wmctrl zu aktvieren und/oder mehrere geöffnete Fenster dieser App schnell anzuordnen, brauche ich selten. Allerdings liegt dies eher daran, dass ich statt mit vielen Fenstern eher mit Tabs arbeite (zumindest in den am häufigsten benutzen Programmen wie Browser, Dateimanager etc.) oder per Keystroke Terminals ausfahre (Win-F1, Win-F2, Win-F3, Win-C). Zum schnellen Fensterwechsel benutze ich Win-Tab in Openbox.
Um GUI-Apps mit Optionen zu starten, habe ich neben Acti (Win-V) noch Gmrun (Win-B) benutzt. Das hat mich gestört. Darum habe ich am Wochenende Acti nochmals umstrukturiert und erweitert. Ziel war es, dass ich auf Gmrun verzichten kann. D.h., Apps in Acti sollen auch mit ihren eigenen Optionen und Parametern geöffnet werden können.
Das Ganze sieht nun so aus: Acti startet Apps oder aktiviert geöffnete Fenster von Apps, die bereits gestartet worden sind. Hat die App nur ein Fenster offen, wird dieses Fenster aktiviert und hervorgeholt; hat die App mehrere Fenster offen, kann bestimmt werden, ob das letzte oder alle Fenster aktiviert und angeordnet werden sollen. Besteht gar kein Fenster, wird die App neu gestartet. Acti verwaltet für dieses Vorgehen eine App File, in der alle Apps eingetragen sind, die in einem Dmenu gelistet werden sollen, um sie schnell starten bzw. aktivieren zu können. Jeder Eintrag hat einer der Status "block", "ign" oder "reg": wenn eine App "regular" ist, kann sie von Acti gestartet und/oder aktviert werden; wenn eine App den Status "ignored" hat, kann sie nur ausgeführt werden, bestehende Fenster können nicht aktiviert werden; der Status "blocked" verhindert Ausführung und Aktivierung gleichermaßen. Wird eine App eingegeben, die nicht in der App File gelistet ist, wird sie so behandelt, als wäre sie blockiert, nur mit dem Hinweis, dass sie nicht gelistet ist. Zusätzlich zur App File gibt es ein App Dir, in dem jede in der App File gelistete App eine eigene Desktop File hat. Das App Dir bildet die App File dynamisch ab. Das App Dir enthält deswegen die Unterordner "block", "ign" und "reg". Sobald die App File verändert wurde, wird die Anordnung des App Dir angepasst. Jede Desktop File enthält per default folgende Variablen und Werte:
Encoding=UTF-8
Version=1.0
Type=Application
Name=$Appname
Exec=$Appname
Terminal=
Path=
Geo=
W_action=
Alle Werte können verändert werden. Terminal hat die Werte "true/false", Geo "X,Y,W,H" und W_action "activate_all/maximize/grid_horizontal/grid_vertical". Encoding, Version, Type und Path werden in Acti bisher nicht gebraucht. Wenn nur ein Fenster einer App geöffnet ist, beeinflusst Geo, wie dieses einzelne Fenster angeordnet sein soll. Wenn mehrere Fenster einer App gelistet sind, wird Geo ignoriert und W_action gelesen.
Zudem kann Acti schon mit folgenden Optionen gestartet werden, die die Werte Geo und W_action in der Desktop File überschreiben:
-e X,Y,W,H
-gh | -gv | -m
Ist weder W_action in der Desktop File gesetzt, noch als Option angegeben, wird die default Aktion "activate_all" benutzt.
Damit Apps mit Optionen eingegeben werden können, die nicht in der App File gelistet sind, können auch die Kommandos "gui" und "term" benutzt werden. Diese umgehen das Checken auf Listing und führen direkt das Kommando aus. In einer History File werden diese Befehle gespeichert und können später über den Befehl "history" ausgewählt werden.
Damit das Ganze leichter vonstatten geht, habe ich Acti nun in 8 Skripte aufgesplittet und versucht, alles in Funktionen zu organsieren. Dabei habe ich es so arrangiert, dass Acti entweder im GUI MODE mit Dmenus oder im CLI MODE ohne Dmenus ausgeführt werden kann. Alles ist - wie bisher - work in progress. Acti baut nun auf folgenden Programmen auf:
awk, bash, cat, column, cp, cut, diff, dmenu, find, grep, mkdir, mv, printf, sed, sort, stat, tar, tee, test, tput, tr, tree, uniq, wc, wmctrl, xargs, xprop, xwininfo. Optional ist weiterhin xmessage.
Das Kommando/Wrapper-set ist verändert und erweitert worden.
$ acti help
acti <options> <subcommand> <APP>
OPTIONS:
--------
--gui Start acti in interactive GUI mode with
Dmenus.
-e X,Y,W,H , -E X,Y,W,H Activate single window of an App with sizing.
-gh , -GH Arrange horizontaly all windows of an App on
current desktop in a grid of equal sizes.
-gv , -GV Arrange verticaly all windows of an App on
current desktop in a grid of equal sizes.
-m , -M Maximize all windows of an App on current
desktop. In GUI mode the last window is set
on top. This option in CLI mode is like the
w_action=activate_all, which is default in
both modes.
SUBCOMMANDS:
------------
gui APP Execute APP with own options without
checking its listing in the App File.
term APP Execute APP with own options in a Terminal
without checking its listing in the App File.
block APP ... Ban Acti from activating and executing APP.
del APP ... Delete APP from the App File.
ign APP ... Ban Acti from activating APP, but enable
executing APP.
reg APP ... Insert APP into App File and enable Acti to
activate APP.
config set PATTERN ... -- APP ...
Set PATTERN in Desktop File with name of APP.
PATTERN can be: Encoding, Version, Type,
Name, Exec, Terminal (true|false), Path, Geo
(X,Y,W,H), W_action (activate_all|maximize|
grid_horizontal|grid_vertical).
config set PATTERN ... -- xargs COMMAND
Set PATTERN in all Desktop Files, where
COMMAND finds PATTERN. COMMAND could be:
egrep -l -e 'PATTERN' ...
edit apps APP Execute an Editor and initiate reading the
Desktop File of APP.
edit apps file Execute an Editor and initiate reading the
App File.
print [-bl|-fm] Print the App File, but edit the status name.
Option '-fm' invokes a tabspaced format with
header; the option '-bl' invokes a block by
block format.
show apps Print all raw Desktop Files.
show apps APP ... Print raw Desktop File with name of APP.
show apps -- xargs COMMAND Print all Desktop Files, where COMMAND finds
PATTERN. See: 'config set'.
show apps dir Tree App Dir.
show apps file Print raw App File.
show history Print raw History File.
show log Print raw Log File.
build dir [--new|--re] Read App File and create App Dir on the basis
of it. Option '--new' create fully new Desktop
Files; the option '--re' only rebuilds the App
Dir, so modified Desktop Files are preserved
and left over Files will be deleted.
build file Read App Dir and map its order in App File
(directional).
wins close APP Close all windows of APP on current desktop.
wins move DESKTOP APP Move all windows of APP on current desktop
to DESKTOP.
wins switch DESKTOP APP Move all windows of APP on current desktop
to DESKTOP and switch to DESKTOP.
info apps Count status of Apps in App File and give an
output.
info version Print version of Acti.
dpath Invoke 'dmenu_path'.
list List all the windows being managed by the
window manager on all desktops.
help, -h , --help Display this help.
GUI-Mode:
---------
acti Prompt a second Dmenu, where commands can be
selected.
history Like 'show history', but interactive with a
Dmenu.
list Comannd 'list', but interactive.
dpath Command 'dpath', but interactive.
GRID_HORIZONTAL Arrange all windows of an App on current
desktop in a grid of equal sizes. Acti begins
to tile horizontaly.
GRID_VERTICAL Arrange all windows of an App on current
desktop in a grid of equal sizes. Acti begins
to tile verticaly.
MAXIMIZE Maximize all windows of an App on current
desktop and set then the last activated on
top.
CLOSE_ALL Close all windows of an App on current desktop.
MV_TO_DESKTOP Prompts a Dmenu, where MV_AND_SWITCH_TO DESKTOP
moves all windows of an App on current
desktop to another desktop and switches
to that desktop. MV_TO_BUT_STAY DESKTOP does
the same, but without switching to that desktop.
CYCLE Reorders window listing. The cycle continues
clockwisely.
Außerdem habe ich die Manpage aktualisiert. Aus der Manpage:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 | EXAMPLES
--------
CLI MODE
--------
acti -gh -e 0,0,1280,400 thunar
acti reg thunar xterm task emacs
acti block claws-mail
acti reg thunar xterm task emacs block claws-mail ign firefox vlc
acti print -fm
acti gui firefox -ProfileManager
acti wins switch 1 thunar
acti config set Name=taskwarrior Exec="task next" -- task
acti config set Name=taskwarrior Exec="task next" -- xargs grep -l -e "Name=task"
acti config set Terminal=true -- task wyrd
acti config set Terminal=true -- xargs egrep -l -e "Terminal=.*"
acti config set Terminal=true -- xargs grep -l -e "Terminal=" -e "Terminal=false"
acti config set Terminal=true -- xargs grep -l -e "Terminal=false" | xargs grep -l -e "Name=task"
GUI MODE
--------
Open Acti with acti --gui and then:
history
reg thunar xterm task emacs block claws-mail ign firefox vlc
thunar
term task next
|