From fbd71a4d658e4ad5be6dc20c626f5b9692b66de6 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sun, 1 Mar 2020 21:38:38 +0100 Subject: [PATCH] Polybar - color config with Xressources --- dotfiles/applications.org | 15 ++++ dotfiles/config.org | 2 +- dotfiles/mail.org | 10 +-- dotfiles/polybar.org | 179 +++++++++++++++++++++----------------- 4 files changed, 120 insertions(+), 86 deletions(-) diff --git a/dotfiles/applications.org b/dotfiles/applications.org index 7fb65aa..c0f0942 100644 --- a/dotfiles/applications.org +++ b/dotfiles/applications.org @@ -232,3 +232,18 @@ Categories=ConsoleOnly;System;FileTools;FileManager MimeType=inode/directory;inode/mount-point;x-scheme-handler/ssh;x-scheme-handler/smb;x-scheme-handler/nfs;x-scheme-handler/ftp; #+end_src +* Emacs Client +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/emacsclient.desktop +:header-args+: :comments both :mkdirp yes +:END: +#+begin_src conf +[Desktop Entry] +Name=Emacs Client +Exec=emacsclient -c %u +Icon=emacs-icon +Type=Application +Terminal=false +MimeType=x-scheme-handler/org-protocol; +NoDisplay=true +#+end_src diff --git a/dotfiles/config.org b/dotfiles/config.org index 8ebde81..c2575b6 100644 --- a/dotfiles/config.org +++ b/dotfiles/config.org @@ -91,8 +91,8 @@ :END: #+BEGIN_SRC conf - max-cache-ttl 60480000 default-cache-ttl 60480000 + max-cache-ttl 60480000 #+END_SRC * Redshift diff --git a/dotfiles/mail.org b/dotfiles/mail.org index 552825c..835075f 100644 --- a/dotfiles/mail.org +++ b/dotfiles/mail.org @@ -875,11 +875,11 @@ https://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/ #+end_src **** Link mail to orgmode - Script - :PROPERTIES: - :header-args: :tangle ~/scripts/mutt-save-org-link.py - :header-args+: :comments both :mkdirp yes - :header-args+: :shebang "#!/usr/bin/env python3" - :END: +:PROPERTIES: +:header-args: :tangle ~/scripts/mutt-save-org-link.py +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env python3" +:END: #+begin_src python import sys import email diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index 7008acc..05eeb43 100644 --- a/dotfiles/polybar.org +++ b/dotfiles/polybar.org @@ -24,41 +24,22 @@ * Colors #+begin_src conf [colors] - base00 = ${xrdb:color0:#000000} - base01 = ${xrdb:color10:#000000} - base02 = ${xrdb:color11:#000000} - base03 = ${xrdb:color8:#000000} - base04 = ${xrdb:color12:#000000} - base05 = ${xrdb:color7:#000000} - base06 = ${xrdb:color13:#000000} - base07 = ${xrdb:color15:#000000} - base08 = ${xrdb:color1:#000000} - base09 = ${xrdb:color9:#000000} - base0A = ${xrdb:color3:#000000} - base0B = ${xrdb:color2:#000000} - base0C = ${xrdb:color6:#000000} - base0D = ${xrdb:color4:#000000} - base0E = ${xrdb:color5:#000000} - base0F = ${xrdb:color14:#000000} - - ; based on http://chriskempson.com/projects/base16/ - background = ${colors.base00} - background-light = ${colors.base01} - background-selection = ${colors.base02} - comments = ${colors.base03} - foreground-dark = ${colors.base04} - foreground = ${colors.base05} - foreground-light = ${colors.base06} - foreground-light-bis = ${colors.base07} - red = ${colors.base08} - orange = ${colors.base09} - brown = ${colors.base0A} - green = ${colors.base0B} - turquoise = ${colors.base0C} - blue = ${colors.base0D} - purple = ${colors.base0E} - magenta = ${colors.base0F} - black = ${#000000} + bg = ${xrdb:background} + red = ${xrdb:color1} + green = ${xrdb:color2} + yellow = ${xrdb:color3} + blue = ${xrdb:color4} + purple = ${xrdb:color5} + aqua = ${xrdb:color6} + gray = ${colors.color7} + darkgray = ${colors.color8} + darkred = ${xrdb:color9} + darkgreen = ${xrdb:color10} + darkyellow = ${xrdb:color11} + darkblue = ${xrdb:color12} + darkpurple = ${xrdb:color13} + darkaqua = ${xrdb:color14} + fg = ${xrdb:foreground} #+end_src * VM @@ -80,8 +61,8 @@ height = 27 radius = 0.0 - background = ${colors.background} - foreground = ${colors.foreground} + background = ${colors.bg} + foreground = ${colors.fg} line-size = 2 @@ -99,14 +80,14 @@ modules-left = i3 bspwm xwindow modules-center = - modules-right = pulseaudio xbacklightredshift nordvpn lockscreen dunst unread_mail cpu battery temperature date + modules-right = pulseaudio xbacklight redshift packages nordvpn lockscreen dunst unread_mail cpu battery temperature date - wm-restack = bspwm + wm-restack = i3 tray-position = right tray-detached = true tray-padding = 0 - tray-background = ${colors.background} + tray-background = ${colors.bg} #+END_SRC * Show Windows Title @@ -131,28 +112,28 @@ #+END_SRC #+BEGIN_SRC conf - label-mode-foreground = ${colors.background} - label-mode-background = ${colors.foreground} + label-mode-foreground = ${colors.bg} + label-mode-background = ${colors.fg} label-mode-padding = 1 # focused = Active workspace on focused monitor label-focused = %icon% %index% - label-focused-foreground = ${colors.foreground} - label-focused-background = ${colors.background} - label-focused-underline = ${colors.turquoise} + label-focused-foreground = ${colors.fg} + label-focused-background = ${colors.bg} + label-focused-underline = ${colors.aqua} label-focused-padding = 1 # unfocused = Inactive workspace on any monitor label-unfocused = %icon% %index% - label-unfocused-foreground = ${colors.foreground} - label-unfocused-background = ${colors.background} - label-unfocused-underline = ${colors.background} + label-unfocused-foreground = ${colors.fg} + label-unfocused-background = ${colors.bg} + label-unfocused-underline = ${colors.bg} label-unfocused-padding = 1 # visible = Active workspace on unfocused monitor label-visible = %icon% %index% - label-visible-background = ${colors.background} - label-visible-underline = ${colors.turquoise} + label-visible-background = ${colors.bg} + label-visible-underline = ${colors.aqua} label-visible-padding = 1 # urgent = Workspace with urgency hint set @@ -185,13 +166,13 @@ ws-icon-default = label-focused = %icon% - label-focused-foreground = ${colors.background} - label-focused-background = ${colors.turquoise} - label-focused-underline= ${colors.turquoise} + label-focused-foreground = ${colors.bg} + label-focused-background = ${colors.aqua} + label-focused-underline= ${colors.aqua} label-focused-padding = 1 label-occupied = %icon% - label-occupied-underline = ${colors.foreground} + label-occupied-underline = ${colors.fg} label-occupied-padding = 1 label-urgent = %icon% @@ -199,7 +180,7 @@ label-urgent-padding = 1 label-empty = %icon% - label-empty-foreground = ${colors.foreground} + label-empty-foreground = ${colors.fg} label-empty-padding = 1 #+end_src @@ -230,8 +211,8 @@ # Used to display the state of random/repeat/repeatone/single # Only applies if is used - toggle-on-foreground = ${colors.foreground-light} - toggle-off-foreground = ${colors.comments} + toggle-on-foreground = ${colors.fg} + toggle-off-foreground = ${colors.gray} bar-progress-width = 15 bar-progress-indicator = | @@ -265,9 +246,9 @@ type = internal/cpu interval = 2 - format-prefix-foreground = ${colors.foreground} + format-prefix-foreground = ${colors.fg} - format-underline = ${colors.background} + format-underline = ${colors.bg} label = %{A1:$TERMINAL -e "htop" &:} ﬙ %percentage:2%% %{A} #+END_SRC @@ -318,7 +299,7 @@ bar-volume-fill-font = 2 bar-volume-empty = ─ bar-volume-empty-font = 2 - bar-volume-empty-foreground = ${colors.foreground} + bar-volume-empty-foreground = ${colors.fg} #+END_SRC * Battery @@ -337,22 +318,22 @@ format-discharging-underline = ${colors.red} format-full-prefix = %{A1:xfce4-power-manager-settings &:} %{A} - format-full-prefix-foreground = ${colors.foreground} - format-full-underline = ${colors.background} + format-full-prefix-foreground = ${colors.fg} + format-full-underline = ${colors.bg} ramp-capacity-0 =  ramp-capacity-1 =  ramp-capacity-2 =  ramp-capacity-3 =  ramp-capacity-4 =  - ramp-capacity-foreground = ${colors.foreground} + ramp-capacity-foreground = ${colors.fg} animation-charging-0 =  animation-charging-1 =  animation-charging-2 =  animation-charging-3 =  animation-charging-4 =  - animation-charging-foreground = ${colors.foreground} + animation-charging-foreground = ${colors.fg} animation-charging-framerate = 750 animation-discharging-0 =  @@ -360,7 +341,7 @@ animation-discharging-2 =  animation-discharging-3 =  animation-discharging-4 =  - animation-discharging-foreground = ${colors.foreground} + animation-discharging-foreground = ${color.fg} animation-discharging-framerate = 750 #+END_SRC @@ -372,11 +353,10 @@ interval = 5 thermal-zone = 0 warn-temperature = 70 - ;; Temperature off one cpu core - hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input + hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input format = %{A1:$TERMINAL -e "watch sensors" &:}