dotfiles

:)
git clone https://git.sr.ht/~ashymad/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit 831b3aee9d068dba6aca29d10104ceee4df26c11
parent 008a30403bef28263b5802d24791948a25bc9ddd
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Sun, 10 Jul 2022 13:41:23 +0200

Update polybar and fish functions

Diffstat:
M.gitmodules | 3+++
Mfish/.config/fish/config.fish | 8+++++++-
Mfish/.config/fish/functions/extract_recursive.fish | 3+--
Afish/.config/fish/functions/git-subpush.fish | 9+++++++++
Afish/.config/fish/functions/neovide.fish | 11+++++++++++
Afish/.config/fish/functions/reademl.fish | 3+++
Mpolybar/.config/polybar/config | 110++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
Apolybar/.config/polybar/polybar-scripts | 1+
8 files changed, 125 insertions(+), 23 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -4,3 +4,6 @@ [submodule "astroid/.config/astroid/kpxcnm"] path = astroid/.config/astroid/kpxcnm url = git@github.com:Ashymad/kpxcnm +[submodule "polybar/.config/polybar/polybar-scripts"] + path = polybar/.config/polybar/polybar-scripts + url = https://github.com/polybar/polybar-scripts.git diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish @@ -6,6 +6,11 @@ alias ec "emacsclient -a \"\"" alias fcd 'cd (fd -I -L -d 8 -t d . ~ | fzf)' alias bash 'env FISH_RAMP_DISABLE=1 bash' alias psgr 'ps aux | grep' + +if test -n "$NVIM" + alias nvim nvr +end + alias vim nvim alias wine64 'env WINEPREFIX=/home/shyman/.wine64 WINEARCH=win64 wine' @@ -19,7 +24,7 @@ alias wine32tricks 'env WINEPREFIX=/home/shyman/.wine32 WINEARCH=win32 winetrick alias cmus='tmux attach-session -t cmus || tmux new-session -A -D -s cmus /usr/bin/cmus' alias :q exit -alias :e nvim +alias :e nvr if test "$XDG_SESSION_TYPE" = "x11" alias :split 'i3-msg split v\; exec alacritty > /dev/null' alias :vsplit 'i3-msg split h\; exec alacritty > /dev/null' @@ -31,3 +36,4 @@ end alias noproxy 'env http_proxy="" https_proxy="" ftp_proxy=""' source /usr/share/autojump/autojump.fish +direnv hook fish | source diff --git a/fish/.config/fish/functions/extract_recursive.fish b/fish/.config/fish/functions/extract_recursive.fish @@ -3,8 +3,7 @@ function extract_recursive 7z x $argv[1] -o$folname echo "0" > /tmp/extrout while read < /tmp/extrout - find $folname \( -name '*.zip' -o -name '*.xz' -o -name '*.tar' -o -name '*.gz' -o -name "*.tgz" \) -type f -exec bash -c '7z x "{}" -o$(echo {} | sed \'s/\\.[^.]*$//\') && rm {}' \; | tee /tmp/extrout - end + find $folname \( -name '*.zip' -o -name '*.xz' -o -name '*.tar' -o -name '*.gz' -o -name "*.tgz" -o -name "*.txz" \) -type f -exec bash -c '7z x "{}" -o$(echo "{}" | sed \'s/\\.[^.]*$//\') && rm "{}"' \; | tee /tmp/extrout end end diff --git a/fish/.config/fish/functions/git-subpush.fish b/fish/.config/fish/functions/git-subpush.fish @@ -0,0 +1,9 @@ +function git-subpush + set sub (basename (pwd)) + git push + pushd .. + git add $sub + git commit -m "Update $sub" + git push + popd +end diff --git a/fish/.config/fish/functions/neovide.fish b/fish/.config/fish/functions/neovide.fish @@ -0,0 +1,11 @@ +function neovide + set DISADR (echo $DISPLAY | cut -d':' -f1) + if test -n "$DISADR" + set LOCADR (ip -f inet addr show enp60s0u1u3u3 | sed -En -e 's/.*inet ([0-9.]+).*/\1/p') + nohup nvim --listen $LOCADR:8118 --headless $argv >/dev/null 2>&1 & + disown + ssh -T shyman@$DISADR "env DISPLAY=:0 neovide --remote-tcp $LOCADR:8118" + else + /home/mikulicz/Workspace/neovide/target/release/neovide -- $argv + end +end diff --git a/fish/.config/fish/functions/reademl.fish b/fish/.config/fish/functions/reademl.fish @@ -0,0 +1,3 @@ +function reademl + awk 'BEGIN {var=9999;} {if ($2=="base64") {var=NR+1} else if (NR!=var && $0=="") {var=9999}; if (NR>var) print $0;}' $argv[1] | base64 -d +end diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config @@ -57,8 +57,8 @@ font-0 = "Noto Mono:pixelsize=9;1" font-1 = "Siji:pixelsize=10;1" modules-left = i3 -modules-center = cmus -modules-right = filesystem memory cpu eth xkeyboard date +modules-center = cmus mpd +modules-right = filesystem memory cpu ibacklight pipewire-simple eth docketh wlan vpn battery0 xkeyboard date tray-position = left tray-padding = 2 @@ -100,7 +100,6 @@ type = internal/fs interval = 25 mount-0 = / -mount-1 = /data label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% label-unmounted = %mountpoint% not mounted @@ -182,31 +181,31 @@ icon-play =  icon-pause =  icon-next =  -label-song-maxlen = 25 +label-song-maxlen = 50 label-song-ellipsis = true -[module/xbacklight] -type = internal/xbacklight +[module/ibacklight] +type = internal/backlight + +card = intel_backlight + +use-actual-brightness = true -format = <label> <bar> -label =  +enable-scroll = true + +format = <bar> bar-width = 10 bar-indicator = | bar-indicator-foreground = ${colors.foreground} bar-indicator-font = 2 -bar-fill = ─ +bar-fill = ― bar-fill-font = 2 bar-fill-foreground = ${colors.magenta} -bar-empty = ─ +bar-empty = ― bar-empty-font = 2 bar-empty-foreground = ${colors.foreground} -[module/backlight-acpi] -inherit = module/xbacklight -type = internal/backlight -card = intel_backlight - [module/cpu] type = internal/cpu interval = 2 @@ -225,7 +224,7 @@ label = %percentage_used%% [module/wlan] type = internal/network -interface = wlp3s0 +interface = wlp0s20f3 interval = 3.0 format-connected = <ramp-signal> <label-connected> @@ -247,7 +246,41 @@ ramp-signal-foreground = ${colors.foreground} [module/eth] type = internal/network -interface = enp4s0 +interface = enp0s31f6 +interval = 3.0 + +format-connected-underline = #55aa55 +format-connected-prefix = " " +format-connected-prefix-foreground = ${colors.foreground-alt} +label-connected = %local_ip% + +format-disconnected = +;format-disconnected = <label-disconnected> +;format-disconnected-underline = ${self.format-connected-underline} +;label-disconnected = %ifname% disconnected +;label-disconnected-foreground = ${colors.foreground-alt} +; + +[module/docketh] +type = internal/network +interface = enp60s0u1u3u3 +interval = 3.0 + +format-connected-underline = #55aa55 +format-connected-prefix = " " +format-connected-prefix-foreground = ${colors.foreground-alt} +label-connected = %local_ip% + +format-disconnected = +;format-disconnected = <label-disconnected> +;format-disconnected-underline = ${self.format-connected-underline} +;label-disconnected = %ifname% disconnected +;label-disconnected-foreground = ${colors.foreground-alt} +; + +[module/vpn] +type = internal/network +interface = vpn0 interval = 3.0 format-connected-underline = ${colors.green} @@ -305,10 +338,47 @@ bar-volume-empty = ─ bar-volume-empty-font = 2 bar-volume-empty-foreground = ${colors.foreground} -[module/battery] +[module/pulseaudio] +type = internal/pulseaudio + +format-volume = <label-volume> <bar-volume> +label-volume = VOL +label-volume-foreground = ${root.foreground} + +format-muted-prefix = " " +format-muted-foreground = ${colors.foreground-alt} +label-muted = sound muted + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground-alt} + +[module/pipewire-simple] +type = custom/script +exec = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh +interval = 3 +click-right = exec pavucontrol & +click-left = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --mute & +scroll-up = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --up & +scroll-down = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --down & + +[module/battery0] type = internal/battery -battery = BAT1 -adapter = ADP1 +battery = BAT0 +adapter = ADP0 full-at = 98 format-charging = <animation-charging> <label-charging> diff --git a/polybar/.config/polybar/polybar-scripts b/polybar/.config/polybar/polybar-scripts @@ -0,0 +1 @@ +Subproject commit 686f211546b77ced32a8487fe8c2a48f3b59c190