display stuff i guess
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [[ "$1" == "0x0" ]]; then
|
||||
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --off
|
||||
elif [[ "$1" == "mirror" ]]; then
|
||||
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode 1920x1080 --same-as eDP-1
|
||||
else
|
||||
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode "$1" --pos 1920x0 --rotate normal
|
||||
fi
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
BR_DIR="/sys/class/backlight/intel_backlight/"
|
||||
|
||||
|
||||
test -d "$BR_DIR" || exit 0
|
||||
|
||||
MIN=0
|
||||
MAX=$(cat "$BR_DIR/max_brightness")
|
||||
VAL=$(cat "$BR_DIR/brightness")
|
||||
|
||||
if [ "$1" = down ]; then
|
||||
VAL=$((VAL-4096))
|
||||
else
|
||||
VAL=$((VAL+4096))
|
||||
fi
|
||||
|
||||
if [ "$VAL" -lt $MIN ]; then
|
||||
VAL=$MIN
|
||||
elif [ "$VAL" -gt $MAX ]; then
|
||||
VAL=$MAX
|
||||
fi
|
||||
|
||||
PERCENT=`echo "$VAL / $MAX" | bc -l`
|
||||
|
||||
export XAUTHORITY=$HOME/.Xauthority # CHANGE "ivo" TO YOUR USER
|
||||
export DISPLAY=:0
|
||||
|
||||
echo "xrandr --output eDP-1 --brightness $PERCENT" > /tmp/oled-brightness.log
|
||||
xrandr --output eDP-1 --brightness $PERCENT
|
||||
|
||||
echo $VAL | sudo tee "$BR_DIR/brightness"
|
||||
Reference in New Issue
Block a user