Merge branch 'master' of ssh://gitlab.ahoskingit.com:9022/ahosking/dotfiles
This commit is contained in:
commit
39120a79a1
@ -67,11 +67,12 @@ bindsym $mod+XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # m
|
|||||||
|
|
||||||
|
|
||||||
## requires xbacklight
|
## requires xbacklight
|
||||||
#bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
|
||||||
#bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
|
||||||
bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
|
bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
|
||||||
bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
|
bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
|
||||||
|
|
||||||
|
## Keyboard Backlighting
|
||||||
|
#/sys/devices/platform/asus-nb-wmi/leds/asus\:\:kbd_backlight/brightness
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
bindsym $mod+h focus left
|
bindsym $mod+h focus left
|
||||||
bindsym $mod+t focus down
|
bindsym $mod+t focus down
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[core]
|
[core]
|
||||||
editor = vim
|
editor = vim
|
||||||
[filter "lfs"]
|
[filter "lfs"]
|
||||||
required = true
|
|
||||||
clean = git-lfs clean -- %f
|
clean = git-lfs clean -- %f
|
||||||
smudge = git-lfs smudge -- %f
|
smudge = git-lfs smudge -- %f
|
||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
@ -30,7 +30,7 @@ ln -sfv ~/.vim/bundle/vimspectr/shell ~/.vimspectr-shell
|
|||||||
ln -sfv "$DOTFILES_DIR/run/.profile" ~
|
ln -sfv "$DOTFILES_DIR/run/.profile" ~
|
||||||
ln -sfv "$DOTFILES_DIR/run/.xprofile" ~
|
ln -sfv "$DOTFILES_DIR/run/.xprofile" ~
|
||||||
ln -sfv "$DOTFILES_DIR/run/.bashrc" ~
|
ln -sfv "$DOTFILES_DIR/run/.bashrc" ~
|
||||||
ln -sfv "$DOTFILES_DIR/run/bruise" ~/apps/bruise
|
ln -sfv "$DOTFILES_DIR/system/.bruise" ~/apps/bruise
|
||||||
ln -sfv "$DOTFILES_DIR/git/.gitconfig" ~
|
ln -sfv "$DOTFILES_DIR/git/.gitconfig" ~
|
||||||
ln -sfv "$DOTFILES_DIR/system/.vimrc" ~
|
ln -sfv "$DOTFILES_DIR/system/.vimrc" ~
|
||||||
ln -sfv "$DOTFILES_DIR/system/.dir_colors" ~
|
ln -sfv "$DOTFILES_DIR/system/.dir_colors" ~
|
||||||
|
@ -21,7 +21,7 @@ fi
|
|||||||
|
|
||||||
# Finally we can source the dotfiles (order matters)
|
# Finally we can source the dotfiles (order matters)
|
||||||
|
|
||||||
for DOTFILE in "$DOTFILES_DIR"/system/.{function,env,alias,prompt}; do
|
for DOTFILE in "$DOTFILES_DIR"/system/.{function,env,alias,prompt,bruise,lyrical-git_mask}; do
|
||||||
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ alias vp='vagrant provision'
|
|||||||
alias vssh='vagrant ssh'
|
alias vssh='vagrant ssh'
|
||||||
alias vd='vagrant destroy'
|
alias vd='vagrant destroy'
|
||||||
alias vc='vagrant destroy && vagrant up --provision'
|
alias vc='vagrant destroy && vagrant up --provision'
|
||||||
|
alias vh="for i in `vagrant global-status | awk '/running/ {print $5}'`; do cd $i && vagrant halt; done"
|
||||||
|
|
||||||
### Git
|
### Git
|
||||||
alias git_clean='git fetch --all && git reset --hard origin/master'
|
alias git_clean='git fetch --all && git reset --hard origin/master'
|
||||||
@ -23,4 +24,4 @@ alias git_clean='git fetch --all && git reset --hard origin/master'
|
|||||||
alias vpn_lyrical='cd /home/ahosking/lyrical/vpn &&sudo openvpn --config gw-udp-1194-ahosking-vpn.ovpn'
|
alias vpn_lyrical='cd /home/ahosking/lyrical/vpn &&sudo openvpn --config gw-udp-1194-ahosking-vpn.ovpn'
|
||||||
|
|
||||||
alias roles_fetch='r10k puppetfile install --puppetfile Puppetfile --moduledir ../../roles/'
|
alias roles_fetch='r10k puppetfile install --puppetfile Puppetfile --moduledir ../../roles/'
|
||||||
alias roles_pull='for role in `ls ../../roles`; do echo "########" $role; echo `git -C ../../roles/$role pull`; done'
|
alias roles_pull='for role in `ls ../../roles`; do echo "########" $role; echo `git -C ../../roles/$role pull origin master`; done'
|
||||||
|
49
system/.lyrical-git_mask
Executable file
49
system/.lyrical-git_mask
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
declare -A user1=([name]='Alexander Hosking' [email]='alexander@ahosking.com')
|
||||||
|
declare -A user2=([name]='Kim Martin' [email]='kim@lyricalsecurity.com')
|
||||||
|
declare -A user3=([name]='Dillon Zhang' [email]='Dillon@lyricalsecurity.com')
|
||||||
|
declare -A user4=([name]='Pam Moire' [email]='pam@lyricalsecurity.com')
|
||||||
|
declare -A user5=([name]='Mitch Warren' [email]='mitch@lyricalsecurity.com')
|
||||||
|
declare -A user6=([name]='James Webster' [email]='james@lyricalsecurity.com')
|
||||||
|
declare -A user7=([name]='Caroline Marcoux' [email]='caroline@lyricalsecurity.com')
|
||||||
|
declare -A user8=([name]='Renato Streefkerk' [email]='renato@lyricalsecurity.com')
|
||||||
|
|
||||||
|
users=(user1 user2 user3 user4 user5 user6 user7 user8)
|
||||||
|
|
||||||
|
#echo $RANDO ## DEBUG
|
||||||
|
##Print the bits from the array index of random number
|
||||||
|
|
||||||
|
function git_mask() {
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
RANDO=$(( ( RANDOM % ${#users[@]} ) )) ## Generate a random index from the users array
|
||||||
|
for arr_name in "${users[$RANDO]}"; do
|
||||||
|
declare -n arr_ref="$arr_name"
|
||||||
|
|
||||||
|
printf "git config user.name \"%s\"\n" "${arr_ref[name]}"
|
||||||
|
printf "git config user.email \"%s\"\n" "${arr_ref[email]}"
|
||||||
|
set_username="git config user.name \"${arr_ref[name]}\" --replace-all"
|
||||||
|
eval $set_username
|
||||||
|
set_email="git config user.email \"${arr_ref[email]}\" --replace-all"
|
||||||
|
eval $set_email
|
||||||
|
|
||||||
|
done
|
||||||
|
else
|
||||||
|
if [[ ! $1 =~ [0-9] ]] || ([[ $1 -gt ${#users[@]} ]] || [[ $1 -le 0 ]]); then
|
||||||
|
printf "Please enter a valid number from 1 to %s\n" "${#users[@]}"
|
||||||
|
else
|
||||||
|
user_id="$(($1 - 1))"
|
||||||
|
for arr_name in "${users[$user_id]}"; do
|
||||||
|
declare -n arr_ref="$arr_name"
|
||||||
|
|
||||||
|
printf "Your git profile is now: \"%s\"\n" "${arr_ref[name]}"
|
||||||
|
set_username="git config user.name \"${arr_ref[name]}\" --replace-all"
|
||||||
|
eval $set_username
|
||||||
|
set_email="git config user.email \"${arr_ref[email]}\" --replace-all"
|
||||||
|
eval $set_email
|
||||||
|
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user