mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
i3/config: fix fullscreen lock disabling
This commit is contained in:
12
.config/i3/disable-standby-fs.py
Normal file → Executable file
12
.config/i3/disable-standby-fs.py
Normal file → Executable file
@ -16,16 +16,16 @@ args = parser.parse_args()
|
||||
|
||||
def on_fullscreen_mode(i3, e):
|
||||
if e.container.props.fullscreen_mode:
|
||||
call(['xset', 's', 'off'])
|
||||
call(['xset', '-dpms'])
|
||||
call(['xautolock', '-disable'])
|
||||
print("disabling autolock")
|
||||
else:
|
||||
call(['xset', 's', 'on'])
|
||||
call(['xset', '+dpms'])
|
||||
call(['xautolock', '-enable'])
|
||||
print("enabling autolock")
|
||||
|
||||
def on_window_close(i3, e):
|
||||
if e.container.props.fullscreen_mode:
|
||||
call(['xset', 's', 'on'])
|
||||
call(['xset', '+dpms'])
|
||||
call(['xautolock', '-enable'])
|
||||
print("enabling autolock")
|
||||
|
||||
i3.on('window::fullscreen_mode', on_fullscreen_mode)
|
||||
i3.on('window::close', on_window_close)
|
||||
|
Reference in New Issue
Block a user