From dbbd4e46ecc0edc82a2dbee7631108ba6e2e96ea Mon Sep 17 00:00:00 2001 From: "Sicelo A. Mhlongo" Date: Mon, 7 Aug 2023 00:08:44 +0200 Subject: [PATCH] device-nokia-n900: let user choose power button action (MR 4312) Offer user a choice between suspend, shutdown, and reboot when power button pressed. [ci:skip-build]: already built successfully in CI --- device/community/device-nokia-n900/APKBUILD | 4 ++-- device/community/device-nokia-n900/i3wm/i3wm.conf | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/device/community/device-nokia-n900/APKBUILD b/device/community/device-nokia-n900/APKBUILD index 1905a3ba0..4dffdcefd 100644 --- a/device/community/device-nokia-n900/APKBUILD +++ b/device/community/device-nokia-n900/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Sicelo # Co-Maintainer: Danct12 pkgname=device-nokia-n900 -pkgver=9.1.4 +pkgver=9.1.5 pkgrel=0 pkgdesc="Nokia N900" url="https://postmarketos.org" @@ -182,7 +182,7 @@ e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b11 2463008d270ed09342f15b51f24ea455bd884021f95397991b85616b6840a6608d91cd1fc43186094f5c3d1bd25e88c16aa9ead07b018aea3d93cd2359bba0b1 deviceinfo f90dcdd310595adf9e00f1eb1032461bd1666fff21eb18615f8e9ef48fff4f872abd3ca7c765fab50957b056a30330e49b5d1e399fc8690f4f9735ccc0eec145 modules-initfs 826a3790b49324c1e61c75b6c0ffc043a2a1d7c13a8c554fb5eae4977af47a1ca93d70ef8c783d712b953b70e18ae58fa4c6a49bf97263398a01a0c4f91ebc8f i3blocks.conf -c8512bb9fd77b265d89ceb25c7a5ee1eac379b2433eb6e6255908b9cd0c27da768258b37d1dde4be3997c9ab50002a787d07f32e4f9b62d3165cfa6f11372826 i3wm.conf +8483ca7e7cea8de041983239d1a2bf64d6af15adcf3fc36dfcdc8ade14e8999b7db0109cf9896140990fe72d2588c9fb3f23b542c6e032950a4ffd18de663dee i3wm.conf 0b80af9fd1f36e6bc06bdfdf48352897234ac7457210649016665da8570a5a64b8a0841b4fbeb64fd7054a5246a64718cf4412f8a53024ce39b28a80984972d8 protip_shell.sh 2ae4771eda9b151de3b47dc4e3081eb86b92fc04c4be4b4fbb98c28016762d24008e935bbba8f95ea0732019f615ee43f5d93dacb21bdc3471e505a07a684e26 battery-bq27200 d9ef88c714e9fce8822f63b7a9d7fc3e1ed472c8c876b44ba524d44efea322839f13ddd2fa652420608427ecf7279bfaac302c9b67667f32796ca21da332164d calendar diff --git a/device/community/device-nokia-n900/i3wm/i3wm.conf b/device/community/device-nokia-n900/i3wm/i3wm.conf index b1ad64321..d7d29feb9 100644 --- a/device/community/device-nokia-n900/i3wm/i3wm.conf +++ b/device/community/device-nokia-n900/i3wm/i3wm.conf @@ -63,8 +63,12 @@ bindsym Shift+space mode "command" # This is the slidey button on the side bindsym XF86ScreenSaver exec --no-startup-id lock.sh -# Pressing the power button suspends the device -bindsym XF86PowerOff exec --no-startup-id loginctl suspend +# Pressing the power button offers reboot, shutdown, or suspend choice +bindsym XF86PowerOff exec --no-startup-id i3-nagbar \ + -m 'Choose Power Button Action:' \ + -b 'Reboot' 'loginctl reboot' \ + -b 'Suspend' 'loginctl suspend' \ + -b 'Shutdown' 'loginctl poweroff' # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available)