Disable the Power Button or make it do something else
#3
(05-30-2021, 10:35 PM)rimaille Wrote: Hi, dont know for i3, on sway i did :

1/ inhibit powerbutton in systemd/logind.conf

HandlePowerKey=ignore

2/ sway/config

# power button
bindsym XF86PowerOff exec ~/bin/wayland_toggle_screen.sh

3/ with wayland_toggle_screen.sh :

#!/bin/sh
read lcd < /tmp/lcd
    if [ "$lcd" -eq "0" ]; then
        swaymsg "output * dpms on"
        echo 1 > /tmp/lcd
    else
        swaymsg "output * dpms off"
        echo 0 > /tmp/lcd
    fi

it works nice (powerbutton does switch screen on/off)
Hi. I did 1 and for 2 I added this line to the shutdown code:


# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
bindsym XF86PowerOff mode "$mode_system"

My only thought is maybe its a different key code on ANSI keyboard?
  Reply


Messages In This Thread
RE: Disable the Power Button or make it do something else - by User 22018 - 06-01-2021, 01:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to make a bootable microSD card myself600 15 7,526 09-27-2022, 01:45 PM
Last Post: myself600
  Loud distorted speaker sound when connecting to power supply myself600 2 1,621 09-21-2022, 12:11 PM
Last Post: myself600
  How to make manjaro sleep or hibernate? KDE? regretfulpineuser 0 1,204 06-20-2022, 12:56 AM
Last Post: regretfulpineuser
  red/green power led not working with kernel 5.14 alchemist 4 4,527 11-04-2021, 04:09 AM
Last Post: alchemist
  Power LED flashing red/green... appelgriebsch 3 6,007 09-05-2021, 07:59 PM
Last Post: dealie
Question How do I disable autologin on TwisterOS? TDC_PBP 3 3,978 08-27-2021, 11:44 AM
Last Post: TDC_PBP
  Pinebook Pro Manjaro Power Savinng Tips HelpMyBatteryIsDraining 1 2,911 06-15-2021, 08:42 AM
Last Post: moonwalkers
  Make it easy? wdt 0 1,866 09-10-2020, 10:05 PM
Last Post: wdt
Information How to make the Manjaro Gnome image update TDC_PBP 2 4,763 07-13-2020, 02:24 PM
Last Post: TDC_PBP
  power button bsammon 3 5,312 03-25-2020, 02:20 PM
Last Post: bsammon

Forum Jump:


Users browsing this thread: 1 Guest(s)