mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 00:56:39 +02:00
- Updated keyswap service template and added service.sh install script
This commit is contained in:
24
keyswap_service.sh
Normal file
24
keyswap_service.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
swapbehavior=$1
|
||||
newparams=$2
|
||||
noswapcmd=$3
|
||||
|
||||
if [[ "$swapbehavior" == "yes" ]]; then
|
||||
swapcmd="/bin/bash /home/`whoami`/.config/xactive.sh $2"
|
||||
|
||||
cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service
|
||||
sed -i "s/{username}/${whoami}/g" ~/.config/systemd/user/keyswap.service
|
||||
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
|
||||
else
|
||||
#/usr/bin/setxkbmap
|
||||
#/usr/bin/xkbcomp
|
||||
#echo $XDG_SESSION_TYPE
|
||||
if [ ! -f "~/.Xsession" ]; then
|
||||
echo "$noswapcmd" > ~/.Xsession
|
||||
fi
|
||||
grep "xkb" ~/.Xsession 1>/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "$noswapcmd" >> ~/.Xsession
|
||||
fi
|
||||
fi
|
@@ -9,7 +9,7 @@ Group={username}
|
||||
Environment=DISPLAY=:0
|
||||
Restart=always
|
||||
WorkingDirectory=/home/{username}/.config/
|
||||
ExecStart=/bin/bash /home/{username}/.config/xactive.sh {parameters}
|
||||
ExecStart=
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user