HikariKnight / material-awesome

Material and Mouse driven config for AwesomeWM 4.3
MIT License
126 stars 52 forks source link

Any way to call the exit screen by a keybinding? #17

Closed thepenguinthatwants closed 2 years ago

thepenguinthatwants commented 3 years ago

Hi, Your exit_screen looks super nice. I am a keyboard based person so I was wondering if there is any easy way to implement calling exit_screen by keybinding. As the exit-screen is module I am curious if its possible and easy to just include it in my own awesome setup.

I am quite new with lua and awesome so being getting load of errors without success. I added this.

require('module.exit-screen')

I guess it could somehow map the keybinding to call

'module::exit_screen:show',

HikariKnight commented 3 years ago

i am quite new to lua myself as this is a fork from the original project with some new stuff from another project added into it, but i will have a look and see if i can get it to load. for some reason github didnt notify me about this issue so i missed it, sorry for the extremely late reply @thepenguinthatwants

HikariKnight commented 2 years ago

@thepenguinthatwants hey, this should be as simple as adding

awesome.emit_signal('module::exit_screen:show')

into the hotkeys function block like this example

awful.key(
        {'Control', altkey},
        'Delete',
        function()
            awesome.emit_signal('module::exit_screen:show')
        end,
        {description = 'Show end session screen', group = 'awesome'}
    ),

PS: actually gone ahead and made this part of the default config now

HikariKnight commented 2 years ago

@thepenguinthatwants implemented in the newest commits now :)