You are not logged in.

#1 2012-07-24 03:19:31

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

[SOLVED] quit confirmation on awesome wm

My lua skills are beginner at best, but does anyone have a quick script or tip to provide an "Are you sure?" confirmation for the awesome WM "quit" action - mapped to Meta-Shift-Q by default...

I have on occassion accidentally hit that command when I meant the Kill window key instead....Kills all open windows, apps. Not fun.

Last edited by twelveeighty (2012-07-25 14:50:25)

Offline

#2 2012-07-24 08:31:18

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: [SOLVED] quit confirmation on awesome wm

Probably not what you're looking for, but why don't you just map the quit action to Mod+Ctrl+Shift+q
Should make it quite clear to your fingers that you definitely want out wink

Edit: or remap your quit window action to something else (eg Mod+Shift+c)

Last edited by JackH79 (2012-07-24 08:33:13)

Offline

#3 2012-07-24 19:12:30

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [SOLVED] quit confirmation on awesome wm

Yeah, I guess. I was hoping that was an easy way to get a prompt at the top bar, where you type to launch a new process, and I would just type 'Y' to close awesome after the Quit command.

Offline

#4 2012-07-24 19:18:02

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] quit confirmation on awesome wm

twelveeighty wrote:

I have on occassion accidentally hit that command when I meant the Kill window key instead

I'm honestly curious why and how often you have to kill windows. I don't use Awesome, so I may not understand, but don't most windows have their own "close" mechanism (you close the app, or exit the shell, or...). I use ratpoison, and I can't even remember what the "kill window" command is mapped to, that's how infrequently I need it.

Offline

#5 2012-07-24 19:21:55

ecmel
Member
Registered: 2012-02-13
Posts: 29
Website

Re: [SOLVED] quit confirmation on awesome wm

twelveeighty wrote:

My lua skills are beginner at best, but does anyone have a quick script or tip to provide an "Are you sure?" confirmation for the awesome WM "quit" action - mapped to Meta-Shift-Q by default...

I have on occassion accidentally hit that command when I meant the Kill window key instead....Kills all open windows, apps. Not fun.


I use dmenu for the task:

cnfrm = "echo -e 'No\nYes' | dmenu -p Quit?"

quit = function()
    if awful.util.pread(cnfrm):sub(1, 3) == "Yes" then
        awesome.quit()
    end
end

Offline

#6 2012-07-24 21:48:16

derhamster
Member
Registered: 2012-07-08
Posts: 86

Re: [SOLVED] quit confirmation on awesome wm

Also have a look at how the myawesomemenu is created and how it is shown with meta+w.
That way you don't need dmenu.

Last edited by derhamster (2012-07-24 21:48:31)

Offline

#7 2012-07-25 03:37:52

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [SOLVED] quit confirmation on awesome wm

2ManyDogs wrote:

I'm honestly curious why and how often you have to kill windows. I don't use Awesome, so I may not understand, but don't most windows have their own "close" mechanism (you close the app, or exit the shell, or...). I use ratpoison, and I can't even remember what the "kill window" command is mapped to, that's how infrequently I need it.

In awesome that kill is the equivalent of clicking the x on the top right of a window in other, "less than awesome" WMs. It's not the kill shell command. Some popup windows and mostly Java apps have to be closed that way. Nothing serious, as long as you don't confuse it with the Quit keyboard shortcut.

Offline

Board footer

Powered by FluxBB