1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/dwm/.dwm/autostart.sh

56 lines
1.2 KiB
Bash
Raw Normal View History

2019-03-15 17:58:36 +00:00
#!/bin/sh
# Set screen orientation if second monitor is connected
SCREENCOUNT=$(xrandr | grep -c "\*")
# If multi screen add special mode for monitor so it supports 1440p over HDMI
if [ "$SCREENCOUNT" -eq 2 ]
then
if [ -f "$HOME/.screenlayout/screen_desktop.sh" ]
then
/bin/sh ~/.screenlayout/screen_desktop.sh
# Make sure mouse is on main screen so windows are launched there
xdotool mousemove 3360 1080
fi
else
if [ -f "$HOME/.screenlayout/screen.sh" ]
then
/bin/sh ~/.screenlayout/screen.sh
fi
fi
2019-03-22 09:39:59 +00:00
# lock screen after x minutes and on laptop close lid
xautolock -time 10 -locker lock &
xss-lock lock &
2019-03-22 09:39:59 +00:00
2019-03-15 17:58:36 +00:00
xbindkeys &
compton --xrender-sync-fence &
if [ -e ~/.cache/wall1.png ] && [ -e ~/.cache/wall2.png ]
then
feh --bg-scale ~/.cache/wall1.png --bg-scale ~/.cache/wall2.png &
elif [ -e ~/.cache/wall1.png ]
then
feh --bg-scale ~/.cache/wall1.png &
fi
2019-04-02 09:54:39 +00:00
# switch off microphones
amixer -c 2 set Mic nocap
amixer -c 3 set Mic nocap
2019-03-15 17:58:36 +00:00
unclutter &
redshift-gtk &
dunst &
slstatus &
exec st -c tmux -e tmux &
2019-03-15 17:58:36 +00:00
exec spotify &
if [ -e /usr/bin/firefox ]
then
exec firefox &
elif [ -e /usr/bin/iceweasel ]
then
exec iceweasel &
fi