diff --git a/bin/toggle_solarized.sh b/bin/toggle_solarized.sh new file mode 100755 index 0000000..01cf83a --- /dev/null +++ b/bin/toggle_solarized.sh @@ -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)" diff --git a/emacs/emacs.org b/emacs/emacs.org index ee8902c..0a13012 100644 --- a/emacs/emacs.org +++ b/emacs/emacs.org @@ -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)) diff --git a/i3/i3.nix b/i3/i3.nix index f3bd68e..89b4aea 100644 --- a/i3/i3.nix +++ b/i3/i3.nix @@ -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 diff --git a/i3/polybar b/i3/polybar index ab2208a..f2ecde0 100644 --- a/i3/polybar +++ b/i3/polybar @@ -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 =