Tweaks and tweaks
This commit is contained in:
parent
9a9ee8858d
commit
150301d166
|
@ -39,6 +39,7 @@ bindsym Mod1+F2 exec --no-startup-id ~/.config/i3/dmenu_run
|
||||||
|
|
||||||
bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu
|
bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu
|
||||||
bindsym $mod+asterisk exec --no-startup-id ~/.config/i3/sshmenu
|
bindsym $mod+asterisk exec --no-startup-id ~/.config/i3/sshmenu
|
||||||
|
bindsym $mod+dollar exec --no-startup-id ~/.config/i3/sshmenu root
|
||||||
|
|
||||||
# start program launcher
|
# start program launcher
|
||||||
bindsym $mod+d exec --no-startup-id ~/.config/i3/dmenu_run
|
bindsym $mod+d exec --no-startup-id ~/.config/i3/dmenu_run
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
xterm -e "ssh $(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p 'SSH to ')"
|
if [ "$1" == 'root' ]; then
|
||||||
|
a=" (root)"
|
||||||
|
b="sudo "
|
||||||
|
fi
|
||||||
|
xterm -e "ssh $(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ") -t '${b}bash --login'"
|
||||||
|
|
|
@ -130,7 +130,7 @@ function _machines-getAkey { # network
|
||||||
}
|
}
|
||||||
|
|
||||||
function _machines-updateAkey {
|
function _machines-updateAkey {
|
||||||
KEY_FILE=$(mktemp machines.XXXXXXXXXX.authorized_keys)
|
KEY_FILE=$(mktemp)
|
||||||
network=$(cat $MACHINES_CONFIG/this | grep '^network=' | cut -d '=' -f 2)
|
network=$(cat $MACHINES_CONFIG/this | grep '^network=' | cut -d '=' -f 2)
|
||||||
_machines-getAkey $network > $KEY_FILE
|
_machines-getAkey $network > $KEY_FILE
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
|
@ -254,6 +254,13 @@ function machines-deleteNetwork { # network
|
||||||
_machines-deleteElement $1 network
|
_machines-deleteElement $1 network
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function machines-updateAll {
|
||||||
|
machines-list | while read machine; do
|
||||||
|
echo "Updating $machine..."
|
||||||
|
ssh $machine 'machines-update' &
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# USER FUNCTIONS
|
# USER FUNCTIONS
|
||||||
|
|
||||||
function machines-update {
|
function machines-update {
|
||||||
|
|
Loading…
Reference in a new issue