Browse Source

Moved to i3blocks and cleaned up font definitions

master
Micah Halter 1 month ago
parent
commit
d040225552

+ 3
- 0
CHANGELOG.md View File

@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9 9
 
10 10
 ### Added
11 11
 
12
+- Added `i3blocks` configuration
12 13
 - Added synctex support to neovim and zathura
13 14
 - Added Markdown bibliography completion to `neovim`
14 15
 - Added LaTeX autocompletion to `neovim`
@@ -21,6 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
21 22
 
22 23
 ### Changed
23 24
 
25
+- Removed `polybar` from installation, moved to `i3blocks`
26
+- Moved all applications to using the monospace definition in the fonts configuration
24 27
 - Changed some gpg settings
25 28
 - Moved from colorscheme plugins to my own files
26 29
 - Moved from `antigen` to `antibody` as `zsh` backend for hopefully more stable

+ 2
- 3
Makefile View File

@@ -66,6 +66,7 @@ arch: pacman
66 66
 		gparted \
67 67
 		gscan2pdf \
68 68
 		i3-gaps \
69
+		i3blocks \
69 70
 		imagemagick \
70 71
 		intel-ucode \
71 72
 		jdk8-openjdk \
@@ -171,13 +172,11 @@ aur: yay
171 172
 		ncpamixer \
172 173
 		nerd-fonts-inconsolata \
173 174
 		networkmanager-dmenu-git \
174
-		polybar \
175 175
 		python-ueberzug-git \
176 176
 		qt5-webengine-widevine \
177 177
 		ranger-git \
178 178
 		rtv \
179 179
 		sc-im \
180
-		siji-git \
181 180
 		skypeforlinux-stable-bin \
182 181
 		tmuxinator \
183 182
 		upass \
@@ -207,6 +206,7 @@ configs: update stow-pre
207 206
 		gnupg \
208 207
 		gtk \
209 208
 		i3 \
209
+		i3blocks \
210 210
 		khal \
211 211
 		khard \
212 212
 		mpv \
@@ -219,7 +219,6 @@ configs: update stow-pre
219 219
 		notmuch \
220 220
 		offlineimap \
221 221
 		pass \
222
-		polybar \
223 222
 		qutebrowser \
224 223
 		ranger \
225 224
 		readline \

+ 1
- 1
dunst/.config/dunst/dunstrc View File

@@ -85,7 +85,7 @@
85 85
 
86 86
     ### Text ###
87 87
 
88
-    font = xos4 Terminus 10
88
+    font = mono 10
89 89
 
90 90
     # The spacing between lines.  If the height is smaller than the
91 91
     # font height, it will get raised to the font height.

+ 1
- 8
fonts/.config/fontconfig/fonts.conf View File

@@ -1,18 +1,11 @@
1 1
 <?xml version="1.0"?>
2 2
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 3
 <fontconfig>
4
-  <alias>
5
-    <family>xos4 Terminus</family>
6
-    <prefer>
7
-      <family>xos4 Terminus</family>
8
-      <family>Inconsolata Nerd Font</family>
9
-      <family>Wuncon Siji</family>
10
-    </prefer>
11
-  </alias>
12 4
   <alias>
13 5
     <family>monospace</family>
14 6
     <prefer>
15 7
       <family>xos4 Terminus</family>
8
+      <family>Inconsolata Nerd Font</family>
16 9
     </prefer>
17 10
   </alias>
18 11
   <alias>

+ 1
- 1
gtk/.config/gtk-3.0/settings.ini View File

@@ -1,7 +1,7 @@
1 1
 [Settings]
2 2
 gtk-theme-name=FlatColor
3 3
 gtk-icon-theme-name=flattrcolor
4
-gtk-font-name=xos4 Terminus 10
4
+gtk-font-name=Monospace 10
5 5
 gtk-cursor-theme-name=Adwaita
6 6
 gtk-cursor-theme-size=0
7 7
 gtk-toolbar-style=GTK_TOOLBAR_BOTH

+ 28
- 11
i3/.config/i3/config View File

@@ -4,7 +4,8 @@ floating_modifier $mod
4 4
 
5 5
 # set variables
6 6
 set $i3exit      "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'"
7
-set $layoutupdate exec --no-startup-id polybar-msg hook i3layout 1
7
+set $layoutupdate exec --no-startup-id pkill -SIGRTMIN+10 i3blocks
8
+set $volumeupdate exec --no-startup-id pkill -SIGRTMIN+11 i3blocks
8 9
 set $smallwidth   900
9 10
 set $smallheight  640
10 11
 set $bigwidth     1500
@@ -16,7 +17,7 @@ set $defaultgaps  25
16 17
 # LOOK & FEEL #
17 18
 ###############
18 19
 # Set fonts
19
-font pango:xos4 Terminus 14
20
+font pango:mono
20 21
 
21 22
 # set up gaps
22 23
 for_window [class="^.*"] border pixel 5
@@ -26,7 +27,7 @@ gaps inner $defaultgaps
26 27
 set_from_resource $bg-color 	         i3wm.color7 #676E7D
27 28
 set_from_resource $inactive-bg-color   i3wm.color0 #2f343f
28 29
 set_from_resource $text-color          i3wm.color7 #f3f4f5
29
-set_from_resource $inactive-text-color i3wm.color7 #676E7D
30
+set_from_resource $inactive-text-color i3wm.color8 #676E7D
30 31
 set_from_resource $urgent-bg-color     i3wm.color1 #E53935
31 32
 
32 33
 # window colors         border              background         text                 indicator
@@ -44,10 +45,10 @@ hide_edge_borders both
44 45
 ##############
45 46
 
46 47
 # wokspace names
47
-set $workspace1  "1"
48
-set $workspace2  "2"
49
-set $workspace3  "3"
50
-set $workspace4  "4"
48
+set $workspace1  "1:"
49
+set $workspace2  "2:"
50
+set $workspace3  "3:"
51
+set $workspace4  "4:"
51 52
 set $workspace5  "5"
52 53
 set $workspace6  "6"
53 54
 set $workspace7  "7"
@@ -152,7 +153,7 @@ assign [class="Telegram"] $workspace3
152 153
 for_window [title="^pdfpc - present"] border none floating enable
153 154
 
154 155
 # status bar
155
-exec_always --no-startup-id polybarlaunch
156
+#exec_always --no-startup-id polybarlaunch
156 157
 
157 158
 # start dual monitor
158 159
 exec --no-startup-id displayctrl -r HDMI-2 HDMI-3
@@ -162,6 +163,22 @@ exec --no-startup-id $BROWSER
162 163
 # terminal
163 164
 exec --no-startup-id i3-msg 'workspace $workspace2; exec $TERMINAL; workspace $workspace1'
164 165
 
166
+bar {
167
+  font pango:mono 12
168
+  status_command i3blocks
169
+  position top
170
+  mode dock
171
+  modifier None
172
+  colors {
173
+    background $inactive-bg-color
174
+    statusline $bg-color
175
+    focused_workspace   $inactive-bg-color  $inactive-bg-color $text-color
176
+    active_workspace    $inactive-bg-color  $inactive-bg-color $inactive-text-color
177
+    inactive_workspace  $inactive-bg-color  $inactive-bg-color $inactive-text-color
178
+    urgent_workspace    $urgent-bg-color    $urgent-bg-color   $text-color
179
+  }
180
+}
181
+
165 182
 
166 183
 ######################
167 184
 # LETTER KEYBINDINGS #
@@ -476,9 +493,9 @@ bindsym $mod+Shift+Control+Next         exec --no-startup-id dmenushutdown
476 493
 # MEDIA KEYBINDINGS #
477 494
 #####################
478 495
 
479
-bindsym XF86AudioLowerVolume            exec --no-startup-id amixer -D pulse sset Master 5%-
480
-bindsym XF86AudioRaiseVolume            exec --no-startup-id amixer -D pulse sset Master 5%+
481
-bindsym XF86AudioMute                   exec --no-startup-id amixer -D pulse sset Master toggle
496
+bindsym XF86AudioLowerVolume            exec --no-startup-id amixer -D pulse sset Master 5%-; $volumeupdate
497
+bindsym XF86AudioRaiseVolume            exec --no-startup-id amixer -D pulse sset Master 5%+; $volumeupdate
498
+bindsym XF86AudioMute                   exec --no-startup-id amixer -D pulse sset Master toggle; $volumeupdate
482 499
 bindsym XF86AudioMicMute           exec --no-startup-id pactl set-source-mute  $(pacmd list-sources|awk '/\* index:/{ print $3 }') toggle
483 500
 
484 501
 bindsym XF86AudioPause                  exec --no-startup-id echo "cycle pause" > $HOME/.config/mpv/control

+ 38
- 0
i3blocks/.config/i3blocks/config View File

@@ -0,0 +1,38 @@
1
+command=~/.config/Scripts/statusbar/$BLOCK_NAME
2
+separator=false
3
+separator_block_width=15
4
+markup=pango
5
+
6
+[mail]
7
+label=
8
+interval=once
9
+signal=13
10
+
11
+[volume]
12
+interval=1
13
+signal=11
14
+
15
+[wifi]
16
+interval=1
17
+
18
+[ethernet]
19
+interval=1
20
+
21
+[powersaver]
22
+interval=once
23
+signal=12
24
+
25
+[battery]
26
+interval=1
27
+
28
+[date]
29
+label=
30
+interval=1
31
+
32
+[clock]
33
+label=
34
+interval=1
35
+
36
+[layout]
37
+interval=once
38
+signal=10

+ 1
- 1
mutt/.config/mutt/muttrc View File

@@ -38,7 +38,7 @@ color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
38 38
 color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
39 39
 color indicator blue default
40 40
 
41
-macro index q "<shell-escape>polybar-msg hook mail 1<enter><quit>" "exit and refresh polybar"
41
+macro index q "<shell-escape>pkill -SIGRTMIN+13 i3blocks<enter><quit>" "exit and refresh polybar"
42 42
 bind editor <space> noop
43 43
 bind index G last-entry
44 44
 bind index gg first-entry

+ 2
- 2
offlineimap/.config/systemd/user/offlineimap-oneshot.service.d/override.conf View File

@@ -1,4 +1,4 @@
1 1
 [Service]
2 2
 Environment=DISPLAY=:0
3
-ExecStartPre=polybar-msg hook mail 2
4
-ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then polybar-msg hook mail 1; else polybar-msg hook mail 3; fi'
3
+ExecStartPre=/bin/sh -c 'echo "" > /tmp/mailsync && pkill -SIGRTMIN+13 i3blocks'
4
+ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then rm /tmp/mailsync; else echo "" > /tmp/mailsync; fi; pkill -SIGRTMIN+13 i3blocks'

+ 0
- 1
scripts/.config/Scripts/displayselect View File

@@ -71,7 +71,6 @@ case "$chosen" in
71 71
 	*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
72 72
 esac
73 73
 
74
-$HOME/.config/polybar/launch.sh
75 74
 $HOME/.config/Scripts/setbackground
76 75
 $HOME/.config/Scripts/remaps
77 76
 systemctl --user restart dunst

+ 0
- 3
scripts/.config/Scripts/dunst/battery View File

@@ -1,3 +0,0 @@
1
-#!/bin/bash
2
-
3
-dunstify -r 52999 "Battery: $(cat /sys/class/power_supply/BAT0/capacity)%"

+ 0
- 3
scripts/.config/Scripts/dunst/date View File

@@ -1,3 +0,0 @@
1
-#!/bin/bash
2
-
3
-dunstify -r 120496 "$(date '+%b %d, %Y; %H:%M')"

+ 1
- 1
scripts/.config/Scripts/i3-powersaver View File

@@ -6,4 +6,4 @@ else
6 6
   xset +dpms; xset s on
7 7
 fi
8 8
 
9
-polybar-msg hook powersaver 1
9
+pkill -SIGRTMIN+12 i3blocks

+ 19
- 0
scripts/.config/Scripts/statusbar/battery View File

@@ -0,0 +1,19 @@
1
+#!/bin/bash
2
+
3
+capacity=$(cat /sys/class/power_supply/BAT0/capacity) || exit
4
+status=$(cat /sys/class/power_supply/BAT0/status)
5
+icon=""
6
+
7
+if [ "$capacity" -ge 75 ]; then
8
+  icon=""
9
+elif [ "$capacity" -ge 50 ]; then
10
+  icon=""
11
+elif [ "$capacity" -ge 25 ]; then
12
+  icon=""
13
+else
14
+  icon=""
15
+fi
16
+
17
+[ "$status" = "Charging" ] && icon=""
18
+
19
+echo "$icon $capacity%"

+ 3
- 0
scripts/.config/Scripts/statusbar/clock View File

@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+
3
+date '+%H:%M:%S'

+ 3
- 0
scripts/.config/Scripts/statusbar/date View File

@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+
3
+date '+%b %d, %Y'

+ 7
- 0
scripts/.config/Scripts/statusbar/ethernet View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+device=enp0s25
4
+ip="$(ip -4 addr show $device|grep -oP '(?<=inet )\d*(\.\d*){3}')"
5
+if [ "$ip" != "" ]; then
6
+  echo " $ip"
7
+fi

+ 8
- 0
scripts/.config/Scripts/statusbar/layout View File

@@ -0,0 +1,8 @@
1
+#!/bin/bash
2
+
3
+layout=`i3-msg -t get_tree | jq -r 'recurse(.nodes[]) | select(.nodes[].focused == true) | .layout'`
4
+if [[ "$layout" == "splitv" ]]; then
5
+  echo ""
6
+else
7
+  echo ""
8
+fi

+ 11
- 0
scripts/.config/Scripts/statusbar/mail View File

@@ -0,0 +1,11 @@
1
+#!/bin/bash
2
+
3
+if [[ -d $HOME/.Mail ]]; then
4
+  out=$(find $HOME/.Mail/Gatech/INBOX/new $HOME/.Mail/Gmail/INBOX/new -type f|wc -l)
5
+
6
+  if [ -f /tmp/mailsync ]; then
7
+    cat /tmp/mailsync
8
+  elif [ "$out" != "0" ]; then
9
+    echo $out
10
+  fi
11
+fi

+ 7
- 0
scripts/.config/Scripts/statusbar/powersaver View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+if xset -q | grep -q "DPMS is Enabled"; then
4
+  echo ""
5
+else
6
+  echo "零"
7
+fi

+ 12
- 0
scripts/.config/Scripts/statusbar/volume View File

@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+
3
+line="$(amixer sget Master | grep 'Right:')"
4
+
5
+stat="$(echo $line | awk -F'[][]' '{ print $4 }')"
6
+level="$(echo $line | awk -F'[][]' '{ print $2 }')"
7
+
8
+if [[ "$stat" == "off" ]]; then
9
+  echo "婢 0%"
10
+else
11
+  echo "墳 $level"
12
+fi

+ 7
- 0
scripts/.config/Scripts/statusbar/wifi View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+device=wlp3s0
4
+ssid="$(iw dev $device info|grep -oP '(?<=ssid ).*')"
5
+if [ "$ssid" != "" ]; then
6
+  echo "說 $ssid"
7
+fi

+ 1
- 1
termite/.config/termite/config View File

@@ -1,4 +1,4 @@
1 1
 [options]
2 2
 allow_bold = false
3
-font = xos4 Terminus 11
3
+font = mono 11
4 4
 scrollback_lines = 50000

+ 0
- 4
urxvt/.Xresources View File

@@ -27,12 +27,8 @@ URxvt.lineSpace:      0
27 27
 ! Fonts
28 28
 URxvt.allow_bold: true
29 29
 URxvt*font:       xft:xos4 Terminus:pixelsize=14,\
30
-                  xft:Symbola:antialias=true,\
31
-                  -wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1,\
32 30
                   xft:Inconsolata Nerd Font Mono:antialias=true
33 31
 URxvt*boldFont:   xft:xos4 Terminus:pixelsize=14,\
34
-                  xft:Symbola:antialias=true,\
35
-                  -wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1,\
36 32
                   xft:Inconsolata Nerd Font Mono:antialias=true
37 33
 
38 34
 ! Fix font space

Loading…
Cancel
Save