Browse Source

dunst fix, switch to xscreensaver and proper support for the whole git repo tree

Von Random 1 year ago
parent
commit
25eeeff21d
3 changed files with 18 additions and 4 deletions
  1. 16
    3
      bashplugins
  2. 1
    0
      dunstrc
  3. 1
    1
      i3_config

+ 16
- 3
bashplugins View File

@@ -38,13 +38,26 @@ gdf()
38 38
     fi
39 39
 }
40 40
 
41
+is_git_repo()
42
+{
43
+    local curr_dir="$PWD"
44
+    while [[ -n "${curr_dir}" ]]; do
45
+        if [[ -r "${curr_dir}/.git/HEAD" ]]; then
46
+            return 0
47
+        else
48
+            curr_dir="${curr_dir%/*}"
49
+        fi
50
+    done
51
+    return 1
52
+}
53
+
41 54
 git_prompt()
42 55
 {
43 56
     prompt_command
44 57
 
45
-    if [[ ! -r ./.git/HEAD ]] || ! local raw_status="$(git status --porcelain -bu 2>/dev/null)"; then
46
-        return
47
-    fi
58
+    is_git_repo || return 0
59
+
60
+    local raw_status="$(git status --porcelain -bu 2>/dev/null)"
48 61
     local branch_info full_status IFS=
49 62
     local git_status=''
50 63
     local staged_count=0

+ 1
- 0
dunstrc View File

@@ -29,6 +29,7 @@
29 29
     browser = /home/von/.local/bin/default-web-browser
30 30
     icon_position = left
31 31
     icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
32
+    max_icon_size = 32
32 33
 
33 34
 [frame]
34 35
     width = 1

+ 1
- 1
i3_config View File

@@ -111,7 +111,7 @@ bindsym $mod+Control+r restart
111 111
 # exit i3 (logs you out of your X session)
112 112
 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'"
113 113
 # lock screen
114
-bindsym $mod+z exec "xautolock -locknow"
114
+bindsym $mod+z exec "xscreensaver-command -lock"
115 115
 # toggle touchpad
116 116
 bindsym XF86TouchpadToggle exec "touchpad-toggle"
117 117
 bindsym XF86KbdBrightnessDown exec "keybrightness d"

Loading…
Cancel
Save