2022-05-03 15:20:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
. "$DIR/../env.sh"
|
|
|
|
|
|
|
|
log 'Setting up awesome'
|
|
|
|
|
2022-05-15 03:34:22 +00:00
|
|
|
case "$UNAMER" in
|
|
|
|
*artix*)
|
|
|
|
sudo pacman -S --noconfirm --needed awesome rofi
|
2022-05-03 15:20:26 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
# necessary tools
|
2022-05-15 03:34:22 +00:00
|
|
|
#$DIR/dmenu.sh
|
|
|
|
#$DIR/slock.sh
|
2022-05-15 07:30:44 +00:00
|
|
|
$DIR/dict.sh
|
2022-05-03 15:20:26 +00:00
|
|
|
|
|
|
|
# install widgets
|
2022-05-15 03:34:22 +00:00
|
|
|
if [ ! -d "$XDG_CONFIG_HOME/awesome/awesome-wm-widgets" ]; then
|
|
|
|
echo cloning awesome widget
|
|
|
|
git clone https://gitee.com/klesh/awesome-wm-widgets.git "$XDG_CONFIG_HOME/awesome/awesome-wm-widgets"
|
|
|
|
fi
|
2022-05-03 15:20:26 +00:00
|
|
|
|
|
|
|
# ~/.xinitrc
|
2022-05-04 14:27:11 +00:00
|
|
|
cat <<'EOT' > ~/.xinitrc
|
2022-05-15 03:34:22 +00:00
|
|
|
export QT_QPA_PLATFORMTHEME="qt5ct"
|
|
|
|
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
|
|
|
|
2022-05-03 15:20:26 +00:00
|
|
|
export XMODIFIERS="@im=ibus"
|
|
|
|
export QT_IM_MODULE=ibus
|
|
|
|
export GTK_IM_MODULE=xim
|
|
|
|
export VIM_MODE=enhanced
|
|
|
|
export XDG_RUNTIME_DIR=/tmp/runtime-klesh
|
2022-05-04 14:27:11 +00:00
|
|
|
mkdir -p $XDG_RUNTIME_DIR
|
2022-05-03 15:20:26 +00:00
|
|
|
|
2022-05-20 07:09:34 +00:00
|
|
|
export LOCKER='/usr/bin/i3lock -i /home/klesh/Nextcloud/wallpapers/1027.png -t --nofork'
|
2022-05-19 08:19:17 +00:00
|
|
|
|
2022-05-15 13:10:38 +00:00
|
|
|
autorandr --change --force
|
2022-05-16 01:48:15 +00:00
|
|
|
mpd
|
|
|
|
picomdaemon
|
2022-05-15 13:10:38 +00:00
|
|
|
|
2022-05-20 07:09:34 +00:00
|
|
|
# disable screen saver / turn off monitor if inactived for 300 secs
|
|
|
|
xset s off
|
|
|
|
xset dpms 300 300 300
|
|
|
|
xss-lock -l $(command -v lock.sh) &
|
2022-05-17 07:47:19 +00:00
|
|
|
|
2022-05-03 15:20:26 +00:00
|
|
|
exec dbus-run-session -- awesome 2> /tmp/awesome.log
|
|
|
|
EOT
|
|
|
|
|
|
|
|
|
|
|
|
# ~/.profile
|
|
|
|
cat <<'EOT' | sed "s|__PDIR__|$PDIR|g" > ~/.profile
|
2022-05-15 03:34:22 +00:00
|
|
|
export PROXY_HOST=localhost
|
|
|
|
export PROXY_PORT=4780
|
|
|
|
export PROXY_PROTO=http
|
|
|
|
export TMUX_SHELL=/usr/bin/fish
|
2022-05-16 01:48:15 +00:00
|
|
|
export PATH=~/dotfiles/bin:~/.local/bin:~/Nextcloud/bin:$PATH
|
2022-05-03 15:20:26 +00:00
|
|
|
|
2022-05-04 14:27:11 +00:00
|
|
|
# startx Automatically
|
2022-05-03 15:20:26 +00:00
|
|
|
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then
|
|
|
|
startx
|
|
|
|
fi
|
|
|
|
EOT
|
|
|
|
|
|
|
|
|
|
|
|
# configuration
|
|
|
|
lnsf "$DIR/awesome/rc.lua" "$XDG_CONFIG_HOME/awesome/rc.lua"
|
2022-05-15 03:34:22 +00:00
|
|
|
lnsf "$DIR/rofi/config.rasi" "$XDG_CONFIG_HOME/rofi/config.rasi"
|
|
|
|
lnsf "$DIR/rofi/catppuccin.rasi" "$XDG_CONFIG_HOME/rofi/catppuccin.rasi"
|