Collection of scripts for my Steam Deck
Reasons using polkit:
- Custom sudoers file is not being validated. Need to investigate.
sudo
doesn't work with Bash Shortcuts.
Add rules in /etc/polkit-1/rules.d/
49-sshd-nopassword.rules - Able to run systemctl start/stop sshd
without a password.
Aliases in .bashrc
and .zshrc
:
alias start-ssh='systemctl start sshd ; wp-on'
alias stop-ssh='systemctl stop sshd ; wp-off'
Shortcuts in Bash Shortcuts:
start-ssh -> systemctl start sshd
stop-ssh -> systemctl stop sshd
50-wifi-power-management.rules - Add wifi-set-power-save.sh in $HOME/.tools
. Run the script with pkexec
:
pkexec $HOME/.tools/wifi-set-power-save.sh on/off
Aliases in .bashrc
and .zshrc
:
alias wp-on='pkexec $HOME/.tools/wifi-set-power-save.sh on'
alias wp-off='pkexec $HOME/.tools/wifi-set-power-save.sh off'
Shortcuts in Bash Shortcuts:
wp-on -> pkexec $HOME/.tools/wifi-set-power-save.sh on
wp-off -> pkexec $HOME/.tools/wifi-set-power-save.sh off