diff options
| -rwxr-xr-x | arch.sh | 3 | ||||
| -rw-r--r-- | btop/btop.conf | 4 | ||||
| -rw-r--r-- | foot/foot.ini | 22 | ||||
| -rw-r--r-- | river/.gitignore | 1 | ||||
| -rwxr-xr-x | river/init | 38 | ||||
| -rwxr-xr-x | river/theme_helper | 43 | ||||
| -rw-r--r-- | waybar/base.css (renamed from waybar/style.css) | 24 | ||||
| -rw-r--r-- | waybar/config | 5 | ||||
| -rwxr-xr-x | waybar/custom/network | 2 | ||||
| -rw-r--r-- | waybar/style-dark.css | 20 | ||||
| -rw-r--r-- | waybar/style-light.css | 20 | ||||
| -rw-r--r-- | waybar/theme.css | 18 | ||||
| -rwxr-xr-x | waylandrc | 7 |
13 files changed, 174 insertions, 33 deletions
@@ -1,6 +1,7 @@ #!/bin/sh set -ex ./bldSession.sh +# GTK portal is for dark mode switching sudo pacman -S \ river \ foot \ @@ -15,4 +16,6 @@ sudo pacman -S \ slurp \ grim \ xdg-desktop-portal-wlr \ + xdg-desktop-portal-gtk \ + diff --git a/btop/btop.conf b/btop/btop.conf index d7e16e5..0c9bd91 100644 --- a/btop/btop.conf +++ b/btop/btop.conf @@ -2,10 +2,10 @@ #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" -color_theme = "/usr/share/btop/themes/gruvbox_dark_v2.theme" +color_theme = "TTY" #* If the theme set background should be shown, set to False if you want terminal background transparency. -theme_background = False +theme_background = True #* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. truecolor = True diff --git a/foot/foot.ini b/foot/foot.ini index 36d943d..e37bc7b 100644 --- a/foot/foot.ini +++ b/foot/foot.ini @@ -80,6 +80,28 @@ bright5=d3869b bright6=8ec07c bright7=ebdbb2 +# Gruvbox light +# -SIGUSR2 +[colors2] +background=fbf1c7 +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 + # Nord # [colors] # cursor = 282C34 d8dee9 diff --git a/river/.gitignore b/river/.gitignore index 6275a75..f211f8c 100644 --- a/river/.gitignore +++ b/river/.gitignore @@ -1 +1,2 @@ padding_conf +theme_conf @@ -1,5 +1,6 @@ #!/bin/sh +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" # This is the example configuration file for river. # # If you wish to edit this, you will probably want to copy it to @@ -13,8 +14,12 @@ # Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) # riverctl map normal Super+Shift Return spawn foot # riverctl map normal Super Return spawn alacritty -riverctl map normal Super Return spawn foot -riverctl map normal Super+Shift Return spawn 'foot -c "$HOME/.config/foot/light.ini"' +# riverctl map normal Super Return spawn foot + +foot --server & +riverctl map normal Super Return spawn footclient +riverctl map normal Super M spawn "${XDG_CONFIG_HOME}"/river/theme_helper +riverctl map normal Super+Shift b spawn footclient btop # Super+Q to close the focused view riverctl map normal Super+Shift Q close @@ -172,11 +177,11 @@ riverctl rule-add -app-id "bar" csd riverctl default-layout rivertile rivertile -view-padding 10 -outer-padding 0 & -riverctl map normal Super Equal spawn "$HOME/.config/river/padding_helper 0 25" -riverctl map normal Super Minus spawn "$HOME/.config/river/padding_helper 0 -25" +riverctl map normal Super Equal spawn "${XDG_CONFIG_HOME}/river/padding_helper 0 25" +riverctl map normal Super Minus spawn "${XDG_CONFIG_HOME}/river/padding_helper 0 -25" -riverctl map normal Super+Shift Equal spawn "$HOME/.config/river/padding_helper 10 0" -riverctl map normal Super+Shift Minus spawn "$HOME/.config/river/padding_helper -10 0" +riverctl map normal Super+Shift Equal spawn "${XDG_CONFIG_HOME}/river/padding_helper 10 0" +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 @@ -203,15 +208,23 @@ if ! pgrep waybar >/dev/null 2>&1 ; then waybar & fi -"$HOME"/.config/river/pointer +"${XDG_CONFIG_HOME}"/river/pointer if ! pgrep swaybg >/dev/null 2>&1 ; then - swaybg -i .wallpaper.jpg & + echo "" + # swaybg -i .wallpaper.jpg & fi # If Chromium dialogs aren't working these are suspect dbus-update-activation-environment --systemd WAYLAND_DISPLAY "XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP" systemctl --user restart xdg-desktop-portal +# I hate calling this directly but the systemd unit is bugged on arch at +# least, running it by hand appears to work just fine +_gtk_portal=/usr/lib/xdg-desktop-portal-gtk +if [ -x "$_gtk_portal" ] ; then + "$_gtk_portal" & +fi + riverctl rule-add -title '*Firefox*' ssd riverctl rule-add -app-id '*chromium*' ssd riverctl rule-add -title '*paypal*' float @@ -224,6 +237,9 @@ riverctl rule-add -app-id "*evolution*" tags $((1 << (8 - 1))) riverctl rule-add -app-id "*pavu*" ssd riverctl rule-add -app-id "*blueman*" ssd -. ~/.kshrc -checkSSHAgent -k -checkSSHAgent +if [ -e ~/.kshrc ] ; then + . ~/.kshrc + checkSSHAgent -k + checkSSHAgent +fi + diff --git a/river/theme_helper b/river/theme_helper new file mode 100755 index 0000000..398910d --- /dev/null +++ b/river/theme_helper @@ -0,0 +1,43 @@ +#!/bin/sh +set -ex +exec >/tmp/theme.log 2>&1 +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +conf="$XDG_CONFIG_HOME/river/theme_conf" + +gnomeSet() { + gsettings set org.gnome.desktop.interface color-scheme "$1" +} + +bgcolor_dark=0x282828 +bgcolor_light=0xfbf1c7 + +if ! [ -e "$conf" ] ; then +cat > "$conf" <<EOF +mode=light +EOF +fi + +. "$conf" + +case $mode in + light) + mode=dark + gnomeSet 'prefer-dark' + # Because GTK is an absolute disaster... + gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark + pkill -SIGUSR1 foot + riverctl background-color "$bgcolor_dark" + ;; + dark) + mode=light + gnomeSet 'prefer-light' + gsettings set org.gnome.desktop.interface gtk-theme Adwaita + pkill -SIGUSR2 foot + riverctl background-color "$bgcolor_light" + ;; +esac + +cat > "$conf" <<EOF +mode=$mode +EOF + diff --git a/waybar/style.css b/waybar/base.css index efff8ea..2ef85f0 100644 --- a/waybar/style.css +++ b/waybar/base.css @@ -1,5 +1,3 @@ -/* window.eDP-1 * { font-size: 18px; } */ - * { /* font-family: "curie"; */ font-family: "IBM 3270"; @@ -11,7 +9,7 @@ window#waybar { /* background: transparent; */ - background: #282828; + background: @background; } @@ -20,26 +18,26 @@ window#waybar.hidden { } #window { - color: #ebdbb2; + color: @foreground; } #tags { } #tags button { - color: #4c566a; + color: @regular2; background: transparent; } #tags button.occupied { transition: none; - color: #a3be8c; + color: @regular3; background: transparent; } #tags button.focused { - color: #81a1c1; - background: #4C566A; + color: @background; + background: @regular3; border-radius: inherit; } @@ -48,26 +46,26 @@ window#waybar.hidden { transition: none; box-shadow: inherit; text-shadow: inherit; - color: #81a1c1; + color: @bright2; } #temperature { background: transparent; - color: #81A1C1; + color: @bright1; } #pulseaudio { - color: #D08770; + color: @bright1; background: transparent; } #battery { - color: #A3BE8C; + color: @bright3; background: transparent; } .modules-right { - color: #8FBCBB; + color: @bright1; } #network, #cpuTemp, #battery, #pulseaudio, #date, #powerUsage { diff --git a/waybar/config b/waybar/config index e9543fc..204d601 100644 --- a/waybar/config +++ b/waybar/config @@ -50,11 +50,6 @@ "format-charging": "bat: {capacity}% charging", "format-plugged": "bat: {capacity}% AC" }, - "upower": { - "show-icon": false, - "native-path": "BAT0", - "format": "bat: {percentage} {time}" - }, "tray":{ "icon-size":18, "show-passive-items":true, diff --git a/waybar/custom/network b/waybar/custom/network index 1d5f226..47409bb 100755 --- a/waybar/custom/network +++ b/waybar/custom/network @@ -6,7 +6,7 @@ wireless_info() { "$_if" \ "$(nmcli c | awk "/$_if/"'{print $1}')" \ "$(ip -4 addr show dev "$_if" | awk '/inet /{print $2}')" \ - "$(awk "/^$_if/"'{print $4+0}' /proc/net/wireless)dbm" + "$(awk "/^$_if/"'{n=$4+0;if(n!=0){print $4+0}}' /proc/net/wireless)dbm" } eth_info() { diff --git a/waybar/style-dark.css b/waybar/style-dark.css new file mode 100644 index 0000000..b8571d3 --- /dev/null +++ b/waybar/style-dark.css @@ -0,0 +1,20 @@ +@define-color background #282828; +@define-color foreground #ebdbb2; +@define-color regular0 #282828; +@define-color regular1 #cc241d; +@define-color regular2 #98971a; +@define-color regular3 #d79921; +@define-color regular4 #458588; +@define-color regular5 #b16286; +@define-color regular6 #689d6a; +@define-color regular7 #a89984; +@define-color bright0 #928374; +@define-color bright1 #fb4934; +@define-color bright2 #b8bb26; +@define-color bright3 #fabd2f; +@define-color bright4 #83a598; +@define-color bright5 #d3869b; +@define-color bright6 #8ec07c; +@define-color bright7 #ebdbb2; + +@import url("base.css"); diff --git a/waybar/style-light.css b/waybar/style-light.css new file mode 100644 index 0000000..eff5379 --- /dev/null +++ b/waybar/style-light.css @@ -0,0 +1,20 @@ +@define-color background #fbf1c7; +@define-color foreground #3c3836; +@define-color regular0 #fbf1c7; +@define-color regular1 #cc241d; +@define-color regular2 #98971a; +@define-color regular3 #d79921; +@define-color regular4 #458588; +@define-color regular5 #b16286; +@define-color regular6 #689d6a; +@define-color regular7 #7c6f64; +@define-color bright0 #928374; +@define-color bright1 #9d0006; +@define-color bright2 #79740e; +@define-color bright3 #b57614; +@define-color bright4 #076678; +@define-color bright5 #8f3f71; +@define-color bright6 #427b58; +@define-color bright7 #3c3836; + +@import url("base.css"); diff --git a/waybar/theme.css b/waybar/theme.css new file mode 100644 index 0000000..0c789ca --- /dev/null +++ b/waybar/theme.css @@ -0,0 +1,18 @@ +@define-color background #282828; +@define-color foreground #ebdbb2; +@define-color regular0 #282828; +@define-color regular1 #cc241d; +@define-color regular2 #98971a; +@define-color regular3 #d79921; +@define-color regular4 #458588; +@define-color regular5 #b16286; +@define-color regular6 #689d6a; +@define-color regular7 #a89984; +@define-color bright0 #928374; +@define-color bright1 #fb4934; +@define-color bright2 #b8bb26; +@define-color bright3 #fabd2f; +@define-color bright4 #83a598; +@define-color bright5 #d3869b; +@define-color bright6 #8ec07c; +@define-color bright7 #ebdbb2; @@ -4,7 +4,12 @@ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # Firefox fix just in case export MOZ_ENABLE_WAYLAND=1 -export GTK_THEME=Adwaita:dark + +# We're going to be letting other programs +# swap about dark mode for us, but if you +# want to pin it to something, this is +# how +# export GTK_THEME=Adwaita:dark # If Chromium dialogs aren't working these are suspect # pacman -S xdg-desktop-portal-wlr |
