2020-05-09 22:41:27 +02:00
|
|
|
#!/bin/sh
|
2020-09-09 23:00:20 +02:00
|
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
|
|
|
2020-09-21 14:40:52 +02:00
|
|
|
# NVDIA
|
2020-05-09 22:41:27 +02:00
|
|
|
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
|
|
|
xrandr --auto
|
2020-09-21 14:40:52 +02:00
|
|
|
|
|
|
|
# Turn off beep
|
2020-05-09 22:41:27 +02:00
|
|
|
xset b off&
|
2020-09-21 14:40:52 +02:00
|
|
|
|
|
|
|
# Lock screen
|
2020-11-10 00:26:41 +01:00
|
|
|
xset s 600&
|
2020-11-06 00:03:08 +01:00
|
|
|
xautolock -time 15 -locker slock&
|
2020-09-21 14:40:52 +02:00
|
|
|
|
|
|
|
# Programs
|
2020-11-23 00:43:02 +01:00
|
|
|
#compton&
|
|
|
|
#feh --bg-fill "$HOME/.wall.jpg" &
|
2020-05-09 22:41:27 +02:00
|
|
|
nm-applet --sm-disable&
|
2020-09-09 23:00:20 +02:00
|
|
|
#sudo /root/.local/bin/protonvpn c -f&
|
2020-05-18 17:04:01 +02:00
|
|
|
dunst -config&
|
2020-05-13 11:54:02 +02:00
|
|
|
browser-x&
|
2020-11-23 00:43:02 +01:00
|
|
|
QT_SCALE_FACTOR=1.5 keepassxc &
|
2020-08-13 17:58:00 +02:00
|
|
|
/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; split-window 'htop'\; new-window -n MAIL 'neomutt'\; new-window -n NEWSBOAT 'newsboat -r '\; new-window -n MUSIC 'cmus'"&
|
2020-10-14 00:35:04 +02:00
|
|
|
#(sleep 30 && getforecast)&
|
2020-08-13 17:58:00 +02:00
|
|
|
sudo /usr/bin/rdate -s ntp.task.gda.pl && sudo /sbin/hwclock --systohc
|
2020-11-23 00:43:02 +01:00
|
|
|
megasync &
|
2020-11-06 00:03:08 +01:00
|
|
|
#mega-cmd-server --debug-full > /var/log/megacmd/megacmd.log&
|
2020-10-14 00:35:04 +02:00
|
|
|
setxkbmap pl&
|
2020-05-09 22:41:27 +02:00
|
|
|
dwmstatusbar&
|
2020-09-21 14:40:52 +02:00
|
|
|
|
2020-11-05 23:58:06 +01:00
|
|
|
# Two monitors are enabled?
|
|
|
|
|
|
|
|
if [[ $(mons | awk '/Monitors/{print $2}') = 2 ]]
|
|
|
|
then
|
|
|
|
xrandr --output eDP-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
|
|
|
|
fi
|
|
|
|
|
2020-09-21 14:40:52 +02:00
|
|
|
# Seetings of LID
|
|
|
|
while true
|
|
|
|
do
|
2020-11-05 23:58:06 +01:00
|
|
|
if [[ $(< /proc/acpi/button/lid/LID0/state ) = *closed ]] && [[ $(mons | awk '/Monitors/{print $2}') = 1 ]]
|
2020-09-21 14:40:52 +02:00
|
|
|
then
|
|
|
|
case $(< /sys/class/power_supply/ADP0/online) in
|
|
|
|
1) ( [[ ! "$(pidof slock)" ]] && slock ) ;;
|
|
|
|
0) sudo pm-suspend && slock ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
sleep 2
|
|
|
|
done &
|
|
|
|
|
2020-09-09 23:00:20 +02:00
|
|
|
exec dbus-launch dwm
|