From f4c7de2e5d117260dbf93fb627414e662c2d0192 Mon Sep 17 00:00:00 2001 From: Simonas Narbutas Date: Tue, 24 Jul 2018 17:08:53 +0200 Subject: [PATCH] mv home bin to repo --- .bin/brightness | 15 +++++++++++++++ .bin/multimonitor | 12 ++++++++++++ .../alt/.config/awesome/rc.lua##Linux.epiphanius | 2 +- .yadm/alt/.xinitrc##Linux.epiphanius | 3 +++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 .bin/brightness create mode 100755 .bin/multimonitor create mode 100644 .yadm/alt/.xinitrc##Linux.epiphanius diff --git a/.bin/brightness b/.bin/brightness new file mode 100755 index 0000000..23e810c --- /dev/null +++ b/.bin/brightness @@ -0,0 +1,15 @@ +#!/bin/bash +# +# adjust screen brightness +# +# +# Script to adjust screen brightness +function usage_and_exit { + echo "Usage: $(basename ${0}) " + exit 1 +} +# Exit if we have an incorrect number of arguments +if [ ${#} -ne 1 ]; then + usage_and_exit +fi +xbacklight -inc ${1} diff --git a/.bin/multimonitor b/.bin/multimonitor new file mode 100755 index 0000000..e208186 --- /dev/null +++ b/.bin/multimonitor @@ -0,0 +1,12 @@ +#!/bin/sh +DISPLAY_COUNT=$(xrandr -d :0 -q | grep ' connected' | wc -l) +if [ "$DISPLAY_COUNT" == 2 ] +then + xrandr --output HDMI2 --set "Broadcast RGB" "Full" --off --output HDMI1 --mode 2560x1440 --pos 1920x0 --rotate normal --output DP1 --set "Broadcast RGB" "Full" --off --output eDP1 --primary --mode 1920x1080 --pos 0x360 --rotate normal --output VIRTUAL1 --off +elif [ "$DISPLAY_COUNT" == 1 ] +then + xrandr --output HDMI2 --off --output HDMI1 --off --output DP1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off +elif [ "$DISPLAY_COUNT" == 3 ] +then + xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x360 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP1-2 --mode 2560x1440 --pos 4480x0 --rotate normal --output DP1-1 --mode 2560x1440 --pos 1920x0 --rotate normal +fi diff --git a/.yadm/alt/.config/awesome/rc.lua##Linux.epiphanius b/.yadm/alt/.config/awesome/rc.lua##Linux.epiphanius index 421496e..35c46d5 100644 --- a/.yadm/alt/.config/awesome/rc.lua##Linux.epiphanius +++ b/.yadm/alt/.config/awesome/rc.lua##Linux.epiphanius @@ -308,7 +308,7 @@ globalkeys = gears.table.join( awful.key({}, "XF86MonBrightnessUp", function () awful.util.spawn("/home/snarbutas/.bin/brightness +15", false) end), awful.key({}, "XF86MonBrightnessDown",function () awful.util.spawn("/home/snarbutas/.bin/brightness -15", false) end), -- Extend monitor - awful.key({ "Control", "Mod4" }, "e", function () awful.util.spawn("/home/snarbutas/.bin/dualhead", false) end), + awful.key({ "Control", "Mod4" }, "e", function () awful.util.spawn("/home/snarbutas/.bin/multimonitor", false) end), -- Lock computer awful.key({ "Control", "Mod4" }, "l", function () awful.util.spawn("i3lock -c 000000 -i /home/snarbutas/Pictures/spiral1.png") end), awful.key({ "Control", "Mod4", "Shift" }, "l", diff --git a/.yadm/alt/.xinitrc##Linux.epiphanius b/.yadm/alt/.xinitrc##Linux.epiphanius new file mode 100644 index 0000000..87eb88c --- /dev/null +++ b/.yadm/alt/.xinitrc##Linux.epiphanius @@ -0,0 +1,3 @@ +xmodmap ~/.Xmodmap 2>~/.Xmodlog +ssh-agent -s > ~/.ssh/agent +exec awesome