mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-01 16:56:38 +02:00
- WIP - Broken state while rewriting initial install files, and GUI interface.
This commit is contained in:
@@ -17,7 +17,7 @@ if [[ "$swapbehavior" == "1" ]]; then
|
||||
cp ./system-config/xactive.sh ~/.config/xactive.sh
|
||||
cp ./system-config/keyswap_toggle.sh ~/.config/keyswap_toggle.sh
|
||||
cp ./kintox11/binary/kintox11_ubuntu19-10 ~/.config/kintox11
|
||||
cp ./kintox11/binary/appnames.csv ~/.config/appnames.csv
|
||||
cp ./kintox11/binary/kinto.json ~/.config/kinto.json
|
||||
sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service
|
||||
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
|
||||
systemctl --user enable keyswap
|
||||
|
@@ -1,70 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemtype=$1
|
||||
internalid=$2
|
||||
usbid=$3
|
||||
swapbehavior=$4
|
||||
|
||||
# echo $1 $2 $3 $4
|
||||
|
||||
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
|
||||
fallbackcmd_gui=""
|
||||
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||
check_gt="setxkbmap -query | grep -v 'swap_alt_win' 1>/dev/null"
|
||||
check_tg="setxkbmap -query | grep -q 'swap_alt_win'"
|
||||
# mac_only is for apple keyboards without an apple hid driver
|
||||
elif [[ "$systemtype" == "mac_only" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||
swapcmd_term="setxkbmap -option"
|
||||
# Chromebook options
|
||||
elif [[ "$swapbehavior" == "both_mac" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
swapcmd_term="setxkbmap -option;setxkbmap -device $internalid -option 'altwin:swap_alt_win'"
|
||||
elif [[ "$swapbehavior" == "both_win" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY; setxkbmap -device $usbid -option altwin:ctrl_alt_win"
|
||||
fallbackcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
elif [[ "$swapbehavior" == "none" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
fi
|
||||
|
||||
eval "$swapcmd_gui"
|
||||
|
||||
# If running gnome this will disable the overlay-key mapping
|
||||
gsettings set org.gnome.mutter overlay-key ''
|
||||
kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta ""
|
||||
qdbus org.kde.KWin /KWin reconfigure
|
||||
|
||||
./kintox11 |
|
||||
while read -r id; do
|
||||
if [[ "$id" == "term" ]]; then
|
||||
echo "internal gui to term"
|
||||
eval "$swapcmd_term"
|
||||
|
||||
# Gnome - Set Activities Overview
|
||||
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Super>Space']"
|
||||
# ~/.config/kglobalshortcutsrc
|
||||
# activate widget 78=Super+Space,none,Activate Application Launcher Widget
|
||||
# kquitapp kglobalaccel && sleep 2s && kglobalaccel5&
|
||||
# kquitapp5 plasmashell && kstart5 plasmashell
|
||||
fi
|
||||
|
||||
if [[ "$id" == "gui" ]]; then
|
||||
echo "internal term to gui"
|
||||
eval "$swapcmd_gui"
|
||||
|
||||
# Gnome - Set Activities Overview
|
||||
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Ctrl>Space']"
|
||||
# ~/.config/kglobalshortcutsrc
|
||||
# activate widget 78=Ctrl+Space,none,Activate Application Launcher Widget
|
||||
# kquitapp kglobalaccel && sleep 2s && kglobalaccel &
|
||||
|
||||
# # Fallback code
|
||||
# if [ $? -eq 0 ] && [[ "$swapbehavior" == "both_win" ]]; then
|
||||
# eval "$fallbackcmd_gui"
|
||||
# check_gt="setxkbmap -query | grep -v 'swap_alt_win' 1>/dev/null"
|
||||
# check_tg="setxkbmap -query | grep -q 'swap_alt_win'"
|
||||
# fi
|
||||
fi
|
||||
|
||||
done
|
||||
./kintox11
|
Reference in New Issue
Block a user