From 026b290aa60d01b28da56abc2d19f92d914c4361 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 22 Nov 2020 17:08:11 +0530 Subject: added mangasort script to satisfy my weebshit needs --- scripts/brightness_indicator_deadd | 14 ---------- scripts/clear-nf | 4 +++ scripts/clear-nfcenter | 4 +++ scripts/dnd | 4 +++ scripts/dnd-off | 4 --- scripts/dnd-on | 4 --- scripts/mangasort | 56 +++++++++++++++++++++++++++++++++++++ scripts/runningminder | Bin 0 -> 7912 bytes scripts/undnd | 4 +++ scripts/volume_indicator_deadd | 35 ----------------------- 10 files changed, 72 insertions(+), 57 deletions(-) delete mode 100755 scripts/brightness_indicator_deadd create mode 100755 scripts/clear-nf create mode 100755 scripts/clear-nfcenter create mode 100755 scripts/dnd delete mode 100755 scripts/dnd-off delete mode 100755 scripts/dnd-on create mode 100755 scripts/mangasort create mode 100755 scripts/runningminder create mode 100755 scripts/undnd delete mode 100755 scripts/volume_indicator_deadd diff --git a/scripts/brightness_indicator_deadd b/scripts/brightness_indicator_deadd deleted file mode 100755 index 9ee4fb2d..00000000 --- a/scripts/brightness_indicator_deadd +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ "$1" == "inc" ]; then - xbacklight -inc 5 -fi - -if [ "$1" == "dec" ]; then - xbacklight -lower 5 -fi - -BRIGHTNESS=$(xbacklight -get) -NOTI_ID=$(notify-send.py "Bildschirmhelligkeit" "$BRIGHTNESS/100" \ - --hint string:image-path:video-display boolean:transient:true \ - --replaces-process "brightness-popup") diff --git a/scripts/clear-nf b/scripts/clear-nf new file mode 100755 index 00000000..4cb96e8d --- /dev/null +++ b/scripts/clear-nf @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:clearPopups diff --git a/scripts/clear-nfcenter b/scripts/clear-nfcenter new file mode 100755 index 00000000..4acfe9c1 --- /dev/null +++ b/scripts/clear-nfcenter @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:clearInCenter diff --git a/scripts/dnd b/scripts/dnd new file mode 100755 index 00000000..0a125013 --- /dev/null +++ b/scripts/dnd @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:pausePopups diff --git a/scripts/dnd-off b/scripts/dnd-off deleted file mode 100755 index 5844f391..00000000 --- a/scripts/dnd-off +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh - -notify-send.py a --hint boolean:deadd-notification-center:true \ - string:type:unpausePopups diff --git a/scripts/dnd-on b/scripts/dnd-on deleted file mode 100755 index 0a125013..00000000 --- a/scripts/dnd-on +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh - -notify-send.py a --hint boolean:deadd-notification-center:true \ - string:type:pausePopups diff --git a/scripts/mangasort b/scripts/mangasort new file mode 100755 index 00000000..d46be69c --- /dev/null +++ b/scripts/mangasort @@ -0,0 +1,56 @@ +#!/bin/python + +import os + +def sxivInput(r1, r2): + return "sxiv " + r1 + " & " + "sxiv " + r2 + " & " + +def calculate(prefix, suffix, num): + r1 = '' + r2 = '' + + i = 1 + while i <= num: # r1 + if i < 10: + ai = "00" + str(i) + elif i < 100: + ai = "0" + str(i) + else: + ai = i + r1 += prefix + str(ai) + suffix + " " + i += 2 + + i = 2 + while i <= num: # ra + if i < 10: + ai = "00" + str(i) + elif i < 100: + ai = "0" + str(i) + else: + ai = i + r2 += prefix + str(ai) + suffix + " " + i += 2 + + return r1, r2 + +def tachiyomi(i): + r1, r2 = calculate('', '.png', i) + os.system(sxivInput(r1, r2)) + +def main(): + titlePrefix = input("Title prefix: ") + titleSuffix = input("Title suffix: ") + numPages = int(input("Number of pages: ")) + + r1, r2 = calculate(titlePrefix, titleSuffix, numPages) + print(sxivInput(r1, r2)) + +if __name__ == '__main__': + contents = os.listdir(os.getcwd()) + c = set(contents) + + if "001.png" in c: + tachiyomi(len(contents)) + else: + main() + diff --git a/scripts/runningminder b/scripts/runningminder new file mode 100755 index 00000000..98fc20e7 Binary files /dev/null and b/scripts/runningminder differ diff --git a/scripts/undnd b/scripts/undnd new file mode 100755 index 00000000..5844f391 --- /dev/null +++ b/scripts/undnd @@ -0,0 +1,4 @@ +#!/bin/zsh + +notify-send.py a --hint boolean:deadd-notification-center:true \ + string:type:unpausePopups diff --git a/scripts/volume_indicator_deadd b/scripts/volume_indicator_deadd deleted file mode 100755 index 3f23df24..00000000 --- a/scripts/volume_indicator_deadd +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -if [ "$1" == "inc" ]; then - amixer -q sset Master 5%+ -fi - -if [ "$1" == "dec" ]; then - amixer -q sset Master 5%- -fi - -if [ "$1" == "mute" ]; then - amixer -q sset Master toggle -fi - - -AMIXER=$(amixer sget Master) -VOLUME=$(echo $AMIXER | grep 'Right:' | awk -F'[][]' '{ print $2 }' | tr -d "%") -MUTE=$(echo $AMIXER | grep -o '\[off\]' | tail -n 1) -if [ "$VOLUME" -le 20 ]; then - ICON=audio-volume-low -else if [ "$VOLUME" -le 60 ]; then - ICON=audio-volume-medium - else - ICON=audio-volume-high - fi -fi -if [ "$MUTE" == "[off]" ]; then - ICON=audio-volume-muted -fi - - - -NOTI_ID=$(notify-send.py "Lautstärke" "$VOLUME/100" \ - --hint string:image-path:$ICON boolean:transient:true \ - --replaces-process "volume-popup") -- cgit v1.2.3