diff --git a/.config/elinks/elinks.conf b/.config/elinks/elinks.conf deleted file mode 100644 index 0924c46..0000000 --- a/.config/elinks/elinks.conf +++ /dev/null @@ -1,45 +0,0 @@ -set document.colors.background = "1a1a1a" -set document.colors.image = "99cc99" -set document.colors.link = "6699cc" -set document.colors.link_number = "cc99cc" -set document.colors.text = "f2f0ec" - -set document.colors.ensure_contrast = 0 -set document.colors.use_document_colors = 0 -set document.colors.use_link_number_color = 1 -set document.history.global.enable = 0 - -set document.browse.links.active_link.colors.background = "1a1a1a" -set document.browse.links.active_link.colors.text = "ffcc66" -set document.browse.links.active_link.enable_color = 0 -set document.browse.links.active_link.invert = 0 -set document.browse.scrolling.vertical_step = 1 - -set terminal.foot.block_cursor = 1 -set terminal.foot.colors = 3 - -set ui.leds.enable = 0 -set ui.show_status_bar = 0 -set ui.show_title_bar = 0 - -set ui.colors.color.title.title-text.text = "f2f0ec" -set ui.colors.color.title.title-bar.background = "262626" - -bind "main" "j" = "scroll-down" -bind "main" "k" = "scroll-up" -bind "main" "h" = "history-move-back" -bind "main" "l" = "history-move-forward" -bind "main" "g" = "move-document-start" -bind "main" "G" = "move-document-end" -bind "main" "f" = "toggle-numbered-links" -bind "main" "q" = "really-quit" - -set mime.handler.image_viewer.unix.ask = 0 -set mime.handler.image_viewer.unix.block = 0 -set mime.handler.image_viewer.unix.program = "linkhandler %u" - -set mime.type.image.jpg = "image_viewer" -set mime.type.image.jpeg = "image_viewer" -set mime.type.image.png = "image_viewer" -set mime.type.image.gif = "image_viewer" -set mime.type.image.bmp = "image_viewer" diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index 67154a6..a49bc92 100644 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -15,7 +15,7 @@ regular0=1a1a1a # black regular1=f2777a # red regular2=99cc99 # green regular3=ffcc66 # yellow -regular4=6699cc # blue +regular4=538cc6 # blue regular5=cc99cc # magenta regular6=66cccc # cyan regular7=d3d0c8 # white diff --git a/.config/git/config b/.config/git/config index 63e802f..0f9a119 100644 --- a/.config/git/config +++ b/.config/git/config @@ -4,8 +4,7 @@ cm = commit co = checkout df = diff - lc = log -1 HEAD --stat - ll = log --oneline + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative pf = push -f sc = pull --rebase upstream master st = status -sb @@ -14,6 +13,8 @@ name = Dmitry Zakharchenko email = dmitz@disroot.org username = dmitz +[core] + editor = nvim [push] autoSetupRemote = true [sendemail] diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index 866066b..f328c13 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -11,3 +11,5 @@ l seek 5 x add sub-delay +1 z add sub-delay -1 tab script-message osc-chapterlist 2 ; show-text "${osd-ass-cc/0}{\\an9}${osd-ass-cc/1}${chapter}" +WHEEL_UP ignore +WHEEL_DOWN ignore diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index f6b6cf5..1bc1e80 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,6 +1,6 @@ alang=eng audio-file-auto=all -hwdec=auto-safe +hwdec=auto slang=eng sub-ass-override=no sub-auto=all diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config index 181b421..e3e479d 100644 --- a/.config/ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -42,4 +42,6 @@ song_window_title_format = "Now playing: {%a > }{%t}|{%f}" search_engine_display_mode = "columns" (classic/columns) follow_now_playing_lyrics = "yes" user_interface = "alternative" (classic/alternative) +execute_on_song_change="pkill -RTMIN+11 someblocks" + vim:ft=config diff --git a/.config/newsboat/urls b/.config/newsboat/urls index 548c421..f9018a3 100644 --- a/.config/newsboat/urls +++ b/.config/newsboat/urls @@ -20,12 +20,10 @@ https://youtube.com/feeds/videos.xml?channel_id=UCjFaPUcJU1vwk193mnW_w1w "(ytb)" https://youtube.com/feeds/videos.xml?channel_id=UCLx053rWZxCiYWsBETgdKrQ "(ytb)" "HL" "(---)" -https://youtube.com/feeds/videos.xml?channel_id=UCjulQNQQJmpYzI-BD1-s03w "(ytb)" https://youtube.com/feeds/videos.xml?channel_id=UCpi0JLkVK0RrAHkfpB3B2Aw "(ytb)" https://youtube.com/feeds/videos.xml?channel_id=UC2WNW0NZVyMeEPvtLmScgvQ "(ytb)" https://youtube.com/feeds/videos.xml?channel_id=UCiUkcNS6W0n8QdosuZASduQ "(ytb)" - "TCH" "(---)" https://twitchrss.appspot.com/vod/uebermarginal "(tch)" "~uebermarginal" https://twitchrss.appspot.com/vod/lastmiles "(tch)" "~lastmiles" @@ -91,6 +89,7 @@ https://rss.nixnet.services/?action=display&bridge=Bandcamp&context=By+band&band "DEV" "(---)" https://repology.org/maintainer/dmitz%40disroot.org/feed-for-repo/alpine_edge/atom "(www)" +https://github.com/kolunmi/sandbar/commits/main.atom "(ghb)" https://github.com/djpohly/dwl/commits/main.atom "(ghb)" https://git.sr.ht/~raphi/somebar/log/master/rss.xml "(srt)" https://github.com/riverwm/river/commits/master.atom "(ghb)" diff --git a/.config/nvim/colors/eighties.vim b/.config/nvim/colors/eighties.vim index eb668c3..efc3ae2 100644 --- a/.config/nvim/colors/eighties.vim +++ b/.config/nvim/colors/eighties.vim @@ -231,6 +231,12 @@ call hi("SpellRare", "", s:cterm00, "underline", "") " Java highlighting call hi("javaOperator", s:cterm0D, "", "", "") +" Telescope highlighting +call hi("TelescopeMatching", s:cterm07, "", "", "") +call hi("TelescopePreviewLine", s:cterm0A, "", "bold", "") +call hi("TelescopePromptPrefix", "", "", "none", "") +call hi("TelescopeSelection", s:cterm07, "", "bold", "") + " Remove functions delf hi diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 448ce9b..4ad57f9 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -2,12 +2,14 @@ require 'paq' { 'hrsh7th/cmp-buffer'; 'hrsh7th/cmp-nvim-lsp'; 'hrsh7th/nvim-cmp'; - 'windwp/nvim-autopairs'; 'neovim/nvim-lspconfig'; + 'nvim-lua/plenary.nvim'; + 'nvim-telescope/telescope.nvim' } require('sets') require('maps') require('lsp') +require('tlp') vim.cmd('colorscheme eighties') diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index 2299c06..d4a2dee 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -1,8 +1,8 @@ local map = vim.keymap.set local opts = { noremap=true, silent=true } +local builtin = require('telescope.builtin') vim.g.mapleader = ' ' -vim.g.fzf_action = { enter = 'tab split', ['ctrl-t'] = 'vsplit' } map('n', '', 'h') map('n', '', 'j') @@ -19,7 +19,9 @@ map('n', '', ':bprevious') map('n', '', ':bnext') map('n', '', ':bdelete') +map('n', 'f', builtin.find_files, {}) +map('n', 'd', builtin.buffers, {}) +map('n', 'g', builtin.live_grep, {}) map('', 'c', ':w! | !compiler "%"') -map('', 'f', ':FZF') map('', 'p', ':!opout %') map('', 'se', ':setlocal spell! spelllang=en_us') diff --git a/.config/nvim/lua/sets.lua b/.config/nvim/lua/sets.lua index 70e2b9d..38fe803 100644 --- a/.config/nvim/lua/sets.lua +++ b/.config/nvim/lua/sets.lua @@ -29,7 +29,6 @@ o.undofile = true wo.wrap = false -g.fzf_layout = { down = '30%' } g.is_posix = 1 au({ 'BufWritePre' }, { pattern = { '*' }, command = [[%s/\n\+\%$//e]] }) diff --git a/.config/nvim/lua/tlp.lua b/.config/nvim/lua/tlp.lua new file mode 100644 index 0000000..d76069e --- /dev/null +++ b/.config/nvim/lua/tlp.lua @@ -0,0 +1,46 @@ +local actions = require('telescope.actions') + +require('telescope').setup { + defaults = { + mappings = { + n = { + ["Z"] = actions.select_vertical, + ["X"] = actions.select_horizontal, + ["C"] = actions.select_tab + }, + }, + }, + pickers = { + buffers = { + ignore_current_buffer = true, + initial_mode = "normal", + previewer = false, + sort_lastused = true, + theme = "ivy", + mappings = { + n = { + [""] = actions.delete_buffer, + }, + }, + layout_config = { + height = 10, + }, + }, + find_files = { + hidden = false, + initial_mode = "normal", + layout_strategies = "vertical", + theme = "ivy", + layout_config = { + height = 15, + }, + }, + live_grep = { + no_ignore = true, + theme = "ivy", + layout_config = { + height = 15, + }, + }, + }, +} diff --git a/.config/pipe-viewer/pipe-viewer.conf b/.config/pipe-viewer/pipe-viewer.conf index 386b61f..9854932 100644 --- a/.config/pipe-viewer/pipe-viewer.conf +++ b/.config/pipe-viewer/pipe-viewer.conf @@ -101,7 +101,7 @@ our $CONFIG = { video_players => { mpv => { arg => "--really-quiet --force-media-title=*TITLE* *URL*", - cmd => "mpv", + cmd => "setsid -f mpv", fs => "--fullscreen", novideo => "--no-video", srt => "--sub-file=*SUB*", diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 3d6adf9..507e137 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -1,4 +1,4 @@ -c.url.searchengines = {'DEFAULT': 'https://search.femboy.hu/search.php?q={}', +c.url.searchengines = {'DEFAULT': 'https://librex.baczek.me/search.php?q={}', 'y': 'https://tube.cadence.moe/search?q={}', 'gh': 'https://github.com/search?q={}', 'md': 'https://reelgood.com/search?q={}', @@ -17,6 +17,7 @@ c.downloads.remove_finished = 500 c.tabs.background = True c.url.start_pages = ['about:blank'] c.url.default_page = 'about:blank' +c.qt.args=["enable-accelerated-video-decode", "enable-gpu-rasterization", "ignore-gpu-blocklist"] c.colors.completion.odd.bg = "#1a1a1a" c.colors.completion.even.bg = "#1a1a1a" diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index 68aaf9d..d10387f 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -1,7 +1,7 @@ t web.telegram.org s steamcommunity.com m miped.ru/f -y yewtu.be +y invidious.lunar.icu gh github.com ap gitlab.alpinelinux.org/alpine/aports cs teachyourselfcs.com diff --git a/.config/river/init b/.config/river/init new file mode 100755 index 0000000..08b1db1 --- /dev/null +++ b/.config/river/init @@ -0,0 +1,145 @@ +#!/bin/sh + +# Background and border color +riverctl background-color 0x1a1a1a +riverctl border-color-focused 0x005577 +riverctl border-color-unfocused 0x262626 + +# General binds +riverctl map normal Super Return spawn foot +riverctl map normal Alt 1 spawn "wlfreerdp $XDG_DATA_HOME/rdp/aws.rdp /dynamic-resolution" +riverctl map normal Super A send-layout-cmd rivertile "padding toggle" +riverctl map normal Super B spawn "echo 'all toggle-visibility' > $XDG_RUNTIME_DIR/sandbar-0" +riverctl map normal Super C spawn "foot pipe-viewer" +riverctl map normal Super D spawn passmenu +riverctl map normal Super E spawn "foot aerc" +riverctl map normal Super F toggle-fullscreen +riverctl map normal Super F2 spawn "wlopm --toggle '*'" +riverctl map normal Super M spawn "foot -T float ncmpcpp" +riverctl map normal Super N spawn "foot newsboat" +riverctl map normal Super Q close +riverctl map normal Super R spawn "foot vifm" +riverctl map normal Super T spawn "torwrap open" +riverctl map normal Super W spawn qutebrowser +riverctl map normal Super+Shift B spawn bluetooth +riverctl map normal Super+Shift BackSpace spawn "sysact reb" +riverctl map normal Super+Shift F toggle-float +riverctl map normal Super+Shift M spawn "foot -T float pulsemixer" +riverctl map normal Super+Shift Q spawn "sysact rest" +riverctl map normal Super+Shift R spawn "foot btm" +riverctl map normal Super+Shift T spawn "torwrap toggle" +riverctl map normal Super+Shift W spawn "qutebrowser --temp-basedir -s content.private_browsing true" +riverctl map normal Super+Shift X spawn "sysact shut" + +# Volume and MPD +for mode in normal locked +do + riverctl map $mode None XF86AudioMute spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -45 $(pidof someblocks)" + riverctl map $mode Super BackSpace spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -45 $(pidof someblocks)" + riverctl map -repeat $mode None XF86AudioLowerVolume spawn "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -45 $(pidof someblocks)" + riverctl map -repeat $mode None XF86AudioRaiseVolume spawn "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -45 $(pidof someblocks)" + riverctl map -repeat $mode Super Equal spawn "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -45 $(pidof someblocks)" + riverctl map -repeat $mode Super Minus spawn "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -45 $(pidof someblocks)" + riverctl map $mode Super Comma spawn "mpc prev" + riverctl map $mode Super P spawn "mpc toggle" + riverctl map $mode Super Period spawn "mpc next" + riverctl map $mode Super+Shift Comma spawn "mpc seek 0%" + riverctl map $mode Super+Shift Period spawn "mpc repeat" +done + +# Screenshots +riverctl map normal None Print spawn "grim pic-full-$(date '+%y%m%d-%H%M-%S').png" +riverctl map normal Shift Print spawn "grimpick" + +# Nodes/tags manipulation +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + riverctl map normal Super $i set-focused-tags $tags + riverctl map normal Super+Shift $i set-view-tags $tags +done + +riverctl map normal Control+Alt H snap left +riverctl map normal Control+Alt J snap down +riverctl map normal Control+Alt K snap up +riverctl map normal Control+Alt L snap right +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous +riverctl map normal Super Space zoom +riverctl map normal Super Tab focus-previous-tags +riverctl map normal Super BackSlash focus-previous-tags +riverctl map normal Super+Shift J swap next +riverctl map normal Super+Shift K swap previous + +# Scratchpad and sticky +all_tags=$(((1 << 32) - 1)) + +scratch_tag=$((1 << 20 )) +all_but_scratch_tag=$(( $all_tags ^ $scratch_tag )) + +riverctl map normal Super Z set-view-tags $scratch_tag +riverctl map normal Super X toggle-focused-tags $scratch_tag +riverctl spawn-tagmask $all_but_scratch_tag + +# Sticky +sticky_tag=$((1 << 31)) +all_but_sticky_tag=$(( $all_tags ^ $sticky_tag )) + +riverctl map normal Super S toggle-view-tags $sticky_tag +riverctl spawn-tagmask $all_but_sticky_tag + +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + riverctl map normal Super $i set-focused-tags $(($sticky_tag + $tags)) +done + +# Resizing +riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" +riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" +riverctl map normal Alt Right resize horizontal 100 +riverctl map normal Alt Left resize horizontal -100 +riverctl map normal Alt Up resize vertical 100 +riverctl map normal Alt Down resize vertical -100 + +# Layout orientation +riverctl map normal Super Up send-layout-cmd rivertile "main-location top" +riverctl map normal Super Right send-layout-cmd rivertile "main-location right" +riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" +riverctl map normal Super Left send-layout-cmd rivertile "main-location left" + +# Input +pad=$(riverctl list-inputs | grep -i touchpad) +riverctl input $pad accel-profile adaptive +riverctl input $pad disable-while-typing enabled +riverctl input $pad disabled-on-external-mouse enabled +riverctl input $pad tap enabled +riverctl input $pad natural-scroll disabled + +riverctl xcursor-theme Adwaita +riverctl focus-follows-cursor normal +riverctl hide-cursor timeout 5000 + +riverctl keyboard-layout -options "grp:ctrl_shift_toggle,altwin:menu_win" "us,ua" +riverctl set-repeat 50 300 + +riverctl map-pointer normal Super BTN_LEFT move-view +riverctl map-pointer normal Super BTN_MIDDLE toggle-float +riverctl map-pointer normal Super BTN_RIGHT resize-view + +# Rules +riverctl rule-add float -title "float" + +# Autostart +autostart="pipewire mpd mako" +for program in $autostart; do + pidof -sx "$program" || riverctl spawn "$program" & +done + +riverctl spawn "startbar" +riverctl spawn "gpg-agent --daemon" + +riverctl declare-mode normal +riverctl default-layout rivertile +riverctl attach-mode bottom +rivertile -view-padding 4 -outer-padding 4 & diff --git a/.config/shell/aliases b/.config/shell/aliases index f4393c7..4e8016a 100644 --- a/.config/shell/aliases +++ b/.config/shell/aliases @@ -2,7 +2,6 @@ alias f="$FILE" \ v="$EDITOR" \ -z="zathura" \ cp="cp -i" \ mv="mv -i" \ rm="rm -i" \ @@ -26,8 +25,13 @@ cfz="$EDITOR $XDG_CONFIG_HOME/zsh/.zshrc" \ cfp="$EDITOR $XDG_CONFIG_HOME/zsh/.zprofile" \ cfq="$EDITOR $XDG_CONFIG_HOME/qutebrowser/config.py" \ cfu="$EDITOR $XDG_CONFIG_HOME/newsboat/urls" \ -cfv="$EDITOR $XDG_CONFIG_HOME/nvim/init.lua" +cfv="$EDITOR $XDG_CONFIG_HOME/nvim/init.lua" \ +hist="$EDITOR $XDG_CACHE_HOME/history" -for command in apk rc rc-service rc-update mount umount poweroff reboot ; do +for program in zathura mpv imv; do + alias $program="setsid -f $program" +done; unset program + +for command in apk wg-quick rc-service rc-update mount umount poweroff reboot ; do alias $command="doas $command" done; unset command diff --git a/.config/tofi/config b/.config/tofi/config index 553561a..2a3a780 100644 --- a/.config/tofi/config +++ b/.config/tofi/config @@ -15,6 +15,6 @@ prompt-text = ">" result-spacing = 20 selection-background = #005577 selection-color = #f2f0ec -selection-background-padding = 8 +selection-background-padding = 10 text-color = #bbbbbb width = 100% diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index 14d29cb..205560a 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -1,17 +1,19 @@ -set vicmd=$EDITOR -set syscalls +colorscheme eighties +set ignorecase +set incsearch set nofollowlinks +set nohlsearch +set scrolloff=4 +set smartcase set sortnumbers +set suggestoptions=normal,visual,view,otherpane,keys,marks,registers +set syscalls +set statusline=" %t%= %A %10u:%-7g %20d " +set timefmt='%Y/%m/%d %H:%M' set undolevels=100 +set vicmd=$EDITOR set wildmenu set wildstyle=popup -set scrolloff=4 -set ignorecase -set smartcase -set nohlsearch -set incsearch -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers -colorscheme eighties map R :restart map E :!$EDITOR %f diff --git a/.config/wall.jpg b/.config/wall.jpg deleted file mode 100644 index 9a84c39..0000000 Binary files a/.config/wall.jpg and /dev/null differ diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 3ed9bc0..c9c988a 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -22,10 +22,11 @@ export FILE="vifm" export READER="zathura" export TERMINAL="foot" -export ELINKS_CONFDIR="$XDG_CONFIG_HOME"/elinks -export FZF_DEFAULT_OPTS="--layout=reverse --height 40%" export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export GOMODCACHE="$XDG_CACHE_HOME/go/mod" export GOPATH="$XDG_DOCUMENTS_DIR/code/go" +export GOTELEMETRY=off +export GOTOOLCHAIN=local export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc" export LESS=-R @@ -40,4 +41,4 @@ export LESS_TERMCAP_us="$(printf '%b' '')" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -[ "$(tty)" = "/dev/tty1" ] && ! pidof -s dwl >/dev/null 2>&1 && dbus-run-session -- dwl -s somebar +[ "$(tty)" = "/dev/tty1" ] && ! pidof -s river >/dev/null 2>&1 && dbus-run-session river diff --git a/.local/bin/menu/linkhandler b/.local/bin/menu/linkhandler index 1d82ba2..ce8c4f9 100755 --- a/.local/bin/menu/linkhandler +++ b/.local/bin/menu/linkhandler @@ -3,20 +3,18 @@ feed="${1:-$(printf "%s" | tofi --prompt-text 'Paste URL or file path')}" case "$feed" in - *mkv|*webm|*mp4|*watch?v*|*youtu.be*|*yewtu.be*|*videos.lukesmith.xyz*|*spacepub.space*|*twitch.tv*) + *mkv|*webm|*mp4|*watch?v*|*youtu.be*|*music.youtube.com*|*invidious.lunar.icu*|*videos.lukesmith.xyz*|*spacepub.space*|*twitch.tv*) case "$(printf "yt-dlp\\nyt-dlp (audio)\\nyt-dlp (music)\\nmpv\\nmpv (audio)" | tofi --prompt-text "Handle media with?")" in "yt-dlp") qndl "$feed" >/dev/null 2>&1 ;; "yt-dlp (audio)") qndl -a "$feed" >/dev/null 2>&1 ;; "yt-dlp (music)") qndl -m "$feed" >/dev/null 2>&1 ;; - "mpv") setsid -f "$TERMINAL" -e mpv --quiet "$feed" >/dev/null 2>&1 ;; + "mpv") setsid -f mpv --quiet "$feed" >/dev/null 2>&1 ;; "mpv (audio)") setsid -f "$TERMINAL" -e mpv --quiet --no-video "$feed" >/dev/null 2>&1 ;; esac ;; *png|*jpg|*jpe|*jpeg|*gif) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f imv "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; *pdf|*cbz|*cbr) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; - *go.dev*|*lukesmith.xyz*|*drewdevault.com*) - setsid -f "$TERMINAL" -e elinks "$feed" >/dev/null 2>&1 ;; *ogg|*mp3|*wav) qndl -a "$feed" >/dev/null 2>&1 ;; magnet*) diff --git a/.local/bin/menu/sysact b/.local/bin/menu/sysact index e78adaf..92baa3e 100755 --- a/.local/bin/menu/sysact +++ b/.local/bin/menu/sysact @@ -6,7 +6,7 @@ case $1 in reb) prompt "Reboot computer?" "doas reboot" ;; rest) - prompt "Leave dwl?" "kill -TERM $(pgrep -u $USER "\bdwl$")" ;; + prompt "Leave WM?" "riverctl exit" ;; lock) mpc pause; waylock -init-color 0x000000 -input-color 0x005577 esac diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index e07ddd0..1549ae1 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -3,5 +3,5 @@ for battery in /sys/class/power_supply/BAT? do capacity=$(cat "$battery"/capacity 2>/dev/null) || break - printf "%s%%" "$capacity" + printf "bat: %s%%" "$capacity" done diff --git a/.local/bin/statusbar/cpu b/.local/bin/statusbar/cpu new file mode 100755 index 0000000..431dc75 --- /dev/null +++ b/.local/bin/statusbar/cpu @@ -0,0 +1,4 @@ +#!/bin/sh + +temp=$(cat /sys/class/thermal/thermal_zone0/temp | awk '{print $1 / 1000}') || break +printf "cpu: %d°" "$temp" diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music index a64b05f..1dd612d 100755 --- a/.local/bin/statusbar/music +++ b/.local/bin/statusbar/music @@ -1,5 +1,9 @@ #!/bin/sh -mpc -f %title% | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/[P]/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' '; +state=$(mpc -f %title% | awk 'NR==2 {print $1}') + +[ -z "$state" ] && state="[stopped]" + +printf "mus: %s" "${state:1:-1}" pidof -x mpdup >/dev/null 2>&1 || mpdup >/dev/null 2>&1 & diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 0f4d2ce..c8da617 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -4,5 +4,6 @@ wp="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" vol="$(echo $wp | awk '{print $2 * 100}')" ismuted="$(echo "$wp" | awk '{print $3}')" -[ -n "$ismuted" ] && echo Muted && exit -printf "%s%%" "$vol" +[ -n "$ismuted" ] && echo muted && exit + +printf "vol: %s%%" "$vol" diff --git a/.local/share/gnupg/gpg-agent.conf b/.local/share/gnupg/gpg-agent.conf index 792b6b8..859a6f0 100644 --- a/.local/share/gnupg/gpg-agent.conf +++ b/.local/share/gnupg/gpg-agent.conf @@ -1,4 +1,4 @@ pinentry-program /usr/bin/pinentry-qt -default-cache-ttl 5000 -max-cache-ttl 7200 +default-cache-ttl 60000 +max-cache-ttl 60000 enable-ssh-support diff --git a/.ssh/config b/.ssh/config index 4be131d..283e2a1 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1 +1,7 @@ Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" + +Host juno + HostName 18.159.216.33 + User admin + RequestTTY yes + RemoteCommand screen -d -RR