1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Merge branch 'master' into surface

This commit is contained in:
2018-03-31 11:09:42 +01:00
13 changed files with 194 additions and 76 deletions

View File

@ -51,6 +51,12 @@ LOCIP=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$
#------------------------------------------------------------------------
case $BLOCK_BUTTON in
1) curl -s https://api.ipify.org;;
*) echo "$LOCIP";;
1) curl -s https://api.ipify.org;
break;;
2) curl -s https://api.ipify.org | tee >(xclip -i);
break;;
0|3) echo "$LOCIP" | tee >(xclip -i);
break;;
*) echo "$LOCIP"
break;;
esac

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
for p in pacaur yaourt pacman; do
for p in trizen pacaur yaourt pacman; do
if $p --version &>/dev/null; then
PAC="$p"
break;
@ -13,7 +13,7 @@ if [ -z "$PAC" ]; then
fi
if [ "$BLOCK_BUTTON" == 1 ]; then
nohup i3-sensible-terminal -r i3blocks-update-term -e "sh -c '$PAC -Syu; pkill -RTMIN+5 i3blocks'" &>/dev/null &
nohup i3-sensible-terminal -r i3blocks-update-term -e "sh -c '$PAC -Syu || exec zsh; pkill -RTMIN+5 i3blocks'" &>/dev/null &
disown
fi

View File

@ -153,7 +153,8 @@ bindsym $mod+Shift+e exec rofi-emoji
bindsym --release Print exec imgur-screenshot
bindsym --release $mod+Print exec imgur-screenshot -f
bindsym $mod+Mod1+space exec --no-startup-id ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks
bindsym $mod+numbersign exec "termite -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ &&\ read'"
bindsym $mod+numbersign exec "termite -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ \;\ $SHELL'"
bindsym $mod+r exec "bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'"
bindsym $mod+g exec "LINK=$(gist -PRpc); notify-send -c transfer \\"<a href=\\\\"$LINK\\\\">$LINK</a>\\""
# Media player controls

View File

@ -1,17 +1,18 @@
#!/bin/bash
option=$(echo " lock| logout| sleep| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs)
option=$(echo " lock| logout| sleep| hibernate| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs)
case $option in
lock) ./lock.sh;;
logout) i3-msg exit;;
sleep) systemctl suspend;;
hibernate) systemctl hibernate;;
power\ off) systemctl poweroff;;
reboot) systemctl reboot;;
windows)
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
sudo efibootmgr -n $windows
systemctl reboot;;
sudo hibereboot;;
esac
exit 0