Various changes
modified: .config/coc/extensions/db.json modified: .config/qutebrowser/bookmarks/urls modified: .config/qutebrowser/qsettings/QtProject.conf modified: .config/xprofile modified: .local/bin/bt modified: .local/bin/displayselect modified: .local/bin/tools/dmenuhandler modified: .local/bin/tools/dmenupass modified: .local/bin/tools/passmenu2 modified: .local/bin/tools/watchit modified: .local/bin/tools/wv
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
SCAN_PERIOD=5
|
||||
AUTOTRUST=false #trust every newly paired device
|
||||
AUTOSCAN=false #immediately start scanning when started to speed up pairing process
|
||||
|
||||
#locations of blacklist and hard coded list of paired devices (watch out, need to modify Makefile as well if you want to change these values and still use make install)
|
||||
BLACKLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/blacklist
|
||||
PAIRLIST=${XDG_DATA_HOME:-$HOME/.local/share}/bt/paired
|
||||
@ -75,8 +76,9 @@ startup(){
|
||||
startup &
|
||||
update_pair_list &
|
||||
|
||||
# include head command here to speed up launch if too many devices are listed (long uptime and long scanning will lead to this depending on your surroundings)
|
||||
# shellcheck disable=SC1091
|
||||
if bluetoothctl devices | awk '{print "bluetoothctl info "$2}' | . /dev/stdin | grep -q "Connected: yes"
|
||||
if bluetoothctl devices | head | awk '{print "bluetoothctl info "$2}' | . /dev/stdin | grep -q "Connected: yes"
|
||||
then
|
||||
actions="$(printf "disconnect\n%s" "$actions")"
|
||||
fi
|
||||
@ -146,7 +148,7 @@ pair(){
|
||||
bluetoothctl trust "$dev_id"
|
||||
fi
|
||||
#if device is not already hard coded as paired, add to paired devices list
|
||||
if [ "$( grep "$dev_id" "$PAIRLIST")" = "" ] || [ "$(wc -l "$PAIRLIST")" -eq 0 ] && $pair_succesful
|
||||
if $pair_succesful && [ "$( grep "$dev_id" "$PAIRLIST")" = "" ] || [ "$(wc -l "$PAIRLIST")" -eq 0 ]
|
||||
then
|
||||
echo to be added to "$PAIRLIST":
|
||||
echo Device "$dev_id" "$choice"
|
||||
@ -221,8 +223,13 @@ case $choice in
|
||||
[ "$dev_no" != "" ] && dev_id=$( echo "$bt_IDS" | nl | grep -P "^.*$dev_no\t" | awk '{print $2}')
|
||||
if [ -n "$dev_id" ]; then
|
||||
power on
|
||||
bluetoothctl devices | grep -q "$dev_id" || bluetoothctl pair "$dev_id"
|
||||
bluetoothctl connect "$dev_id"
|
||||
if bluetoothctl info "$dev_id" | grep -q "Connected: yes"
|
||||
then
|
||||
bluetoothctl disconnect "$dev_id"
|
||||
else
|
||||
bluetoothctl devices | grep -q "$dev_id" || bluetoothctl pair "$dev_id"
|
||||
bluetoothctl connect "$dev_id"
|
||||
fi
|
||||
fi;;
|
||||
esac
|
||||
|
||||
|
@ -4,6 +4,9 @@
|
||||
# displays and lets user select one to use. User may also select "manual
|
||||
# selection" which opens arandr.
|
||||
|
||||
#automatically scale HD screens to better work with hidpi
|
||||
scale_factor_HD=1.6
|
||||
|
||||
twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
|
||||
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
|
||||
@ -34,7 +37,13 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary")
|
||||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
if [ "$primary" = "HDMI-1" ]; then
|
||||
xrandr --output "$primary" --auto --scale $scale_factor_HD --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
elif [ "$secondary" = "HDMI-1" ]; then
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale $scale_factor_HD
|
||||
else
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -16,5 +16,5 @@ case "$(printf "mpv\\ncopy url\\nqueue download\\n\\nqueue youtube-dl\\nbrowser\
|
||||
#w3m) w3m "$1" >/dev/null 2>&1 ;;
|
||||
#"mpv (float)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;;
|
||||
"rip media") dest="$(dmenuinput 'name of folder:')"
|
||||
[ "$dest" != "" ] && ( lynx --dump --nonumbers --listonly $1 | grep -E "(*\.webm|*\.mp4|\.gif|\.jpg|\.jpeg|\.png)" | sort -u | xargs wget -P /home/alex/$dest ) || ( lynx --dump --nonumbers --listonly $1 | grep -E "(*\.webm|*\.mp4|\.gif|\.jpg|\.jpeg|\.png)" | sort -u | xargs wget -P /home/alex/ );;
|
||||
lynx --dump --nonumbers --listonly "$1" | grep -E "(*\.webm|*\.mp4|\.gif|\.jpg|\.jpeg|\.png)" | sort -u | xargs wget -P "$HOME/$dest";;
|
||||
esac
|
||||
|
@ -1,2 +1,2 @@
|
||||
!/bin/sh
|
||||
#!/bin/sh
|
||||
dmenu -fn Monospace-13 -sb "#d79921" -sf "#1d2021" -nf "#000000" -nb "#000000" -p "$1" <&- && echo
|
||||
|
@ -47,8 +47,10 @@ while [ "$DONE" -eq 0 ] ; do
|
||||
pass show -c "$SELECTION" > $HOME/.cache/passstring
|
||||
sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000
|
||||
sleep 45
|
||||
[ -f $HOME/.cache/passstring ] && notify-send "Password" "password cleared from clipboard" -t 4000
|
||||
rm $HOME/.cache/passstring
|
||||
if [ -f $HOME/.cache/passstring ]; then
|
||||
notify-send "Password" "password cleared from clipboard" -t 4000
|
||||
rm $HOME/.cache/passstring
|
||||
fi
|
||||
|
||||
else
|
||||
xdotool - <<<"type --clearmodifiers -- $(pass show "$SELECTION" | head -n 1)"
|
||||
|
@ -12,4 +12,5 @@ do
|
||||
printf '%-*.*s%s\n' $COLS $COLS "$LINE" "$EL"
|
||||
done
|
||||
printf '%s%s' "$ED" "$HOME"
|
||||
sleep 0.2
|
||||
done
|
||||
|
@ -6,6 +6,6 @@ touch $videos
|
||||
while read line; do
|
||||
[ -f "$line" ] && echo $line >> $videos
|
||||
done <$alldata
|
||||
cat $videos | dmenu -i -l 30 -p "Choose a video to watch:" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r xdg-open
|
||||
cat $videos | sort -u | dmenu -i -l 30 -p "Choose a video to watch:" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r xdg-open
|
||||
rm "$alldata"
|
||||
rm "$videos"
|
||||
|
Reference in New Issue
Block a user