theme switcher, dpi, font fixes

auto-flake-update
Yorick van Pelt 2018-03-30 00:31:41 +02:00
parent 3853ff7e49
commit 2e60402320
10 changed files with 98 additions and 103 deletions

33
bin/toggle_solarized.sh Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
DIR=~/dotfiles/x/solarized
COL=${1:-$(readlink $DIR/alternate)}
if [ $COL == "dark" ]; then
ROFI_THEME=solarized_alternate
ALTERNATE=light;
fi
if [ $COL == "light" ]; then
ALTERNATE=dark;
ROFI_THEME=Arc
fi
echo "changing to solarized_$COL"
# rofi
sed -i "s/theme: .*;/theme: \"$ROFI_THEME\";/" ~/dotfiles/rofi/.config/rofi/config.rasi
# xrdb
ln -fs $ALTERNATE $DIR/alternate
ln -fs $COL $DIR/actual
xrdb ~/dotfiles/x/.Xdefaults
# urxvt
RECOLOR=$(xrdb -query | tr -d ' \t' | sed -n '
s/.*background:/\x1b]11;/p
s/.*foreground:/\x1b]10;/p
s/.*borderColor:/\x1b]708;/p
s/.*color\([0-9][^:]*\):/\x1b]4;\1;/p
' | tr \\n \\a)
for i in /dev/pts/*; do
echo -n $RECOLOR > $i
done
#polybar
pkill -USR1 polybar
#emacs
emacsclient -e "(load-theme 'solarized-$COL)"

View File

@ -2,6 +2,10 @@
#+AUTHOR: Yorick van Pelt
* Prelims
** start server
#+BEGIN_SRC emacs-lisp
(server-start)
#+END_SRC
** use-package compile-time
#+BEGIN_SRC emacs-lisp
(eval-when-compile (require 'use-package))

View File

@ -185,6 +185,7 @@ bindsym XF86AudioMute exec ${alsaUtils}/bin/amixer set Master toggle
bindsym $mod+Shift+s exec --no-startup-id ${screenshot_public}/bin/screenshot_public
bindsym Print exec --no-startup-id ${screenshot_public}/bin/screenshot_public
bindsym $mod+p exec --no-startup-id ${rofi-pass}/bin/rofi-pass
bindsym $mod+Shift+t exec --no-startup-id /home/yorick/dotfiles/bin/toggle_solarized.sh
workspace_auto_back_and_forth yes
hide_edge_borders smart

View File

@ -8,23 +8,22 @@
;=====================================================
[colors]
background = #002b36
;background = #222
background-alt = #073642
foreground = ${xrdb:foreground:#222}
;foreground = #dfdfdf
background = ${xrdb:background}
background-alt = ${xrdb:color0}
foreground = ${xrdb:foreground:}
foreground-alt = ${xrdb:foreground:#555}
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
primary = ${xrdb:color6}
secondary = ${xrdb:color5}
alert = ${xrdb:color1}
[bar/common]
monitor = ${env:MONITOR:}
width = 100%
fixed-center = true
dpi = ${env:DPI:${xrdb:Xft.dpi:-1}}
height = 20
radius = 6.0
height = 2.5%
radius = 8%
background = ${colors.background}
foreground = ${colors.foreground}
@ -33,22 +32,21 @@ scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
font-0 = FontAwesome:size=10;1
font-1 = FiraMono:size=10;0
font-1 = ${xrdb:polybar.font}
;tray-padding = 2
tray-scale = 1.0
;tray-transparent = true
tray-maxsize = 1000
tray-background = ${colors.background}
modules-left = i3 xwindow
modules-center =
;override-redirect = true
line-size = 3
line-size = 5%
line-color = #f00
border-size = 4
border-size = 2%
border-color = #00000000
padding-left = 0
@ -57,12 +55,9 @@ padding-right = 2
module-margin-left = 1
module-margin-right = 2
[bar/ascanius_primary]
inherit = bar/common
modules-left = i3 xwindow
modules-center =
modules-right = spotify filesystem volume eth memory battery temperature date
@ -71,35 +66,21 @@ tray-position = right
[bar/ascanius_other]
inherit = bar/common
modules-left = i3 xwindow
modules-center =
modules-right = date
; jarvis: retina screen
[bar/jarvis_primary]
inherit = bar/common
modules-left = i3 xwindow
modules-center =
modules-right = spotify filesystem volume backlight-acpi wlan memory battery temperature date
tray-position = right
;font-0 = FontAwesome:size=20;1
;font-1 = FiraMono:size=20;0
[bar/jarvis_other]
inherit = bar/common
modules-left = i3 xwindow
modules-center =
modules-right = eth wlan memory battery temperature date
tray-position = right
;font-0 = FontAwesome:size=20;1
;font-1 = FiraMono:size=20;0
; modules
@ -182,17 +163,7 @@ type = internal/xbacklight
format = <label>
label =  %percentage%%
format-underline = #9f78e1
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
format-underline = ${xrdb:color13}
[module/backlight-acpi]
inherit = module/xbacklight
@ -204,7 +175,7 @@ type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
format-underline = ${xrdb:color1}
label = %percentage%%
[module/spotify]
@ -218,7 +189,7 @@ type = internal/memory
interval = 2
format-prefix = "m "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
format-underline = ${xrdb:color6}
label = %percentage_used%%
[module/wlan]
@ -227,7 +198,7 @@ interface = wlp58s0
interval = 3.0
format-connected = 
format-connected-underline = #9f78e1
format-connected-underline = ${xrdb:color13}
label-connected = %essid%
format-disconnected =
@ -248,7 +219,7 @@ type = internal/network
interface = eth0
interval = 3.0
format-connected-underline = #55aa55
format-connected-underline = ${xrdb:color2}
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
@ -271,7 +242,7 @@ time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
format-underline = ${xrdb:color4}
label = %date% %time%
@ -288,24 +259,8 @@ format-muted-prefix = " "
;
format-muted-foreground = ${colors.foreground-alt}
label-muted = muted
format-volume-underline = #55aa55
format-muted-underline = #f5a70a
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
format-volume-underline = ${xrdb:color2}
format-muted-underline = ${xrdb:color9}
[module/battery]
type = internal/battery
@ -314,7 +269,7 @@ adapter = ADP1
full-at = 100
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-charging-underline = ${xrdb:color9}
time-format = %H:%M
label-charging = %percentage%% - %time%
label-discharging = %percentage%% - %time%
@ -347,7 +302,7 @@ thermal-zone = 1
warn-temperature = 100
format = <ramp> <label>
format-underline = #f50a4d
format-underline = ${xrdb:color5}
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
@ -390,14 +345,10 @@ menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View File

@ -3,7 +3,7 @@ configuration {
/* width: 50;*/
/* lines: 15;*/
/* columns: 1;*/
font: "Source Code Pro 12";
/* font: "Source Code Pro 12";*/
/* bw: 1;*/
/* location: 0;*/
/* padding: 5;*/
@ -18,7 +18,7 @@ configuration {
/* run-list-command: "";*/
/* run-shell-command: "{terminal} -e {cmd}";*/
/* window-command: "xkill -id {window}";*/
/* drun-icon-theme: ;*/
/* drun-icon-theme: "solarized_alternate";*/
/* disable-history: false;*/
/* sort: false;*/
/* levenshtein-sort: false;*/
@ -40,7 +40,7 @@ configuration {
/* hide-scrollbar: false;*/
/* fullscreen: false;*/
/* fake-transparency: false;*/
dpi: 109;
/* dpi: 109; */
/* threads: 0;*/
/* scrollbar-width: 8;*/
/* scroll-method: 0;*/

View File

@ -7,34 +7,14 @@
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900
! Dark
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3
! Light
! #define S_base03 #fdf6e3
! #define S_base02 #eee8d5
! #define S_base01 #93a1a1
! #define S_base00 #839496
! #define S_base0 #657b83
! #define S_base1 #586e75
! #define S_base2 #073642
! #define S_base3 #002b36
#include "/home/yorick/dotfiles/x/solarized/actual"
! To only apply colors to your terminal, for example, prefix
! the color assignment statement with its name. Example:
!
! URxvt*background: S_base03
*background: S_base3
URxvt*background: [85]#002b36
*background: S_base03
URxvt*background: S_base03_transp
! S_base03
*foreground: S_base0
*fading: 10
*fadeColor: [70]#002b36
*cursorColor: S_base1
*pointerColorBackground: S_base01
*pointerColorForeground: S_base1
@ -62,13 +42,16 @@ URxvt.url-launcher: xdg-open
URxvt.matcher.button: 1
URxvt.urgentOnBell: True
URxvt.depth: 32
URxvt.borderColor: S_base03
! URxvt.background: [95]#202020
URxvt.font: xft:SourceCodePro:size=12:antialias=true:hinting=true
*font: xft:DejaVu Sans Mono:size=10:antialias=true:hinting=true
polybar.font: DejaVu Sans Mono:size=10:antialias=true:hinting=true;2
! URxvt.boldFont: xft:SourceCodePro:bold:size=12:antialias=true:hinting=true
URxvt.geometry: 100x30
URxvt.scrollColor: S_base0
rofi.font: Source Code Pro 12
rofi.font: DejaVu Sans Mono 10
Emacs.font: DejaVu Sans Mono-10
URxvt.font-size.step: 4
URxvt.keysym.C-equal: perl:font-size:increase

1
x/solarized/actual Symbolic link
View File

@ -0,0 +1 @@
dark

1
x/solarized/alternate Symbolic link
View File

@ -0,0 +1 @@
light

11
x/solarized/dark Normal file
View File

@ -0,0 +1,11 @@
! Dark
#define S_base03 #002b36
#define S_base03_transp [85]#002b36
*fading: 10
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3

10
x/solarized/light Normal file
View File

@ -0,0 +1,10 @@
! Light
#define S_base03 #fdf6e3
#define S_base03_transp [90]#fdf6e3
#define S_base02 #eee8d5
#define S_base01 #93a1a1
#define S_base00 #839496
#define S_base0 #657b83
#define S_base1 #586e75
#define S_base2 #073642
#define S_base3 #002b36