From 6907760e58cdad673e0af8d8846c5dd86ebac2d8 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Wed, 28 Oct 2020 13:48:43 +0100 Subject: [PATCH] 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 --- .config/coc/history.json | 3 +++ .config/gtk-2.0/gtkfilechooser.ini | 4 +-- .config/newsboat/config | 3 ++- .config/nvim/init.vim | 6 +++++ .config/qutebrowser/autoconfig.yml | 2 ++ .config/qutebrowser/qsettings/QtProject.conf | 4 +-- .config/zsh/.zshrc | 5 +++- .local/bin/castscreen | 8 +++--- .local/bin/dmenuvpn | 27 ++++++++++---------- .local/bin/statusbar/internet | 4 +-- .local/bin/tools/bright | 8 ------ .local/bin/tools/ce | 18 +++++++++++-- .local/bin/tools/hover | 6 +++-- .local/bin/tools/ripper | 2 +- .local/bin/tools/startmpv | 2 -- .zprofile | 2 ++ 16 files changed, 63 insertions(+), 41 deletions(-) delete mode 100755 .local/bin/tools/bright diff --git a/.config/coc/history.json b/.config/coc/history.json index ec534dc..36c9d4d 100644 --- a/.config/coc/history.json +++ b/.config/coc/history.json @@ -20,6 +20,9 @@ "%2Fhome%2Falex": [ "kk", " " + ], + "%2Fhome%2Falex%2Fdrv%2FDocuments%2Fencyclicals%2FleoXIII": [ + " " ] } } \ No newline at end of file diff --git a/.config/gtk-2.0/gtkfilechooser.ini b/.config/gtk-2.0/gtkfilechooser.ini index 7ca5fbd..38c42b7 100644 --- a/.config/gtk-2.0/gtkfilechooser.ini +++ b/.config/gtk-2.0/gtkfilechooser.ini @@ -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 diff --git a/.config/newsboat/config b/.config/newsboat/config index cc4853a..846a0b2 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -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 diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d8b9827..d23d81b 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -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 :set spell! +" inoremap :set spell! + set bg=light set go=a set mouse=a diff --git a/.config/qutebrowser/autoconfig.yml b/.config/qutebrowser/autoconfig.yml index 060ab54..8365489 100644 --- a/.config/qutebrowser/autoconfig.yml +++ b/.config/qutebrowser/autoconfig.yml @@ -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: diff --git a/.config/qutebrowser/qsettings/QtProject.conf b/.config/qutebrowser/qsettings/QtProject.conf index ccb9eee..81eab3c 100644 --- a/.config/qutebrowser/qsettings/QtProject.conf +++ b/.config/qutebrowser/qsettings/QtProject.conf @@ -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 diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 2e866c4..5558ea2 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -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 diff --git a/.local/bin/castscreen b/.local/bin/castscreen index 939e0e4..512ddbf 100755 --- a/.local/bin/castscreen +++ b/.local/bin/castscreen @@ -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 diff --git a/.local/bin/dmenuvpn b/.local/bin/dmenuvpn index 4aef354..9ad1a0f 100755 --- a/.local/bin/dmenuvpn +++ b/.local/bin/dmenuvpn @@ -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 diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index ad9bee5..b7f8dc9 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -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//")" diff --git a/.local/bin/tools/bright b/.local/bin/tools/bright deleted file mode 100755 index 4dd4826..0000000 --- a/.local/bin/tools/bright +++ /dev/null @@ -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=$(