remove doas_askpass subodule update shortcuts
This commit is contained in:
@@ -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+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+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---# #
|
# #---Workspace Bindings---# #
|
||||||
bindsym $mod+Home workspace $ws1
|
bindsym $mod+Home workspace $ws1
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ set shell bash
|
|||||||
set shellopts '-eu'
|
set shellopts '-eu'
|
||||||
set ifs "\n"
|
set ifs "\n"
|
||||||
set scrolloff 10
|
set scrolloff 10
|
||||||
set color256
|
|
||||||
set icons
|
set icons
|
||||||
set period 1
|
set period 1
|
||||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||||
|
set watch true
|
||||||
|
|
||||||
# Vars that depend on environmental variables
|
# Vars that depend on environmental variables
|
||||||
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
|
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
# Specify fast video rendering preset (for --vo=<gpu|gpu-next> only)
|
# Specify fast video rendering preset (for --vo=<gpu|gpu-next> only)
|
||||||
# Recommended for mobile devices or older hardware with limited processing power
|
# Recommended for mobile devices or older hardware with limited processing power
|
||||||
profile=fast
|
#profile=fast
|
||||||
|
|
||||||
# Specify high quality video rendering preset (for --vo=<gpu|gpu-next> only)
|
# Specify high quality video rendering preset (for --vo=<gpu|gpu-next> only)
|
||||||
# Offers superior image fidelity and visual quality for an enhanced viewing
|
# 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.
|
# 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
|
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
|
||||||
# may or may not help.
|
# may or may not help.
|
||||||
hwdec=auto
|
# hwdec=auto
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# audio settings #
|
# audio settings #
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ vim.g.vimtex_view_automatic = 0
|
|||||||
|
|
||||||
vim.g.vimtex_compiler_latexmk = {
|
vim.g.vimtex_compiler_latexmk = {
|
||||||
options = {
|
options = {
|
||||||
"-verbose",
|
"-verbose",
|
||||||
"-file-line-error",
|
"-file-line-error",
|
||||||
"-synctex=1",
|
"-synctex=1",
|
||||||
"-interaction=nonstopmode",
|
"-interaction=nonstopmode",
|
||||||
"-shell-escape",
|
"-shell-escape",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +25,8 @@ vim.g.vimtex_toc_config = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vim.g.vimtex_quickfix_ignore_filters = {
|
vim.g.vimtex_quickfix_ignore_filters = {
|
||||||
|
"Underfull \\\\vbox",
|
||||||
|
"Overfull \\\\vbox",
|
||||||
"Underfull \\\\hbox",
|
"Underfull \\\\hbox",
|
||||||
"Overfull \\\\hbox",
|
"Overfull \\\\hbox",
|
||||||
-- "LaTeX Warning: .\\+ float specifier changed to",
|
-- "LaTeX Warning: .\\+ float specifier changed to",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ alias \
|
|||||||
ka="killall" \
|
ka="killall" \
|
||||||
g="git" \
|
g="git" \
|
||||||
trem="transmission-remote" \
|
trem="transmission-remote" \
|
||||||
YT="youtube-viewer" \
|
YT="pipe-viewer" \
|
||||||
sdn="doas shutdown -h now" \
|
sdn="doas shutdown -h now" \
|
||||||
f="$FILE" \
|
f="$FILE" \
|
||||||
e="$EDITOR" \
|
e="$EDITOR" \
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ alias cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \
|
|||||||
m="cd ${XDG_MUSIC_DIR:-$HOME/Music} && ls -a" \
|
m="cd ${XDG_MUSIC_DIR:-$HOME/Music} && ls -a" \
|
||||||
pp="cd ${XDG_PICTURES_DIR:-$HOME/Pictures} && ls -a" \
|
pp="cd ${XDG_PICTURES_DIR:-$HOME/Pictures} && ls -a" \
|
||||||
vv="cd ${XDG_VIDEOS_DIR:-$HOME/Videos} && 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" \
|
t="cd ${XDG_THESIS_DIR:-$HOME/Documents/These} && ls -a" \
|
||||||
p="cd ${XDG_PAPERS_DIR:-$HOME/Documents/These/Papers} && 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 ." \
|
T="cd ${XDG_PAPERS_DIR:-$HOME/Documents/These/Papers/Thesis_Barnouin/} && vim ." \
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -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"]
|
[submodule ".local/src/dmenu"]
|
||||||
path = .local/src/dmenu
|
path = .local/src/dmenu
|
||||||
url = https://github.com/lukesmithxyz/dmenu.git
|
url = https://github.com/lukesmithxyz/dmenu.git
|
||||||
|
|||||||
Submodule .local/bin/doas_askpass deleted from db7da6746c
15
.local/bin/doas_askpass/Makefile
Normal file
15
.local/bin/doas_askpass/Makefile
Normal file
@@ -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}
|
||||||
81
.local/bin/doas_askpass/README.md
Normal file
81
.local/bin/doas_askpass/README.md
Normal file
@@ -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 <command>
|
||||||
|
|
||||||
|
## 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:"
|
||||||
|
```
|
||||||
34
.local/bin/doas_askpass/doas_askpass
Executable file
34
.local/bin/doas_askpass/doas_askpass
Executable file
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user