From 548912f3f48a663e7f0c5b2548538e4622ed3905 Mon Sep 17 00:00:00 2001 From: itmodulo Date: Mon, 17 Apr 2023 23:46:25 +0200 Subject: [PATCH] Applications launchers and scripts --- bin/100_backlight.sh | 3 +++ bin/custom-pulse.sh | 2 ++ bin/decrease_backlight.sh | 3 +++ bin/increase_backlight.sh | 3 +++ bin/pxt-launch-DevLapce.sh | 11 +++++++++++ bin/pxt-launch-DevLiteIDE.sh | 11 +++++++++++ bin/pxt-launch-StudiaFirefox.sh | 11 +++++++++++ bin/pxt-launch-StudiaXournalpp.sh | 11 +++++++++++ bin/pxt-launch-SyncSeafile-applet.sh | 11 +++++++++++ bin/pxt-launch-WebFirefox.sh | 11 +++++++++++ bin/pxt-launch-template.sh | 11 +++++++++++ bin/usb-power-save.sh | 6 ++++++ bin/xorg-fix.sh | 2 ++ 13 files changed, 96 insertions(+) create mode 100755 bin/100_backlight.sh create mode 100755 bin/custom-pulse.sh create mode 100755 bin/decrease_backlight.sh create mode 100755 bin/increase_backlight.sh create mode 100755 bin/pxt-launch-DevLapce.sh create mode 100755 bin/pxt-launch-DevLiteIDE.sh create mode 100755 bin/pxt-launch-StudiaFirefox.sh create mode 100755 bin/pxt-launch-StudiaXournalpp.sh create mode 100755 bin/pxt-launch-SyncSeafile-applet.sh create mode 100755 bin/pxt-launch-WebFirefox.sh create mode 100755 bin/pxt-launch-template.sh create mode 100755 bin/usb-power-save.sh create mode 100755 bin/xorg-fix.sh diff --git a/bin/100_backlight.sh b/bin/100_backlight.sh new file mode 100755 index 0000000..edf4ff6 --- /dev/null +++ b/bin/100_backlight.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +intel_backlight 100 diff --git a/bin/custom-pulse.sh b/bin/custom-pulse.sh new file mode 100755 index 0000000..f4ca479 --- /dev/null +++ b/bin/custom-pulse.sh @@ -0,0 +1,2 @@ +#!/bin/sh +pulseaudio --daemonize --log-target=syslog diff --git a/bin/decrease_backlight.sh b/bin/decrease_backlight.sh new file mode 100755 index 0000000..748a3c2 --- /dev/null +++ b/bin/decrease_backlight.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +intel_backlight decr 10 diff --git a/bin/increase_backlight.sh b/bin/increase_backlight.sh new file mode 100755 index 0000000..c8d63dd --- /dev/null +++ b/bin/increase_backlight.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +intel_backlight incr 10 diff --git a/bin/pxt-launch-DevLapce.sh b/bin/pxt-launch-DevLapce.sh new file mode 100755 index 0000000..3f0af0c --- /dev/null +++ b/bin/pxt-launch-DevLapce.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="dev" +JAIL_COMMAND="lapce -w" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID $JAIL_COMMAND diff --git a/bin/pxt-launch-DevLiteIDE.sh b/bin/pxt-launch-DevLiteIDE.sh new file mode 100755 index 0000000..14683d7 --- /dev/null +++ b/bin/pxt-launch-DevLiteIDE.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="dev" +JAIL_COMMAND="liteide" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID $JAIL_COMMAND diff --git a/bin/pxt-launch-StudiaFirefox.sh b/bin/pxt-launch-StudiaFirefox.sh new file mode 100755 index 0000000..6464bdd --- /dev/null +++ b/bin/pxt-launch-StudiaFirefox.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="studia" +JAIL_COMMAND="MOZ_USE_XINPUT2=1 firefox" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID sh -c "$JAIL_COMMAND" diff --git a/bin/pxt-launch-StudiaXournalpp.sh b/bin/pxt-launch-StudiaXournalpp.sh new file mode 100755 index 0000000..b70a9b4 --- /dev/null +++ b/bin/pxt-launch-StudiaXournalpp.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="studia" +JAIL_COMMAND="xournalpp" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID $JAIL_COMMAND diff --git a/bin/pxt-launch-SyncSeafile-applet.sh b/bin/pxt-launch-SyncSeafile-applet.sh new file mode 100755 index 0000000..3a0314c --- /dev/null +++ b/bin/pxt-launch-SyncSeafile-applet.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="sync" +JAIL_COMMAND="seafile-applet" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID $JAIL_COMMAND diff --git a/bin/pxt-launch-WebFirefox.sh b/bin/pxt-launch-WebFirefox.sh new file mode 100755 index 0000000..3ca18b4 --- /dev/null +++ b/bin/pxt-launch-WebFirefox.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="web" +JAIL_COMMAND="MOZ_USE_XINPUT2=1 firefox" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID sh -c "$JAIL_COMMAND" diff --git a/bin/pxt-launch-template.sh b/bin/pxt-launch-template.sh new file mode 100755 index 0000000..8b762c9 --- /dev/null +++ b/bin/pxt-launch-template.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# +# + +JAIL_NAME="" +JAIL_COMMAND="" + +JAIL_RUN_ID=$(jls | grep $JAIL_NAME | tr -s ' ' | cut -d ' ' -f 2) +jailme $JAIL_RUN_ID $JAIL_COMMAND diff --git a/bin/usb-power-save.sh b/bin/usb-power-save.sh new file mode 100755 index 0000000..1b54a29 --- /dev/null +++ b/bin/usb-power-save.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# This oneliner turns powersave on usb hubs, excluding 0.1 +# do usbconfig list and add another grep -v x.x to devices you wish not to do so + +for i in $(usbconfig list | cut -f 1 -d ':' | cut -f 2 -d 'n' | grep -v 0.1); do usbconfig -d $i power_save; done + diff --git a/bin/xorg-fix.sh b/bin/xorg-fix.sh new file mode 100755 index 0000000..cf9f859 --- /dev/null +++ b/bin/xorg-fix.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xhost si:localuser:damoon