You are not logged in.
I'm having troubles with keeping track of my applications in DWM.
Is there any way to run a command and figure out:
1) My running applications (xlsclients maybe?)
2) More importantly, which tag a given window is in
3) Finally, switch to that tag to view the window.
My final goal would be to incorporate it in dmenu, if possible.
My knowledge of C is quite limited, but I'm fluent in Bash/zsh, so would prefer a scritable solution.
Offline
Would it not be easier to just have an extensive rule list for your applications, and assign each application to the relevant tag(s)?
If not, there are a couple of tilers with dynamic tagging.
Just a thought. Carry on regardless... ![]()
Offline
Would it not be easier to just have an extensive rule list for your applications, and assign each application to the relevant tag(s)?
Yeah, that would be the next-best thing. I have a small screen resolution, so I kindof just uses DWM's tiling capabilities like a constant monocle-mode. So I would have one window in each tag.
Having the possibility to search through open programs via dmenu would make the whole thing a lot easier, but I don't really think that it's possible.
I've had no luck with wmctrl - Am I right when I think that DWM isn't compatible with the EWMH/NetWM specification (which is used by wmctrl)?
Last edited by graph (2012-08-23 09:26:04)
Offline
Yes: I think the suckless crew regard EWMH as some sort of abomination ![]()
Offline
You could also try Telescope, which may work pretty well for what you want: it'll show you (live) thumbnails of all your open windows with its respective name and allow you to choose and switch to its tag. Works pretty well with DWM - very fast, very lightweight - has a few bugs as it was originally intended for Maemo OS (Nokia Internet Tablets).
Last edited by Onyros (2012-08-23 11:42:03)
Offline
Just a thought. Carry on regardless...
And so I did. I just hacked a script that actually does this. It depends on xdotool and dmenu.
plugin-container is removed, since it's flash running inside Firefox in my case.
#!/bin/bash
# Search through open programs and switch to their tag
application=$(
# List all running programs
xlsclients |\
# Fix Virtualbox and LibreOffice
sed -e 's/.*VirtualBox/foobar virtualbox/g' -e 's/.*soffice/foobar libreoffice/g' |\
# Remove flash from results
grep -v "plugin-container" |\
# Show only app-names
cut -d" " -f3 |\
# Pipe to dmenu ($@ to include font settings from dwm/config.h)
dmenu -i -p "Switch to" $@
)
# Switch to chosen application
case $application in
gimp | truecrypt)
xdotool search --onlyvisible -classname "$application" windowactivate &> /dev/null
;;
*)
xdotool search ".*${application}.*" windowactivate &> /dev/null
;;
esacLast edited by graph (2013-01-03 10:54:50)
Offline
I know it's a year old but this is a very nice solution - could you tell me how I would add an app to filter out of the list.
I get Guake and clipit shown and don't want that.
You can like linux without becoming a fanatic!
Offline