From 2d6c761f91e9e063379a1414d34e211b3603057b Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 26 Jul 2022 22:11:16 -0500 Subject: [PATCH] asdfasfqsfda --- .config/aliasrc | 2 +- .local/bin/transadd | 117 +++++++++++++------------ .local/installers/arch/arch-install.sh | 5 ++ .local/scripts/vol.sh | 8 +- 4 files changed, 70 insertions(+), 62 deletions(-) diff --git a/.config/aliasrc b/.config/aliasrc index 5e5f968..8c5c6b5 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -35,7 +35,7 @@ alias reboot='sudo reboot' alias shutdown='sudo shutdown' #programs -alias trc='tremc -c @nagato:9091' +alias trc='tremc -c @192.168.1.162:9091' alias pm='pulsemixer' #Youtube diff --git a/.local/bin/transadd b/.local/bin/transadd index f3c74ef..04b8e66 100755 --- a/.local/bin/transadd +++ b/.local/bin/transadd @@ -1,65 +1,70 @@ #!/usr/bin/env sh + + tremc -c@192.168.1.162:9091 "$@" + notify-send "transadd" " $@" + + # script copied from Luke Smith to add a torrent # removed part of first line that uses i3blocks # modifications to allow the user to select the download directory using lf #modifications to interface with remote transmission server -TRANSMISSION_REMOTE="nagato:9091" - -OPTS="default -lf_select -lf_last" - -DEST="remote -local" - -DEST_OPT="local" #"$(echo "$DEST" | bemenu -p "select destination machine: ")" - -if [ "$DEST_OPT" = "local" ]; then - pgrep -x transmission-da > /dev/null || (trans-init && notify-send "Starting transmission daemon..." && sleep 3) -fi - - -OPT="$(echo "$OPTS" | bemenu -p "download to:")" - -if [ "$OPT" = "lf_select" ]; then - if [ ! -f ~/.cache/lf/lastpath ]; then - mkdir -p ~/.cache/lf/ - touch ~/.cache/lf/lastpath - echo "~" > ~/.cache/lf/lastpath - fi - $TERMINAL -e lf -last-dir-path ~/.cache/lf/lastpath "$(cat ~/.cache/lf/lastpath)" - SEL="$(cat ~/.cache/lf/lastpath)" - -elif [ "$OPT" = "lf_last" ]; then - SEL="$(cat ~/.cache/lf/lastpath)" - -elif [ "$OPT" = "default" ]; then - SEL="" - -else - SEL="" - notify-send "ERROR" - exit - -fi - - -#if [ "$TRANSMISSION_REMOTE" ]; then -# SEL_REM="$(echo "$SEL" | sed 's/^\/media\/nagato/\/media\/storage/g')" +#TRANSMISSION_REMOTE="nagato:9091" +# +#OPTS="default +#lf_select +#lf_last" +# +#DEST="remote +#local" +# +#DEST_OPT="local" #"$(echo "$DEST" | bemenu -p "select destination machine: ")" +# +#if [ "$DEST_OPT" = "local" ]; then +# pgrep -x transmission-da > /dev/null || (trans-init && notify-send "Starting transmission daemon..." && sleep 3) #fi - - -#if [ "$DEST_OPT" = "remote" ]; then -# if [ "$SEL_REM" ]; then -# transmission-remote $TRANSMISSION_REMOTE -a "$@" -w "$SEL_REM" && notify-send " Transmission-daemon" "Torrent added to $SEL" -# else -# transmission-remote $TRANSMISSION_REMOTE -a "$@" && notify-send " Transmission-daemon" "Torrent added." -# fi +# +# +#OPT="$(echo "$OPTS" | bemenu -p "download to:")" +# +#if [ "$OPT" = "lf_select" ]; then +# if [ ! -f ~/.cache/lf/lastpath ]; then +# mkdir -p ~/.cache/lf/ +# touch ~/.cache/lf/lastpath +# echo "~" > ~/.cache/lf/lastpath +# fi +# $TERMINAL -e lf -last-dir-path ~/.cache/lf/lastpath "$(cat ~/.cache/lf/lastpath)" +# SEL="$(cat ~/.cache/lf/lastpath)" +# +#elif [ "$OPT" = "lf_last" ]; then +# SEL="$(cat ~/.cache/lf/lastpath)" +# +#elif [ "$OPT" = "default" ]; then +# SEL="" +# #else - if [ -d "$SEL" ]; then - transmission-remote -a "$@" -w "$SEL" && notify-send " Transmission-daemon" "Torrent added to $SEL" - else - transmission-remote -a "$@" && notify-send " Transmission-daemon" "Torrent added." - fi +# SEL="" +# notify-send "ERROR" +# exit +# #fi +# +# +##if [ "$TRANSMISSION_REMOTE" ]; then +## SEL_REM="$(echo "$SEL" | sed 's/^\/media\/nagato/\/media\/storage/g')" +##fi +# +# +##if [ "$DEST_OPT" = "remote" ]; then +## if [ "$SEL_REM" ]; then +## transmission-remote $TRANSMISSION_REMOTE -a "$@" -w "$SEL_REM" && notify-send " Transmission-daemon" "Torrent added to $SEL" +## else +## transmission-remote $TRANSMISSION_REMOTE -a "$@" && notify-send " Transmission-daemon" "Torrent added." +## fi +##else +# if [ -d "$SEL" ]; then +# transmission-remote -a "$@" -w "$SEL" && notify-send " Transmission-daemon" "Torrent added to $SEL" +# else +# transmission-remote -a "$@" && notify-send " Transmission-daemon" "Torrent added." +# fi +##fi diff --git a/.local/installers/arch/arch-install.sh b/.local/installers/arch/arch-install.sh index ef30e80..5fd0a09 100755 --- a/.local/installers/arch/arch-install.sh +++ b/.local/installers/arch/arch-install.sh @@ -103,6 +103,11 @@ harden() { echo " run this script with the --harden flag again after rebooting to ensure all settings are applied correctly." echo " press enter to continue." read input + + #add any firejail configuration here + #fix mpv not being able to open some files, allows mmpv to play videos in the ~/media dir + sudo sh -c 'echo "whitelist $HOME/media" >> /etc/firejail/whitelist-player-common.local' + } diff --git a/.local/scripts/vol.sh b/.local/scripts/vol.sh index 8c0a54c..d8c5522 100755 --- a/.local/scripts/vol.sh +++ b/.local/scripts/vol.sh @@ -1,10 +1,7 @@ #!/bin/sh -#PERC="5" PERC="0.05" -MUTEFN="~/.cache/volsh_mute" - refbar() { pkill sleep -P "$(cat ~/.cache/statusbar_pid )" } @@ -37,8 +34,9 @@ get() { } help() { - echo "-i N -> increment volume by N amount" - echo "-d N -> decrement volume by N amount" + echo "-i N -> increment volume by N (0.00 - 1.00)" + echo "-d N -> decrement volume by N (0.00 - 1.00)" + echo "-g -> get current volume" echo "--toggle-mute -> toggle mute sound" }