From df1d5daa89407b3e1a80d9272b5784e1e44ac97d Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 30 May 2022 22:31:22 -0500 Subject: [PATCH] various cleanup. added gammastep-init.sh to config, to give geoclue location to gammastep --- .config/gammastep/config.ini | 2 -- .local/bin/transadd | 24 ++++++++++++------------ .local/init/startup | 2 +- .local/installers/artix/artix-install.sh | 7 ++----- .local/scripts/compress.sh | 2 +- .local/scripts/days_since.sh | 2 +- .local/scripts/gammastep-init.sh | 10 ++++++++++ .local/scripts/sleepytime.sh | 1 - .profile | 6 ++++++ 9 files changed, 33 insertions(+), 23 deletions(-) create mode 100755 .local/scripts/gammastep-init.sh diff --git a/.config/gammastep/config.ini b/.config/gammastep/config.ini index e5a9bce..4b98a3a 100644 --- a/.config/gammastep/config.ini +++ b/.config/gammastep/config.ini @@ -55,8 +55,6 @@ adjustment-method=wayland ; Keep in mind that longitudes west of Greenwich (e.g. the Americas) ; are negative numbers. [manual] -lat=32 -lon=-86 ; Configuration of the adjustment-method ; type 'gammastep -m METHOD:help' to see the settings. diff --git a/.local/bin/transadd b/.local/bin/transadd index 9e0269f..f3c74ef 100755 --- a/.local/bin/transadd +++ b/.local/bin/transadd @@ -13,7 +13,7 @@ lf_last" DEST="remote local" -DEST_OPT="$(echo "$DEST" | bemenu -p "select destination machine: ")" +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) @@ -45,21 +45,21 @@ else fi -if [ "$TRANSMISSION_REMOTE" ]; then - SEL_REM="$(echo "$SEL" | sed 's/^\/media\/nagato/\/media\/storage/g')" -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 [ "$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 +#fi diff --git a/.local/init/startup b/.local/init/startup index 6df8f86..1f6cbea 100644 --- a/.local/init/startup +++ b/.local/init/startup @@ -1,5 +1,5 @@ mako -gammastep +gammastep-init.sh devmon pipewire.sh mpd diff --git a/.local/installers/artix/artix-install.sh b/.local/installers/artix/artix-install.sh index dc7a627..19abfa5 100755 --- a/.local/installers/artix/artix-install.sh +++ b/.local/installers/artix/artix-install.sh @@ -22,7 +22,7 @@ enable_repo() { enable_repos() { #enable lib32 - enable_repo lib32 + enable_repo lib32 mirrorlist sudo pacman -Sy @@ -31,9 +31,6 @@ enable_repos() { sudo pacman-key --populate archlinux sudo pacman -Sy - #enable arch community repo - enable_repo community mirrorlist-arch - #enable artix universe repo if [ -z "$(grep "universe" /etc/pacman.conf)" ]; then sudo sh -c 'echo "[universe]" >> /etc/pacman.conf' @@ -50,7 +47,7 @@ enable_repos() { #enable arch community repo enable_repo extra mirrorlist-arch enable_repo community mirrorlist-arch - + enable_repo multilib mirrorlist-arch diff --git a/.local/scripts/compress.sh b/.local/scripts/compress.sh index 7e9eeec..75938b7 100755 --- a/.local/scripts/compress.sh +++ b/.local/scripts/compress.sh @@ -27,7 +27,7 @@ compress() { FILES="$(echo "$@" | xargs -0)" DIRNAME="$(basename "$FILES")" - if ! [ -d "$NAME" ]; then + if ! [ -d "$DIRNAME" ]; then DIRNAME="$(mkname "$@")" echo "making directory $DIRNAME" diff --git a/.local/scripts/days_since.sh b/.local/scripts/days_since.sh index b5ed38e..cf0c7aa 100755 --- a/.local/scripts/days_since.sh +++ b/.local/scripts/days_since.sh @@ -7,7 +7,7 @@ help() { ! [ -f "$1" ] && touch "$1" -#Command for ~/.cache/last_fap + if [ "$2" = "-u" ]; then echo $(date "+%y%m%d %H") >> "$1" else diff --git a/.local/scripts/gammastep-init.sh b/.local/scripts/gammastep-init.sh new file mode 100755 index 0000000..93f01a1 --- /dev/null +++ b/.local/scripts/gammastep-init.sh @@ -0,0 +1,10 @@ +#!/bin/sh +#run this to start gammastep +#got this from https://rumpelsepp.org/blog/geolocation-for-gammastep/ +#modified to be a posix shell script, and to save location data to a file +#so gammastep still works if internet is out. + +FN="$HOME/.cache/gs_geoclue.json" + +curl -Ls https://ipapi.co/json > "$FN" +gammastep -l "$( cat "$FN" | jq ".latitude" )":"$( cat "$FN" | jq ".longitude" )" -m wayland diff --git a/.local/scripts/sleepytime.sh b/.local/scripts/sleepytime.sh index 4d04b7d..83b1246 100755 --- a/.local/scripts/sleepytime.sh +++ b/.local/scripts/sleepytime.sh @@ -2,6 +2,5 @@ LOC="$HOME/media/videos/sleeping" VID="ARTILLERY_ASMR.mp4" -#VID="nofap_music_01.mp4" mpv "$LOC"/"$VID" --loop=inf diff --git a/.profile b/.profile index 9c1129a..ac7106c 100644 --- a/.profile +++ b/.profile @@ -64,4 +64,10 @@ export MANPATH="$MANPATH:/usr/local/man/" #fix arduino ide issues export AWT_TOOLKIT=MToolkit + +#mount samba share, needs entry in /etc/fstab for this line to work +# //192.168.1.218/storage /media/nagato cifs username=alex,pass=PASSWORD,workgroup=WORKGROUP,user,noauto 0 0 +mount /media/nagato & + + [ "$(tty)" = /dev/tty1 ] && exec dbus-launch sway