config.ini 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. ; This is my (demuredemeanor) polybar conf
  2. ; vim:ft=dosini
  3. ; This is a port of my fancy powerline-esk lemonbar to polybar, in hopes of making things simpler :)
  4. ;; TODO: weechat highlight module?
  5. ;;; Colors Block ;;; {{{
  6. ;; NOTE: could use "COLOR = ${xrdb:color#}" to reference from ~/.Xdefaults
  7. [colors]
  8. ;; Main powerline colors
  9. m_fg = #C5C8C6
  10. ;; alias for m_bg_sec1
  11. m_fg_dark = #282A2E
  12. m_bg = #1D1F21
  13. m_bg_edge = #B5BD68
  14. m_bg_wsp = #8C9440
  15. m_bg_sec1 = #282A2E
  16. m_bg_sec2 = #454A4F
  17. m_bg_sec3 = #60676E
  18. m_fg_icon = #979997
  19. ;;;; Palate ;;;; {{{
  20. ;; "base" palate?
  21. foreground = #C5C8C6
  22. background = #1D1F21
  23. black = #282A2E
  24. red = #A54242
  25. green = #8C9440
  26. yellow = #DE935F
  27. blue = #5F819D
  28. magenta = #85678F
  29. cyan = #5E8D87
  30. white = #707880
  31. bblack = #373B41
  32. bred = #CC6666
  33. ;; yellow-green
  34. bgreen = #B5BD68
  35. byellow = #F0C674
  36. bblue = #81A2BE
  37. bmagenta = #B294BB
  38. bcyan = #8ABEB7
  39. bwhite = #C5C8C6
  40. ;;;; End Palete ;;;; }}}
  41. ;;; End Colors Block ;;; }}}
  42. ;;; Bar Section ;;; {{{
  43. ;;;; Main Bar ;;;; {{{
  44. [bar/main]
  45. monitor = ${env:MONITOR:}
  46. width = 100%
  47. height = 19
  48. fixed-center = false
  49. border-color = ${colors.bblack}
  50. ;border-bottom-size = 2
  51. background = ${colors.m_bg}
  52. foreground = ${colors.m_fg}
  53. font-0 = "PragmataPro:size=13;3"
  54. ;; It looks like PragmataPro includes FA now, so FA isn't called
  55. font-1 = "FontAwesome:size=13;2"
  56. ;; Back up font, and japanese support (so I get less error msgs) (window titles)
  57. font-2 = "Noto Sans Mono:size=13;3"
  58. font-3 = "Noto Sans Mono CJK JP:size=13;3"
  59. modules-left = i3 title end_indicator_left
  60. ;modules-center =
  61. modules-right = end_indicator_right mmpd rss mail misc_status local_ip net_use ext_ip tmb cpu memory filesystem temperature volume backlight udate
  62. ;;;; End Main Bar ;;;; }}}
  63. ;;; End Bar Section ;;; }}}
  64. ;;; Module Section ;;; {{{
  65. ;;;; Indicator Modules ;;;; {{{
  66. ;; Colors:
  67. ;; Name BG HEX FG HEX
  68. ;; Content m_bg_sec3 #60676E m_bg_wsp #8C9440
  69. [module/end_indicator_left]
  70. type = custom/text
  71. ;; Fancy, with icon
  72. ;; Color sec3 bg sec3 green? bg sec3
  73. ;content = %{B#60676E F#1D1F21}%{B#60676E F#8C9440}%{B#1D1F21 F#60676E}
  74. ;; Plain
  75. ;; Color sec3 bg bg sec3
  76. content = %{B#60676E F#1D1F21}%{B#1D1F21 F#60676E}
  77. ;; Colors:
  78. ;; Name BG HEX FG HEX
  79. ;; Content m_bg_sec3 #60676E m_bg_wsp #8C9440
  80. [module/end_indicator_right]
  81. type = custom/text
  82. ;; Fancy, with icon
  83. ;; Color bg sec3 sec3 green? bg
  84. ;content = %{B#1D1F21 F#60676E}%{B#60676E F#8C9440}%{F#1D1F21}
  85. ;; Plain
  86. ;; Color bg sec3 sec3 sec1
  87. ;content = %{B#1D1F21 F#60676E}%{B#60676E F#282A2E}
  88. ;; Color bg sec3 sec3 sec2
  89. content = %{B#1D1F21 F#60676E}%{B#60676E F#454A4F}
  90. ;;;; End Indicator Modules ;;;; }}}
  91. ;;; Builtins
  92. ;;;; i3 Workspace Module ;;;; {{{
  93. ;; Colors:
  94. ;; Name BG HEX FG HEX
  95. ;; Prefix m_bg_edge #B5BD68 m_fg_dark #282A2E
  96. ;; (Main) Unfocused m_bg_edge #B5BD68 m_fg_dark #282A2E
  97. ;; Focused/Visible m_bg_wsp #8C9440 m_fg_dark #282A2E
  98. ;; Urgent red? m_fg_dark #282A2E
  99. ;; Suffix Smooth out for next section
  100. [module/i3]
  101. type = internal/i3
  102. format = <label-state> <label-mode>
  103. ;index-sort = true
  104. wrapping-scroll = true
  105. strip-wsnumbers = false
  106. ;;;pin-workspaces = true
  107. ;; i3 mode
  108. label-mode = "%{B#A54242 F#B5BD68}%{B#A54242 F#282A2E}%{O2}%{O2}%mode%%{O2}%{B#B5BD68 F#A54242}"
  109. ;; This section is not using label-NAME-(fore|back)ground, and instead is
  110. ;; literally declaring colors. This allows nice powerline transitions.
  111. ;; NOTE: the leading symbol had flip flopped bg/fg on purpose, to mesh nicely.
  112. label-unfocused = "%{B#B5BD68 F#282A2E}%name%%{B#B5BD68 F#B5BD68}"
  113. label-visible = "%{B#8C9440 F#B5BD68}%{B#8C9440 F#282A2E}%{O2}%name%%{O2}%{B#B5BD68 F#8C9440}"
  114. label-focused = "%{B#8C9440 F#B5BD68}%{B#8C9440 F#282A2E}%{O2}%name%%{O2}%{B#B5BD68 F#8C9440}"
  115. label-urgent = "%{B#A54242 F#B5BD68}%{B#A54242 F#282A2E}%{O2}%name%%{O2}%{B#B5BD68 F#A54242}"
  116. format-prefix = "%{B#B5BD68 F#282A2E}%{O4}%{O4}%{B#B5BD68 F#B5BD68}"
  117. format-suffix = "%{B#454A4F F#B5BD68}"
  118. ;;;; End i3 Workspace Module ;;;; }}}
  119. ;;;; Title Module ;;;; {{{
  120. ;; Colors:
  121. ;; Name BG HEX FG HEX
  122. ;; Prefix: m_bg_sec2 #454A4F m_bg_edge #B5BD68
  123. ;; Main: m_bg #1D1F21 m_fg #C5C8C6
  124. [module/title]
  125. type = internal/xwindow
  126. format = "%{O4}<label>%{O4}"
  127. ;; prefix is needed as otherwise maxlen would be ate up.
  128. format-prefix = "%{B#454A4F F#B5BD68}%{O4}%{O4}%{B#1D1F21 F#454A4F}"
  129. ;format-suffix = ""
  130. format-background = ${colors.m_bg}
  131. format-foreground = ${colors.m_fg}
  132. label = "%title:0:40:…%"
  133. label-maxlen = 50
  134. label-empty = "Empty"
  135. label-empty-foreground = #707880
  136. ;;;; End Title Module ;;;; }}}
  137. ;;;; CPU Module ;;;; {{{
  138. [module/cpu]
  139. type = internal/cpu
  140. interval = 1
  141. ;; NOTE: Set up for easy sec1/sec2 toggling
  142. ;; Color sec2 sec1 sec1 icon fg
  143. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage:2%%%{O2}"
  144. ;; Color sec1 sec2 sec2 icon fg
  145. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage:2%%%{O2}"
  146. ;;;; End CPU Module ;;;; }}}
  147. ;;;; Memory Module ;;;; {{{
  148. [module/memory]
  149. type = internal/memory
  150. ;interval = 1
  151. interval = 3
  152. ;; NOTE: Set up for easy sec1/sec2 toggling
  153. ;; Color sec2 sec1 sec1 icon fg
  154. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage_used:2%%%{O2}"
  155. ;; Color sec1 sec2 sec2 icon fg
  156. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage_used:2%%%{O2}"
  157. ;;;; End Memory Module ;;;; }}}
  158. ;;;; Volume Module ;;;; {{{
  159. [module/volume]
  160. type = internal/pulseaudio
  161. ;interval = 0.1
  162. interval = 3
  163. ;; NOTE: Set up for easy sec1/sec2 toggling
  164. ;; Color sec2 sec1 sec1 icon fg
  165. label-volume = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage:2%%%{O2}"
  166. ;; Color sec2 yellow? yellow? icon fg_dark sec1
  167. label-muted = "%{B#454A4F F#DE935F}%{B#DE935F F#282A2E}%{O2}%{O2}%{F#282A2E}%percentage:2%%%{O2}%{F#282A2E}"
  168. ;; Color sec1 sec2 sec2 icon fg
  169. ;label-volume = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage:2%%%{O2}"
  170. ;; Color sec1 yellow? yellow? icon fg_dark sec2
  171. ;label-muted = "%{B#282A2EF F#DE935F}%{B#DE935F F#282A2E}%{O2}%{O2}%{F#282A2E}%percentage:2%%%{O2}%{F#454A4F}"
  172. ; Right and Middle click
  173. click-right = pavucontrol
  174. ;;;; End Volume Module ;;;; }}}
  175. ;;;; Temperature Module ;;;; {{{
  176. [module/temperature]
  177. type = internal/temperature
  178. ;; chose your thermal-zone
  179. thermal-zone = 3
  180. warn-temperature = 70
  181. ;; NOTE: Set up for easy sec1/sec2 toggling
  182. ;; Color sec2 sec1 sec1 icon fg
  183. ;format = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}<ramp>%{O2}%{F#C5C8C6}<label>%{O2}"
  184. ;; Color sec2 red? red? icon fg_dark sec1
  185. ;format-warn = "%{B#454A4F F#A54242}%{B#A54242 F#282A2E}%{O2}<ramp>%{O2}%{F#282A2E}<label-warn>%{O2}%{F#282A2E}"
  186. ;; Color sec1 sec2 sec2 icon fg
  187. format = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}<ramp>%{O2}%{F#C5C8C6}<label>%{O2}"
  188. ;; Color sec1 red? red? icon fg_dark sec2
  189. format-warn = "%{B#282A2E F#A54242}%{B#A54242 F#282A2E}%{O2}<ramp>%{O2}%{F#282A2E}<label-warn>%{O2}%{F#454A4F}"
  190. label = %temperature-c%
  191. label-warn = %temperature-c%
  192. ;; Note: pragmatapro (currently) has 5 icon increments.
  193. ;; Also, I'm reusing icons since the icons are divvied evenly between 0-70C...
  194. ;; and my x270 idles at ~50C. Otherwise the icons would look artificially 'high'
  195. ;; icon 1/5
  196. ramp-0 = ""
  197. ramp-1 = ""
  198. ;; icon 2/5
  199. ramp-2 = ""
  200. ramp-3 = ""
  201. ramp-4 = ""
  202. ;; icon 3/5
  203. ramp-5 = ""
  204. ;; icon 4/5
  205. ramp-6 = ""
  206. ;; icon 5/5
  207. ramp-7 = ""
  208. ;;;; End Temperature Module ;;;; }}}
  209. ;;;; Filesystem Module ;;;; {{{
  210. [module/filesystem]
  211. type = internal/fs
  212. interval = 10
  213. mount-0 = /
  214. ;fixed-values = true
  215. ;; NOTE: Set up for easy sec1/sec2 toggling
  216. ;; Color sec2 sec1 sec1 icon fg
  217. label-mounted = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage_used:2%%%{O2}"
  218. ;; Color sec1 sec2 sec2 icon fg
  219. ;label-mounted = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%percentage_used:2%%%{O2}"
  220. ;;;; End Filesystem Module ;;;; }}}
  221. ;;;; Backlight Module ;;;; {{{
  222. [module/backlight]
  223. type = internal/backlight
  224. ; NOTE: uses %{A} for redshift toggle
  225. ; Use the following command to list available cards:
  226. ; $ ls -1 /sys/class/backlight/
  227. card = intel_backlight
  228. ;; NOTE: Set up for easy sec1/sec2 toggling
  229. ;; Color sec2 sec1 sec1 icon fg
  230. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{A3:pkill -USR1 redshift:}%{O2}%{O2}%{F#C5C8C6}%percentage%%%{O2}%{A}"
  231. ;; Color sec1 sec2 sec2 icon fg
  232. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{A3:pkill -USR1 redshift:}%{O2}%{O2}%{F#C5C8C6}%percentage%%%{O2}%{A}"
  233. ;;;; End Backlight Module ;;;; }}}
  234. ;;; Scripts
  235. ;;;; Misc Status Check Script Module ;;;; {{{
  236. [module/misc_status]
  237. type = custom/script
  238. interval = 15
  239. exec = $HOME/.config/polybar/scripts/misc_status_check.sh
  240. ;; NOTE: Set up for easy sec1/sec2 toggling
  241. ;; Color sec2 sec1 sec1 icon fg
  242. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  243. ;; Color sec1 sec2 sec2 icon fg
  244. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  245. ;;;; End Misc Status Check Script Module ;;;; }}}
  246. ;;;; Mail Check Script Module ;;;; {{{
  247. [module/mail]
  248. type = custom/script
  249. interval = 60
  250. exec = $HOME/.config/polybar/scripts/mail_check.sh
  251. ;; NOTE: Set up for easy sec1/sec2 toggling
  252. ;; NOTE: this script provides its foreground colors
  253. ;; Color sec2 sec1 sec1
  254. label = "%{B#454A4F F#282A2E}%{B#282A2E}%output%"
  255. ;; Color sec1 sec2 sec2
  256. ;label = "%{B#282A2E F#454A4F}%{B#454A4F}%output%"
  257. click-left = $HOME/projects/personal/scripts/offlineimap_neomutt_hook.sh &
  258. ;click-right = $HOME/projects/personal/scripts/offlineimap_neomutt_hook.sh &
  259. ;;;; End Mail Check Script Module ;;;; }}}
  260. ;;;; RSS Check Script Module ;;;; {{{
  261. [module/rss]
  262. type = custom/script
  263. interval = 60
  264. exec = $HOME/.config/polybar/scripts/rss_check.sh
  265. ;; NOTE: Set up for easy sec1/sec2 toggling
  266. ;; Color sec2 sec1 sec1 icon fg
  267. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  268. ;; Color sec1 sec2 sec2 icon fg
  269. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  270. ;;;; End RSS Check Script Module ;;;; }}}
  271. ;;;; TMB Check Script Module ;;;; {{{
  272. ;; Thinkpad Multi Battery
  273. [module/tmb]
  274. type = custom/script
  275. interval = 60
  276. exec = $HOME/.config/polybar/scripts/tmb_check.sh
  277. ;; NOTE: Colors set in script, toggle section in script.
  278. label = "%output%"
  279. ;;;; End TMB Check Script Module ;;;; }}}
  280. ;;;; UDate Script Module ;;;; {{{
  281. ;; This is a replacement for the builtin date.
  282. ;; This has a UTC toggle, done in a way that also allows for a i3 binding to toggle.
  283. [module/udate]
  284. type = custom/script
  285. ;interval = 1
  286. interval = 5
  287. exec = $HOME/.config/polybar/scripts/udate_check.sh
  288. ;; NOTE: Colors set in script, toggle section in script.
  289. label = "%output%"
  290. ## Toggles. There is also an i3 binding of this.
  291. ## NOTE: Using script as raw awk command was erroring out here.
  292. click-left = $HOME/.config/polybar/scripts/udate_toggle.sh
  293. ;click-right = $HOME/.config/polybar/scripts/udate_toggle.sh
  294. ;;;; End UDate Script Module ;;;; }}}
  295. ;;;; MMPD Check Script Module ;;;; {{{
  296. ;; Multi Music Player Display
  297. ;; The Output has a min 0 max 50 char limit inplace
  298. [module/mmpd]
  299. type = custom/script
  300. interval = 10
  301. exec = $HOME/.config/polybar/scripts/mmpd_check.sh
  302. ;; NOTE: I suggest this one looks best as m_bg_sec1
  303. ;; NOTE: Set up for easy sec1/sec2 toggling
  304. ;; Color sec2 sec1 sec1 icon fg
  305. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%output:0:40:…%%{O2}"
  306. ;; Color sec1 sec2 sec2 icon fg
  307. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%output:0:40:...%%{O2}"
  308. ;;;; End MMPD Check Script Module ;;;; }}}
  309. ;;;; Local IP Check Script Module ;;;; {{{
  310. [module/local_ip]
  311. type = custom/script
  312. interval = 15
  313. exec = $HOME/.config/polybar/scripts/local_ip_check.sh
  314. ;; NOTE: Icon colors handled in script
  315. ;; NOTE: Set up for easy sec1/sec2 toggling
  316. ;; Color sec2 sec1 sec1 fg
  317. label = "%{B#454A4F F#282A2E}%{B#282A2E F#C5C8C6}%output%"
  318. ;; Color sec1 sec2 sec2 fg
  319. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#C5C8C6}%output%"
  320. ## Toggles. There is also an i3 binding of this.
  321. ## NOTE: Using script as raw awk command was erroring out here.
  322. ;click-left = $HOME/.config/polybar/scripts/ipv6_toggle.sh
  323. click-right = $HOME/.config/polybar/scripts/ipv6_toggle.sh
  324. ;;;; End Loca Ip Check Script Module ;;;; }}}
  325. ;;;; Ext IP Check Script Module ;;;; {{{
  326. [module/ext_ip]
  327. type = custom/script
  328. interval = 15
  329. exec = $HOME/.config/polybar/scripts/ext_ip_check.sh
  330. ;; NOTE: Set up for easy sec1/sec2 toggling
  331. ;; Color sec2 sec1 sec1 icon fg
  332. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  333. ;; Color sec1 sec2 sec2 icon fg
  334. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{O2}%{O2}%{F#C5C8C6}%output%%{O2}"
  335. ## Toggles. There is also an i3 binding of this.
  336. ## NOTE: Using script as raw awk command was erroring out here.
  337. ;click-left = $HOME/.config/polybar/scripts/ip_toggle.sh
  338. click-right = $HOME/.config/polybar/scripts/ip_toggle.sh
  339. ;;;; End Ext Ip Check Script Module ;;;; }}}
  340. ;;;; Net Use Check Script Module ;;;; {{{
  341. [module/net_use]
  342. type = custom/script
  343. exec = $HOME/.config/polybar/scripts/net_use_check.sh
  344. tail = true
  345. ;; NOTE: Icon and highlight colors handled in script
  346. ;; NOTE: Set up for easy sec1/sec2 toggling
  347. ;; Color sec2 sec1 sec1 fg
  348. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#C5C8C6}%output%"
  349. ;; Color sec1 sec2 sec2 fg
  350. label = "%{B#282A2E F#454A4F}%{B#454A4F F#C5C8C6}%output%"
  351. ;;;; Net Use Check Script Module ;;;; }}}
  352. ;;; End Module Section ;;; }}}
  353. [settings]
  354. screenchange-reload = true
  355. [global/wm]
  356. margin-top = 0
  357. margin-bottom = 0