diff --git a/bashplugins b/bashplugins index a99799c..e9d1b38 100644 --- a/bashplugins +++ b/bashplugins @@ -38,13 +38,26 @@ gdf() fi } +is_git_repo() +{ + local curr_dir="$PWD" + while [[ -n "${curr_dir}" ]]; do + if [[ -r "${curr_dir}/.git/HEAD" ]]; then + return 0 + else + curr_dir="${curr_dir%/*}" + fi + done + return 1 +} + git_prompt() { prompt_command - if [[ ! -r ./.git/HEAD ]] || ! local raw_status="$(git status --porcelain -bu 2>/dev/null)"; then - return - fi + is_git_repo || return 0 + + local raw_status="$(git status --porcelain -bu 2>/dev/null)" local branch_info full_status IFS= local git_status='' local staged_count=0 diff --git a/dunstrc b/dunstrc index cfe2868..1af6165 100644 --- a/dunstrc +++ b/dunstrc @@ -29,6 +29,7 @@ browser = /home/von/.local/bin/default-web-browser icon_position = left icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + max_icon_size = 32 [frame] width = 1 diff --git a/i3_config b/i3_config index b853b9e..2d567a7 100644 --- a/i3_config +++ b/i3_config @@ -111,7 +111,7 @@ bindsym $mod+Control+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # lock screen -bindsym $mod+z exec "xautolock -locknow" +bindsym $mod+z exec "xscreensaver-command -lock" # toggle touchpad bindsym XF86TouchpadToggle exec "touchpad-toggle" bindsym XF86KbdBrightnessDown exec "keybrightness d"