diff --git a/.config/i3/config b/.config/i3/config index 5f04f6a..46849f7 100755 --- a/.config/i3/config +++ b/.config/i3/config @@ -152,7 +152,8 @@ bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right bindsym $mod+m exec --no-startup-id mpd-mpris ;; exec --no-startup-id $term -e ncmpcpp -bindsym $mod+Shift+m exec --no-startup-id spotify-tray +bindsym $mod+Shift+m exec --no-startup-id jellyfinmediaplayer +bindsym $mod+Ctrl+m exec --no-startup-id feishin # #---Workspace Bindings---# # bindsym $mod+Home workspace $ws1 diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 796c1f9..2c0e4d8 100755 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -5,10 +5,10 @@ set shell bash set shellopts '-eu' set ifs "\n" set scrolloff 10 -set color256 set icons set period 1 set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml" +set watch true # Vars that depend on environmental variables $lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index 06e1d2b..2c29f0a 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -57,7 +57,7 @@ # Specify fast video rendering preset (for --vo= only) # Recommended for mobile devices or older hardware with limited processing power -profile=fast +#profile=fast # Specify high quality video rendering preset (for --vo= only) # Offers superior image fidelity and visual quality for an enhanced viewing @@ -73,7 +73,7 @@ profile=fast # video outputs, but should work well with default settings on most systems. # If performance or energy usage is an issue, forcing the vdpau or vaapi VOs # may or may not help. -hwdec=auto +# hwdec=auto ################## # audio settings # diff --git a/.config/nvim/after/plugin/vimtex.lua b/.config/nvim/after/plugin/vimtex.lua index 0e749ca..50fea21 100644 --- a/.config/nvim/after/plugin/vimtex.lua +++ b/.config/nvim/after/plugin/vimtex.lua @@ -6,11 +6,11 @@ vim.g.vimtex_view_automatic = 0 vim.g.vimtex_compiler_latexmk = { options = { - "-verbose", - "-file-line-error", - "-synctex=1", - "-interaction=nonstopmode", - "-shell-escape", + "-verbose", + "-file-line-error", + "-synctex=1", + "-interaction=nonstopmode", + "-shell-escape", } } @@ -25,6 +25,8 @@ vim.g.vimtex_toc_config = { } vim.g.vimtex_quickfix_ignore_filters = { + "Underfull \\\\vbox", + "Overfull \\\\vbox", "Underfull \\\\hbox", "Overfull \\\\hbox", -- "LaTeX Warning: .\\+ float specifier changed to", diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 3fd7aaf..247de3d 100755 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -24,7 +24,7 @@ alias \ ka="killall" \ g="git" \ trem="transmission-remote" \ - YT="youtube-viewer" \ + YT="pipe-viewer" \ sdn="doas shutdown -h now" \ f="$FILE" \ e="$EDITOR" \ diff --git a/.config/shell/shortcutrc b/.config/shell/shortcutrc index fa9ae4b..f2e24c1 100755 --- a/.config/shell/shortcutrc +++ b/.config/shell/shortcutrc @@ -11,6 +11,7 @@ alias cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \ m="cd ${XDG_MUSIC_DIR:-$HOME/Music} && ls -a" \ pp="cd ${XDG_PICTURES_DIR:-$HOME/Pictures} && ls -a" \ vv="cd ${XDG_VIDEOS_DIR:-$HOME/Videos} && ls -a" \ + L="cd ${XDG_LATEX_DIR:-$HOME/Documents/LaTeX/}Projects && ls -a" \ t="cd ${XDG_THESIS_DIR:-$HOME/Documents/These} && ls -a" \ p="cd ${XDG_PAPERS_DIR:-$HOME/Documents/These/Papers} && ls -a" \ T="cd ${XDG_PAPERS_DIR:-$HOME/Documents/These/Papers/Thesis_Barnouin/} && vim ." \ diff --git a/.gitmodules b/.gitmodules index b40e8d4..289bb49 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule ".local/bin/doas_askpass"] - path = .local/bin/doas_askpass - url = https://github.com/amarakon/doas_askpass [submodule ".local/src/dmenu"] path = .local/src/dmenu url = https://github.com/lukesmithxyz/dmenu.git diff --git a/.local/bin/doas_askpass b/.local/bin/doas_askpass deleted file mode 160000 index db7da67..0000000 --- a/.local/bin/doas_askpass +++ /dev/null @@ -1 +0,0 @@ -Subproject commit db7da6746ce9fb6276ea02eae73d439465d752a5 diff --git a/.local/bin/doas_askpass/Makefile b/.local/bin/doas_askpass/Makefile new file mode 100644 index 0000000..40c3b19 --- /dev/null +++ b/.local/bin/doas_askpass/Makefile @@ -0,0 +1,15 @@ +PROG=doas_askpass +PREFIX=/usr/local +BINDIR=${PREFIX}/bin +LICENSEDIR=${PREFIX}/share/licenses/doas_askpass + +install: + chmod 755 ${PROG} + cp ${PROG} ${PROG}.bak + mkdir -p ${DESTDIR}${BINDIR} + cp ${PROG}.bak ${DESTDIR}${BINDIR}/${PROG} + rm ${PROG}.bak + +uninstall: + rm -rf ${DESTDIR}${LICENSEDIR} + rm -f ${DESTDIR}${BINDIR}/${PROG} diff --git a/.local/bin/doas_askpass/README.md b/.local/bin/doas_askpass/README.md new file mode 100644 index 0000000..aceeeaa --- /dev/null +++ b/.local/bin/doas_askpass/README.md @@ -0,0 +1,81 @@ +Doas AskPass +================ + +## Contents + +- [Usage](#usage) +- [Dependencies](#dependencies) +- [Installation](#installation) + - [Universal](#universal) + - [Gentoo](#gentoo) +- [Uninstallation](#uninstallation) + - [Universal](#universal-1) + - [Gentoo](#gentoo-1) +- [Configuration](#configuration) + +Doas AskPass is a simple expect script that basically creates a +`sudo -A` equivalent for Doas. This allows you to graphically enter your +password. + +## Usage + + `# user` doas-askpass + +## Dependencies + +1. Doas +2. Expect + +Dmenu is also recommended. + +## Installation + +### Universal + +``` sh +`# user` git clone https://github.com/amarakon/doas_askpass +`# user` cd doas_askpass +`# root` make install +``` + +### Gentoo + +``` sh +`# root` eselect repository add amarlay git https://github.com/amarakon/amarlay +`# root` emerge --sync amarlay +`# root` emerge app-admin/doas_askpass +``` + +## Uninstallation + +### Universal + +``` sh +`# user` cd doas_askpass +`# root` make uninstall +``` + +### Gentoo + +``` sh +`# root` emerge -c app-admin/doas_askpass +# Remove my overlay (optional) +`# root` eselect-repository remove -f amarlay +`# root` emerge --sync +``` + +## Configuration + +The graphical program that is expected by the script is set by the +`DOAS_ASKPASS` environment variable. Otherwise, the default is +`dmenu -P -p password`. You need the +[password](https://tools.suckless.org/dmenu/patches/password/) patch in +order for this to work. I recomment using my +[version](https://github.com/amarakon/dotfiles/blob/master/etc/portage/patches/x11-misc/dmenu/dmenu-password-5.0.diff) +which is more secure. You can set the environment variable in +`~/.bashrc` or anywhere else that your shell is going to source. The +following is an example. + +``` sh +DOAS_ASKPASS="dmenu -P -p password:" +``` diff --git a/.local/bin/doas_askpass/doas_askpass b/.local/bin/doas_askpass/doas_askpass new file mode 100755 index 0000000..611f13d --- /dev/null +++ b/.local/bin/doas_askpass/doas_askpass @@ -0,0 +1,34 @@ +#!/usr/bin/expect -- + +# askpass implementation for doas +# example usage: DOAS_ASKPASS="dmenu -P -p password:" doas_askpass echo working + +# don't mind the man behind the curtain +log_user 0 + +# no command, then nothing to do +if { $argc == 0 } { exit 0 } + +# treat all arguments as command input +set cmd [lrange $argv 0 end]; + +# read askpass from env or fallback to dmanu_pass () +if {[info exists ::env(DOAS_ASKPASS)]} { + set askpass "$::env(DOAS_ASKPASS)" +} else { + set askpass "dmenu -P -p password" +} + +# read password from user +set pwd [exec {*}$askpass] + +# spawn doas operation +spawn doas {*}$cmd + +# send password and execute command +expect "doas*password:" { + send -- "$pwd\r" + expect \r + log_user 1 + expect eof +}