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
|
2021-01-07 18:48:15 +01:00
|
|
|
|
|
|
|
dwmstatusbar&
|
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-12-23 21:36:34 +01:00
|
|
|
browser-x&
|
|
|
|
QT_SCALE_FACTOR=1.5 keepassxc &
|
2021-02-09 11:39:54 +01:00
|
|
|
#bitlbee -D&
|
|
|
|
/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'"&
|
|
|
|
#/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; split-window 'htop'\; new-window -n WEECHAT 'weechat'\; 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&
|
2021-01-16 18:14:25 +01:00
|
|
|
ibus-daemon&
|
|
|
|
#setxkbmap pl&
|
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
|
2021-02-09 11:39:54 +01:00
|
|
|
xrandr --output HDMI-1 --mode 1920x1080 --rate 60 --primary --output eDP-1 --off
|
|
|
|
#xrandr --output eDP-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
|
2020-11-05 23:58:06 +01:00
|
|
|
fi
|
|
|
|
|
2021-02-09 11:39:54 +01:00
|
|
|
|
|
|
|
|
2020-09-21 14:40:52 +02:00
|
|
|
# Seetings of LID
|
|
|
|
while true
|
|
|
|
do
|
2021-02-09 11:39:54 +01:00
|
|
|
if xrandr | grep "HDMI-1 disconnected"; then
|
|
|
|
xrandr --output "HDMI-1" --off --output "eDP-1" --auto
|
|
|
|
else
|
|
|
|
xrandr --output "eDP-1" --off --output "HDMI-1" --auto
|
|
|
|
fi
|
|
|
|
|
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 ) ;;
|
2021-02-09 11:39:54 +01:00
|
|
|
0) sudo s2ram && slock ;;
|
2020-09-21 14:40:52 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
sleep 2
|
|
|
|
done &
|
|
|
|
|
2020-09-09 23:00:20 +02:00
|
|
|
exec dbus-launch dwm
|