9
.xinitrc
9
.xinitrc
@@ -28,10 +28,17 @@ mega-cmd-server --debug-full > /var/log/megacmd/megacmd.log&
|
||||
setxkbmap pl&
|
||||
dwmstatusbar&
|
||||
|
||||
# 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
|
||||
|
||||
# Seetings of LID
|
||||
while true
|
||||
do
|
||||
if [[ $(< /proc/acpi/button/lid/LID0/state ) = *closed ]]
|
||||
if [[ $(< /proc/acpi/button/lid/LID0/state ) = *closed ]] && [[ $(mons | awk '/Monitors/{print $2}') = 1 ]]
|
||||
then
|
||||
case $(< /sys/class/power_supply/ADP0/online) in
|
||||
1) ( [[ ! "$(pidof slock)" ]] && slock ) ;;
|
||||
|
Reference in New Issue
Block a user