Krolyxon
Commit e6a46d6

Branches

Refs →

dotfiles-x11e6a46d6

use rofi for SUDO_ASKPASS

Author
krolxon
Date
2025-08-04 21:45 +0530
Parent
70249a2
Commit
e6a46d699b5dafa35ffb38ccdf5153d67f7348e4

+10 −7

3 files changed

  1. M .config/shell/profile +1 −1
  2. D .local/bin/dmenupass +0 −6
  3. A .local/bin/rofipass +9 −0
M .config/shell/profile View
@@ -32,7 +32,7 @@ export MYSQL_HISTFILE="$XDG_CACHE_HOME/.mariadb_history"
3232 export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
3333
3434 # Other program settings
35−export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
35+export SUDO_ASKPASS="$HOME/.local/bin/rofipass"
3636 export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
3737 export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
3838 export ANDROID_HOME="$HOME/Android/Sdk/"
D .local/bin/dmenupass View
@@ -1,6 +0,0 @@
1−#!/bin/sh
2−
3−# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
4−# password prompt if needed.
5−
6−dmenu -P -p "$1" <&- && echo
A .local/bin/rofipass View
@@ -0,0 +1,9 @@
1+#!/bin/sh
2+#
3+# Take password prompt from STDIN, print password to STDOUT
4+# the sed piece just removes the colon from the provided
5+# prompt: rofi -p already gives us a colon
6+rofi -dmenu \
7+ -password \
8+ -no-fixed-num-lines \
9+ -p "$(printf "$1" | sed s/://)"