From 3d864c067471c657b95979b30c2e5cdc603ad17b Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 13 Feb 2023 13:19:05 +0330 Subject: update --- .kshrc | 24 +++++--- .newsboat/urls | 16 +++-- .secrets.baseline | 4 +- .tmux.conf | 17 ++++-- .tunneltop.toml | 128 +++++++++++++++++++++++++++------------- .vimrc | 16 +++++ .zshrc | 23 ++++++-- bin/clipd | 24 ++++---- bin/virttop | 33 ++++++++++- devi.zsh-theme | 82 ++++++++++++------------- fonts/patch_dejavusansmono.sh | 32 ++++++---- irssi/config | 39 ++++++++++-- irssi/irssi.sh | 2 + irssi/solarized-powerline.theme | 19 ++++-- keymap.kbd | 2 +- sshfs/mount.sh | 4 +- tmux/date.sh | 35 +++++++++-- vagrant/722N.xml | 6 ++ 18 files changed, 358 insertions(+), 148 deletions(-) create mode 100644 vagrant/722N.xml diff --git a/.kshrc b/.kshrc index ba360d2..98ec191 100644 --- a/.kshrc +++ b/.kshrc @@ -4,7 +4,7 @@ set -o vi # set -o vi-tabcomplete # bind ^I=complete-list HISTFILE="$HOME/.ksh_history" -HISTSIZE=5000 +HISTSIZE=10000 alias ..="cd ../" alias ...="cd ../../" @@ -30,11 +30,17 @@ alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' +alias def="sdcv --color" +alias defe="sdcv --color -u dictd_www.dict.org_gcide" +alias defd="sdcv --color -u LDaF" +alias deff="sdcv --color -u XMLittre" + function loginname { - echo $USER + echo "$USER" } -PS1='$(echo -ne "\033[32m`loginname`@`hostname`:\033[00m";if [[ "${PWD#$HOME}" != "$PWD" ]] then; echo -ne "\033[34m~${PWD#$HOME}\033[00m"; else; echo -ne "\033[34m$PWD\033[00m";fi;echo -ne " >>> ")' +# PS1='$(echo -ne "\033[32m`loginname`@`hostname`:\033[00m";if [[ "${PWD#$HOME}" != "$PWD" ]] then; echo -ne "\033[34m~${PWD#$HOME}\033[00m"; else; echo -ne "\033[34m$PWD\033[00m";fi;echo -ne " >>> ")' +PS1='$(print -n "`logname`@`hostname`:";if [[ "${PWD#$HOME}" != "$PWD" ]] then; print -n "~${PWD#$HOME}"; else; print -n "$PWD";fi;print "\n$ ")' function docpp { cp ~/scripts/makefilecpp ./makefile @@ -58,7 +64,7 @@ function docc { function dig { globalholecounter=0 if test "$(ls -A "/home/devi/devi/abbatoir")"; then - while [ 1 ]; do + while true; do if [ -d "/home/devi/devi/abbatoir/hole$globalholecounter" ]; then # if its not empty if test "$(ls -A "/home/devi/devi/abbatoir/hole$globalholecounter")"; then @@ -91,9 +97,11 @@ export SHELL="ksh" export PATH=$PATH:/home/devi/scripts/bin export PATH=$PATH:/home/devi/bin export GOPROXY=https://goproxy.io -export HTTP_PROXY=socks5://127.0.0.1:9995 -export HTTPS_PROXY=socks5://127.0.0.1:9995 +export HTTP_PROXY=socks5h://127.0.0.1:9995 +export HTTPS_PROXY=socks5h://127.0.0.1:9995 export NO_PROXY=localhost,127.0.0.0/8,192.168.1.0/24,10.0.0.0/8,172.17.0.0/24 -export http_proxy=socks5://127.0.0.1:9995 -export https_proxy=socks5://127.0.0.1:9995 +export http_proxy=socks5h://127.0.0.1:9995 +export https_proxy=socks5h://127.0.0.1:9995 export no_proxy=localhost,127.0.0.0/8,192.168.1.0/24,10.0.0.0/8,172.17.0.0/24 +export ALL_PROXY=socks5h://127.0.0.1:9995 +export all_proxy=socks5h://127.0.0.1:9995 diff --git a/.newsboat/urls b/.newsboat/urls index 1eea8a2..f1bbfa2 100644 --- a/.newsboat/urls +++ b/.newsboat/urls @@ -2,14 +2,16 @@ https://www.reddit.com/r/CryptoCurrency.rss http://feeds.feedburner.com/abseilio https://www.cyberciti.biz/atom/atom.xml https://www.semicolonandsons.com/feed -https://blog.terminaldweller.com/rss/feed "~terminaldweller"Blog -https://suckless.org/atom.xml "~Suckless"Suckless +https://blog.terminaldweller.com/rss/feed "~terminaldweller" +https://suckless.org/atom.xml "~Suckless" https://microservices.io/feed.xml -https://news.ycombinator.com/rss "~HN"HN -https://www.ecliptik.com/feed.xml "~Ecliptik"Blog +https://news.ycombinator.com/rss "~HN" +https://www.ecliptik.com/feed.xml "~Ecliptik" +https://www.privacytools.io/guides/rss.xml "~Privacy_Tools" -gemini://mozz.us/journal/atom.xml "~GEMINI"MOZZ -gemini://midnight.pub/feed.xml "~GEMINI"Midnight_Pub +"exec:gemget gemini://mozz.us/journal/atom.xml --output -" "~MOZZ"GEMINI +"exec:gemget gemini://midnight.pub/feed.xml --output -" "~Midnight_Pub"GEMINI +"exec:torsocks --address 127.0.0.1 --port 9054 curl gopher://gopher.black:70/0/rss.xml" "~Gopher_Black"GOPHER https://rssgen.terminaldweller.com/?action=display&bridge=BinanceBridge&format=Atom "~Binance_Blog"Binance_Blog https://rssgen.terminaldweller.com/?action=display&bridge=HaveIBeenPwnedBridge&order=dateAdded&item_limit=20&format=Atom "~HIBP"HIBP @@ -116,6 +118,8 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCS4FAVeYW_IaZqAbqhlvxlA "~C https://www.youtube.com/feeds/videos.xml?channel_id=UCYVU6rModlGxvJbszCclGGw "~Rob_Braxman_Tech"youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCVik6mzTCurdJmvdj5dCa7A "~My_PlayHouse"youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCdSnjmLUUe_NT4ml9OkUi1A "~NewWorldReview"youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCpFFItkfZz1qz5PpHpqzYBw "~Nexpo"youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC9PIn6-XuRKZ5HmYeu46AIw "~Barely_Sociable"youtube https://www.youtube.com/feeds/videos.xml?user=g297125009 "~Gavin_Freeborn"youtube https://www.youtube.com/feeds/videos.xml?user=Hak5Darren "~Hak_5"youtube diff --git a/.secrets.baseline b/.secrets.baseline index 33b5cc4..5fd71f9 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -270,7 +270,7 @@ "filename": "irssi/config", "hashed_secret": "825e522c6f25f4d5e79c97adb96bf4d84f8606c2", "is_verified": false, - "line_number": 501 + "line_number": 524 } ], "kubernetes/mongodb/add-user.yaml": [ @@ -365,5 +365,5 @@ } ] }, - "generated_at": "2023-01-26T19:38:27Z" + "generated_at": "2023-02-13T09:48:20Z" } diff --git a/.tmux.conf b/.tmux.conf index e7265b0..887a5ec 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -13,8 +13,13 @@ set -g @plugin 'tmux-plugins/tmux-continuum' set -g @continuum-restore 'on' set -g @continuum-save-interval '15' +set -g @yank_selection 'clipboard' +set -g @yank_action 'copy-pipe-and-cancel' +set -g @custom_copy_command 'pyclip copy' +set -g @override_copy_command 'pyclip copy' + # set -g @plugin 'tmux-plugins/tmux-sidebar' -# set -g @resurrect-processes `ranger ssh w3mlastsession k9s top cointop newsboat irssi neomutt` +# set -g @resurrect-processes `ranger ssh w3mlastsession k9s top cointop newsboat neomutt` set -g @fzf-url-history-limit '2000' set -g @fzf-url-fzf-options '-w 70% -h 70% --multi -0 --no-preview --border=sharp' @@ -40,12 +45,12 @@ set -sg escape-time 0 set -g default-command /usr/bin/zsh set -g default-shell /usr/bin/zsh -set -g default-terminal "st-256color" -set -s set-clipboard external +set -g default-terminal "screen-256color" +# set -s set-clipboard external set-option -g prefix C-a set -g status-interval 120 -set-option -g history-limit 10000 +set-option -g history-limit 30000 set-option -g repeat-time 500 set -g display-time 0 set status-keys vi @@ -132,9 +137,11 @@ setw -g mode-keys vi bind [ copy-mode # bind -T copy-mode-vi 'v' send -X begin-selection # set -s copy-command 'wl-copy' -set -s copy-command 'xsel -ib' +# set -s copy-command 'xsel -ib' + bind -T copy-mode-vi 'v' send -X copy-pipe bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel + # bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel "xsel -i --clipboard" #bind -T copy-mode-vi 'V' rectangle-toggle bind ] paste-buffer diff --git a/.tunneltop.toml b/.tunneltop.toml index 9e62be6..487fa26 100644 --- a/.tunneltop.toml +++ b/.tunneltop.toml @@ -1,74 +1,83 @@ -[socks5ir] +[color] +header_fg = 4 +header_bg = 0 +active_fg = 23 +active_bg = 0 +disabled_fg = 8 +disabled_bg = 0 +timeout_fg = 63 +timeout_bg = 0 +unknown_fg = 38 +unknown_bg = 0 +down_fg = 208 +down_bg = 0 +box_fg = 22 +box_bg = 0 + +[tunnel.socks5ir] address = "127.0.0.1" port = 9997 command = "autossh -M 0 -N -D 9997 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 1022 87.236.209.206" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9997 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9997 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 10 -[socks5_3] +[tunnel.socks5_3] address = "127.0.0.1" port = 9995 command = "autossh -M 0 -N -D 0.0.0.0:9995 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l root -p 2022 185.112.147.110" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9995 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9995 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 10 -[socks5_5] +[tunnel.socks5_5] address = "127.0.0.1" port = 9990 command = "autossh -M 0 -N -D 0.0.0.0:9990 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9990 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9990 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 10 -[socks5_8] +[tunnel.socks5_8] address = "127.0.0.1" port = 9989 command = "autossh -M 0 -N -D 0.0.0.0:9989 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.47.208" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9989 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9989 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 10 -[i2pmapped6http] +[tunnel.i2pmapped6http] address = "127.0.0.1" port = 9064 command = "autossh -M 0 -N -L 0.0.0.0:9064:127.0.0.1:4444 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 --proxy http://127.0.0.1:9064 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --proxy http://127.0.0.1:9064 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped6server] +[tunnel.i2pmapped6server] address = "127.0.0.1" port = 9066 command = "autossh -M 0 -N -L 0.0.0.0:9066:127.0.0.1:7070 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 localhost:9066' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 localhost:9066' test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped6socks] +[tunnel.i2pmapped6socks] address = "127.0.0.1" port = 9067 command = "autossh -M 0 -N -L 0.0.0.0:9067:127.0.0.1:4447 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 --socks5 socks5h://127.0.0.1:9067 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --socks5 socks5h://127.0.0.1:9067 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped6irssilitia] +[tunnel.i2pmapped6irssilitia] address = "127.0.0.1" port = 9068 command = "autossh -M 0 -N -L 0.0.0.0:9068:127.0.0.1:6668 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" @@ -77,7 +86,7 @@ test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped6irssipostman] +[tunnel.i2pmapped6irssipostman] address = "127.0.0.1" port = 9069 command = "autossh -M 0 -N -L 0.0.0.0:9069:127.0.0.1:6669 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" @@ -86,62 +95,101 @@ test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped8http] +[tunnel.i2pmapped8http] address = "127.0.0.1" port = 9164 command = "autossh -M 0 -N -L 0.0.0.0:9164:127.0.0.1:4444 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.47.208" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 --proxy http://127.0.0.1:9164 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --proxy http://127.0.0.1:9164 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped8server] +[tunnel.i2pmapped8server] address = "127.0.0.1" port = 9166 command = "autossh -M 0 -N -L 0.0.0.0:9166:127.0.0.1:7070 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.47.208" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 localhost:9166' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 localhost:9166' test_command_result = "200" test_interval = 300 test_timeout = 30 -[i2pmapped8socks] +[tunnel.i2pmapped8socks] address = "127.0.0.1" port = 9167 command = "autossh -M 0 -N -L 0.0.0.0:9167:127.0.0.1:4447 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.47.208" -test_command = 'curl -s -o -s -w "%{http_code}" -I -4 --socks5 socks5h://127.0.0.1:9167 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --socks5 socks5h://127.0.0.1:9167 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' +test_command_result = "200" +test_interval = 300 +test_timeout = 30 + +[tunnel.i2pmappedvhttp] +address = "127.0.0.1" +port = 9264 +command = "autossh -M 0 -N -L 0.0.0.0:9264:127.0.0.1:4444 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.244.29.79" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --proxy http://127.0.0.1:9264 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' +test_command_result = "200" +test_interval = 300 +test_timeout = 30 + +[tunnel.i2pmappedvserver] +address = "127.0.0.1" +port = 9266 +command = "autossh -M 0 -N -L 0.0.0.0:9266:127.0.0.1:7070 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.244.29.79" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 localhost:9266' test_command_result = "200" test_interval = 300 test_timeout = 30 -[tormapped6] +[tunnel.i2pmappedvsocks] +address = "127.0.0.1" +port = 9267 +command = "autossh -M 0 -N -L 0.0.0.0:9267:127.0.0.1:4447 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.244.29.79" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -I -4 --socks5 socks5h://127.0.0.1:9267 http://iedzwh5v2vouywqy4eak3eu33amfn3rzhdcln7j4r5kcyvf46cea.b32.i2p:7774/' +test_command_result = "200" +test_interval = 300 +test_timeout = 30 + +[tunnel.tormapped6] address = "127.0.0.1" port = 9053 command = "autossh -M 0 -N -L 9053:127.0.0.1:9050 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.45.46" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9053 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9053 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 20 -[tormapped8] +[tunnel.tormapped8] address = "127.0.0.1" port = 9054 command = "autossh -M 0 -N -L 0.0.0.0:9054:127.0.0.1:9050 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.130.47.208" -test_command = 'curl -s -o -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9054 https://icanhazallips.terminaldweller.com:9380' -# test_command = "" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9054 https://icanhazallips.terminaldweller.com:9380' +test_command_result = "200" +test_interval = 300 +test_timeout = 20 + +[tunnel.tormappedv] +address = "127.0.0.1" +port = 9055 +command = "autossh -M 0 -N -L 0.0.0.0:9055:127.0.0.1:9050 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 3333 185.244.29.79" +test_command = 'curl -s -o /dev/null -s -w "%{http_code}" -k -I -4 --socks5 socks5h://127.0.0.1:9055 https://icanhazallips.terminaldweller.com:9380' test_command_result = "200" test_interval = 300 test_timeout = 20 -[haproxy_prom_mapped] +[tunnel.haproxy_prom_mapped] address = "127.0.0.1" port = 9099 command = "autossh -M 0 -N -L 0.0.0.0:9099:127.0.0.1:9099 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 1022 87.236.209.206" test_command = "curl -s localhost:9099" -# test_command = "" +test_command_result = "Found." +test_interval = 300 +test_timeout = 10 + +[tunnel.upnp_2234] +address = "127.0.0.1" +port = 2234 +command = "autossh -M 0 -N -L 0.0.0.0:2234:127.0.0.1:2234 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l root -p 2022 185.112.147.110" +test_command = "" test_command_result = "Found." test_interval = 300 test_timeout = 10 diff --git a/.vimrc b/.vimrc index 2acfaef..9fc389d 100644 --- a/.vimrc +++ b/.vimrc @@ -79,6 +79,16 @@ if !has('nvim') set completeopt+=popup endif +let $GOPROXY="https://goproxy.io" +let $HTTP_PROXY="socks5://127.0.0.1:9995" +let $HTTPS_PROXY="socks5://127.0.0.1:9995" +let $ALL_PROXY="socks5://127.0.0.1:9995" +let $NO_PROXY="localhost,127.0.0.0/8,192.168.1.0/24,10.0.0.0/8,172.17.0.0/24" +let $http_proxy="socks5://127.0.0.1:9995" +let $https_proxy="socks5://127.0.0.1:9995" +let $all_proxy="socks5://127.0.0.1:9995" +let $no_proxy="localhost,127.0.0.0/8,192.168.1.0/24,10.0.0.0/8,172.17.0.0/24" + highlight clear Search let g:is_posix = 1 @@ -1524,6 +1534,12 @@ augroup ALECSS autocmd! autocmd FileType css let b:ale_fixers = {'css': ['prettier']} augroup END +let b:ale_go_golangci_lint_options = "--enable-all" +augroup ALEGO + autocmd! + autocmd FileType go let b:ale_fixers = {'go': ['gofumpt']} + autocmd FileType go let b:ale_linters = {'go': ['golangci-lint']} +augroup END " we can edit gzip files because of this augroup gzip diff --git a/.zshrc b/.zshrc index 4d0ed51..d377c63 100644 --- a/.zshrc +++ b/.zshrc @@ -25,6 +25,7 @@ alias sudo="sudo " alias mpv="proxychains4 -q -f ~/proxies/swe/proxychains.conf mpv --save-position-on-quit --term-osd-bar --msg-module --msg-time --cache=yes --cache-secs=9600 --cache-on-disk --cache-dir=/tmp/ --demuxer-max-bytes=500MiB" alias w3m='proxychains4 -q -f ~/proxies/ice/proxychains.conf w3m -o auto_image=FALSE -o user_agent="$(get_random_ua.sh)" -graph' alias torw3m='torsocks --port 9053 w3m -o auto_image=FALSE -o user_agent="$(get_random_ua.sh)" -graph' +alias i2pw3m='proxychains4 -q -f ~/proxies/i2p_one/proxychains.conf w3m -o auto_image=FALSE -o user_agent="$(get_random_ua.sh)" -graph' alias rm="rm -I --one-file-system --preserve-root=all" alias vv="vim" alias ls="exa" @@ -147,7 +148,7 @@ alias jupyterlab="jupyter lab --no-browser --port 9989" alias iredisrc="vim ~/scripts/.iredisrc" alias fixiredisrc="cp ~/scripts/.iredisrc ~/.iredisrc" # alias irssi="TERM=screen-256color docker run --runtime=runsc -it -e TERM -u $(id -u):$(id -g) --log-driver=none -e DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" -v $HOME/.irssi:/home/user/.irssi:ro -v /etc/localtime:/etc/localtime:ro devi_irssi" -alias irssi="TERM=screen-256color docker run --runtime=runsc -it -e TERM -u $(id -u):$(id -g) --log-driver=none -v $HOME/.irssi:/home/user/.irssi:ro -v /etc/localtime:/etc/localtime:ro devi_irssi" +alias irssi="TERM=screen-256color COLORTERM=truecolor docker run --runtime=runsc -it -e COLORTERM -e TERM -u $(id -u):$(id -g) --log-driver=none -v $HOME/.irssi:/home/user/.irssi:ro -v /etc/localtime:/etc/localtime:ro devi_irssi" alias tor_irssi="TERM=screen-256color docker run --runtime=runsc -it -e TERM -u 1001:1001 --log-driver=none -v tor_irssi_mount:/home/user/.irssi -v ~/devi/abbatoir/hole16:/home/user/.irssi/certs tor_irssi" alias i2p_irssi="TERM=screen-256color docker run --runtime=runsc -it -e TERM -u $(id -u):$(id -g) --log-driver=none -v i2p_irssi_mount:/home/user/.irssi irssi:1.2.3" alias openbb="TERM=screen-256color \ @@ -242,7 +243,7 @@ alias youtube_dl="proxychains4 -f /home/devi/proxies/ice/proxychains.conf youtub # alias campv="proxychains4 -f /home/devi/proxies/ca/proxychains.conf mpv --no-video" alias tormpv="torsocks --port 9054 mpv --no-video" alias youtube144="mpv --ytdl-format=160+249" -alias youtube360="mpv --ytdl-format=243+160" +alias youtube360="mpv --ytdl-format=243+250" alias youtube480="mpv --ytdl-format=244+140" alias tridactylrc="vim ~/scripts/.tridactylrc" alias fixtridactylrc="cp ~/scripts/.tridactylrc ~/" @@ -310,6 +311,9 @@ alias nd2_proxy="proxychains4 -q -f ~/proxies/nd2/proxychains.conf" alias swe_proxy="proxychains4 -q -f ~/proxies/swe/proxychains.conf" alias ir_proxy="proxychains4 -q -f ~/proxies/ir/proxychains.conf" alias ice_proxy="proxychains4 -q -f ~/proxies/ice/proxychains.conf" +alias tor_one_proxy="proxychains4 -q -f ~/proxies/tor_one/proxychains.conf" +alias tor_two_proxy="proxychains4 -q -f ~/proxies/tor_two/proxychains.conf" +alias tor_three_proxy="proxychains4 -q -f ~/proxies/tor_threece/proxychains.conf" alias tor_carrier_proxy="proxychains4 -q -f ~/proxies/tor_carrier/proxychains.conf" alias glow="glow --style ~/.config/glow/dark.json --pager --local" alias nmap="grc nmap" @@ -333,7 +337,7 @@ alias sensors_pp="sensors -A -j 2> /dev/null | json_pp -json_opt pretty,canonica alias vdiff="vimdiff" # alias virt-top="/nix/store/gn20hprla1p86fkvml4c6im3839vmlzn-virt-top-1.1.1/bin/virt-top" alias finger="/nix/store/rqc8gdpx6dzwk38dx01ddb4kfcrkyiwq-bsd-finger-0.17/bin" -alias fox_in_a_box='ssh -X -i /home/devi/devi/vagrantboxes.git/main/dispffox/.vagrant/machines/default/libvirt/private_key vagrant@virt-dispffox.vagrant-libvirt "XAUTHORITY=/home/vagrant/.Xauthority firefox"' +alias fox_in_a_box='ssh -o Compression=no -X -i /home/devi/devi/vagrantboxes.git/main/dispffox/.vagrant/machines/default/libvirt/private_key vagrant@virt-dispffox.vagrant-libvirt "XAUTHORITY=/home/vagrant/.Xauthority firefox -no-remote"' alias run_doh_client="sudo doh-client -d doh.terminaldweller.com -r 185.130.47.81:443 -p getnsrecord --proxy-host 127.0.0.1:9995 --proxy-scheme socks5h --timeout 10" alias bun="ALL_PROXY=socks5h://127.0.0.1:9995 bun" alias ffox_i2p='ssh -C -X -i /home/devi/devi/vagrantboxes.git/main/i2p/.vagrant/machines/default/libvirt/private_key vagrant@i2p-host.vagrant-libvirt "XAUTHORITY=/home/vagrant/.Xauthority firefox"' @@ -354,6 +358,7 @@ alias mariadb="mariadb --safe-updates" alias tunneltoprc="vim ~/scripts/.tunneltop.toml" alias fixtunneltoprc="cp ~/scripts/.tunneltop.toml ~/.tunneltop.toml" alias tokei="tokei --hidden --num-format underscores -s lines" +alias waydroid="WAYLAND_DISPLAY=wayland-0 waydroid" function ccgrep() { EXTRA_ARG_BEFORE=$(llvm-config --libdir)/clang/$(llvm-config --version)/include @@ -535,7 +540,7 @@ export PATH=$PATH:/home/devi/opam export PATH=$PATH:/home/devi/devi/ghorg export PATH=$PATH:/home/devi/kubectl export PATH=$PATH:/home/devi/solidity -export PATH=$PATH:/home/devi/vagrant +# export PATH=$PATH:/home/devi/vagrant # export PATH=$PATH:/home/devi/devi/emsdk.git/main # export PATH=$PATH:/home/devi/devi/emsdk.git/main/node/14.15.5_64bit/bin # export PATH=$PATH:/home/devi/devi/emsdk.git/main/upstream/emscripten @@ -685,6 +690,10 @@ get_irssi_logs() { psql -h 192.168.1.109 -p 30432 -U postgres postgres -c '\c irc' -c 'select * from public.logs;' } +virshxml() { + virsh dumpxml --domain "$@" | pygmentize -l xml -P style=$PYGMENTIZE_STYLE | nl | less +} + setopt APPEND_HISTORY setopt EXTENDED_HISTORY setopt HIST_FIND_NO_DUPS @@ -732,7 +741,7 @@ fzf-down() { } dff() { - df -hT "$@" | colcol | column -t + grc df --output -h } jcurl() { @@ -888,5 +897,9 @@ export DVM_DIR="/home/devi/.dvm" export PATH="$DVM_DIR/bin:$PATH" export PATH=/home/devi/.bun/bin:$PATH +#plan9 +# PLAN9=/home/devi/devi/plan9port.git/master export PLAN9 +# PATH=$PATH:$PLAN9/bin export PATH + [[ -s "/home/devi/.gvm/scripts/gvm" ]] && source "/home/devi/.gvm/scripts/gvm" # [[ -s "/usr/share/grc/grc.zsh" ]] && source /usr/share/grc/grc.zsh diff --git a/bin/clipd b/bin/clipd index 6c6d40e..bf3d1f3 100755 --- a/bin/clipd +++ b/bin/clipd @@ -8,9 +8,7 @@ local string = require("string") local signal = require("posix.signal") local argparse = require("argparse") local sys_stat = require("posix.sys.stat") -local unistd_getuid = require("posix.unistd.getuid") -local unistd_getgid = require("posix.unistd.getgid") -local unistd_getpid = require("posix.unistd.getpid") +local unistd = require("posix.unistd") local posix_syslog = require("posix.syslog") local function default_luarocks_modules() @@ -50,8 +48,8 @@ local function log_to_syslog(log_str, log_priority) end local function check_clip_hist_perms(clip_hist) - local uid = unistd_getuid() - local gid = unistd_getgid() + local uid = unistd.getuid() + local gid = unistd.getgid() for k, v in pairs(sys_stat.stat(clip_hist)) do if k == "st_uid" then if v ~= uid then @@ -70,7 +68,8 @@ local function check_clip_hist_perms(clip_hist) end end if k == "st_mode" then - if v & sys_stat.S_IRWXU ~= 0 then + if v and (sys_stat.S_IRUSR or sys_stat.S_IWUSR) ~= + (sys_stat.S_IRUSR or sys_stat.S_IWUSR) then log_to_syslog( "file permissions are too open. they need to be 0600.", posix_syslog.LOG_CRIT) @@ -81,16 +80,21 @@ local function check_clip_hist_perms(clip_hist) end local function check_pid_file() - local f = sys_stat("/var/run/clipd.pid") + local f = sys_stat.stat("/var/run/clipd.pid") if f ~= nil then log_to_syslog("clipd is already running", posix_syslog.LOG_CRIT) os.exit(1) end end +-- FIXME- we cant write to /var/run since we are running as non-root user local function write_pid_file() - local f = io.open("/var/run/clipd.pid") - f.write(unistd_getpid()) + local f = io.open("/var/run/clipd.pid", "w") + if f == nil then + log_to_syslog("cant open pid file for writing", posix_syslog.LOG_CRIT) + os.exit(1) + end + f.write(unistd.getpid()) end local function remove_pid_file() end @@ -145,7 +149,7 @@ local function main() local args = parser:parse() check_clip_hist_perms(args["hist_file"]) check_pid_file() - write_pid_file() + -- write_pid_file() local status, err = pcall(loop(args["hist_file"], args["hist_size"])) if ~status then log_to_syslog(err, posix_syslog.LOG_CRIT) end remove_pid_file() diff --git a/bin/virttop b/bin/virttop index 24c4bb8..4d8943b 100755 --- a/bin/virttop +++ b/bin/virttop @@ -9,11 +9,14 @@ import argparse import csv import dataclasses import enum +import os import signal import sys import time import typing -from xml.dom.minidom import Document + +# we are only using this for type annotation +from xml.dom.minidom import Document # nosec from defusedxml import ElementTree # type:ignore from defusedxml import minidom @@ -90,6 +93,11 @@ class VirtData: disk_writes: typing.List[str] = dataclasses.field(default_factory=list) snapshot_counts: typing.List[str] = dataclasses.field(default_factory=list) uri: typing.List[str] = dataclasses.field(default_factory=list) + memory_pool: typing.List[str] = dataclasses.field(default_factory=list) + + pools: typing.List[libvirt.virStoragePool] = dataclasses.field( + default_factory=list + ) def get_network_info( @@ -249,7 +257,10 @@ def fill_virt_data_uri( virt_data.name.append(dom.name()) mem_stats = dom.memoryStats() - virt_data.mem_actual.append(size_abr(mem_stats["actual"], 1000)) + if "actual" in mem_stats: + virt_data.mem_actual.append(size_abr(mem_stats["actual"], 1000)) + else: + virt_data.mem_actual.append("n/a") # BSD guests dont support mem balloons? try: @@ -263,6 +274,18 @@ def fill_virt_data_uri( virt_data.write_bytes.append(size_abr(stats[4], 1)) virt_data.read_bytes.append(size_abr(stats[0], 1)) + found_the_pool: bool = False + disk = tree.find("devices/disk/source").get("file") + for pool in virt_data.pools: + if os.path.basename(disk) in pool.listVolumes(): + virt_data.memory_pool.append(pool.name()) + found_the_pool = True + # you could delete the pool but keep the volumes inside + # which results in a functional VM but it wont have a + # volume inside a pool that we can detect + if not found_the_pool: + virt_data.memory_pool.append("N/A") + disk_info = get_disk_info(xml_doc) image_name = disk_info["file"] _, rd_bytes, _, wr_bytes, _ = dom.blockStats(image_name) @@ -290,7 +313,9 @@ def main() -> None: conn = libvirt.openReadOnly(hv_host) active_hosts = conn.listDomainsID() if len(active_hosts) > 0: - # pools = conn.listAllStoragePools() + virt_data.pools = conn.listAllStoragePools() + # for pool in virt_data.pools: + # print(pool.listVolumes()) # networks = conn.listAllNetworks() # print([pool.name() for pool in conn.listAllStoragePools()]) # print([net.name() for net in conn.listAllNetworks()]) @@ -321,6 +346,7 @@ def main() -> None: "IO_WRITE_B", "SNAPSHOTS", "URI", + "STORAGE_POOL", ], False, virt_data.vm_id, @@ -336,6 +362,7 @@ def main() -> None: virt_data.disk_writes, virt_data.snapshot_counts, virt_data.uri, + virt_data.memory_pool, ) for line in lines: print(line) diff --git a/devi.zsh-theme b/devi.zsh-theme index 1cb132d..02e2167 100644 --- a/devi.zsh-theme +++ b/devi.zsh-theme @@ -104,47 +104,47 @@ is_in_git_repo() { git rev-parse HEAD > /dev/null 2>&1 } -steeef_preexec() { - case "$2" in - *git*) - PR_GIT_UPDATE=1 - ;; - *svn*) - PR_GIT_UPDATE=1 - ;; - esac -} -add-zsh-hook preexec steeef_preexec - -steeef_chpwd() { - local result=$(git rev-parse --is-bare-repository 2> /dev/null) - if [[ $? == 0 ]]; then - if [[ $result == true ]]; then - PR_GIT_UPDATE= - else - PR_GIT_UPDATE=1 - fi - else - PR_GIT_UPDATE=1 - fi -} -add-zsh-hook chpwd steeef_chpwd - -steeef_precmd() { - if [[ -n "$PR_GIT_UPDATE" ]] ; then - if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then - PR_GIT_UPDATE=1 - FMT_BRANCH="${PM_RST} on %{$turquoise%}%s>%r>%b%u%c%a%{$hotpink%} ●${PR_RST}" - else - FMT_BRANCH="${PM_RST} on %{$turquoise%}%s>%r>%b%u%c%a${PR_RST} " - fi - zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" - - vcs_info 'prompt' - PR_GIT_UPDATE= - fi -} -add-zsh-hook precmd steeef_precmd +# steeef_preexec() { +# case "$2" in +# *git*) +# PR_GIT_UPDATE=1 +# ;; +# *svn*) +# PR_GIT_UPDATE=1 +# ;; +# esac +# } +# add-zsh-hook preexec steeef_preexec + +# steeef_chpwd() { +# local result=$(git rev-parse --is-bare-repository 2> /dev/null) +# if [[ $? == 0 ]]; then +# if [[ $result == true ]]; then +# PR_GIT_UPDATE= +# else +# PR_GIT_UPDATE=1 +# fi +# else +# PR_GIT_UPDATE=1 +# fi +# } +# add-zsh-hook chpwd steeef_chpwd + +# steeef_precmd() { +# if [[ -n "$PR_GIT_UPDATE" ]] ; then +# if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then +# PR_GIT_UPDATE=1 +# FMT_BRANCH="${PM_RST} on %{$turquoise%}%s>%r>%b%u%c%a%{$hotpink%} ●${PR_RST}" +# else +# FMT_BRANCH="${PM_RST} on %{$turquoise%}%s>%r>%b%u%c%a${PR_RST} " +# fi +# zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" + +# vcs_info 'prompt' +# PR_GIT_UPDATE= +# fi +# } +# add-zsh-hook precmd steeef_precmd # function guess_who { # upower -e > /dev/null 2>&1 diff --git a/fonts/patch_dejavusansmono.sh b/fonts/patch_dejavusansmono.sh index f376e29..09111c8 100755 --- a/fonts/patch_dejavusansmono.sh +++ b/fonts/patch_dejavusansmono.sh @@ -1,36 +1,44 @@ #!/usr/bin/env bash set -ex +FONT_NORMAL=DejaVuSansMonoNerdNormal.ttf +FONT_BOLD=DejaVuSansMonoNerdBold.ttf +FONT_OBLIQUE=DejaVuSansMonoNerdOblique.ttf +FONT_BOLD_OBLIQUE=DejaVuSansMonoNerdBoldOblique.ttf + FONT_PATCHER=./font-patcher -OPTIONS="--adjust-line-height \ ---fontawesome \ +OPTIONS="--fontawesome \ --fontawesomeextension \ --fontlogos \ --octicons \ --codicons \ --powersymbols \ --pomicons \ +--material \ +--careful \ --powerline \ --powerlineextra \ --weather \ +--mono \ +--adjust-line-height \ --variable-width-glyphs \ ---careful" +--makegroups" FONT_LIST=("./dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf" "./dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-BoldOblique.ttf" "./dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-Oblique.ttf" "./dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-Bold.ttf") for FONT in ${FONT_LIST[@]};do - ${FONT_PATCHER} ${OPTIONS} ${FONT} + ${FONT_PATCHER} ${OPTIONS} "${FONT}" done -mv DejaVu\ Sans\ Mono\ Bold\ Nerd\ Font\ Plus\ Font\ Awesome\ Plus\ Font\ Awesome\ Extension\ Plus\ Octicons\ Plus\ Power\ Symbols\ Plus\ Codicons\ Plus\ Pomicons\ Plus\ Font\ Logos\ Plus\ Weather\ Icons.ttf DejaVuSansMonoNerdBold.ttf -mv DejaVu\ Sans\ Mono\ Bold\ Oblique\ Nerd\ Font\ Plus\ Font\ Awesome\ Plus\ Font\ Awesome\ Extension\ Plus\ Octicons\ Plus\ Power\ Symbols\ Plus\ Codicons\ Plus\ Pomicons\ Plus\ Font\ Logos\ Plus\ Weather\ Icons.ttf DejaVuSansMonoNerdBoldOblique.ttf -mv DejaVu\ Sans\ Mono\ Nerd\ Font\ Plus\ Font\ Awesome\ Plus\ Font\ Awesome\ Extension\ Plus\ Octicons\ Plus\ Power\ Symbols\ Plus\ Codicons\ Plus\ Pomicons\ Plus\ Font\ Logos\ Plus\ Weather\ Icons.ttf DejaVuSansMonoNerdNormal.ttf -mv DejaVu\ Sans\ Mono\ Oblique\ Nerd\ Font\ Plus\ Font\ Awesome\ Plus\ Font\ Awesome\ Extension\ Plus\ Octicons\ Plus\ Power\ Symbols\ Plus\ Codicons\ Plus\ Pomicons\ Plus\ Font\ Logos\ Plus\ Weather\ Icons.ttf DejaVuSansMonoNerdOblique.ttf +# mv 'DejaVu Sans Mono Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono Bold Oblique.ttf' ${FONT_BOLD_OBLIQUE} +# mv 'DejaVu Sans Mono Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono Bold.ttf' ${FONT_BOLD} +# mv 'DejaVu Sans Mono Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono Oblique.ttf' ${FONT_OBLIQUE} +# mv 'DejaVu Sans Mono Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono.ttf' ${FONT_NORMAL} -# mv 'DejaVu Sans Mono Bold Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono.ttf' DejaVuSansMonoNerdBold.ttf -# mv 'DejaVu Sans Mono Bold Oblique Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono.ttf' DejaVuSansMonoNerdBoldOblique.ttf -# mv 'DejaVu Sans Mono Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono.ttf' DejaVuSansMonoNerdNormal.ttf -# mv 'DejaVu Sans Mono Oblique Nerd Font Plus Font Awesome Plus Font Awesome Extension Plus Octicons Plus Power Symbols Plus Codicons Plus Pomicons Plus Font Logos Plus Weather Icons Mono.ttf' DejaVuSansMonoNerdOblique.ttf +mv './DejaVu Sans Mono Nerd Font Complete Mono Bold Oblique.ttf' ${FONT_BOLD_OBLIQUE} +mv './DejaVu Sans Mono Nerd Font Complete Mono Bold.ttf' ${FONT_BOLD} +mv './DejaVu Sans Mono Nerd Font Complete Mono Oblique.ttf' ${FONT_OBLIQUE} +mv './DejaVu Sans Mono Nerd Font Complete Mono.ttf' ${FONT_NORMAL} sudo cp ./DejaVuSansMonoNerdBold.ttf /usr/share/fonts/TTF/ sudo cp ./DejaVuSansMonoNerdBoldOblique.ttf /usr/share/fonts/TTF/ diff --git a/irssi/config b/irssi/config index 14cf750..8914e06 100644 --- a/irssi/config +++ b/irssi/config @@ -207,9 +207,11 @@ channels = ( # { name = "#openssh"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, # { name = "#gdb"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#openbsd"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, + { name = "#lobsters"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#gnupg"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#znc"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#go-nuts"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, + { name = "#opennic"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "##terminaldweller"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#voidlinux"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, { name = "#CataclysmDDA"; chatnet = "Libera-ZNC"; autojoin = "yes"; }, @@ -306,7 +308,7 @@ statusbar = { # treated "normally", you could change the time/user name to whatever time = "{sb $Z}"; - user = "%z005fff{sb {sbnickmode $[-2]cumode}%k$N %Zeeeeee {sbumode %k$usermode} %Z005fff%0%z005f00{sbaway $A}}%N"; + user = "%9%z005fff{sb {sbnickmode $[-2]cumode}%k$N %Zeeeeee {sbumode %k$usermode} %Z005fff%0%z005f00{sbaway $A}}%N"; # treated specially .. window is printed with non-empty windows, # window_empty is printed with empty windows @@ -315,7 +317,7 @@ statusbar = { prompt = "please%z005f87{%k%z005f87%9$c $*%w%k$R%w%k$S%w%k$N%w%k$T %N%Z005f87}%n"; prompt_empty = "you%z005f87%k%z005f87%9$c $*%w%k$R%w%k$S%w%k$N%w%k$T %N%Z005f87%n"; - topic = " $topic"; + topic = "%Z005f00%k%z005f00%N%Z005f00%N %Z5f5faf%9 $topic%N"; topic_empty = " Irssi v$J - http://www.irssi.org"; # all of these treated specially, they're only displayed when needed @@ -327,6 +329,8 @@ statusbar = { # vim_mode vim_mode_1 = "%z005f5f%Zffffff%z005f5f%k%9 $vim_cmd_mode%N"; vim_windows_1 = "%Z005f5f%0%z005f5f%k%9 $vim_wins%z005f5f"; + + itime = "%Z005f00%k%z005f00%9 $0 %z005f00"; }; # there's two type of statusbars. root statusbars are either at the top @@ -354,11 +358,11 @@ statusbar = { user = { }; window = { }; window_empty = { }; - mh_sbsplitmode = { }; lag = { priority = "-1"; }; more = { priority = "-1"; alignment = "right"; }; otr = { priority = "100"; alignment = "right"; }; usercount = { }; + inputlength = { alignment = "right"; }; rotator = { alignment = "right"; }; vim_windows_1 = { alignment = "right"; }; vim_mode_1 = { priority = "100"; alignment = "right"; }; @@ -406,6 +410,7 @@ statusbar = { items = { barstart = { }; timezones = { }; + itime = { priority = "1"; alignment = "right"; }; barend = { alignment = "right"; }; }; }; @@ -438,9 +443,26 @@ statusbar = { barend = { priority = "100"; alignment = "right"; }; }; }; + awl_3 = { + items = { + barstart = { priority = "100"; }; + awl_3 = { }; + barend = { priority = "100"; alignment = "right"; }; + }; + }; + awl_4 = { + items = { + barstart = { priority = "100"; }; + awl_4 = { }; + barend = { priority = "100"; alignment = "right"; }; + }; + }; }; }; settings = { + misc = { + split_line_end = "↪"; + } core = { real_name = "john doe"; user_name = "devi"; @@ -456,7 +478,8 @@ settings = { theme = "solarized-powerline"; hilight_color = "%Zd75f5f"; emphasis_italics = "yes"; - emphasis_replace = "yes"; + emphasis_multiword = "yes"; + emphasis_replace = "no"; show_names_on_join = "no"; }; "fe-text" = { actlist_sort = "refnum"; }; @@ -508,6 +531,12 @@ settings = { start_cmd = "yes"; vim_mode_start_cmd = "yes"; vim_mode_max_undo_lines = "100"; + # inputlength + inputlength_width = "0"; + inputlength_padding_char = "%Z005f00  "; + # bitlbee_typing_notice + bitlbee_send_typing = "0"; + bitlbee_typing_allwin = "1"; }; "irc/dcc" = { dcc_download_path = "~/.irssi/downloads/"; @@ -593,11 +622,13 @@ ignores = ( { level = "JOINS PARTS QUITS NICKS"; channels = ( "#news" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#mednafen" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#forgefed" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#lobsters" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#s6" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#postgresql" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#meta" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#gemini" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#llvm" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#opennic" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#selfhosting" ); }, { level = "JOINS PARTS QUITS NICKS"; channels = ( "#irc" ); }, { level = "CTCPS"; }, diff --git a/irssi/irssi.sh b/irssi/irssi.sh index 8a37915..7d3d74f 100755 --- a/irssi/irssi.sh +++ b/irssi/irssi.sh @@ -8,7 +8,9 @@ wget https://scripts.irssi.org/scripts/desktop_notify.pl wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/vim-mode/vim_mode.pl wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/irssi-logger/irssi_logger.pl wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/hilite-url/hilite_url.pl +wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/il/il.pl wget https://scripts.irssi.org/scripts/line_buffer.pl +wget https://raw.githubusercontent.com/irssi/scripts.irssi.org/master/scripts/itime.pl wget https://scripts.irssi.org/scripts/messages_bottom.pl wget https://scripts.irssi.org/scripts/nm2.pl wget https://scripts.irssi.org/scripts/rotator.pl diff --git a/irssi/solarized-powerline.theme b/irssi/solarized-powerline.theme index cc83466..37b0b3f 100644 --- a/irssi/solarized-powerline.theme +++ b/irssi/solarized-powerline.theme @@ -88,7 +88,8 @@ abstracts = { channel = "%Z00af00$*%n"; # nick is printed - nick = "%z005f87%Zeeeeee{nickcolor $*}"; + # nick = "%z005f87%Zeeeeee{nickcolor $*}"; + nick = "%Zeeeeee{nickcolor $*}"; mynick = "%Zeeeeee{nickcolor $*}"; inick = "%Zeeeeee{nickcolor $*}"; # Inverted @@ -186,19 +187,20 @@ abstracts = { # private message, $0 = nick, $1 = host # TODO: To test for Solarized - privmsg = " %m$0%G<%n$1-%G>%n "; + privmsg = " %m$0%G<%n$1-%G>%n %Z005f87"; # private message from you, $0 = "msg", $1 = target nick # TODO: To test for Solarized - ownprivmsg = " %Z005f87$0%G<%Z005f87$1-%G>%n "; + ownprivmsg = " %Z005f87$0%G<%Z005f87$1-%G>%n %Z005f87"; # own private message in query - ownprivmsgnick = "%z5f5fff%k{%z5f5fff $*}%N%Z5f5fff %C"; + ownprivmsgnick = "%z5f5fff%k{%z5f5fff $*}%N%Z5f5fff %Z005f87"; ownprivnick = "%k$*"; # private message in query # NOTE: for some reason, we gotta handle both the nick & msg on in this line - privmsgnick = "%5%k{msgnick $*}%N%m %n"; + # privmsgnick = "%5%k{ %5%k msgnick %m%0%N $*}%N%m %n"; + privmsgnick = "%z005f00%k{%z005f00%k %z005f00%k $*}%N%Z005f00 %n %Z005f87"; ## ## Actions (/ME stuff) @@ -479,4 +481,11 @@ formats = { neat_style = ",cp,,,,,,,"; neat_custom_modes = "&%B&%n%Zeeeeee | @%g@%n%Zeeeeee | +%y+%n%Zeeeeee"; }; + "Irssi::Script::mh_sbsplitmode" = { + mh_sbsplitmode_line = "%Zaf5f87{server $0}: $1 {comment $2}"; + mh_sbsplitmode_line_no_detail = "%Zaf5f87{server $0}: %Zaf5f87 {error $1}"; + mh_sbsplitmode_info = "%Zaf5f87{server $0} $1 {hilight splitmode}"; + mh_sbsplitmode_info_details = "%Zaf5f87{server $0} $1 {hilight splitmode} {comment $2}"; + mh_sbsplitmode_error = "%Zaf5f87{error $0}"; + } }; diff --git a/keymap.kbd b/keymap.kbd index 72e0d58..a27f7a0 100644 --- a/keymap.kbd +++ b/keymap.kbd @@ -17,7 +17,7 @@ ) -------------------------------------------------------------------------- |# (defcfg - input (device-file "/dev/input/by-id/usb-Razer_Razer_Huntsman_Tournament_Edition_00000000001A-if01-event-kbd") + input (device-file "/dev/input/by-id/usb-Razer_Razer_Huntsman_Tournament_Edition_00000000001A-event-kbd") output (uinput-sink "KMonad output") cmp-seq lalt diff --git a/sshfs/mount.sh b/sshfs/mount.sh index 6d0ef1f..490b2c7 100755 --- a/sshfs/mount.sh +++ b/sshfs/mount.sh @@ -3,7 +3,7 @@ sshfs \ -o compression=no \ -o idmap=user \ - -o reconnect \ + -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \ ubuntu@10.167.131.24:/home/ubuntu \ /home/devi/sshfs/lxc/ubuntu2204_python @@ -11,6 +11,6 @@ sshfs \ sshfs \ -o compression=no \ -o idmap=user \ - -o reconnect \ + -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \ ubuntu@10.167.131.30:/home/ubuntu \ /home/devi/sshfs/lxc/ubuntu2204_js diff --git a/tmux/date.sh b/tmux/date.sh index ca75a6d..7a82d91 100755 --- a/tmux/date.sh +++ b/tmux/date.sh @@ -3,20 +3,47 @@ # source common.sh SEPARATOR_LEFT_BOLD="" SEPARATOR_LEFT_THIN="" +PROXY="proxychains4 -q -f /home/devi/proxies/ice/proxychains.conf" + +internet_time_cache() { + INTERNET_TIME_CACHE_AGE=60 + INTERNET_TIME_CACHE_OUTPUT=/tmp/tmux_internet_time_cache + # if the cache has not expired yet + if [ $(( $( stat --format=%Y $INTERNET_TIME_CACHE_OUTPUT ) + INTERNET_TIME_CACHE_AGE )) -gt $( date +%s ) ];then + : + else + date -u +"%T" -d @$(curl -s --connect-timeout 10 --socks5-hostname localhost:9054 --user-agent "$(get_random_ua.sh)" http://worldtimeapi.org/api/timezone/Europe/London.json | jq '.unixtime') > ${INTERNET_TIME_CACHE_OUTPUT} + fi + cat ${INTERNET_TIME_CACHE_OUTPUT} +} + +weather_info_cache() { + WEATHER_INFO_CACHE_AGE=300 + WEATHER_INFO_CACHE_OUTPUT=/tmp/tmux_weather_info_cache + if [ $(( $( stat --format=%Y $WEATHER_INFO_CACHE_OUTPUT ) + INTERNET_TIME_CACHE_AGE )) -gt $( date +%s ) ];then + : + else + ${PROXY} curl -s 'wttr.in/tehran?T&format=%f' > ${WEATHER_INFO_CACHE_OUTPUT} + fi + cat ${WEATHER_INFO_CACHE_OUTPUT} +} + RESULT=$(date +"%a %D %H:%M") -PROXY="proxychains4 -q -f /home/devi/proxies/ice/proxychains.conf" DAY="#[fg=colour255 bg=colour31]"$(echo "$RESULT" | gawk '{print $1}') DATE="#[fg=colour255 bg=colour31]"$(echo "$RESULT" | gawk '{print $2}') TIME="#[fg=colour255 bg=colour31]"$(echo "$RESULT" | gawk '{print $3}') -UTC_TIME_RESULT=$(date -u +"%H:%M") -UTC_TIME="#[fg=colour255 bg=colour25]"${UTC_TIME_RESULT} +INTERNET_TIME_RESULT=$(date -u +"%T" -d @$(curl -s --connect-timeout 10 --socks5-hostname localhost:9054 --user-agent "$(get_random_ua.sh)" http://worldtimeapi.org/api/timezone/Europe/London.json | jq '.unixtime')) +# UTC_TIME_RESULT=$(date -u +"%H:%M") +# UTC_TIME="#[fg=colour255 bg=colour25]"${INTERNET_TIME_RESULT} +UTC_TIME="#[fg=colour255 bg=colour25]"$(internet_time_cache) JDATE="#[fg=colour255 bg=colour29]"$(jdate | gawk '{print $2" "$3}') # OPENWEATHERMAP_TOKEN=$(jq -r ".token" < /home/devi/scripts/tmux/openweathermap.json) # WEATHER_INFO=$(sleep 120 && proxychains4 -q -f /home/devi/proxies/ice/proxychains.conf curl "https://api.openweathermap.org/data/2.5/weather?q=Tehran&appid=${OPENWEATHERMAP_TOKEN}&units=metric"|jq ".main.temp") -WEATHER_INFO=$(${PROXY} curl -s 'wttr.in/tehran?T&format=%f') +# WEATHER_INFO=$(${PROXY} curl -s 'wttr.in/tehran?T&format=%f') +WEATHER_INFO=$(weather_info_cache) if echo "${WEATHER_INFO}" | grep Unknown\ location; then WEATHER="#[fg=colour255 bg=colour32]"no_temp else diff --git a/vagrant/722N.xml b/vagrant/722N.xml new file mode 100644 index 0000000..1234c7d --- /dev/null +++ b/vagrant/722N.xml @@ -0,0 +1,6 @@ + + + + + + -- cgit v1.2.3