summaryrefslogtreecommitdiff
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/stackrpms-acer-chromebook/fluxbox.keys2
-rw-r--r--src/etc/stackrpms-acer-chromebook/fluxbox.startup25
-rw-r--r--src/etc/sysconfig/disable-powerbutton8
3 files changed, 22 insertions, 13 deletions
diff --git a/src/etc/stackrpms-acer-chromebook/fluxbox.keys b/src/etc/stackrpms-acer-chromebook/fluxbox.keys
index 96865cd..06aa158 100644
--- a/src/etc/stackrpms-acer-chromebook/fluxbox.keys
+++ b/src/etc/stackrpms-acer-chromebook/fluxbox.keys
@@ -201,5 +201,5 @@ Mod4 Mod1 80 :MacroCmd {ResizeTo 34% 33%} {MoveTo 33% 00% Up}
Mod4 Mod1 81 :MacroCmd {ResizeTo 33% 33%} {MoveTo 67% 00% Up}
# Acer Chromebook C720 keys, React to power key
-# The ability to use this depends on elogind-inhibit!
+# The ability to use this depends on disable-powerbutton-daemon (elogind-inhibit)
124 :Exec logout-manager-gtk
diff --git a/src/etc/stackrpms-acer-chromebook/fluxbox.startup b/src/etc/stackrpms-acer-chromebook/fluxbox.startup
index ef8cd5a..2b1d644 100644
--- a/src/etc/stackrpms-acer-chromebook/fluxbox.startup
+++ b/src/etc/stackrpms-acer-chromebook/fluxbox.startup
@@ -1,35 +1,36 @@
#!/bin/sh
-# File: /etc/stackrpms-acer-chromebook/fluxbox.startup
-# Location: stackrpms-acer-chromebook package
+# File: /etc/stackrpms-thinkpad-p50s/fluxbox.startup
+# Location: stackrpms-thinkpad-p50s package
# Author: bgstack15
# Startdate: 2019-12-26
# SPDX-License-Identifier: GPL-3.0
# Title: Common fluxbox startup file for Thinkpad P50s platform
-# Package: stackrpms-acer-chromebook
+# Package: stackrpms-thinkpad-p50s
# Purpose: standardize fluxbox config across systems
# History:
# 2019-12-26 started on ltb-018 from fluxbox startup example
# 2022-11-03 adapted for this package
# 2023-12-12 revised to be consistent across bgconf and stackrpms-thinkpad-p50s
-# 2024-04-30 adapted for acer chromebook package
+# 2024-04-30 update disable-powerbutton-daemon, copyq, centralized xmodmap
# Usage:
# symlink your ~/.fluxbox/startup to this file with:
-# ln -sf /etc/stackrpms-acer-chromebook/fluxbox.startup ~/.fluxbox/startup
+# ln -sf /etc/stackrpms-thinkpad-p50s/fluxbox.startup ~/.fluxbox/startup
# Reference:
# ltb-018:~/.fluxbox/startup
# Improve:
# Documentation:
-# last modified: 2022-11-03-5 14:28
+# last modified: 2024-04-30-3 17:06
# Change your keymap:
-test -f /etc/stackrpms-acer-chromebook/Xmodmap && xmodmap /etc/stackrpms-acer-chromebook/Xmodmap
-test -f .Xmodmap && xmodmap ".Xmodmap"
+find /etc/stackrpms-*/Xmodmap .Xmodmap -maxdepth 0 -exec xmodmap {} \; 2>&1 | grep -vE '\*\/Xmodmap.: No such' || :
echo "${PATH}" | grep -q "${HOME}/bin" 1>/dev/null 2>&1 && export PATH="${HOME}/bin:${PATH}"
+# If present, suppress power button immediate shutdown, e.g., on a Chromebook
+disable-powerbutton-daemon &
+
# for vlc on hidpi screens
-export QT_AUTO_SCREEN_SCALE_FACTOR=0
-export QT_SCREEN_SCALE_FACTORS=1
+export QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=1
# Applications you want to run with fluxbox.
which fbautostart > /dev/null
@@ -41,8 +42,8 @@ fi
spacefm --desktop &
start-pulseaudio-x11 &
-volumeicon &
-copyq &
+volumeicon &
+( sleep 8 ; copyq ; ) &
xscreensaver -nosplash &
# This might be redundant if /usr/share/services/com.example.Notifications.service but will not hurt.
/usr/lib/notification-daemon/notification-daemon &
diff --git a/src/etc/sysconfig/disable-powerbutton b/src/etc/sysconfig/disable-powerbutton
new file mode 100644
index 0000000..34c1fc3
--- /dev/null
+++ b/src/etc/sysconfig/disable-powerbutton
@@ -0,0 +1,8 @@
+# Config file for disable-powerbutton-daemon
+# Running that program is designed to suppress the default behavior of the power button which is to shut down immediately.
+# DP_WHAT Which elogind-inhibit behaviors to control.
+DP_WHAT="shutdown:sleep:idle:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch"
+# DP_COMMAND which program to run, and when this program ends, the inhibition ends.
+DP_COMMAND="/usr/libexec/stackrpms-acer-chromebook/disable-powerbutton-loop"
+# When this file exists at the end of a sleep loop, the loop ends and therefore the inhibition ends.
+DP_SAFETY_FILE=/tmp/stop-disable-powerbutton
bgstack15