Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Awesome Window Manager Assign Key Question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 737

PostPosted: Sat Jul 06, 2013 5:18 pm    Post subject: Awesome Window Manager Assign Key Question Reply with quote

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
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 95

PostPosted: Wed Jul 10, 2013 5:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 256

PostPosted: Thu Jul 11, 2013 11:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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