From 85c91b7249e03b03ed913e7070861cea3734cb57 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Thu, 27 Nov 2025 10:05:38 -0500 Subject: Add a default style for waybar when the gtk portal isn't running. Bemenu helper for live light/dark switching --- river/_bemenu_dark.sh | 19 +++++++++++++++++++ river/_bemenu_light.sh | 20 ++++++++++++++++++++ river/bemenu_helper | 24 ++++++++++++++++++++++++ river/init | 11 ++++++----- 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 river/_bemenu_dark.sh create mode 100644 river/_bemenu_light.sh create mode 100755 river/bemenu_helper (limited to 'river') 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... -- cgit v1.2.3