summaryrefslogtreecommitdiff
path: root/.local/bin/desktop
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/desktop')
-rwxr-xr-x.local/bin/desktop/brightness1
-rwxr-xr-x.local/bin/desktop/setdp4
-rwxr-xr-x.local/bin/desktop/windowshot3
-rwxr-xr-x.local/bin/desktop/zbarscreen3
-rwxr-xr-x.local/bin/desktop/zbarwindow3
5 files changed, 12 insertions, 2 deletions
diff --git a/.local/bin/desktop/brightness b/.local/bin/desktop/brightness
index 11733f4..74d3e36 100755
--- a/.local/bin/desktop/brightness
+++ b/.local/bin/desktop/brightness
@@ -15,6 +15,7 @@ case "$1" in
esac
brightness="$(brightnessctl --machine-readable | cut -d, -f4)"
+echo "$brightness" > "${XDG_STATE_HOME:-$HOME/.local/state}/brightness"
if [ -n "$TMUX" ]; then
tmux display "Brightness: $brightness"
diff --git a/.local/bin/desktop/setdp b/.local/bin/desktop/setdp
index 48c6a7a..afe4498 100755
--- a/.local/bin/desktop/setdp
+++ b/.local/bin/desktop/setdp
@@ -13,8 +13,8 @@ if [ "$display_count" = 2 ]; then
for display in $displays; do
case "$display" in
- eDP*) export PRIMARY="$display"; set -- "$@" --output "$display" --mode 1920x1080 --primary --pos 0x270 ;;
- HDMI*) set -- "$@" --output "$display" --mode 1920x1080 --pos 1920x0 --scale "1.25x1.25" ;;
+ eDP*) export PRIMARY="$display"; set -- "$@" --output "$display" --mode 1920x1080 --primary --pos 0x162 ;;
+ HDMI*) set -- "$@" --output "$display" --mode 1920x1080 --pos 2112x0 --scale "1.25x1.25" ;;
esac
done
diff --git a/.local/bin/desktop/windowshot b/.local/bin/desktop/windowshot
new file mode 100755
index 0000000..e4de6b0
--- /dev/null
+++ b/.local/bin/desktop/windowshot
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+import -silent -window "$(xdotool selectwindow)" png:- | xclip -sel clipboard -t image/png -i
diff --git a/.local/bin/desktop/zbarscreen b/.local/bin/desktop/zbarscreen
new file mode 100755
index 0000000..e325ce5
--- /dev/null
+++ b/.local/bin/desktop/zbarscreen
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ import -silent -window root bmp:- | zbarimg - | sed -e 's/QR-Code://' | xclip -selection clipboard
diff --git a/.local/bin/desktop/zbarwindow b/.local/bin/desktop/zbarwindow
new file mode 100755
index 0000000..7085f69
--- /dev/null
+++ b/.local/bin/desktop/zbarwindow
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+import -silent -window "$(xdotool selectwindow)" bmp:- | zbarimg - | sed -e 's/QR-Code://' | xclip -selection clipboard