mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-14 08:01:35 +09:00
66 lines
1.8 KiB
Bash
Executable File
66 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
##################################################
|
|
# DISPLAY
|
|
##################################################
|
|
# if [[ $JUPCID == "HOME-DESKTOP" ]]; then
|
|
# xrandr --output DP-4 --primary --mode 2560x1440 --rotate normal --output HDMI-0 --rotate right --right-of DP-4
|
|
# elif [[ $JUPCID == "HWDEV" ]]; then
|
|
# xrandr --output HDMI-1 --primary --mode 2560x1440 --rotate normal
|
|
# fi
|
|
|
|
wmname LG3D
|
|
export _JAVA_AWT_WM_NONREPARETING=1
|
|
|
|
##################################################
|
|
# THEME & POLYBAR
|
|
##################################################
|
|
export SCRIPTPATH="$( cd "$(dirname "$0")" || exit ; pwd -P )"
|
|
|
|
#down the last running theme
|
|
if [ -f "/tmp/leftwm-theme-down" ]; then
|
|
/tmp/leftwm-theme-down
|
|
rm /tmp/leftwm-theme-down
|
|
fi
|
|
ln -s "${SCRIPTPATH}"/down /tmp/leftwm-theme-down
|
|
|
|
#boot a polybar for each monitor
|
|
index=0
|
|
monitors="$(polybar -m | sed s/:.*//)"
|
|
leftwm-state -q -n -t "$SCRIPTPATH"/sizes.liquid | sed -r '/^\s*$/d' | while read -r width x y
|
|
do
|
|
let indextemp=index+1
|
|
monitor=$(sed "$indextemp!d" <<<"$monitors")
|
|
barname="mainbar$index"
|
|
monitor=$monitor offset=$x width=$width polybar -c "$SCRIPTPATH"/polybar.config $barname &> /dev/null &
|
|
let index=indextemp
|
|
done
|
|
|
|
#boot picom if it exists
|
|
if [ -x "$(command -v picom -b)" ]; then
|
|
picom &> /dev/null &
|
|
fi
|
|
|
|
# set the theme.ron config
|
|
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
|
|
|
|
# set the background
|
|
if [ -x "$(command -v feh)" ]; then
|
|
~/scripts/random_wallpaper.sh
|
|
fi
|
|
|
|
# start flameshot if exists
|
|
if [ -x "$(command -v flameshot)" ]; then
|
|
flameshot &> /dev/null &
|
|
fi
|
|
|
|
|
|
##################################################
|
|
# STARTUP APPLICATION
|
|
##################################################
|
|
killall nm-applet && nm-applet &
|
|
killall volumeicon && volumeicon &
|
|
|
|
echo "done"
|