migrated to waybar for river

This commit is contained in:
William Ball 2025-02-06 20:51:55 -08:00
parent da16936d07
commit 0aad7e4c50
Signed by: wball
GPG key ID: B8682D8137B70765
7 changed files with 211 additions and 10 deletions

View file

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
# Variables # Variables
term="foot" # term="foot"
term_client="footclient" # term_client="footclient"
term_float="foot --app-id=float -w 1120x700" # term_float="foot --app-id=float -w 1120x700"
term="kitty"
term_client="kitty"
term_float="kitty --app-id=float -w 1120x700"
browser="firefox" browser="firefox"
email="thunderbird" email="thunderbird"
emacs="emacsclient --create-frame --alternate-editor='emacs'" emacs="emacsclient --create-frame --alternate-editor='emacs'"
@ -13,8 +16,8 @@ wobsock=$XDG_RUNTIME_DIR/wob.sock
rm -f $wobsock && mkfifo $wobsock && tail -f $wobsock | wob & rm -f $wobsock && mkfifo $wobsock && tail -f $wobsock | wob &
# Launch things # Launch things
riverctl map normal $mod Return spawn footclient riverctl map normal $mod Return spawn $term_client
riverctl map normal $mod+Shift Return spawn foot riverctl map normal $mod+Shift Return spawn $term
riverctl map normal $mod Semicolon spawn fuzzel riverctl map normal $mod Semicolon spawn fuzzel
riverctl map normal $mod BracketRight spawn "$browser" riverctl map normal $mod BracketRight spawn "$browser"
riverctl map normal $mod T spawn "$email" riverctl map normal $mod T spawn "$email"
@ -116,6 +119,9 @@ do
riverctl map $mode $mod+Control+Shift J spawn "brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $wobsock" riverctl map $mode $mod+Control+Shift J spawn "brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $wobsock"
done done
# "caffeine"
riverctl map normal $mod+Control C spawn "$HOME/.config/river/toggle_caffeine.sh"
# colors # colors
riverctl background-color 0x1e1e2e riverctl background-color 0x1e1e2e
riverctl border-color-focused 0xf5c2e7 riverctl border-color-focused 0xf5c2e7
@ -146,7 +152,7 @@ scratch_tag=$((1 << 20))
riverctl map normal $mod Slash toggle-focused-tags $scratch_tag riverctl map normal $mod Slash toggle-focused-tags $scratch_tag
riverctl map normal $mod+Shift Slash set-view-tags $scratch_tag riverctl map normal $mod+Shift Slash set-view-tags $scratch_tag
riverctl map normal $mod+Control Slash toggle-view-tags $scratch_tag riverctl map normal $mod+Control Slash toggle-view-tags $scratch_tag
riverctl map normal $mod S spawn 'foot --app-id=float -w 1120x700' riverctl map normal $mod S spawn $term_float
riverctl rule-add -app-id float float riverctl rule-add -app-id float float
# SSD (so GTK apps show border) # SSD (so GTK apps show border)
@ -163,17 +169,20 @@ riverctl rule-add -app-id com.github.xournalpp.xournalpp ssd
# spawn stuff # spawn stuff
pgrep wbg || wbg ~/.config/wallpaper.png & pgrep wbg || wbg ~/.config/wallpaper.png &
# pgrep swaybg || swaybg --image ~/.config/wallpaper.png &
wlr-randr --output eDP-1 --scale 1.25 wlr-randr --output eDP-1 --scale 1.25
pgrep yambar || yambar & # pgrep yambar || yambar &
pgrep waybar || waybar &
# mako stuff # mako stuff
pgrep mako || mako & pgrep mako || mako &
riverctl map normal $mod D spawn 'makoctl dismiss' riverctl map normal $mod D spawn 'makoctl dismiss'
riverctl map normal $mod+Shift D spawn 'makoctl dismiss --all' riverctl map normal $mod+Shift D spawn 'makoctl dismiss --all'
# bluetooth
blueman-applet &
# foot server # foot server
foot --server & # TODO: figure out systemd service # foot --server & # TODO: figure out systemd service
# pianobar # pianobar
riverctl map normal $mod+Shift S spawn '~/.config/pianobar/change_station.sh' riverctl map normal $mod+Shift S spawn '~/.config/pianobar/change_station.sh'
@ -183,7 +192,7 @@ riverctl map normal $mod N spawn 'echo "n" > ~/.config/pianobar/ctl'
# swayidle # swayidle
pgrep swayidle || swayidle -w \ pgrep swayidle || swayidle -w \
timeout 300 'swaylock -f -c 000000' \ timeout 300 '$HOME/.config/river/timeout.sh' \
before-sleep 'swaylock -f -c 000000' & before-sleep 'swaylock -f -c 000000' &
# start rivertile # start rivertile

View file

@ -0,0 +1,91 @@
// -*- mode: json -*-
{
"layer": "top",
"position": "bottom",
"height" : 36,
"modules-left": [
"river/tags",
],
"modules-center": [
"clock",
],
"modules-right": [
"tray",
"pulseaudio",
"network",
"battery",
],
"river/tags": {
"format": "{icon}",
"format-icons": {
"1": " 1 ",
"2": " 2 ",
"3": " 3 ",
"4": " 4 ",
"5": " 5 ",
"6": " 6 ",
"7": " 7 ",
"8": " 8 ",
"9": " 9 ",
},
},
"clock": {
"format": "{:%H:%M %A, %B %d}",
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume:2}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE",
"format-icons": {
"headphones": "",
"default": [
"",
""
]
},
"scroll-step": 5,
"on-click": "pamixer -t",
"on-click-right": "pavucontrol"
},
"network": {
"interface": "wlan0",
"format": "{ifname}",
"format-wifi": "{essid} ({signalStrength}%)  ",
"format-ethernet": "{ipaddr}/{cidr} ",
"format-disconnected": "",
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%)  ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
},
"battery": {
"bat": "BAT0",
"interval": 60,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": [
"",
"",
"",
"",
""
]
},
"tray": {
"icon-size": 20
}
}

View file

@ -0,0 +1,64 @@
@import "mocha.css";
* {
font-size: 20px;
font-family: Iosevka Nerd Font;
border-radius: 0;
}
window#waybar {
background: rgba(30, 30, 40, 1);
color: @text;
}
#clock,
#pulseaudio,
#battery,
#tray {
background: transparent;
}
#language {
color: @yellow;
}
#tags button {
padding: 0 8px;
color: @text;
}
#tags button.focused {
color: @base;
background: @pink;
}
#tags button.occupied {
color: @text;
background: @surface1;
}
#tags button.occupied.focused {
color: @base;
background: @pink;
}
#pulseaudio {
color: @red;
}
#network {
color: @green;
}
#battery {
color: @blue;
}
#clock,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk {
padding: 0 10px;
}

View file

@ -0,0 +1,37 @@
/*
*
* Catppuccin Mocha palette
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;