[DWM] List applications and switch to tag

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.

jasonwryan wrote: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
esac
Last edited by graph (2013-01-03 10:54:50)

Similar Messages

  • In Pages 5.5.1 when I go to the Open menu I cannot get a preview of any of the files in the list using the spacebar, which I can do in every other application and finder. Is there a workaround?

    In all other applications and in the finder, if I select a document and press the spacebar I get a quickview preview of that file. It does not work in Pages when I choose Open and am given a list of files to select from. This was not the case in older versions of Pages. Is there a workaround, other than doing quickview in the Finder before going to Pages.

    On Yosemite, Pages documents that are in a package (folder) format are viewable with Quick Look in the Pages v5.5.1 file chooser. Pages documents that are in the Single File (compressed, renamed folder) format are viewable in diminished size with Quick Look. Other documents that can be opened in the version(s) of Pages on your Mac will also open properly in Quick Look from the file chooser.

  • I can't open .doc downloads with MS Office. I click tools-options-applications and Word is not in the list of choices. I browse and double click MS Office to choose it only to get more subfolders. How do I choose Office?

    When I receive a .doc (or .docx) to download from an email, open office or another similar application is chosen to open it instead of MS Office Word (have 2007 student). When I go to Tools>Options>Applications, Word does not appear on the list. When I use the Browse button, I cannot choose Word either. I double click on the MS Office folder only to get more subfolders.
    == This happened ==
    Every time Firefox opened
    == I think it's always been the case

    I have a similar problem. Even though Word is listed under Firefox applications as opening .doc files, when I try to download a .doc file, it always asks me to choose an application and I have to go through an extra three steps to open Word.

  • Since i updated my iphone to ios7, i can no longer download applications and also cannot update my apps. what happened? there is an alert popping and it tells that i should switch to Philippine store.

    since i updated my iphone to ios7, i can no longer download applications and also cannot update my apps. what happened? there is an alert popping and it tells that i should switch to Philippine store.

    Hi, sallymaesmag. 
    Thank you for visiting Apple Support Communities.
    If you are in the Philippines, check to see if the country is changed in the iTunes Store settings on the iOS device.  These steps will show you how to change the preference.
    Change your iTunes Store country
    Sign in to the account for the iTunes Store region you'd like to use. TapSettings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    Follow the onscreen process to change your region, agree to the terms and conditions for the region if necessary, and then change your billing information.
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    Once you make the change attempt to download applications again.
    Jason H.

  • HT4199 I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need a

    I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need advice.

    What type network is yu router set up for? The 4G iPod can only connect and see 2.4 GHZ networl like B, G and the 2,4 GHz N. There is also a 5 GHz N but the iPod will not even seethat network.
    See:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Recommended settings for Wi-Fi routers and access points

  • Trying to clean up my iMac.  Noticed that while in finder, I click on Applications and in the list I see another folder called applications that is a duplicator of the original folder.  Is this truly a copy that can be deleted?

    Trying to clean up my iMac.  Noticed that while in finder, I click on Applications and in the list I see another folder called applications that is a duplicator of the original folder.  Is this truly a copy that can be deleted?

    DO NOT remove either folder. DO NOT mess with any OS X system files either. If you have dupliocates check your files in iPhoto, iTunes and your iMovies libraries. Also check your data files, under ALL circumstances stay away from any OS X systems files or you will probably bork your Mac to the point it will not run.

  • I have mac 10.6.8 and safari 5.1.10. on checking help website i am told latest flash player 16.0.0.305 is already installed BUT is not listed in my applications and unable to access sites requiring flash player. can anyone help?

    i have mac 10.6.8 and safari 5.1.10. on checking help website i am told latest flash player 16.0.0.305 is already installed BUT does not appear on my list of applications and am unable to access websites requiring it. have also downloaded flash player installer app but unable to download the flash player itself. can anyone help? thank you!

    Hi Anne,
    Your version of Safari is still supported.  Please see Adobe Flash Player | Tech specs for supported OS and browsers.
    If the Flash Player plugin is in the Plug-ins (disabled) folder it's because it's an older version that Apple has disabled in Safari.  This has nothing to do with whether or not Flash Player supports the browser.
    I'm not sure what you mean by "when i click on flash player itself i am told there is no application to open it."  Flash Player.plugin only works in the browser to view Flash content in the browser.  The plugin does not open files outside of the browser.  If you have SWF files you'd like to view outside of the browser, then you'll need the Flash Player projector. However, based on your previous comments this doesn't appear to be what you are trying to do.
    Google Chrome does embed Flash Player in it, while Firefox does not.   Mozilla has also recently started blocking older versions of Flash Player in Firefox similar to what Apple is doing in Safari.
    Following the 'clean install' instructions should result in you having the latest version of Flash Player installed that will not be blocked by the browser.
    Maria

  • New Mac Mini Server, two Hard drives, Can I install an older Mac OS on the second drive and switch start up disks to run PowerPc applications?

    New Mac Mini Server, has two Hard drives, could I install an older Mac OS on the second drive and switch start up disks to run PowerPc applications?

    I haven't purchased a Mac Mini at this time and I may not if I can't use it as a non server. I need to update my system I would be better off buying a new Mac with Snow Leopard the last app that will run Rosetta. The Mac Mini Server has a quad 2.0 processor and 4 GB RAM and two internal hard drives and should out perform my dual 1.25 G4. I can run PPC apps on my G4 but it is 8+ years old and seems to be getting noisy. I don't want to tie myself to another old machine. I want a machine that will work with Intel Apps I was hoping that the two hard drives would allow me to boot from the second with Snow Leopard and use Lion on the first drive to be able to keep up to date with all my other universal apps and Mac OS up grades. The application I use the most is my CanvasX app with drawing & vector effects, text & typography, sprite technology, painting, image editing, and multimedia tools are all in this one app but will not be updated to run Intel apps. I am frozen in time because my most valuable Application won't be updated and Apple has cut me off by not supporting PPC in Lion and onward; Apple used to backward support but I guess that they are no longer as user friendly and concerned with a happy user. I have always been a loyal Mac user and I will not migrate to Windows under any circumstance; I hate windows!
    Thanks for your prompt response,
    Dick Deaton

  • How to save a list of open applications and files?

    Many times I need to turn off my computer but I have many things open. A friend tells me to use <sleep> but sometimes I have to still turn off my computer for a reason. Is there a way to create a list of all the open applications and files that when I turn on my computer I know where I last worked? Maybe there is a way to do this automatically without writing down on paper? My english is not the best and I am sorry. Thank you.

    Thank you Smokerz and ademsemir. I like alot both ideas that you have. Sometimes I will use one and sometimes I will use the other one. Maybe I can explain better what I am thinking to do. If I have 4 applications that I am using and different files in applications I hope to make a list of everything. I use Excel, Word, Preview, and Mail all the time. If I leave open emails when I close Mail then the same emails will open when I run Mail the next time. That is perfect for me. Excel, Word, and Preview only show the recent files I use if I close the applications and use them later. If I use shiftcommand4 it helps me alot because I click on Window and take a picture of the open files. I like shiftcommand3 also it helps if I use Expose and take a picture of the screen but the files with long names will cut off.
    I try also Activity Monitor and Force Quit because they show me applications that I use but they do not show the files. If I have alot of things open in Firefox that I will use again but do not have time I use Bookmark All Tabs.
    It is ok if you do understand what I ask. What you told me will help me. Thank you.

  • Task Manager and/or Grocery List application ideas?

    Looking for Task Manager and Grocery List applications that will sync my Mac with my iPhone. Do you know of any? Zenbe is not really what I am looking for.

    EVERNOTE
    Have you looked at evernote? Syncs over the air with the desktop client. You can create notes, checklists (with checkboxes) and even audio notes that all sync.
    I use it more for notes, as I use Remeber the Milk for to do... but Evernote might be worth looking at, it is free.

  • My ipad is stolen ,, and i want to reopen find my ipad application because as i know once the ipad switched off and switched on again the application needs to be reopened ,, any one can help me please to find my ipad again

    my ipad is stolen ,, and i want to reopen find my ipad application because as i know once the ipad switched off and switched on again the application needs to be reopened ,, any one can help me please to find my ipad again

    Stolen
    http://support.apple.com/kb/HT5668
    Erase iPad
    http://support.apple.com/kb/ph2701
    Lost Mode
    http://support.apple.com/kb/PH2700
    Reporting lost or stolen iPad
    http://support.apple.com/kb/HT2526

  • Table to store the list of BSP Applications and View Names

    Hi,
    Please let me know the tables used to store the list of BSP Application and the corresponding View Names.
    Thanks and Regards,
    Pavithra

    Table name is O2PAGDIR.
    ~Salil

  • Follow-up: Starting, Launching and Switching ...

    Follow-up: Starting, Launching and Switching ... Messing around with the Windows UI - not a feature problem, but a provisioning problem! Now start listening and please fix it this time! 
    (Is it still program managers or people in power designing the UI for Windows? It certainly does not look like domain specialist or software engineering designing the solution here - it's just too weak for that to look like a professional solution?
    Please let educated people do their work ...)
    Problem:
    - Task Bar = (is and still is originally) Start. So keep promoting task bar and kill the new Start. Task Bar is Start.
    - Virtual Desktop lacks virtual Start (= virtual Task Bar) (Virtual Desktop only have virtual launch from the virtual documents (the virtual desktop) ... you need to add virtual start beyond virtual launch.
    - Starting universal Windows apps including touch goes to the virtual task bar (add virtualization above, i.e. context changes - for touch meaning i.e. increasing the task bar (Start) areas height)
    Cause:
    Steven Sinofsky:
    @Computermensch writes “The problem with this "analysis" (show me the data) is that you're only managing current activities surrounding the taskbar. So with respect "to evolving the taskbar" you're only developing it within its
    current operational framework while developing or evolution of it really should refer to developing the taskbars concept.” 
    0) A history reminder - where is Windows 10 now starting program: Back where Windows 7 left off.
    Well, guess I do not have to remind about what happened to Windows 8. Now we're back at it. Welcome back to testing ...
    I did some of them, testing Windows client for Windows Vista, Windows 7, Windows 8 and now Windows 10.
    Let's go back in time to 2008 - Engineneering Windows 7: 
    Follow-up: Starting, Launching, and Switching
    http://blogs.msdn.com/b/e7/archive/2008/09/29/follow-up-starting-launching-and-switching.aspx
    Steven Sinofsky:
    @Computermensch writes “The problem with this "analysis" (show me the data) is that you're only managing current activities surrounding the taskbar. So with respect "to evolving the taskbar" you're only developing it within its
    current operational framework while developing or evolution of it really should refer to developing the taskbars concept.” 
    Then let's go forward in time - to Windows 8 coming up with a new start and launch context namely the Start Screen - and now kind of back in time again to Windows 7 and the desktop using Windows 10. So now we're also back to the Task Bar!!!! Hence we're
    back to developing and evolving the way of Starting programs.
    Microsoft just have a serious problem working the provisioning in it system, i.e. what concepts you supply (provision) to the user. For instance just compare an open instance of Windows Explorer with MacOS Finder. It's the same features - but the provisioning
    is just much better in Finder. The concepts are just an important mess in Windows - and needs serious clean up.
    No new features! Evolvle the pinning (task bar and make it work with the virtual desktop - including touch (just add some height man ...).
    And fix the freaking provisioning of concepts in the All Apps list. For instance take a look at the naming in Linux for some standard folders - instead of the bloating 3rd party names.
    1) Provisioning: Now back to Windows 10 and starting programs
    It's the task bar that needs development (Windows 8 kind-of "Start Menu" in Windows 7)  Take a look at my comment above again for engineering Windows 7 about the taskbar on evolution - now in context with Virtual Desktops:
           - May add some height to the task bar - and you can have kind-of tilesized stuff there.
           - Have the taskbar configuration of pins switch (be variable) with the virtual desktop. May add an ekstra feature to pin program across all virtual desktops.
           - Do not have 2 different places for pinning programs (really bad provisioning ...). Lets see some nice categories instead when pressing the start button. It really confusing pressing the start menu button - and
    then you see a place like the task bar to pin programs. Typical Microsoft end up scenario, the more, the merrier ...
    Please cut it down to having a pinning feature working variably in context (the task bar) with virtual desktops.
    2) Finally the All Apps list pressing the start menu button: using navigation (categories, tags or filters!!!!!) to look up and finding programs not in use on a daily or weekly basis - now in context with the virtual desktop
    The All Apps list that needs a nice feature to support categorization, really better provisioning in the UI of user or standard concepts (now come on, man - fix the mess. Just take a look at the complexity in that list ...). You could add a feature
    to filter the All Apps list in context with the concepts for the virtual desktop.
    At least provide the application infrastructure for categorization in the Start Menu. So you could process it as a third party. See what happens. Add app store later then. Whatever. Make categorization happen. No more bloat navigating for programs.
    Add a template feature to the categorization. Provide 2-3 templates with Windows and let people tag there programs. Let them extend the templates ... the concepts when doing their own user concepts.
    With a template feature a user just have to fill in the blanks i.e. tag his/her programs - and the menus will parse equally. Hey, the template feature could even parse into virtual desktops. I.e. using a dev variant of a template.
    It's going to be 2015. And compositional software design have been around for some time. Including factories for configuring software variability. Some come on now. Let's work.
    4) Conclusion
    360 degrees now on virtual desktops, task bar, all apps and workflow please! Make it happen.
    The problem with Windows 8 was not bad features - but bad provisioning including empty programs like the new wau media players ... underdeveloped features (no really good quantity of content demonstrating value = bad provisioning) ... completely lack of
    demonstrating the value of the new UI. Like if Sharepoint or any other CMS was demonstrated completely blank with no sites and empty features, no templates. Just nothing.
    Please do not miss the oppertunity to demonstrate the value of an evolved UI this time.
    Please complete the provisioning. Your greatest problem is releasing undone things - may be the intension is there (recall DB schemas). However the "DB extension" is empty on release? Which consumers just buy the DB schema :o). Add some "movies"
    (content) please ... add frameworks for content and provisioning ... use templates. If you do not understand this ... go away program manager ;o) Let a good software engineering read it.
    Now let's fully develop the virtual features in the desktop in Windows 10. And have them provisioned - so people can see how to use them. That unfortunately never happened during engineering in Windows 8.

    3 different ways and displays for pinning a program for Start!
    Please consider merging Start (on the Start), Start Screen and the task bar - with pins extending the Task Bar and using the Metro UI icons overall including on the desktop. It would be a nice move on the look and feel - while the task bar would be
    the same. Add virtualization for pins as well on the task bar. Make shortscuts and docs on the virtual desktop actual as well - binding dynamically to a virtual desktop - instead of formal and static.
    Just observed the Start Screen can be turned back on using properties on the Task Bar.
    Many ambigious concepts now for Starting programs instead of just using a Consolidated Start concept for Start Screen, Start on the Start Menu and Task bar.

  • Command-tab pop-up list of apps switches monitors

    The command-tab pop-up list of apps switches monitors sometimes on my two-monitor system. Why? Why doesn't it always appear on the monitor with menubar specified in Displays preference panel? How do I switch it back when it moves to the wrong monitor? Very annoying because I can't figure out why it moves to the other monitor in the first place!  (actually running OS X 10.9.4 -- not Mavericks -- but you don't seem to have a community for OS X 10.9)

    That unfortunately doesn't work. I just tried it. For the last couple minutes, the command-tab app list has been appearing on my "main" monitor (the one I selected in Display prefs to have the menu bar). When I click in my "secondary" monitor to highlight its menu bar and then type command-tab, the app list still appears on the main monitor. Doesn't make a difference whether I click on the desktop background or a Finder window or an app window on the secondary monitor, when I hit command-tab the app list still appears on the main monitor. And all of that is OK. I'd like to have the command-tab app list ALWAYS appear on the main window.
    The problem is that sometimes the app list switches to the secondary monitor and I don't know why. And after that happens, I can click all I want on the main monitor -- desktop, Finder window, application window -- and the app list still appears on the secondary window when I type command-tab. I'll give up trying to make it switch to the main window and then, at some point, I'll notice that it has switched back to the main window. I can't figure out why it has this behavior, which seems to be random. Or at least I can't figure out what to do to make the pop-up app list return to the main window.

  • Artwork, podcast notes and editing ID3 tags

    Hello
    I'm trying to get to a point where information about the content of my show appears on the iPod, in iTunes and any other podcatching application/mp3 player. In my case that would be a artist/track listing of the music featured on my podcast.
    I tried editing the ID3 tags under the 'media' tab in Libsyn by inserting the artist/track listing into the comments box but that didn't work. I then read about how to edit the ID3 tags using iTunes but that seemed to refer to editing the tags in a dowloaded podcast and not the tags on a podcast uploaded to Libsyn's server.
    So, how do I edit my ID3 tags to achieve the results I'm looking for?
    Oh.....and I'm also trying to do that thing where my logo will appear in iTunes and on an iPod when the podcast is playing but I'm not having much luck there either. I can't get the logo to appear in my iPod at all. I'm able to get it to appear in the flip section at the top of iTunes but shouldn't it also be in the bottom left hand corner of the iTunes window?
    Thanks
    Neil

    I tried editing the ID3 tags under the 'media' tab in
    Libsyn by inserting the artist/track listing into the
    comments box but that didn't work. I then read about
    how to edit the ID3 tags using iTunes but that seemed
    to refer to editing the tags in a dowloaded podcast
    and not the tags on a podcast uploaded to Libsyn's
    server.
    When you edit the ID3 tags in iTunes, the information is stored in the file. When this file is subsequently uploaded to a server, and then downloaded by a user, the tags carry through and are available to the user's iTunes/iPod. So you need to use iTunes to add whatever ID3 tags you want before uploading your file.
    Hope this helps,
    Greg.

Maybe you are looking for

  • Uploading songs

    I recently bought a 60 gb ipod photo. however, when i try to upload songs onto it, it has an error message that says "the disk could not be read from or written to." this is an inconsistent message and occasionally one or two songs will work. i have

  • Need help with photo frame

    Below is a quick frame I made to re-use on my photos, which I overlayed onto an image.  I set the Blending Mode to Screen for the Frame Layer. The problem I am having is that when I try to reverse the colors on the frame, so that the border is Black,

  • Best practices in implementation of MDM

    Hi ALL, What are the best practices for implementation of MDM? Regards, Pramod

  • Error code: ICF-IE-http -c: 201 -u: ***** -l: E -s: DEV  -i: server1_DEV_0

    Hello, I am trying to run a web service in SICF and codes in SE80, but get this error when I browse through it. Pleae assist. The following error text was processed in the system DEV : Communication failure The error occurred on the application serve

  • Adobe Scout 1.0 - Getting Started Guide.pdf

    is this now or will this document be publically available? if yes, what url? if no, is there any problem if i include this file in a collection of files linked to an article i've written for adobe.com?