From dfae762222a739f4b8688191803224f776040847 Mon Sep 17 00:00:00 2001 From: qvalentin Date: Thu, 30 Sep 2021 12:33:07 +0200 Subject: [PATCH] add wpg for theme switching --- .config/xmobar/xmobarrc-template | 8 +++----- .config/xmonad | 2 +- .scripts/changebg | 18 ++++++++---------- .scripts/dmen | 6 ++++++ .scripts/{poweroff => shutdownnow} | 0 5 files changed, 18 insertions(+), 16 deletions(-) create mode 100755 .scripts/dmen rename .scripts/{poweroff => shutdownnow} (100%) diff --git a/.config/xmobar/xmobarrc-template b/.config/xmobar/xmobarrc-template index eea4fa5..4d3eb7e 100644 --- a/.config/xmobar/xmobarrc-template +++ b/.config/xmobar/xmobarrc-template @@ -3,13 +3,11 @@ Config { overrideRedirect = False , bgColor = "BGCOLOR" , fgColor = "FGCOLOR" , position = TopW L 100 + , iconRoot = ".config/xmobar/xpm/" , commands = [ Run Weather "EGPF" [ "--template", " °C" , "-L", "0" , "-H", "25" - , "--low" , "lightblue" - , "--normal", "#f8f8f2" - , "--high" , "red" ] 36000 , Run Cpu [ "-L", "3" @@ -25,10 +23,10 @@ Config { overrideRedirect = False ] , Run Memory ["--template", "Mem: %"] 10 , Run Swap [] 10 - , Run Date "%a %Y-%m-%d %H:%M" "date" 10 + , Run Date "%a %Y-%m-%d %H:%M" "date" 10 , Run XMonadLog ] , sepChar = "%" , alignSep = "}{" - , template = "%XMonadLog% }{ %alsa:default:Master% | %cpu% | %memory% * %swap% | %EGPF% | %date% " + , template = " %XMonadLog% }{ %alsa:default:Master% | %cpu% | %memory% * %swap% | %EGPF% | %date% " } diff --git a/.config/xmonad b/.config/xmonad index 90fd606..949a7b7 160000 --- a/.config/xmonad +++ b/.config/xmonad @@ -1 +1 @@ -Subproject commit 90fd606fb31f033373a3bd40030f19e5a1d586a0 +Subproject commit 949a7b7021a0587ddde0342207fe67fc0ccafcc5 diff --git a/.scripts/changebg b/.scripts/changebg index f664c29..b295e1c 100755 --- a/.scripts/changebg +++ b/.scripts/changebg @@ -25,11 +25,13 @@ xmobar_change(){ args=("$@") PATH_TO_IMG="${args[0]}" -echo $PATH_TO_IMG - -wal -i $PATH_TO_IMG -feh --bg-fill $PATH_TO_IMG - +if [[ -z "$PATH_TO_IMG" ]]; then + wpg -m +else + echo $PATH_TO_IMG + wpg -a $PATH_TO_IMG + wpg -s "$(basename $PATH_TO_IMG)" +fi # overwrite .Xresources file cat ~/.cache/wal/colors.Xresources > ~/.Xresources echo "\nXcursor.theme: Breeze" >> ~./Xresources @@ -37,11 +39,7 @@ echo "\nXcursor.theme: Breeze" >> ~./Xresources # merge it into xrdb xrdb -merge ~/.Xresources -# Does not really work because it takes the wrong colors and the cli cannot use the Xresources file for some reason... -# aur package is themix-full-git - -# generate new gtk themes -/opt/oomox/plugins/theme_oomox/change_color.sh ~/.cache/wal/colors-oomox -o Wal -t ~/.themes/ -d true -m gtk3 +emacsclient -e '(my-load-xresources)' xmobar_change killall xmobar diff --git a/.scripts/dmen b/.scripts/dmen new file mode 100755 index 0000000..a636cd6 --- /dev/null +++ b/.scripts/dmen @@ -0,0 +1,6 @@ +#!/bin/sh + +# Import the colors +. "${HOME}/.cache/wal/colors.sh" + +dmenu_run -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" diff --git a/.scripts/poweroff b/.scripts/shutdownnow similarity index 100% rename from .scripts/poweroff rename to .scripts/shutdownnow