aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2025-11-27 10:05:38 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2025-11-27 10:05:38 -0500
commit85c91b7249e03b03ed913e7070861cea3734cb57 (patch)
tree50e5329333da40a1918bf7e1ad2296c8ee49e83b
parent488dec64b403ae4aba65cad0e46b4d2767f0b2dd (diff)
downloadrivercfg-85c91b7249e03b03ed913e7070861cea3734cb57.tar.gz
rivercfg-85c91b7249e03b03ed913e7070861cea3734cb57.tar.xz
Add a default style for waybar when the gtk portal isn't running. Bemenu helper for live light/dark switching
-rwxr-xr-xarch.sh1
-rw-r--r--river/_bemenu_dark.sh19
-rw-r--r--river/_bemenu_light.sh20
-rwxr-xr-xriver/bemenu_helper24
-rwxr-xr-xriver/init11
-rw-r--r--waybar/style.css (renamed from waybar/theme.css)2
-rwxr-xr-xwaylandrc2
7 files changed, 73 insertions, 6 deletions
diff --git a/arch.sh b/arch.sh
index 1d0cf9e..7ae8dbf 100755
--- a/arch.sh
+++ b/arch.sh
@@ -17,5 +17,6 @@ sudo pacman -S \
grim \
xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk \
+ wtype \
diff --git a/river/_bemenu_dark.sh b/river/_bemenu_dark.sh
new file mode 100644
index 0000000..3f73733
--- /dev/null
+++ b/river/_bemenu_dark.sh
@@ -0,0 +1,19 @@
+background='#282828'
+dark_background='#202020'
+foreground='#ebdbb2'
+regular0='#282828'
+regular1='#cc241d'
+regular2='#98971a'
+regular3='#d79921'
+regular4='#458588'
+regular5='#b16286'
+regular6='#689d6a'
+regular7='#a89984'
+bright0='#928374'
+bright1='#fb4934'
+bright2='#b8bb26'
+bright3='#fabd2f'
+bright4='#83a598'
+bright5='#d3869b'
+bright6='#8ec07c'
+bright7='#ebdbb2'
diff --git a/river/_bemenu_light.sh b/river/_bemenu_light.sh
new file mode 100644
index 0000000..b234c48
--- /dev/null
+++ b/river/_bemenu_light.sh
@@ -0,0 +1,20 @@
+background='#fbf1c7'
+dark_background='#f2e3bc'
+foreground='#3c3836'
+regular0='#fbf1c7'
+regular1='#cc241d'
+regular2='#98971a'
+regular3='#d79921'
+regular4='#458588'
+regular5='#b16286'
+regular6='#689d6a'
+regular7='#7c6f64'
+bright0='#928374'
+bright1='#9d0006'
+bright2='#79740e'
+bright3='#b57614'
+bright4='#076678'
+bright5='#8f3f71'
+bright6='#427b58'
+bright7='#3c3836'
+
diff --git a/river/bemenu_helper b/river/bemenu_helper
new file mode 100755
index 0000000..f6b3134
--- /dev/null
+++ b/river/bemenu_helper
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+conf="$XDG_CONFIG_HOME/river/theme_conf"
+. "$conf"
+. "$XDG_CONFIG_HOME"/river/_bemenu_"$mode".sh
+export BEMENU_OPTS=\
+--fn\ \''IBM 3270 12'\'\ \
+--tb\ "$background"\ \
+--tf\ "$foreground"\ \
+--fb\ "$background"\ \
+--ff\ "$bright2"\ \
+--cb\ "$background"\ \
+--cf\ "$foreground"\ \
+--nb\ "$background"\ \
+--nf\ "$foreground"\ \
+--hb\ "$background"\ \
+--hf\ "$bright3"\ \
+--sb\ "$foreground"\ \
+--sf\ "$background"\ \
+--ab\ "$dark_background"\ \
+--af\ "$regular7"
+
+exec "$@"
diff --git a/river/init b/river/init
index 848403e..a883d8d 100755
--- a/river/init
+++ b/river/init
@@ -1,6 +1,7 @@
#!/bin/sh
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+bmenu_helper="$XDG_CONFIG_HOME/river/bemenu_helper"
# This is the example configuration file for river.
#
# If you wish to edit this, you will probably want to copy it to
@@ -184,7 +185,7 @@ riverctl map normal Super+Shift Equal spawn "${XDG_CONFIG_HOME}/river/padding_he
riverctl map normal Super+Shift Minus spawn "${XDG_CONFIG_HOME}/river/padding_helper -10 0"
riverctl map normal Super+Control L spawn swaylock
-riverctl map normal Super D spawn bemenu-run
+riverctl map normal Super D spawn "$bmenu_helper "bemenu-run
riverctl map normal Super B spawn 'pkill -SIGUSR1 waybar'
riverctl focus-follows-cursor normal
@@ -193,10 +194,10 @@ riverctl map normal Super+Shift+Control P spawn 'grim -g "$(slurp)" /tmp/screens
riverctl map normal Super+Shift+Alt+Control P spawn '_f=/tmp/screenshot_$(date +%s).png; grim -g "$(slurp)" $_f; wl-copy < $_f'
riverctl map normal Super P spawn dpw-menu
-riverctl map normal Super+Control P spawn 'dpw-menu -o'
-riverctl map normal Super O spawn 'dpw-menu --type'
-riverctl map normal Super+Shift O spawn 'dpw-menu -t -o'
-riverctl map normal Super backslash spawn 'pm'
+riverctl map normal Super+Control P spawn "$bmenu_helper "'dpw-menu -o'
+riverctl map normal Super O spawn "$bmenu_helper "'dpw-menu --type'
+riverctl map normal Super+Shift O spawn "$bmenu_helper "'dpw-menu -t -o'
+riverctl map normal Super backslash spawn "$bmenu_helper "'pm'
# Only start these once...
diff --git a/waybar/theme.css b/waybar/style.css
index 0c789ca..b8571d3 100644
--- a/waybar/theme.css
+++ b/waybar/style.css
@@ -16,3 +16,5 @@
@define-color bright5 #d3869b;
@define-color bright6 #8ec07c;
@define-color bright7 #ebdbb2;
+
+@import url("base.css");
diff --git a/waylandrc b/waylandrc
index e2ac437..86b6a98 100755
--- a/waylandrc
+++ b/waylandrc
@@ -25,7 +25,7 @@ export SSH_ASKPASS=bemenu_askpass
export SSH_ASKPASS_REQUIRE=force
# export BEMENU_OPTS="--fn 'Curie 10' --tb '#3B4252' --tf '#8FBCBB' --cf '#E5E9F0' --nb '#2e3440' --ab '#3b4252' --nf '#e5e9f0' --af '#e5e9f0' --fb '#2e3440' --ff '#a3be8c' --hb '#2e3440' --hf '#a3be8c' "
-export BEMENU_OPTS="--fn 'IBM 3270 12' --tb '#3B4252' --tf '#8FBCBB' --cf '#E5E9F0' --nb '#2e3440' --ab '#3b4252' --nf '#e5e9f0' --af '#e5e9f0' --fb '#2e3440' --ff '#a3be8c' --hb '#2e3440' --hf '#a3be8c' "
+#export BEMENU_OPTS="--fn 'IBM 3270 12' --tb '#3B4252' --tf '#8FBCBB' --cf '#E5E9F0' --nb '#2e3440' --ab '#3b4252' --nf '#e5e9f0' --af '#e5e9f0' --fb '#2e3440' --ff '#a3be8c' --hb '#2e3440' --hf '#a3be8c' "
# Prevent other applications from grabbing the card, so annoying.
sh -c 'gpg --card-status &' &