config 15 KB

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