Hi all,
I'm running kde5 and would like to map the function key "settings" on my laptop to opening the GUI window of systemsettings5 in KDE Plasma.
For this I know what button press I must map, but I can't seem to wrap my head around what command I must run so that it gets attached to my session and the window opens. When I'm logged in and simply run "systemsettings5" it works fine. But when run from a devd script it doesn't. Any help would be appreciated. Below you can find my devd mapping script, which I known functionally works
I have tried using Xauthority, and the naked command as such but now I'm stuck. The action I'm trying to get to work is under "Ox1d) # Settings" in the script.
I'm running kde5 and would like to map the function key "settings" on my laptop to opening the GUI window of systemsettings5 in KDE Plasma.
For this I know what button press I must map, but I can't seem to wrap my head around what command I must run so that it gets attached to my session and the window opens. When I'm logged in and simply run "systemsettings5" it works fine. But when run from a devd script it doesn't. Any help would be appreciated. Below you can find my devd mapping script, which I known functionally works
I have tried using Xauthority, and the naked command as such but now I'm stuck. The action I'm trying to get to work is under "Ox1d) # Settings" in the script.
Code:
#!/bin/sh case $1 in 0x1b) # Microphone mute LEVEL=`sysctl -n dev.acpi_ibm.0.mic_led` if [ "$LEVEL" = "1" ] then sysctl dev.acpi_ibm.0.mic_led=0 else sysctl dev.acpi_ibm.0.mic_led=1 fi ;; Ox07) # Switch screen ;; Ox05) # WIFI LEVEL=`sysctl -n dev.acpi_ibm.0.wlan` if [ "$LEVEL" = "1" ] then sysctl dev.acpi_ibm.0.wlan=0 else sysctl dev.acpi_ibm.0.wlan=1 fi ;; Ox1d) # Settings /usr/bin/su dries -c 'env XAUTHORITY=/home/dries/.Xauthority DISPLAY=:0 /usr/local/bin/systemsettings5' ;; 0x14) # Bluetooth LEVEL=`sysctl -n dev.acpi_ibm.0.bluetooth` if [ "$LEVEL" = "1" ] then sysctl dev.acpi_ibm.0.bluetooth=0 else sysctl dev.acpi_ibm.0.bluetooth=1 fi ;; 0x15) # Keyboard ;; 0x11) # Favorites ;; *) esac exit 0