From 7d6a8b7f5a494704d9af3b89f5a0958d8a377169 Mon Sep 17 00:00:00 2001 From: paperbenni Date: Sat, 28 Dec 2019 13:34:57 +0100 Subject: [PATCH] move laptop specific stuff and fix distro detection --- autostart.sh | 4 +++- install.sh | 65 +++++++++++++++++++++++++++++++++--------------------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/autostart.sh b/autostart.sh index 7bc7fc8..858edef 100755 --- a/autostart.sh +++ b/autostart.sh @@ -42,7 +42,9 @@ fi bash /home/benjamin/paperbenni/monitor.sh # apply german keybpard layout -setxkbmap -layout de +if locale | grep -q 'de_DE'; then + setxkbmap -layout de +fi # laptop specific background jobs if [ -n "$ISLAPTOP" ]; then diff --git a/install.sh b/install.sh index a9f72f1..e8fefcc 100755 --- a/install.sh +++ b/install.sh @@ -112,7 +112,8 @@ fi LINK="https://raw.githubusercontent.com/paperbenni/suckless/master" -if cat /etc/os-release | grep -i 'arch'; then +if cat /etc/os-release | grep -iq 'name.*arch' || + cat /etc/os-release | grep -iq 'name.*manjaro'; then pacinstall() { for i in "$@"; do { pacman -iQ "$i" || command -v "$i"; } &>/dev/null && continue @@ -137,8 +138,6 @@ if cat /etc/os-release | grep -i 'arch'; then pacinstall feh pacinstall mpv - pacinstall dmidecode - pacinstall wmctrl pacinstall xdotool pacinstall xrandr @@ -168,12 +167,8 @@ fi cd -if acpi | grep -q '%'; then - touch .cache/islaptop -fi - # ubuntu specific stuff -if grep -iq 'ubuntu' /dev/null +Section "InputClass" + Identifier "touchpad" + MatchIsTouchpad "on" + Driver "libinput" + Option "Tapping" "on" +EndSection + +EOF + fi + +fi + +# three and four finger swipes on laptop if ! command -v libinput-gestures &>/dev/null; then cd /tmp git clone --depth=1 https://github.com/bulletmark/libinput-gestures.git @@ -230,7 +248,7 @@ fi cd # auto start script with dwm -ls .dwm || mkdir .dwm +ls .dwm &>/dev/null || mkdir .dwm curl $LINK/autostart.sh >.dwm/autostart.sh chmod +x .dwm/autostart.sh @@ -281,13 +299,14 @@ cd # install win + a menus for shortcuts like screenshots and shutdown curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash -## notification center ## +# notification center # if ! command -v deadd &>/dev/null; then echo "installing deadd" wget -q "http://deadd.surge.sh/deadd" usrbin deadd fi +# drag and drop x utility for ranger if ! command -v dragon &>/dev/null; then cd /tmp git clone --depth=1 https://github.com/mwh/dragon.git @@ -302,6 +321,7 @@ cd mkdir paperbenni &>/dev/null # automatic wallpaper changer +# uses reddit r/wallpaper scraper if [ "$2" = "rwall" ]; then cd /tmp gitclone rwallpaper @@ -316,19 +336,6 @@ fi cd -fixtaptoclick() { - # fix tap to click behaviour - sudo mkdir -p /etc/X11/xorg.conf.d && sudo tee /etc/X11/xorg.conf.d/90-touchpad.conf <<'EOF' 1>/dev/null -Section "InputClass" - Identifier "touchpad" - MatchIsTouchpad "on" - Driver "libinput" - Option "Tapping" "on" -EndSection - -EOF -} - # install things like fonts or gtk theme if ! [ -e .config/paperthemes/$THEME.txt ]; then echo "installing theme" @@ -339,7 +346,7 @@ else echo "theme installation already found" fi -# fix java on dwm +# fix java gui appearing empty on dwm if ! grep 'dwm'