From cdb453875132a8111132a8064e7399b5ba8e45c7 Mon Sep 17 00:00:00 2001 From: cyteen Date: Sun, 13 Mar 2022 17:00:25 +0000 Subject: [PATCH] commit before push. --- 001_swap-caps.sh | 76 +++++++++++++++++++++++++++++++++++++++++++----- 020_conky.sh | 4 +++ 020_qucs-s.sh | 32 ++++++++++++++++++++ 020_waterfox.sh | 2 +- 4 files changed, 105 insertions(+), 9 deletions(-) create mode 100755 020_qucs-s.sh diff --git a/001_swap-caps.sh b/001_swap-caps.sh index af593d9..b88d29d 100755 --- a/001_swap-caps.sh +++ b/001_swap-caps.sh @@ -1,13 +1,73 @@ -#!/usr/bin/env bash +#!/usr/bin/env zsh + +DEST=${1:-/etc/skel} # xmodmap -cat > ~/.Xmodmap << 'EOF' -! Swap caps lock and escape -remove Lock = Caps_Lock -keysym Escape = Caps_Lock -keysym Caps_Lock = Escape -add Lock = Caps_Lock +#cat > ~/.Xmodmap << 'EOF' +#! Swap caps lock and escape +#remove Lock = Caps_Lock +#keysym Escape = Caps_Lock +#keysym Caps_Lock = Escape +#add Lock = Caps_Lock +#EOF +# +#xmodmap ~/.Xmodmap + +#cat </dev/null +#[Desktop Entry] +#Name=Xmodmap +#Exec=/usr/bin/xmodmap ${HOME}/.Xmodmap +#Terminal=false +#Type=Application +#X-GNOME-Autostart-enabled=true +#EOF +# +#chmod +x ~/.config/autostart/xmodmap.desktop + +# Console tty +#cat </dev/null +#!/usr/bin/env bash + +setxkbmap -model pc104 -layout gb,us -option caps:swapecape EOF -xmodmap ~/.Xmodmap +chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh + +# default keyboard layout is described in /etc/default/keyboard and it is shared between X and the console. +config_file="/etc/default/keyboard" + + typeset -A rules + rules=( + "XKBMODEL" "pc104" + "XKBLAYOUT" "gb" + "XKBVARIANT" "" + "XKBOPTIONS" "caps:swapescape" + "BACKSPACE" "guess" + ) + + for rule in "${(@k)rules}"; do + regex="s/^#\?\(${rule}\s*\).*$/\1 ${rules[${rule}]}/" + sudo sed -i "${regex}" ${config_file}; + done + +sudo udevadm trigger --subsystem-match=input --action=change + +#cat < /dev/null +#Section "InputClass" +# Identifier "system-keyboard" +# MatchIsKeyboard "on" +# Option "XkbLayout" "gb,us" +# Option "XkbModel" "pc104" +# Option "XkbVariant" "" +# Option "XkbOptions" "caps:swapescape" +#EndSection +#EOF +#echo "enlightenment desktop settings-input-keyboard allowd swapping esc with caps." diff --git a/020_conky.sh b/020_conky.sh index 9f8d313..85fd43a 100755 --- a/020_conky.sh +++ b/020_conky.sh @@ -58,9 +58,13 @@ cp ./fonts/* ${DEST}/.conky/fonts # Run conky + theme on x startup. Points at the symlink in dotconky changed by theme mkdir -p ${DEST}/.xinitrc.d/ cat > ${DEST}/.xinitrc.d/start_conky.sh << 'EOF' +#!/usr/bin/env bash + exec /bin/sh ${HOME}/.conky/conky-startup.sh EOF +chmod +x ${DEST}/.xinitrc.d/start_conky.sh + # download example conky theme. mkdir -p ${DEST}/.conky if [ ! -d ${DEST}/.conky/conky-xanimos ]; then diff --git a/020_qucs-s.sh b/020_qucs-s.sh new file mode 100755 index 0000000..439957e --- /dev/null +++ b/020_qucs-s.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +#!/bin/bash +set -e + +#RELEASE_NAME=Debian_Unstable +#RELEASE_NAME=Debian_Testing +#RELEASE_NAME=Debian_9.0 # stretch +#RELEASE_NAME=Debian_10 # buster +RELEASE_NAME=Debian_11 # bullseye + +SUSE_USER="ra3xdh" + +mkdir -p /etc/apt//sources.list-available || exit +cat </dev/null +# wget -nv https://download.opensuse.org/repositories/home:/${SUSE_USER}/${RELEASE_NAME}/Release.key -O Release.key +# apt-key add - < Release.key +deb http://download.opensuse.org/repositories/home:/${SUSE_USER}/${RELEASE_NAME}/ / +EOF + +# The dl-bintray repo doesn't play nice with apt-proxy +#echo "Acquire::http::Proxy { dl.bintray.com DIRECT; };" >> /etc/apt/apt.conf.d/02proxy + +sudo ln -sf /etc/apt/sources.list-available/qucs-s.list /etc/apt/sources.list.d/qucs-s.list + +wget -nv https://download.opensuse.org/repositories/home:/${SUSE_USER}/${RELEASE_NAME}/Release.key -O /tmp/Release.key +sudo apt-key add - < /tmp/Release.key + +sudo apt update + +sudo apt install -y qucs-s + + diff --git a/020_waterfox.sh b/020_waterfox.sh index 9cb0d15..15c7981 100755 --- a/020_waterfox.sh +++ b/020_waterfox.sh @@ -35,7 +35,7 @@ sudo apt update # waterfox-current-kpe - Free, open and private browser with better integration with KDE # waterfox-current-i18n-en-gb - English (British) language pack for Waterfox Current -sudo apt install -y waterfox-current-kpe waterfox-current-i18n-en-gb +sudo apt install -y waterfox-g4-kpe waterfox-g4-i18n-en-gb sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/waterfox-current 201