a decent working guix config
This commit is contained in:
parent
ae77d05e2f
commit
0ebbec7644
22 changed files with 2302 additions and 279 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
hyprctl dispatch focuswindow emacs
|
||||
|
||||
# Check to see if an emacsclient is running
|
||||
if [ $(pgrep -c emacsclient) -gt 0 ]; then
|
||||
echo hi
|
||||
|
@ -22,13 +24,13 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then
|
|||
exit
|
||||
else
|
||||
echo WAYLAND
|
||||
emacsrg=$(wlrctl window list | rg "emacs:" | rg -v dired)
|
||||
emacsrg=$(hyprctl clients | rg "emacs:" | rg -v dired)
|
||||
echo $emacsrg
|
||||
|
||||
emacswin=$(echo $emacsrg | sed 's/.*\: //')
|
||||
echo $emacswin
|
||||
|
||||
exec wlrctl toplevel focus title:"$emacswin"
|
||||
exec hyprctl dispatch focuswindow emacs
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -25,12 +25,12 @@ if [ $(pgrep -c firefox) -gt 0 ]; then
|
|||
exit
|
||||
else
|
||||
# WAYLAND
|
||||
ffrg=$(wlrctl window list | rg firefox)
|
||||
ffrg=$(hyprctl clients | rg firefox)
|
||||
|
||||
ffwin=$(echo $ffrg | sed 's/.*\: //')
|
||||
# echo $ffwin
|
||||
|
||||
exec wlrctl toplevel focus firefox
|
||||
exec hyprctl dispatch focuswindow firefox
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
71
scripts/rbw.sh
Executable file
71
scripts/rbw.sh
Executable file
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/env bash
|
||||
# Very basic interface for rbw using rofi
|
||||
|
||||
if [ $(hostname) = "syl" ]; then
|
||||
style="laptop-rbw-wayland"
|
||||
#echo "this is hidpi"
|
||||
else
|
||||
style="desktop-rbw"
|
||||
#echo "this is not hidpi"
|
||||
fi
|
||||
|
||||
# Get all password files and create an array
|
||||
root=~/.password-store
|
||||
CACHE=~/.local/tmp/pass_rofi
|
||||
seat=seat0
|
||||
|
||||
rbw sync
|
||||
rbw list
|
||||
|
||||
list_passwords() {
|
||||
rbw list
|
||||
}
|
||||
|
||||
passwords=$(rbw list)
|
||||
|
||||
prompt='search for passwords...'
|
||||
SECRET=$(list_passwords | rofi -sync -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||
|
||||
# Ask whether pass, user or both are required
|
||||
|
||||
options=("Password" \
|
||||
"User" \
|
||||
"User and password" \
|
||||
"QR-Code" \
|
||||
"OTP")
|
||||
|
||||
option=$(printf '%s\n' "${options[@]%}" | rofi -sync -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||
|
||||
echo $option
|
||||
|
||||
case ${option} in
|
||||
Password )
|
||||
echo "${SECRET}"
|
||||
wtype $(rbw get "${SECRET}")
|
||||
;;
|
||||
User )
|
||||
wtype $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
|
||||
;;
|
||||
"User and password" )
|
||||
wtype $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
|
||||
wtype -P tab
|
||||
wtype $(rbw get "${SECRET}")
|
||||
;;
|
||||
"QR-Code" )
|
||||
if [[ $SECRET =~ wifi$ ]]; then
|
||||
# Produce a valid wifi QR-code
|
||||
WIFISSID=$(pass get_user ${SECRET})
|
||||
WIFIPASS=$(pass get_pass ${SECRET})
|
||||
WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;"
|
||||
qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" -
|
||||
else
|
||||
# Only password
|
||||
pass show -q1 ${SECRET}
|
||||
fi
|
||||
;;
|
||||
"OTP" )
|
||||
wtype $(rbw code "${SECRET}")
|
||||
;;
|
||||
esac
|
||||
|
||||
# wl-copy -o -s ${seat} ${PASSWD_PASS}
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
waybar &
|
||||
kwalletd5 &
|
||||
systemctl --user stop jellyfin-mpv-shim.service &
|
||||
systemctl --user stop nextcloud-client.service &
|
||||
|
@ -12,9 +13,3 @@ rbw-agent &
|
|||
emacs --daemon &
|
||||
nextcloud --background &
|
||||
batmon &
|
||||
|
||||
killall eww
|
||||
|
||||
eww open bar0 &
|
||||
eww open notifications &
|
||||
eww open sidebar &
|
||||
|
|
10
scripts/wb-toggle
Executable file
10
scripts/wb-toggle
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $(pgrep -c waybar) -gt 0 ]; then
|
||||
echo "killing"
|
||||
kill $(pgrep waybar)
|
||||
else
|
||||
echo "starting"
|
||||
waybar &
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue