From 37de71d510adc3a3210b04c8b9c9630fe0467f68 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 27 Oct 2018 11:02:46 +0200 Subject: Add new scripts Signed-off-by: Florian Pritz --- anydesk-nested | 7 +++++++ cpanm | 3 +++ log-stderr | 5 +++++ new-otp | 3 +++ toggle-music | 8 ++++++++ 5 files changed, 26 insertions(+) create mode 100755 anydesk-nested create mode 100644 cpanm create mode 100755 log-stderr create mode 100755 new-otp create mode 100755 toggle-music diff --git a/anydesk-nested b/anydesk-nested new file mode 100755 index 0000000..84e376a --- /dev/null +++ b/anydesk-nested @@ -0,0 +1,7 @@ +#!/bin/bash + +# anydesk doesn't work without this in i3 + +Xephyr :10 -ac -br -noreset -screen 1920x1080 & +sleep .1 && DISPLAY=:10.0 anydesk +fg diff --git a/cpanm b/cpanm new file mode 100644 index 0000000..752ec1a --- /dev/null +++ b/cpanm @@ -0,0 +1,3 @@ +#!/bin/bash + +exec /usr/bin/vendor_perl/cpanm --from https://cpan.metacpan.org/ "$@" diff --git a/log-stderr b/log-stderr new file mode 100755 index 0000000..f1fd0c5 --- /dev/null +++ b/log-stderr @@ -0,0 +1,5 @@ +#!/bin/bash + +exec 2> >(systemd-cat) + +exec "$@" diff --git a/new-otp b/new-otp new file mode 100755 index 0000000..d891f78 --- /dev/null +++ b/new-otp @@ -0,0 +1,3 @@ +#!/bin/bash + +maim -s | zbarimg -q --raw - | pass otp insert diff --git a/toggle-music b/toggle-music new file mode 100755 index 0000000..c491b76 --- /dev/null +++ b/toggle-music @@ -0,0 +1,8 @@ +#!/bin/bash + +if pgrep spotify &>/dev/null; then + mpc pause + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause +else + mpc toggle +fi -- cgit v1.2.3-24-g4f1b