diff options
| -rwxr-xr-x | bin/common/goo | 2 | ||||
| -rwxr-xr-x | bin/common/saf | 13 | ||||
| -rwxr-xr-x | bin/common/y2feed | 21 | ||||
| -rwxr-xr-x | bin/menuscripts/mpdf | 24 | ||||
| -rwxr-xr-x | bin/menuscripts/mpower | 18 | ||||
| -rwxr-xr-x | bin/menuscripts/mvid | 29 | ||||
| -rw-r--r-- | config/X/dunst/dunstrc | 2 | ||||
| -rw-r--r-- | config/common/alacritty/alacritty.yml | 3 | ||||
| -rwxr-xr-x | config/common/tmux/tmux.conf | 55 | ||||
| -rw-r--r-- | config/essentials/nvim/after/plugin/luasnip.lua | 14 | ||||
| -rw-r--r-- | config/essentials/nvim/ftplugin/sh.lua | 8 | ||||
| -rw-r--r-- | config/essentials/nvim/lua/user/zk.lua | 5 | ||||
| -rw-r--r-- | config/essentials/zsh/.zshrc | 6 | ||||
| -rw-r--r-- | config/essentials/zsh/aliases.sh | 15 | ||||
| -rw-r--r-- | config/essentials/zsh/functions.zsh | 94 | ||||
| -rw-r--r-- | config/home/.zshenv | 8 | ||||
| -rw-r--r-- | config/hyprland/hypr/hyprland.conf | 13 | ||||
| -rw-r--r-- | config/hyprland/tofi/themes/nord | 35 | ||||
| -rw-r--r-- | config/hyprland/waybar/config.jsonc | 6 | ||||
| -rw-r--r-- | config/hyprland/waybar/schemes/base16.css | 59 | 
20 files changed, 243 insertions, 187 deletions
diff --git a/bin/common/goo b/bin/common/goo index a56cbaf..cb7a8b6 100755 --- a/bin/common/goo +++ b/bin/common/goo @@ -18,6 +18,6 @@ arduino15"  for dir in $exclude; do      dirs="$dirs -name \"$dir\" -o "  done -cmd="find ${dest:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" +cmd="find ${2:-.} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print"  eval "$cmd" 2>/dev/null diff --git a/bin/common/saf b/bin/common/saf index 0c6fbc4..2936346 100755 --- a/bin/common/saf +++ b/bin/common/saf @@ -3,10 +3,19 @@  # Simple Ass Fetch by futxlii  red="$(printf '\033[31m')" -green="$(printf '\033[32m')"  blue="$(printf '\033[34m')"  reset="$(printf '\033[0m')" +load () +{ +	# take everything after 'load average: ' then remove '0.' or '.' or ',' +	# from output, this multiplies by hundred, so we can divide an integer +	# instead of a fraction (which dash can't do) +	for time in $(uptime | sed -e 's/^.*load average://' -e 's/0\?\.\|,//g') +	do printf "%s%%\n" "$((time/$(nproc)))" +	done | xargs +} +  for file in /etc/os-release /usr/lib/os-release  do      [ -f "$file" ] && . "$file" && break @@ -19,6 +28,6 @@ SHELL="$(basename "$SHELL")"  cat <<EOF  	${red}- ${blue}${ID:-"unknown"}  	${red}- ${blue}$KERNEL -	${red}- ${blue}$UPTIME +	${red}- ${blue}$UPTIME ($(load))  	${red}- ${blue}$SHELL${reset}  EOF diff --git a/bin/common/y2feed b/bin/common/y2feed index e30bccf..b55d66b 100755 --- a/bin/common/y2feed +++ b/bin/common/y2feed @@ -1,5 +1,18 @@  #!/bin/sh -echo "url: $1" >&2 -curl -L -s "$1" | -	pup 'link[title=RSS] attr{href}' | -	tee /dev/stderr + +get_feed() +{ +	link="$(curl -L -s "$1" | pup 'link[title=RSS] attr{href}' 2>/dev/null)" +	[ "$link" ] && printf "%s\n" "$link" | tee /dev/stderr && exit +} + +[ "$1" ] || exit 1 + +# url is channel +get_feed "$1" + +part="$(echo "$1" | awk -F '/' '{print $NF}')" +# last part is channel id +get_feed "https://www.youtube.com/channel/$part" +# last part is channel tag +get_feed "https://www.youtube.com/$part" diff --git a/bin/menuscripts/mpdf b/bin/menuscripts/mpdf index d67fdae..85debfb 100755 --- a/bin/menuscripts/mpdf +++ b/bin/menuscripts/mpdf @@ -1,22 +1,10 @@  #!/bin/sh -if [ "$MENUCMD" = "tofi" ] -then -	menucmd="tofi --width 30% --height 30% --matching-algorithm normal --prompt-text pdf:" -elif [ "$MENUCMD" = "dmenu" ] -then -	menucmd="dmenu -l 10 -g 1 -x -i -p pdf:"  -else -	menucmd="fzf" -fi - -tmp="/tmp/dmpdf" -find ${1:-$HOME/docs $HOME/dl} 2> /dev/null | grep -E ".+\.pdf" | sort > "$tmp" -choice="$(sed "s|^$HOME|\~| ; s|\([^/]\)[^/]*/|\1/|g" "$tmp" |  -		awk '{printf "%s %s\n", NR ":", $0}' |  -		$menucmd | -		grep -o "^[0-9]\+:" | -		cut -f 1 -d :)" -test -z "$choice" && exit 1 +tmp="/tmp/mpdf" +choice="$(find ${1:-$HOME/docs $HOME/dl} -iname "*.pdf" 2> /dev/null | sort | +	tee "$tmp" | +	sed "s|^$HOME|\~| ; s|\([^/]\)[^/]*/|\1/|g" | +	commander -x -n)"  file="$(sed -n "${choice}p" "$tmp")" +[ -r "$file" ] || exit 1  zathura "$file" & diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index 443ed54..3b66824 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,14 +1,8 @@  #!/bin/sh -if [ "$MENUCMD" = "tofi" ] -then -	menucmd="tofi --width 10% --height 13% --padding-left 2%"  -elif [ "$MENUCMD" = "dmenu" ] -then -	menucmd="dmenu -g 2 -l 2" -else -	menucmd="fzf" -fi +choice="$(printf 'poweroff +suspend +hibernate +reboot +' | commander -c -d)" -choices="poweroff\nreboot\nhibernate\nsuspend" -choice="$(printf "$choices" | $menucmd)" -test -z "$choice" || systemctl "$choice" +[ "$choice" ] && systemctl "$choice" diff --git a/bin/menuscripts/mvid b/bin/menuscripts/mvid index ca309fb..09ebab8 100755 --- a/bin/menuscripts/mvid +++ b/bin/menuscripts/mvid @@ -1,27 +1,16 @@  #!/usr/bin/env sh -tmpfile="/tmp/dmvids" +tmp="/tmp/dmvids"  dirs="${1:-$HOME/vids $HOME/dl}" -find -L $dirs 2> /dev/null | -	grep ".\+\.\(webm\|mp4\|mpeg\|mkv\)$" | -	sort > "$tmpfile" -if [ "$MENUCMD" = "tofi" ] -then -	menucmd="tofi --width 30% --height 30% --matching-algorithm normal" -elif [ "$MENUCMD" = "dmenu" ] -then -	menucmd="dmenu -l 10 -g 1 -x -i"  -else -	menucmd="fzf" -fi +choice="$(find -L $dirs 2> /dev/null | +	grep '^.\+\.\(webm\|mp4\|mpeg\|mkv\)$' | +	sort | tee "$tmp" | +	sed "s#^$HOME#\~#;s#\([^/]\)[^/]*/#\1/#g" | +	commander -n -x)" -choice="$(sed "s|^$HOME|\~| ; s|\([^/]\)[^/]*/|\1/|g" "$tmpfile" |  -	awk '{printf "%s %s\n", NR ":", $0}' |  -	$menucmd |  -	cut -f 1 -d ':')" -test -z "$choice" && -	exit 1 +file="$(sed -n "${choice}p" "$tmp")" +[ -r "$file" ] || exit 1 -mpv "$(sed -n "${choice}p" "$tmpfile")" +mpv "$file" diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc index 6127474..0c4eebc 100644 --- a/config/X/dunst/dunstrc +++ b/config/X/dunst/dunstrc @@ -187,7 +187,7 @@      hide_duplicate_count = false      # Display indicators for URLs (U) and actions (A). -    show_indicators = yes +    show_indicators = no      ### Icons ### diff --git a/config/common/alacritty/alacritty.yml b/config/common/alacritty/alacritty.yml index e5664f1..32fc95b 100644 --- a/config/common/alacritty/alacritty.yml +++ b/config/common/alacritty/alacritty.yml @@ -761,7 +761,7 @@ hints:  #  # If the same trigger is assigned to multiple actions, all of them are executed  # in the order they were defined in. -# key_bindings: +key_bindings:    #- { key: Paste,                                       action: Paste          }    #- { key: Copy,                                        action: Copy           }    #- { key: L,         mods: Control,                    action: ClearLogNotice } @@ -871,6 +871,7 @@ hints:    #- { key: F,              mods: Command|Control,            action: ToggleFullscreen      }    #- { key: F,              mods: Command, mode: ~Search,     action: SearchForward         }    #- { key: B,              mods: Command, mode: ~Search,     action: SearchBackward        } +  - {key: F11, action: ToggleFullscreen}  #debug:    # Display the time it takes to redraw each frame. diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf index 409ad66..e74713a 100755 --- a/config/common/tmux/tmux.conf +++ b/config/common/tmux/tmux.conf @@ -1,9 +1,5 @@ -# By Nicholas Marriott. Public domain. -# but -now- me. +# Special thanks to Nicholas Marriott. -# Some tweaks to the status line -set -g status-right "%H:%M" -set -g window-status-current-style "underscore"  # Enable RGB color if running in xterm  set-option -sa terminal-overrides ",xterm*:Tc"  # Change the default $TERM to xterm-256color @@ -26,7 +22,7 @@ set -g focus-events on  # KEYBINDINGS   # Reload config file -bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" +bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded ~/.tmux.conf"  # Clipboard  bind -T copy-mode-vi v send-keys -X begin-selection  bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard" @@ -82,9 +78,54 @@ bind -n M-I switch-client -n  bind n command-prompt "rename-window '%%'"  bind N command-prompt "rename-session '%%'"  # Starting new windows -bind w new-window -c "#{pane_current_path}" +bind w new-window -c "$HOME"  bind W new-session -c "$HOME"  # Show tree   bind S choose-tree -Z  # Menu for mounting and ejecting devices.  bind E display-menu -T "#[align=centre]#I:#W" -x W -y W '' Mount 0 "display-popup -E 'amount'" + +# Theme + +#+---------+ +#+ Options + +#+---------+ +set -g status-interval 1 +set -g status on + +#+--------+ +#+ Status + +#+--------+ +#+--- Layout ---+ +set -g set-titles on +set -g status-position top +set -g window-status-current-style "underscore" +set -g status-justify left +set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]" +set -g status-right "#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H " +#+--- Colors ---+ +set -g status-style bg=black,fg=white + +#+-------+ +#+ Panes + +#+-------+ +set -g pane-border-style bg=default,fg=brightblack +set -g pane-active-border-style bg=default,fg=blue +set -g display-panes-colour black +set -g display-panes-active-colour brightblack + +#+------------+ +#+ Clock Mode + +#+------------+ +setw -g clock-mode-colour cyan + +#+----------+ +#+ Messages + +#+---------+ +set -g message-style bg=brightblack,fg=cyan +set -g message-command-style bg=brightblack,fg=cyan + +#+--- Windows ---+ +set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" +set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]" +set -g window-status-separator "" diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index 7ee274f..5657560 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -155,18 +155,14 @@ ls.add_snippets("sh", {  		stty \$old_stty_cfg  	}  	]], {}), -	parse("fdie", +	parse("flogn",  	[[ -	die () -	{ -		echo "\$@" >&2 -	} +	logn () { >&2 printf '%s\n' "\$@"; }  	]], {}), -	s("die", fmt( +	parse("flog",  	[[ -	die "{}: {}"{} -	]], -	{ c(1, {t "I", t "E", t "W"}), i(2), i(0) })), +	log () { >&2 printf '%s' "\$@"; } +	]], {}),  	s("inp", fmt(  	[[  	test -z "${{{}:=$1}}" &&  diff --git a/config/essentials/nvim/ftplugin/sh.lua b/config/essentials/nvim/ftplugin/sh.lua index 01b20d6..e18170a 100644 --- a/config/essentials/nvim/ftplugin/sh.lua +++ b/config/essentials/nvim/ftplugin/sh.lua @@ -1,6 +1,6 @@ -vim.keymap.set("n", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"<cr>") -vim.keymap.set("n", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"<cr>") -vim.keymap.set("i", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"<cr><esc>A") -vim.keymap.set("i", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"<cr><esc>A") +vim.keymap.set("n", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2\"<cr>") +vim.keymap.set("n", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2: %s\\\\n\" \"$\\2\"<cr>") +vim.keymap.set("i", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2\"<cr><esc>A") +vim.keymap.set("i", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2: %s\\\\n\" \"$\\2\"<cr><esc>A")  vim.keymap.set({"i", "n"}, "<LocalLeader>v", "<esc>A)\"<esc>I\"$(<esc>I")  vim.opt.formatoptions = "cqrnj" diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index 613c8e5..8004238 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -50,6 +50,11 @@ require('telekasten').setup({  			template_new_note = home .. "/" .. "templates/new_note.md",  			new_note_filename = "title",  		}, +		NetworkEssentials = { +			home = home .. "/" .. "NetworkEssentials", +			template_new_note = home .. "/" .. "templates/new_note.md", +			new_note_filename = "title", +		},  		C = {  			home = home .. "/" .. "C",  			template_new_note = home .. "/" .. "templates/new_note.md", diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 0665533..769c805 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -121,13 +121,13 @@ RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(par  setopt prompt_subst  parse_git_remote() { -	b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')" +	b="$(git branch -v 2>/dev/null | grep "^*" | cut -f2 -d'[' | cut -f1 -d' ')"  	if [ "$b" = "behind" ]  	then -		echo -n "↓ " +		printf "↓ "  	elif [ "$b" = "ahead" ]  	then -		echo -n "↑ " +		printf "↑ "  	fi  }  parse_git_branch() { diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 461546a..28aef75 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -5,9 +5,6 @@  if [ $SHELL = "/bin/zsh" ]  then  	# googoo aliases -	alias o.='o .' -	alias go.='go .' -	alias ogo.='ogo .'  	alias o/='o /'  	alias o/s='o /srv'  	alias go/='go /' @@ -15,6 +12,8 @@ then  	alias ogo/='ogo /'  	alias ogo/s='ogo /srv' +	alias calc='bc <<<' +  	if [ "$WAYLAND_DISPLAY" ]  	then  		alias -g clipp='wl-copy -n' @@ -131,10 +130,6 @@ alias df='df -h'  alias diff='diff -u --color'  alias shred='shred -uz'  alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' -alias floc='doas find / -type "f" 2> /dev/null | grep' -alias dloc='doas find / -type "d" 2> /dev/null | grep' -alias fif='find . -type "f" | grep' -alias fid='find . -type "d" | grep'  alias sxt='sxiv -t'  alias wgsh='wget --quiet --show-progress'  alias wgc='wgsh "$(clipo)"' @@ -145,7 +140,6 @@ alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb'  # ssh  alias sha='ssh-add'  alias sshs='eval "$(ssh-agent)" && ssh-add' -  alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i'  alias whatsmyip='curl -s "ifconfig.co"'  alias icognito='unset HISTFILE' @@ -184,6 +178,7 @@ alias rmd='rm -f *.{orig,rej}'  alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite'  alias gdate='date +%y_%m_%d-%T'  alias tpid='tail -f /dev/null --pid' +alias pwdcp='pwd | clipp'  alias vbm='vboxmanage'  alias vbls='vbm list vms' @@ -216,6 +211,7 @@ alias cdpa='cd ~/pics/ai-outputs/'  alias cdpp='cd ~/proj/personal/'  alias chom='cd ~/proj/personal/homepage'  alias lov='cd ~/proj/personal/lola' +alias cdsh='~/proj/personal/scheduler'  alias cdsw='cd ~/proj/personal/WheelAdvisor'  alias cddm='cd ~/proj/suckless/dmenu'  alias cdw='cd ~/proj/suckless/dwm' @@ -237,6 +233,8 @@ alias cdng='cd /etc/nginx'  alias cdrs='cd /srv/'  # fzf aliases +alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n"| fzf)"' +alias cfg='find -L ~/src/dotfiles -type f | fzf | xargs -r $EDITOR'  alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp'  alias asf='alias | fzf'  alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" @@ -257,7 +255,6 @@ alias dbinf='ssh db dlinfo'  alias sshdb='ssh -t db tmux a'  alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' -alias cfg='git --git-dir=~/src/dotfiles/.git --work-tree=~/src/dotfiles'  # oh-my-zsh git aliases  alias g='git'  alias ga='git add' diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 3c5f11f..eb776f0 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -1,9 +1,7 @@  #!/bin/zsh -die () -{ -	echo "$@" >&2 -} +log() { >&2 printf '%s' "$@"; } +logn() { >&2 printf '%s\n' "$@"; }  awnk() {  	awk "{print \$$1}" @@ -39,34 +37,40 @@ nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit }  ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit }  # googoo aliases -_googoo_fzf_opt () +_googoo_fzf_opt()  {  	if [ "$1" ]  	then  		[ -d "$1" ] && dest="$1" || opt="-q $1"  	fi  } -o () +o()  {  	_googoo_fzf_opt "$1" -	f="$(goo f "dest" | fzf $opt)" +	f="$(goo f "$dest" | fzf $opt)"  	test "$1" && shift  	test -f "$f" && $EDITOR $@ "$f"  } -go () +go()  {  	_googoo_fzf_opt "$1" -	d="$(goo d "$dest" | fzf $opt)" -	test -d "$d" && cd "$d" +	cd "$(goo d "$dest" | fzf $opt)"  } -ogo () +ogo()  {  	_googoo_fzf_opt "$1" -	d="$(dirname "$(goo f "$dest")" | fzf $opt)" -	test -d "$d" && cd "$d" +	cd "$(dirname "$(goo f "$dest")" | fzf $opt)" +} +dgo() +{ +	cd "$(goo d | fzf --filter "$@" | head -n 1)" +} +open() +{ +	$EDITOR "$(goo f | fzf --filter "$@" | head -n 1)"  } -ipc ()  +ipc()   {     if [[ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" == "UP" ]]     then @@ -76,22 +80,20 @@ ipc ()     fi  } -calc () { echo "$@" | bc -l | numfmt --grouping; } - -psgrep () +psgrep()  {  	[ $# -eq 0 ] && return 1  	pgrep "$@" | xargs ps  } -unique () { +unique() {  	local f  	f="$(mktemp)"  	awk '!x[$0]++' "$1" > "$f"  	mv "$f" "$1"  } -clip () {  +clip() {   	if [ "$WAYLAND_DISPLAY" ]  	then  		echo -n "$@" | wl-copy @@ -100,7 +102,7 @@ clip () {  	fi  } -unzipp () { +unzipp() {      file=$1      shift      unzip $file $@ || exit 1 @@ -108,18 +110,18 @@ unzipp () {  }  # fix long waiting time -__git_files () {  +__git_files() {       _wanted files expl 'local files' _files       } -esc () { +esc() {  	$EDITOR "$(which $1)"  } -delfile () { +delfile() {  	curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"  } -upfile () { +upfile() {  	curl -F "file=@\"$1\"" ${2:-https://upfast.cronyakatsuki.xyz}  } @@ -142,16 +144,24 @@ sgd () {  	unset d  } -# Git functions +ginit() +{ +	[ "$1" ] || return 1 +	ssh db /var/git/initdir.sh "$1" +	git remote add origin git@db:"$1.git" +	git push --set-upstream origin $(git_current_branch) +} +  # Returns current branch -function git_current_branch() +git_current_branch()  {  	command git rev-parse --git-dir &>/dev/null || return  	git branch --show-current  }  # Check if main exists and use instead of master -function git_main_branch() { +git_main_branch() +{    command git rev-parse --git-dir &>/dev/null || return    local ref    for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do @@ -177,7 +187,7 @@ function git_develop_branch() {  }  # gpg backup -gpg_backup () +gpg_backup()  {  	gpg --export-secret-keys --armor > private.asc  	gpg --export --armor > public.asc @@ -186,7 +196,7 @@ gpg_backup ()  	shred -uz {public,private,trust}.asc  } -gpg_import () +gpg_import()  {  	tar xf $1  	shred -uz $1 @@ -196,29 +206,29 @@ gpg_import ()  	shred -uz {public,private,trust}.asc  } -ngenable () +ngenable()  {  	ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/  } -vbsr () +vbsr()  {  	vboxmanage snapshot "$1" restore "$2" &&  		vboxmanage startvm "$1" ||  		vboxmanage controlvm "$1" poweroff  } -vbsrr () +vbsrr()  {  	vbsr "$1" "$2"  	sleep 3  	vbsr "$1" "$2"  } -vbst () +vbst()  {  	vboxmanage snapshot "$1" take "$2"  } -pacsize () +pacsize()  {  	if test -n "$1"; then  		packages="$@" @@ -232,7 +242,7 @@ pacsize ()  		expac '%m %n' - |  		numfmt --to=iec-i --suffix=B --format="%.2f"  } -pkbs () +pkbs()  {  	pkgfile -b "$1" | tee /dev/stderr | doas pacman -S -  } @@ -247,7 +257,7 @@ mime-default ()  	die "Done."  } -addedkeys () { +addedkeys() {  	find ~/.ssh -iname "*.pub" | while read key  	do   		local fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)"  @@ -258,7 +268,7 @@ addedkeys () {  	done | sed "s,$HOME/.ssh/,,"  } -fpass () { +fpass() {  	find $HOME/.password-store -type f -not -path ".git" |  		grep "\.gpg$" |  		sed "s,$HOME/.password-store/,,;s,\.gpg$,," | @@ -266,22 +276,22 @@ fpass () {  		xargs pass show -c  } -oclip () +oclip()  {  	printf "\033]52;c;$(echo -n "$@" | base64)\a"  } -sms () +sms()  {  	ssh phone sendmsg "$1" "'$2'"  } -trcp () +trcp()  {  	scp "$1" db:/media/basilisk/downloads/transmission/torrents/  } -muttmail () +muttmail()  {  	die -n "email set: "  	ls $HOME/.config/mutt/configs | @@ -292,7 +302,7 @@ muttmail ()  	read && mutt  } -resize () +resize()  {  	test $# -lt 2 &&  		printf "usage: %s <format> <file> [out]\n" "$0" >&2 && diff --git a/config/home/.zshenv b/config/home/.zshenv index 9a8206c..0c5057e 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -55,3 +55,11 @@ export PASSWORD_STORE_CLIP_TIME=5  # export VIMINIT="source ~/.config/vim/vimrc"  # export fpath=($XDG_CONFIG_HOME/zsh/completion/ $fpath)  # export CUDA_CACHE_PATH="$XDG_CONFIG_HOME"/nv + +export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' +    --color=fg:#e5e9f0,hl:#88c0d0 +	--color=pointer:blue +	--color=gutter:#2e3440 +    --color=fg+:#5e81ac,hl+:#d08770 +    --color=info:#b48ead,prompt:#bf6069,pointer:#b48dac +    --color=marker:#a3be8b,spinner:#ebcb8b,header:#a3be8b' diff --git a/config/hyprland/hypr/hyprland.conf b/config/hyprland/hypr/hyprland.conf index a8a99c2..17f0235 100644 --- a/config/hyprland/hypr/hyprland.conf +++ b/config/hyprland/hypr/hyprland.conf @@ -41,14 +41,17 @@ misc {  }  decoration { -    rounding = 2 -    blur = no -    blur_size = 3 -    blur_passes = 1 -    blur_new_optimizations = on +    rounding = 0 +	blur { +		enabled = 1 +		size = 6 +	}  	dim_inactive = true  	dim_strength = 0.08 +	active_opacity = 0.98 +	inactive_opacity = 0.92 +      drop_shadow = yes      shadow_range = 4      shadow_render_power = 3 diff --git a/config/hyprland/tofi/themes/nord b/config/hyprland/tofi/themes/nord index cf78b5c..c8a6192 100644 --- a/config/hyprland/tofi/themes/nord +++ b/config/hyprland/tofi/themes/nord @@ -1,7 +1,9 @@  ### Font  font = monospace bold  font-size = 12 +anchor=top +# colors  text-color = #d8dee9  prompt-color = #81a1c1  placeholder-color = #4c566a @@ -9,25 +11,28 @@ input-color = #d8dee9  default-result-color = #88c0d0  selection-color = #5e81ac  selection-match-color = #ffffff +background-color = #3b4252f2 +outline-color = #81a1c1 +border-color = #88c0d0 -prompt-text = "" -prompt-padding = 0 -placeholder-text = "..." - -width = 20% +# sizes +width = 100%  height = 20% -background-color = #2e3440f0 -outline-width = 0 -outline-color = #81a1c1 +  border-width = 2 -border-color = #88c0d0 -corner-radius = 26 +outline-width = 0 +prompt-padding = 0 -padding-top = 0 -padding-bottom = 0 -padding-left = 0 -# padding-left = 7% -padding-right = 0 +padding-top = 5 +padding-bottom = 5 +padding-left = 5 +padding-right = 5 + +corner-radius = 0 + +# general +prompt-text = "" +placeholder-text = "..."  matching-algorithm = prefix  require-match = false diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index 0fc585f..6866f62 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -4,15 +4,15 @@  	"modules-center": ["clock"],  	"modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"],  	"mpd": { -		"tooltip": false,  		"format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",  		"artist-len": 24,  		"format-disconnected": "s", -		"format-stopped": "s", +		"format-stopped": "",  		"state-icons": {  			"playing": "",  			"paused": "",  		}, +		"tooltip-format": "{songPosition}/{queueLength} ({volume}%)",  		"on-click": "mpc toggle",  		"on-scroll-up": "mpc volume +5",  		"on-scroll-down": "mpc volume -5", @@ -26,7 +26,6 @@  		"separate-outputs": true,  	},  	"pulseaudio": { -		"tooltip": false,  		"scroll-step": 5,  		"format": "{icon} {volume:3}%",  		"format-icons": { @@ -54,7 +53,6 @@  		"format-disconnected": "",  	},  	"cpu": { -		"tooltip": false,  		"format": " {usage:2}%",  		"interval": 3,  	}, diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css index 61378fd..76efbb3 100644 --- a/config/hyprland/waybar/schemes/base16.css +++ b/config/hyprland/waybar/schemes/base16.css @@ -29,6 +29,12 @@ window#waybar.hidden {  	opacity: 0.2;  } +tooltip { +	background: @background; +	color: @foreground; +	border: 2px solid @color0; +} +  window#waybar.termite #window,  window#waybar.Firefox #window,  window#waybar.Navigator #window, @@ -37,17 +43,21 @@ window#waybar.PCSX2 #window {  	background: @color7;  } -#mpd, #battery, -#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory { -	margin-left: 8px; -	padding-left: 16px; -	padding-right: 16px; -	border-radius: 26px; +.modules-right * { +	padding: 0 16px; +} + +.modules-right { +	margin-right: 2px; +} +.modules-left { +	margin-left: 2px;  }  #workspaces, #mpd, #battery, #clock,  #custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray { -	border: solid @background 2px; +	border: solid @background; +	border-width: 2px 2px 2px 0;  	margin-top: 4px;  	margin-bottom: 2px;  	transition: none; @@ -60,15 +70,13 @@ window#waybar.PCSX2 #window {  }  #workspaces { -	margin-left: 12px; -	border-radius: 26px; +	border: solid @background 2px;  	background: @color3;  }  #workspaces button {  	transition: none;  	background: transparent; -	font-size: 16px;  	color: @background;  } @@ -83,6 +91,7 @@ window#waybar.PCSX2 #window {  #mpd {  	color: @background; +	padding: 0 16px;  	background: @color6;  } @@ -94,30 +103,27 @@ window#waybar.PCSX2 #window {  }  #clock { -	margin-top: 4px; -	margin-bottom: 2px; -	margin-left: 8px; -	padding-left: 16px; -	padding-right: 16px; -	border-radius: 26px; +	border: solid @color4 2px; +	padding: 0 16px;  	color: @color3;  	background: @background; -	border-color: @color4;  }  #window { -	padding-left: 16px; -	color: @color4; +	margin-left: 16px; +	padding: 0; +	color: @color5;  }  #custom-wireguard {  	color: @color5; -	border-color: @color8; +	border: 2px solid @color8;  	background: @background;  }  #network {  	color: @background; +	border-left: 2px solid @background;  	background: @color5;  } @@ -137,20 +143,13 @@ window#waybar.PCSX2 #window {  }  #custom-memory { -	margin-left: 8px; -	margin-right: 12px; -	padding-left: 16px; -	padding-right: 16px; -	border-radius: 26px; +	padding: 0 16px;  	color: @background;  	background: @color5;  } -#tray { -	border: none; -	margin-right: 12px; -	color: @foreground; -	background: transparent; +#tray * { +	padding: unset;  }  #tray > .needs-attention {  | 
