View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sat Jul 06, 2013 5:18 pm Post subject: Awesome Window Manager Assign Key Question |
|
|
For awesome window manager, is it possible to to assign a key to spawn a window and afterwards that key will bring that window into focus whenever? For instance, I would like to have F1 spawn a urxvt window. Then, later on if I want to go back to this same window all I have to do is hit F1 again. I plan on using 2 screens and I prefer floating windows. |
|
Back to top |
|
|
gfaccin Tux's lil' helper
Joined: 20 Aug 2004 Posts: 120
|
Posted: Wed Jul 10, 2013 5:49 pm Post subject: |
|
|
To assign a key to launch an app, in your rc.lua:
Code: |
awful.key({ modkey, }, "f", function () awful.util.spawn_with_shell("firefox") end),
|
This example will launch firefox when you press the Win+f keys.
Now for the key recalling a specific window, I don't know how to do it. Perhaps you might need to do some harder scripting using the application process id upon launch. |
|
Back to top |
|
|
Spidey Apprentice
Joined: 07 Sep 2006 Posts: 269
|
Posted: Thu Jul 11, 2013 11:39 pm Post subject: |
|
|
If you'd like to simulate Windows 7/8 or OS X or Unity's behavior, you can write a shell script to search for a window with the given class or title, and give focus to it, or, if you can't find it, spawn the process. Awesome docs recommend using xprops IIRC to read window properties. You could do the same. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|