Adding some moRe scripts and android variables

This commit is contained in:
2021-09-07 20:22:09 +01:00
parent 2018d94552
commit 758934e0d5
3 changed files with 42 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
# profile file. Runs on login. Environmental variables are set here.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}:$(yarn global bin)"
unsetopt PROMPT_SP
@@ -43,6 +43,7 @@ export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum"
export ANDROID_AVD_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android/avd"
# Other program settings
export DICS="/usr/share/stardicts/dic/"
@@ -61,6 +62,11 @@ export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
# Development variables
export ANDROID_HOME="/opt/android"
export ANDROID_SDK_HOME="$ANDROID_HOME"
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME"
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\

24
.local/bin/downloadhandler Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
echo "starting"
echo "$1"
file="${1:-$HOME/Downloads}"
[ -d "$file" ] && file="$file/$(ls -Art "$file" | tail -n 1)"
echo "continuing"
echo "$file"
case "$file" in
*ergodox*.hex)
wally-cli "$file" ;;
# *png|*jpg|*jpe|*jpeg|*gif)
# curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
# *pdf|*cbz|*cbr)
# curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
# *mp3|*flac|*opus|*mp3?source*)
# qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
# *)
# [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
esac

11
.local/bin/installfont Executable file
View File

@@ -0,0 +1,11 @@
# !/bin/bash
dir=$(mktemp -d)
unzip "$1" -d "$dir"
mv "$dir/"*.ttf ~/.local/share/fonts/
mv "$dir/"*.otf ~/.local/share/fonts/
mv "$dir/"*.TTF ~/.local/share/fonts/
mv "$dir/"*.OTF ~/.local/share/fonts/