various changes
modified: .config/coc/history.json modified: .config/gtk-2.0/gtkfilechooser.ini modified: .config/newsboat/config modified: .config/nvim/init.vim modified: .config/qutebrowser/autoconfig.yml modified: .config/qutebrowser/qsettings/QtProject.conf modified: .config/zsh/.zshrc modified: .local/bin/castscreen modified: .local/bin/dmenuvpn modified: .local/bin/statusbar/internet deleted: .local/bin/tools/bright modified: .local/bin/tools/ce modified: .local/bin/tools/hover modified: .local/bin/tools/ripper modified: .local/bin/tools/startmpv modified: .zprofile
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
xrandr --output eDP-1 --mode 1920x1080 --auto
|
||||
xrdb -merge ~/.config/X11/Xres_casting
|
||||
wal -q -i ~/.config/wall.png -b '#000000'
|
||||
xdotool key super+F2
|
||||
#wal -q -i ~/.config/wall.png -b '000000'
|
||||
pkill dwm
|
||||
st mkchromecast --video --control --screencast
|
||||
xrandr --output eDP-1 --mode 3200x1800 --auto
|
||||
xrdb -merge ~/.config/X11/Xresources
|
||||
wal -q -i ~/.config/wall.png -b '#000000'
|
||||
xdotool key super+F2
|
||||
#wal -q -i ~/.config/wall.png -b '000000'
|
||||
pkill dwm
|
||||
|
@ -5,29 +5,28 @@ ETH_user="abocken@student-net.ethz.ch"
|
||||
ETH_password_path="ETH/VPN"
|
||||
|
||||
if [ "$1" = "status" ]; then
|
||||
ping -c 2 -W 3 -q webprint.ethz.ch > /dev/null && printf '🔬'
|
||||
if ping -c 1 -W 1 -q webprint.ethz.ch &> /dev/null
|
||||
then
|
||||
printf '🔬'
|
||||
fi
|
||||
pgrep openvpn > /dev/null && printf '🛡'
|
||||
printf '\n'
|
||||
pkill -RTMIN+9 dwmblocks
|
||||
else
|
||||
|
||||
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -p 'connect with which vpn server?' -l 10)"
|
||||
[ -z "$choice" ] && exit
|
||||
if [ "$choice" = "ETH" ]; then
|
||||
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -p 'connect with which vpn server?' -l 10)"
|
||||
[ -z "$choice" ] && exit
|
||||
if [ "$choice" = "ETH" ]; then
|
||||
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
||||
pass "$ETH_password_path" | sudo openconnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||
if ping -c 4 -W 6 -q webprint.ethz.ch ;then
|
||||
notify-send "ETH VPN" "ETH VPN connected"
|
||||
fi
|
||||
else
|
||||
if ping -c 1 -W 2 -q webprint.ethz.ch ;then
|
||||
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
||||
elif ping -c 1 -W 2 -q webprint.ethz.ch ;then
|
||||
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
||||
fi
|
||||
else
|
||||
printf '%s\n%s\n' "$USER" "$(pass $PASS_DIR)" > /tmp/tmp_pass
|
||||
[ -n "$choice" ] && st -t "openVPN" sudo openvpn --config "${XDG_CONFIG_HOME}/openvpn/cfgs/${choice}.ovpn" --auth-user-pass /tmp/tmp_pass & pkill -RTMIN+9 dwmblocks; sleep 2; rm -f /tmp/tmp_pass
|
||||
fi
|
||||
pkill -RTMIN+9 dwmblocks
|
||||
else
|
||||
printf '%s\n%s\n' "$USER" "$(pass $PASS_DIR)" > /tmp/tmp_pass
|
||||
[ -n "$choice" ] && st -t "openVPN" sudo openvpn --config "${XDG_CONFIG_HOME}/openvpn/cfgs/${choice}.ovpn" --auth-user-pass /tmp/tmp_pass & pkill -RTMIN+9 dwmblocks; sleep 2; rm -f /tmp/tmp_pass
|
||||
pkill -RTMIN+9 dwmblocks
|
||||
fi
|
||||
fi
|
||||
pkill -RTMIN+9 dwmblocks
|
||||
|
@ -12,8 +12,8 @@ esac
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon="📶"
|
||||
[ -z "${wifiicon+var}" ] && wifiicon="📶"
|
||||
#[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||
|
||||
|
||||
printf "%s%s" "$wifiicon" "$(cat /sys/class/net/w*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
||||
printf "%s%s\n" "$wifiicon" "$(cat /sys/class/net/w*/operstate | sed "s/down/❎/;s/up//")"
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
case $1 in
|
||||
"set") printf %0.f $( echo "scale=0; $2 * 9.37" | bc -l ) > /sys/class/backlight/intel_backlight/brightness;;
|
||||
"add") current=$( </sys/class/backlight/intel_backlight/brightness )
|
||||
new=$( printf %.0f $(echo "$current + $2 * 9.37" | bc -l ) )
|
||||
[ $new -gt 936 ] && bright set 937 || ( [ $new -lt 0 ] && bright set 0 || bright set "$(( new + 1 ))" ) ;;
|
||||
"del") bright add "-$2";;
|
||||
esac
|
@ -1,4 +1,18 @@
|
||||
#!/bin/bash
|
||||
currentdir="$(pwd)"
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
[ "$file" = "" ] || ( cd "$( dirname "$file" )" && $EDITOR "$file" && cd "$currentdir" )
|
||||
#file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
#[ "$file" = "" ] || ( cd "$( dirname "$file" )" && $EDITOR "$file" && cd "$currentdir" )
|
||||
ppid () { ps -p ${1:-$$} -o ppid=; }
|
||||
shell="$(ps aux | grep $( ppid ) | head -n1 | awk '{print $11}' )"
|
||||
#/bin/sh probably means we're in dmenu_run
|
||||
if [ "$shell" = "/bin/sh" ]; then
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | dmenu -l 10 -p 'open what file?' )"
|
||||
[ -z "$file" ] && exit
|
||||
## NEEDS TO BE WORKED ON
|
||||
cd "$( dirname "$file" )" && st $EDITOR "$file"
|
||||
else
|
||||
currentdir="$(pwd)"
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
[ -z "$file" ] && exit
|
||||
cd "$( dirname "$file" )" && rifle "$file" && cd "$currentdir"
|
||||
fi
|
||||
|
@ -12,5 +12,7 @@ case "$1" in
|
||||
right) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth - 2 * borderwidth ))
|
||||
vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newheight - 2 * borderwidth )) ;;
|
||||
esac
|
||||
xdotool windowsize "$current" $newwidth $newheight
|
||||
xdotool windowmove "$current" $horizontal $vertical
|
||||
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
|
||||
wmctrl -r :ACTIVE: -e 0,$horizontal,$vertical,$newwidth,$newheight
|
||||
#xdotool windowsize "$current" $newwidth $newheight
|
||||
#xdotool windowmove "$current" $horizontal $vertical
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#needed if run as cronjob
|
||||
export XDG_VIDEOS_DIR=$HOME/vids
|
||||
|
||||
echo $XDG_VIDEOS_DIR
|
||||
DLARCHIVE=$XDG_VIDEOS_DIR/.downloaded
|
||||
DLLOC=$XDG_VIDEOS_DIR
|
||||
CHANNELSFILE=$XDG_VIDEOS_DIR/.channels
|
||||
|
@ -6,9 +6,7 @@ js_playlist_index_loc="$HOME/src/youtube-playlist-video-ids"
|
||||
# I've saved my API key in my password manager, I reccomend you to do something similar.
|
||||
API_key="$(pass show 'Misc/Youtube Data API v3')"
|
||||
if echo "$1" | grep -qE 'youtube.*list'; then
|
||||
echo "$1"
|
||||
playlist_id="$( echo "$1" | perl -pe "s|^.*?(\?\|&)list=(.*?)|\2|; s|&index=[0-9]+||" )"
|
||||
echo PL_id:$playlist_id
|
||||
notify-send "startmpv" "Searching for all videos in playlist..."
|
||||
npm start --prefix "$js_playlist_index_loc" -- --api-key "$API_key" --playlist-id $playlist_id | sed 's/^/https:\/\/www.youtube.com\/watch?v=/' | xargs mpv || notify-send "startmpv" "An error has occured with playlist $playlist_id"
|
||||
else
|
||||
|
Reference in New Issue
Block a user