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:
Alexander Bocken 2020-10-28 13:48:43 +01:00
parent 0433f3ab41
commit 6907760e58
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
16 changed files with 63 additions and 41 deletions

View File

@ -20,6 +20,9 @@
"%2Fhome%2Falex": [
"kk",
" "
],
"%2Fhome%2Falex%2Fdrv%2FDocuments%2Fencyclicals%2FleoXIII": [
" "
]
}
}

View File

@ -2,8 +2,8 @@
LocationMode=path-bar
ShowHidden=false
ShowSizeColumn=true
GeometryX=4035
GeometryY=433
GeometryX=0
GeometryY=0
GeometryWidth=990
GeometryHeight=800
SortColumn=modified

View File

@ -1,8 +1,9 @@
#show-read-feeds no
auto-reload yes
#external-url-viewer "urlscan -dc -r 'linkhandler {}'"
#external-url-viewer "urlscan -dc -r 'dmenuhandler {}'"
external-url-viewer "newsboat_urlscan {}"
#external-url-viewer "urlscan -dn -r 'echo {} | newsboat_urlscan'
bind-key j down
bind-key k up

View File

@ -26,8 +26,14 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'dense-analysis/ale'
Plug 'arcticicestudio/nord-vim'
Plug 'tpope/vim-fugitive'
Plug 'rhysd/vim-grammarous'
call plug#end()
" Integrated spell-check
" set spellang = en,de
" nnoremap <silent> <F11> :set spell!<cr>
" inoremap <silent> <F11> <C-O>:set spell!<cr>
set bg=light
set go=a
set mouse=a

View File

@ -24,8 +24,10 @@ settings:
https://boards.4chan.org: true
https://boards.4channel.org: true
https://nobodyhasthe.biz: true
https://old.reddit.com: false
https://riot.im: true
https://support.cloud.google.com: true
https://www.duolingo.com: false
https://www.reddit.com: false
https://www.youtube.com: false
content.register_protocol_handler:

View File

@ -1,6 +1,6 @@
[FileDialog]
history=file:///home/alex/eth/werkstatt, file:///home/alex/dox/orga/imma, file:///home/alex/dox/orga/sbk, file:///home/alex/eth/zsf, file:///home/alex, file:///home/alex/bks
lastVisited=file:///home/alex/bks
history=file:///home/alex/dox/encyclicals/piousX/1907-modernists, file:///home/alex/dox/encyclicals/piousXI/1937-sorge, file:///home/alex/eth/dynamics, file:///home/alex, file:///home/alex/dl
lastVisited=file:///home/alex
qtVersion=5.15.1
shortcuts=file:, file:///home/alex
sidebarWidth=82

View File

@ -4,7 +4,7 @@
autoload -U colors && colors # Load colors
export LC_ALL="en_US.UTF-8"
PROMPT="%{%B%}%(?.%{$fg[grey]%}◆.%{$fg[red]%}✖ %?)%{$fg[blue]%} %1~ %(?.%{$fg[grey]%}%{$fg[blue]%}%{$fg[white]%}.%{$fg[red]%}) %{%f%b%}"
PROMPT="%{%B%}%(?.%{$fg[grey]%}◆.%{$fg[red]%}✖ %?)%{$fg[blue]%} %1~ %(?.%B%{$fg[grey]%}%{$fg[blue]%}%{$fg[white]%}.%{$fg[red]%}) %{%f%b%}"
#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
setopt autocd # Automatically cd into typed directory.
stty stop undef # Disable ctrl-s to freeze terminal.
@ -26,6 +26,9 @@ zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
#does not return error if argument cannot be found as file, was annoying for URLs with '?'
setopt NO_NOMATCH
# vi mode
bindkey -v
export KEYTIMEOUT=1

View File

@ -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

View File

@ -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

View File

@ -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//")"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -9,6 +9,8 @@
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
# Adds cargo bin path to $PATH
export PATH="$PATH:$(du "$HOME/.local/share/cargo/bin" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
# Adds MATLAB
#export PATH="$PATH:$(du "/usr/local/MATLAB" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
# Default programs:
export EDITOR="nvim"