Introduction
Introduction Statistics Contact Development Disclaimer Help
cleanup - dotfiles - These are my dotfiles. There are many like it, but these a…
Log
Files
Refs
README
---
commit b4d3ece906a944fb0682b1a96855a6a93a858fe4
parent 93802d2398e90b8a41e9c2d16e0a5bd5ae4d8962
Author: Jay Scott <[email protected]>
Date: Sat, 10 Feb 2024 18:55:54 +0000
cleanup
Diffstat:
M README | 2 +-
M ashrc | 14 +++++++++-----
M bin/genaccount.sh | 28 ++++++++++------------------
M bin/link_handler.sh | 45 +++++++++++++++++------------…
R bin/dwmstatus.sh -> bin/old/dwmsta… | 0
R bin/game_select.sh -> bin/old/game… | 0
R bin/sway-run.sh -> bin/sway_run.sh | 0
M bin/yt_feedurl.sh | 9 ++++-----
M bootstrap.sh | 31 +++++++++++------------------…
M git/config | 7 ++++++-
D isync/mbsyncrc | 25 -------------------------
M lynx/bookmarks.html | 8 ++++----
M lynx/config | 2 +-
M mutt/muttrc | 150 +++++++++++------------------…
A mutt/theme | 94 +++++++++++++++++++++++++++++…
M newsraft/feeds | 1 -
M nvim/init.lua | 6 +++---
M qutebrowser/config.py | 2 +-
M sway/config | 3 +--
M waybar/config | 28 +++++++++++++++-------------
M waybar/style.css | 19 ++++++++-----------
D waybar/waybar_newsboat.sh | 11 -----------
A waybar/waybar_vpn.sh | 9 +++++++++
23 files changed, 255 insertions(+), 239 deletions(-)
---
diff --git a/README b/README
@@ -11,7 +11,7 @@ at all, the closest I come is using IRC.
window manager : sway
terminal : foot
launcher : bemenu
- email : mutt / isync
+ email : neomutt
browser : qutebrowser / librewolf
video / music : mpv
password mgt : pass
diff --git a/ashrc b/ashrc
@@ -6,14 +6,13 @@ export XDG_STATE_HOME="$HOME/.local/state"
# cleanup ~/
export PASSWORD_STORE_DIR="$XDG_CONFIG_HOME"/pass
export CARGO_HOME="$XDG_DATA_HOME"/cargo
-alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
# common exports
GPG_TTY=$(tty)
export GPG_TTY
-export EDITOR="vim"
-export BROWSER="qutebrowser"
-export PATH=$PATH:$HOME/bin:$HOME/.local/bin
+export EDITOR="nvim"
+export BROWSER="firefox"
+export PATH=$PATH:$HOME/bin
export BEMENU_OPTS="-p '> ' --tb '#013220' --tf '#ffffff' --hf '#444444'"
@@ -32,6 +31,7 @@ alias rm='rm -i'
# random alias
alias weather='curl wttr.in/?1QF'
+alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
# git alias
alias ga='git add -A'
@@ -44,8 +44,12 @@ alias gma='git commit -am'
alias vim='nvim'
alias mutt='neomutt'
+# vpn
+alias von='doas wg-quick up mullvad'
+alias voff='doas wg-quick down mullvad'
+alias vcheck='curl https://am.i.mullvad.net/connected'
+
# ash
-export MAILPATH='~/.mail/jay/Inbox/cur/'
export LANG=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
export LC_ALL=en_US.UTF-8
diff --git a/bin/genaccount.sh b/bin/genaccount.sh
@@ -1,27 +1,19 @@
#!/bin/sh
generate_username() {
- od -An -N3 -x /dev/random | awk '{$1=$1};1' | sed 's/ //g'
+ file=$(find /usr/bin/ -type f -exec basename {} \; | shuf -n 1)
+ words=$(strings "/usr/bin/$file" | grep -Eo '\b[a-zA-Z]{5,}\b' | shuf)
+ word1=$(echo "$words" | head -n 1)
+ word2=$(echo "$words" | tail -n 1)
+ printf "%s_%s" "$word1" "$word2"
}
generate_password() {
- tr </dev/urandom -dc _A-Z-a-z-0-9 | head -c"${1:-16}"
- echo
+ openssl rand -base64 12
}
-generate_avatar() {
- convert -size 200x200 xc:gray +noise random /tmp/avatar.png
-}
-
-main() {
- username=$(generate_username)
- password=$(generate_password)
- generate_avatar
-
- printf "username: %s\n" "$username"
- printf "password: %s\n" "$password"
- printf "image : /tmp/avatar.png\n"
-}
-
-main
+username=$(generate_username)
+password=$(generate_password)
+printf "Username: %s\n" "$username"
+printf "Password: %s\n" "$password"
diff --git a/bin/link_handler.sh b/bin/link_handler.sh
@@ -2,34 +2,39 @@
launcher="setsid"
-# apps
+# applications
player="mpv --really-quiet --no-terminal"
gemini="foot -e amfora"
gopher="foot -e lynx"
pdf="zathura"
images="swayimg"
+torrent="qbittorrent"
uri="$1"
uri_lower="$(printf "%s" "$uri" | tr '[:upper:]' '[:lower:]')"
case "$uri_lower" in
-*.mkv | *.mp4 | *.webm | *'youtube.com'* | *'odysee.com'*)
- $player "$uri" &
- ;;
-*.gmi | 'gemini:'*)
- $gemini "$uri"
- ;;
-'gopher:'*)
- $gopher "$uri"
- ;;
-
-*.pdf | *.ps | *.epub)
- $launcher $pdf "$uri"
- ;;
-*.jpg | *.jpe | *.jpeg | *.png | *.gif | *.webp)
- $launcher $images "$uri"
- ;;
-*)
- $launcher firefox "$uri"
- ;;
+ *.mkv | *.mp4 | *.webm | *youtube.com* | *odysee.com*)
+ $player "$uri" &
+ ;;
+ *.gmi | gemini:*)
+ $gemini "$uri"
+ ;;
+ gopher:*)
+ $gopher "$uri"
+ ;;
+ magnet:*)
+ $launcher "$torrent" "$uri"
+ ;;
+ *.pdf | *.ps | *.epub)
+ $launcher "$pdf" "$uri"
+ ;;
+ *.jpg | *.jpe | *.jpeg | *.png | *.gif | *.webp)
+ echo "in"
+ #$launcher "$images" "$uri"
+ wget -qO- $uri | $images -
+ ;;
+ *)
+ $launcher "$BROWSER" "$uri"
+ ;;
esac
diff --git a/bin/dwmstatus.sh b/bin/old/dwmstatus.sh
diff --git a/bin/game_select.sh b/bin/old/game_select.sh
diff --git a/bin/sway-run.sh b/bin/sway_run.sh
diff --git a/bin/yt_feedurl.sh b/bin/yt_feedurl.sh
@@ -2,8 +2,8 @@
# Check if a YouTube URL is provided
if [ -z "$1" ]; then
- echo "Usage: $0 <youtube_url>"
- exit 1
+ echo "Usage: $0 <youtube_url>"
+ exit 1
fi
# Fetch the HTML content of the YouTube page
@@ -15,9 +15,8 @@ rss_url=$(echo "$html_content" | grep -o 'https://www.youtube…
# Check if the RSS URL is found
if [ -z "$rss_url" ]; then
- echo "Unable to find the application/rss+xml URL on the provided YouTube pag…
- exit 1
+ echo "Unable to find the application/rss+xml URL on the provided YouTu…
+ exit 1
fi
echo "RSS URL: $rss_url"
-
diff --git a/bootstrap.sh b/bootstrap.sh
@@ -4,37 +4,28 @@ DOTFILES=$(pwd)
FILES='ashrc profile'
ROOT='bin'
-CONFIG='foot git isync lynx mutt newsraft nvim qutebrowser sway waybar'
+CONFIG='foot git lynx mutt newsraft nvim qutebrowser sway waybar'
link() {
- for f in $FILES; do ln -sfn "$DOTFILES/$f" "$HOME/.$f"; done
- for f in $ROOT; do ln -sfn "$DOTFILES/$f" "$HOME/$f"; done
- for f in $CONFIG; do ln -sfn "$DOTFILES/$f" "$HOME/.config/$f"; done
+ for f in $FILES; do ln -sfn "$DOTFILES/$f" "$HOME/.$f"; done
+ for f in $ROOT; do ln -sfn "$DOTFILES/$f" "$HOME/$f"; done
+ for f in $CONFIG; do ln -sfn "$DOTFILES/$f" "$HOME/.config/$f"; done
}
unlink() {
- for f in $FILES; do unlink "$HOME/.$f"; done
- for f in $ROOT; do unlink "$HOME/$f"; done
- for f in $CONFIG; do unlink "$HOME/.config/$f"; done
-}
-
-backup() {
- pacman -Qqen >pkg/pkglist-repo.txt
- pacman -Qqem >pkg/pkglist-aur.txt
-}
-
-restore() {
- crontab "$DOTFILES/crontab"
+ for f in $FILES; do unlink "$HOME/.$f"; done
+ for f in $ROOT; do unlink "$HOME/$f"; done
+ for f in $CONFIG; do unlink "$HOME/.config/$f"; done
}
testsh() {
- shellcheck -s sh "$DOTFILES"/bin/*.sh
- shfmt -p -w "$DOTFILES"/bin/*.sh
+ shellcheck -s sh "$DOTFILES"/bin/*.sh
+ shfmt -p -w "$DOTFILES"/bin/*.sh
}
if [ "$#" -eq 0 ]; then
- printf "No arguments supplied\n" >&2
- exit 1
+ printf "No arguments supplied\n" >&2
+ exit 1
fi
$1
diff --git a/git/config b/git/config
@@ -2,17 +2,22 @@
name = Jay Scott
signingkey = C88BBC696A39CCB0
email = [email protected]
+
[commit]
gpgSign = true
+
[pull]
rebase = true
+
[sendemail]
annotate = yes
smtpserver = smtp.mailbox.org
smtpuser = [email protected]
smtpencryption = ssl
smtpserverport = 465
+
[core]
- editor = vim
+ editor = nvim
+
[alias]
last = log -1 HEAD
diff --git a/isync/mbsyncrc b/isync/mbsyncrc
@@ -1,25 +0,0 @@
-Create Both
-Expunge Both
-Remove Both
-Sync All
-SyncState *
-
-IMAPAccount jay
-Host imap.mailbox.org
-User [email protected]
-PassCmd "pass tech/mailbox.org | head -n1"
-SSLType IMAPS
-CertificateFile /etc/ssl/certs/ca-certificates.crt
-
-IMAPStore jay-remote
-Account jay
-
-MaildirStore jay-local
-SubFolders Verbatim
-Path ~/.mail/jay/
-Inbox ~/.mail/jay/Inbox
-
-Channel jay
-Far :jay-remote:
-Near :jay-local:
-Patterns *
diff --git a/lynx/bookmarks.html b/lynx/bookmarks.html
@@ -12,15 +12,15 @@
<ol>
<h2>Gopher</h2>
<LI><a href="gopher://jay.scot/">jay.scot</a>
+<LI><a href="gopher://gopher.icu/">Ian J</a>
+<LI><a href="gopher://hngopher.com">Hacker News</a>
<LI><a href="gopher://gopher.tildeverse.org">gopher.tildeverse.org</a>
<LI><a href="gopher://freeshell.org/">freeshell</a>
-<LI><a href="gopher://bitreich.org/">bitreich.org</a>
+<LI><a href="gopher://bitreich.org/">BitReich</a>
<LI><a href="gopher://gopherpedia.com/">gopherpedia</a>
-<LI><a href="gopher://bay.parazy.de:666">piratebay</a>
<LI><a href="gopher://typed-hole.org/1/roll/">typed-hole phlog</a>
<LI><a href="gopher://bitreich.org/1/lawn">The Gopher Lawn</a>
<LI><a href="gopher://gopher.black/1/moku-pona">Aggregator of phlog</a>
<LI><a href="gopher://uninformativ.de/">Uninform</a>
-<LI><a href="gopher://i-logout.cz/1/bongusta/">Bongusta! phlog aggregator</a>
+<LI><a href="gopher://i-logout.cz/1/bongusta/">Bongusta</a>
<LI><a href="gopher://floodgap.com/">Floodgap</a>
-<LI><a href="gopher://gopher.icu/">gopher.icu</a>
diff --git a/lynx/config b/lynx/config
@@ -12,7 +12,7 @@ XLOADIMAGE_COMMAND:link_handler.sh %s &
NO_PAUSE:TRUE
MINIMAL_COMMENTS:TRUE
-DEFAULT_EDITOR:/usr/bin/vim
+DEFAULT_EDITOR:/usr/bin/nvim
DEFAULT_KEYPAD_MODE:LINKS_AND_FIELDS_ARE_NUMBERED
diff --git a/mutt/muttrc b/mutt/muttrc
@@ -1,35 +1,44 @@
# info
-set my_user = '[email protected]'
-set my_pass = `pass tech/mailbox.org | head -n1`
-set realname = 'Jay Scott'
-set from = '[email protected]'
-
-# SMTP settings
-set smtp_pass = $my_pass
-set smtp_url = smtps://[email protected]
-set ssl_force_tls = yes
+set imap_user = '[email protected]'
+set imap_pass = `pass tech/mailbox.org | head -n1`
+set realname = 'Jay Scott'
+set from = '[email protected]'
+
+# smtp settings
+set smtp_pass = $imap_pass
+set smtp_url = smtps://[email protected]
+set ssl_force_tls = yes
+
+# imap settings
+set spoolfile ="imaps://imap.mailbox.org/"
+set folder = $spoolfile
+set postponed = "+Drafts"
+set record = "+Sent"
+set trash = "+Trash"
+set folder=imaps://imap.mailbox.org/
+set imap_check_subscribed
# general
-set envelope_from = yes
-set use_from = yes
-set editor = "vim"
-set markers = no
-set mark_old = no
-set delete = yes
-set forward_format = "Fwd: %s"
-set fcc_attach = no
-set edit_headers = yes
-set fast_reply = yes
-set include = yes
+set envelope_from = yes
+set use_from = yes
+set editor = "nvim"
+set markers = no
+set mark_old = no
+set delete = yes
+set forward_format = "Fwd: %s"
+set fcc_attach = no
+set edit_headers = yes
+set fast_reply = yes
+set include = yes
# gpg encryption
source ~/.config/mutt/gpg.rc
bind compose p pgp-menu
-set pgp_use_gpg_agent = yes
-set pgp_sign_as = 0726AF07C73389E1E4475B7EC88BBC696A39CCB0
-set pgp_timeout = 3600
-set crypt_autosign = no
-set crypt_replyencrypt = yes
+set pgp_use_gpg_agent = yes
+set pgp_sign_as = 0726AF07C73389E1E4475B7EC88BBC696A39CCB0
+set pgp_timeout = 3600
+set crypt_autosign = no
+set crypt_replyencrypt = yes
# html emails
auto_view text/html
@@ -40,20 +49,11 @@ unset wait_key
unset allow_8bit
# paths
-set folder = ~/.mail
-set header_cache = ~/.config/mutt/cache/headers
-set message_cachedir = ~/.config/mutt/cache/bodies
-set mailcap_path = ~/.config/mutt/mailcap
-set alias_file = ~/.config/mutt/aliases
-set tmpdir = ~/.cache/
-
-set spoolfile = "+jay/Inbox"
-set postponed = "+jay/Drafts"
-set record = "+jay/Sent"
-
-# inbox
-mailboxes ! `echo ~/.mail/jay/*`
-
+set header_cache = ~/.cache/mutt/headers
+set message_cachedir = ~/.cache/mutt/bodies
+set mailcap_path = ~/.config/mutt/mailcap
+set alias_file = ~/.config/mutt/aliases
+set tmpdir = ~/.cache/
set sort_alias = alias
set reverse_alias = yes
source $alias_file
@@ -63,24 +63,20 @@ bind index g noop
bind index gg first-entry
bind index G last-entry
bind index <space> collapse-thread
-macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "…
-macro index o "<shell-escape>mbsync -a -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc<…
-macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
-macro index A "<save-message>=jay/archive<enter><enter><sync-mailbox><enter>" …
-macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
+macro index A "<save-message>=Keep<enter><enter><sync-mailbox><enter>" "save t…
# sorting
-set sort = threads
-set sort_aux = reverse-date
-set pager_index_lines = 15
-set pager_context = 1
-set index_format = '%Z | %{%b %d %Y} | %-15.15F | %s'
+set sort = threads
+set sort_aux = reverse-date
+set pager_index_lines = 15
+set pager_context = 1
+set index_format = '%Z | %{%b %d %Y} | %-15.15F | %s'
# sidebar
-set mail_check_stats = yes
-set sidebar_visible = yes
-set sidebar_width = 25
-set sidebar_short_path = yes
+set mail_check_stats = yes
+set sidebar_visible = yes
+set sidebar_width = 25
+set sidebar_short_path = yes
set sidebar_folder_indent = yes
set sidebar_format = "%B%* %?N?%N?"
set sidebar_divider_char = │
@@ -90,51 +86,11 @@ bind index,pager <backtab> sidebar-prev
bind index,pager \Cl sidebar-open
# disable help menu
-set help = no
+set help = no
# status bar
set sidebar_delim_chars = "/"
-set status_chars = " *%A"
-set status_format = "───[ Folder: %f ]───[%r%m messages%?n…
-
-# default
-color normal color223 color0
-
-# status bar
-color status color8 color0
-
-# highlight bar
-color indicator color223 color237
-
-# replied to
-color index color2 color0 ~Q
-
-# email info header
-color header color11 color0 "^(To:|From:|Date:|^Subject:)"
-
-# web links
-color body color2 color0 "https?://[^ ]+"
-color body color2 color0 "www.[^ ]+"
-
-# email addresss
-color body color2 color0 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
-color body color2 color0 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
-
-# image links
-color body color2 color0 "\\[image\\ [0-9]+\\]"
-
-# sidebar
-color sidebar_new bold color11 color0
-color sidebar_divider bold color2 color0
+set status_chars = " *%A"
+set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n ne…
-# patch syntax
-color body brightwhite default ^[[:space:]].*
-color body brightwhite default ^(diff).*
-color body white default ^[\-\-\-].*
-color body white default ^[\+\+\+].*
-color body green default ^[\+].*
-color body red default ^[\-].*
-color body brightblue default [@@].*
-color body brightwhite default ^(\s).*
-color body brightwhite default ^(Signed-off-by).*
-color body brightwhite default ^(Cc)
+source ~/.config/mutt/theme
diff --git a/mutt/theme b/mutt/theme
@@ -0,0 +1,94 @@
+
+color body color136 color234 "(jay|jay.scot)"
+
+# basic colors ---------------------------------------------------------
+color normal color241 color234
+color error color160 color234
+color tilde color235 color234
+color message color37 color234
+color markers color160 color254
+color attachment color254 color234
+color search color61 color234
+color status color241 color235
+color indicator color234 color136
+color tree color136 color234
+
+# basic monocolor screen
+mono bold bold
+mono underline underline
+mono indicator reverse
+mono error bold
+
+# index ----------------------------------------------------------------
+
+color index color160 color234 "~A" …
+color index color166 color234 "~E" …
+color index color33 color234 "~N" …
+color index color33 color234 "~O" …
+color index color61 color234 "~Q" …
+color index color240 color234 "~R" …
+color index color33 color234 "~U" …
+color index color33 color234 "~U~$" …
+color index color241 color234 "~v" …
+color index color241 color234 "~P" …
+color index color37 color234 "~p!~F" …
+color index color37 color234 "~N~p!~F" …
+color index color37 color234 "~U~p!~F" …
+color index color240 color234 "~R~p!~F" …
+color index color160 color234 "~F" …
+color index color160 color234 "~F~p" …
+color index color160 color234 "~N~F" …
+color index color160 color234 "~N~F~p" …
+color index color160 color234 "~U~F~p" …
+color index color235 color160 "~D" …
+color index color245 color234 "~v~(!~N)" …
+color index color136 color234 "~v~(~N)" …
+color index color64 color234 "~N~v~(~N)" …
+# statusbg used to indicated flagged when foreground color shows other status
+# for collapsed thread
+color index color160 color235 "~v~(~F)!~N" …
+color index color136 color235 "~v~(~F~N)" …
+color index color64 color235 "~N~v~(~F~N)" …
+color index color64 color235 "~N~v~(~F)" …
+color index color37 color235 "~v~(~p)" …
+color index color136 color160 "~v~(~D)" …
+
+# message headers ------------------------------------------------------
+
+#color header color240 color234 "^"
+color hdrdefault color240 color234
+color header color241 color234 "^(From)"
+color header color33 color234 "^(Subject)"
+
+# body -----------------------------------------------------------------
+
+color quoted color33 color234
+color quoted1 color37 color234
+color quoted2 color136 color234
+color quoted3 color160 color234
+color quoted4 color166 color234
+
+color signature color240 color234
+color bold color235 color234
+color underline color235 color234
+color normal color244 color234
+#
+color body color245 color234 "[;:][-o][)/(|]" # emot…
+color body color245 color234 "[;:][)(|]" # emot…
+color body color245 color234 "[*]?((N)?ACK|CU|LOL|SCNR|…
+ |FWIW|vbg|GD&R|HTH|HTHBE|…
+ |IRL|RTFM|ROTFL|ROFL|YMMV…
+color body color245 color234 "[ ][*][^*]*[*][ ]?" # mor…
+color body color245 color234 "[ ]?[*][^*]*[*][ ]" # mor…
+
+## pgp
+
+color body color160 color234 "(BAD signature)"
+color body color37 color234 "(Good signature)"
+color body color234 color234 "^gpg: Good signature .*"
+color body color241 color234 "^gpg: "
+color body color241 color160 "^gpg: BAD signature from.…
+mono body bold "^gpg: Good signature"
+mono body bold "^gpg: BAD signature from.…
+color body color160 color234 "([a-z][a-z0-9+-]*://(((([…
+color body color33 color234 "( *[-+=#*~_]){6,}"
diff --git a/newsraft/feeds b/newsraft/feeds
@@ -2,7 +2,6 @@
https://tilde.news/newest.rss "Tilde News"
https://lwn.net/headlines/rss "LWN"
https://rss.slashdot.org/Slashdot/slashdotMain "Slashdot"
-https://archlinux.org/feeds/news/ "Arch Linux"
@ OUTDOORS
https://bushcraftuk.com/community/forums/-/index.rss
diff --git a/nvim/init.lua b/nvim/init.lua
@@ -112,9 +112,9 @@ vim.opt.ignorecase = true
-- indent
vim.opt.wrap = false
-vim.opt.tabstop = 2
-vim.opt.expandtab = true
-vim.opt.shiftwidth = 2
+vim.opt.tabstop = 4
+vim.opt.expandtab = false
+vim.opt.shiftwidth = 4
vim.opt.smartindent = true
-- show space and tab characters
diff --git a/qutebrowser/config.py b/qutebrowser/config.py
@@ -17,7 +17,7 @@ DEFAULT_PAGE = str(config.configdir / 'blank.html')
config.bind("xx", "set tabs.show always;; later 5000 set tabs.show switching")
config.bind("xc", "spawn --userscript password_fill")
config.bind("zd", "download-open")
-config.bind("xz", "hint links spawn --detach mpv --ytdl-format=\"bestvideo[hei…
+config.bind("xz", "hint links spawn --detach ~/bin/link_handler.sh {hint-url}")
config.bind("j", "run-with-count 5 scroll down")
config.bind("k", "run-with-count 5 scroll up")
diff --git a/sway/config b/sway/config
@@ -10,7 +10,7 @@ set $right l
# apps
set $term footclient -d none
-set $browser qutebrowser
+set $browser firefox
set $menu bemenu-run -n -p '> ' --tb '$colour' --tf '#ffffff' --hf '#444444'
set $vol pamixer
@@ -38,7 +38,6 @@ input * {
# monitors
output HDMI-A-1 pos 0 0 res 1920x1080
output DP-1 pos 1920 0 res 1920x1080
-#focus output DP-1
# workspaces
workspace 1 HDMI-A-1
diff --git a/waybar/config b/waybar/config
@@ -7,10 +7,12 @@
"custom/right-arrow-dark"
],
+ "modules-center": [
+ "custom/vpn"
+ ],
+
"modules-right": [
"custom/left-arrow-dark",
- "custom/mail",
- "custom/newsboat",
"pulseaudio",
"tray",
"clock"
@@ -37,8 +39,7 @@
},
"pulseaudio": {
- "format": "{icon} {volume:2}%",
- "format-bluetooth": " {volume}%",
+ "format": "{icon} {volume:2}% ",
"format-muted": "MUTE",
"format-icons": {
"default": [
@@ -47,19 +48,20 @@
]
},
"scroll-step": 5,
- "on-click": "pamixer -t",
- "on-click-right": "foot ncmpcpp"
+ "on-click": "pamixer -t"
},
- "custom/mail": {
- "format": "",
- "return-type": "json",
- "interval": 120,
- "exec": "$HOME/.config/waybar/waybar_mail.sh",
- "on-click": "foot mutt",
+ "custom/vpn":{
+ "format": "{icon} {}",
+ "format-icons": {
+ "default": [""]
+ },
+ "return-type": "json",
+ "interval": 60,
+ "exec": "$HOME/.config/waybar/waybar_vpn.sh"
},
"tray": {
- "icon-size": 15
+ "icon-size": 12
}
}
diff --git a/waybar/style.css b/waybar/style.css
@@ -1,8 +1,10 @@
* {
font-size: 12px;
- font-family: monospace;
+ font-family: Hack;
}
+
+#custom-vpn,
window#waybar {
background: #292b2e;
color: #fdf6e3;
@@ -11,8 +13,6 @@ window#waybar {
#workspaces,
#clock,
#custom-mail,
-#custom-newsboat,
-#custom-vpn,
#pulseaudio,
#tray {
background: #1a1a1a;
@@ -37,22 +37,19 @@ window#waybar {
#workspaces button:hover {
background: #1a1a1a;
border: #1a1a1a;
- padding: 0 3px;
+ padding: 0 1px;
}
-#custom-mail.new,
-#custom-newsboat.new {
- color: #268bd2;
+#custom-vpn.connected {
+ color: #007300;
}
-#custom-vpn.connected {
+#custom-vpn.disconnected {
color: #d22635;
}
#clock,
-#custom-mail,
-#custom-newsboat,
#custom-vpn,
#pulseaudio {
- padding: 0 5px;
+ padding: 0 3px;
}
diff --git a/waybar/waybar_newsboat.sh b/waybar/waybar_newsboat.sh
@@ -1,11 +0,0 @@
-#!/usr/bin/bash
-
-new="$(newsboat -x print-unread | awk '{ print $1}')"
-
-if [ $new -gt 0 ]
-then
- echo "{\"text\":\"$new\",\"tooltip\":\"$new Feeds\",\"class\":\"new\"}"
-else
- echo '{"text":"No new feeds","tooltip":"","class":""}'
-fi
-
diff --git a/waybar/waybar_vpn.sh b/waybar/waybar_vpn.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+country=$(curl -s https://am.i.mullvad.net/country)
+
+if curl -s https://am.i.mullvad.net/connected | grep -q "server"; then
+ echo "{\"text\":\"$country\",\"class\":\"connected\"}"
+else
+ echo "{\"text\":\"$country\",\"class\":\"disconnected\"}"
+fi
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.