mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
Update rofi, add rifile to ranger, add ale to nvim
This commit is contained in:
parent
5cc86198aa
commit
3bad265983
15 changed files with 232 additions and 123 deletions
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
shopt -s nullglob globstar
|
||||
|
||||
menucmd="rofi -dmenu"
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
password=$(printf '%s\n' "${password_files[@]}"|${menucmd} -p "Passwords" "$@")
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
if [[ $typeit -eq 0 ]]; then
|
||||
pass show -c "$password" 2>/dev/null
|
||||
else
|
||||
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
|
||||
xdotool type --clearmodifiers --file -
|
||||
fi
|
||||
|
|
@ -1,26 +1,24 @@
|
|||
#!/bin/sh
|
||||
declare options=("ShutDown
|
||||
Lock
|
||||
Logout
|
||||
Reboot")
|
||||
#!/usr/bin/env bash
|
||||
declare options=("ShutDown\nLogOut\nReboot")
|
||||
|
||||
menucmd="rofi -dmenu"
|
||||
choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@)
|
||||
case "$choice" in
|
||||
choice=$(echo -e ${options[@]} | rofi -dmenu -p "Power" -theme nten-dmenu)
|
||||
case $choice in
|
||||
"ShutDown")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
|
||||
case "$(echo -e "Yes\nNo" | rofi -dmenu -p "ShutDown" -theme nten-dmenu)" in
|
||||
"Yes") exec systemctl poweroff ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac ;;
|
||||
"Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
|
||||
"Logout")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "Logout" $@)" in
|
||||
"no") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"LogOut")
|
||||
case "$(echo -e "Yes\nNo" | rofi -dmenu -p "LogOut" -theme nten-dmenu)" in
|
||||
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac ;;
|
||||
esac
|
||||
;;
|
||||
"Reboot")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "Reboot" $@)" in
|
||||
case "$(echo -e "Yes\nNo" | rofi -dmenu -p "Reboot" -theme nten-dmenu)" in
|
||||
"Yes") exec systemctl reboot ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue