Commit 0b4a68be authored by Tim van Deurzen's avatar Tim van Deurzen

Add river configuration and waybar / waydisplay.

parent 9ce82f85
......@@ -79,7 +79,7 @@ label = %percentage_used:2%%
[module/wlan]
type = internal/network
interface = wlp61s0
interface = wlan0
interval = 5.0
format-connected = <ramp-signal> <label-connected>
......
#!/bin/sh
# This is the example configuration file for river.
#
# If you wish to edit this, you will probably want to copy it to
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
#
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
dbus-update-activation-environment SEATD_SOCK DISPLAY MOZ_ENABLE_WAYLAND XDG_DEFAULT_LAYOUT WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
riverctl map normal Alt+Shift Return spawn wezterm
riverctl map normal Alt P spawn "wofi --show drun"
# Super+Q to close the focused view
riverctl map normal Alt+Shift Q exit
riverctl map normal Alt+Shift C close
# Super+J and Super+K to focus the next/previous view in the layout stack
riverctl map normal Alt N focus-view next
riverctl map normal Alt E focus-view previous
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
# view in the layout stack
riverctl map normal Alt+Shift N swap next
riverctl map normal Alt+Shift E swap previous
# Super+Period and Super+Comma to focus the next/previous output
riverctl map normal Alt H focus-output left
riverctl map normal Alt I focus-output right
# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
riverctl map normal Alt+Shift H send-to-output left
riverctl map normal Alt+Shift I send-to-output right
# Super+Return to bump the focused view to the top of the layout stack
riverctl map normal Alt Return zoom
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
riverctl map normal Alt L send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Alt U send-layout-cmd rivertile "main-ratio +0.05"
# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
riverctl map normal Alt+Shift L send-layout-cmd rivertile "main-count +1"
riverctl map normal Alt+Shift U send-layout-cmd rivertile "main-count -1"
# Super+Alt+{H,J,K,L} to move views
riverctl map normal Super+Alt H move left 100
riverctl map normal Super+Alt J move down 100
riverctl map normal Super+Alt K move up 100
riverctl map normal Super+Alt L move right 100
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
riverctl map normal Super+Alt+Control H snap left
riverctl map normal Super+Alt+Control J snap down
riverctl map normal Super+Alt+Control K snap up
riverctl map normal Super+Alt+Control L snap right
# Super+Alt+Shift+{H,J,K,L} to resize views
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
# Super + Left Mouse Button to move views
riverctl map-pointer normal Super BTN_LEFT move-view
# Super + Right Mouse Button to resize views
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Super + Middle Mouse Button to toggle float
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Alt $i set-focused-tags $tags
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Alt+Shift $i set-view-tags $tags
# Super+Ctrl+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Shift $i toggle-focused-tags $tags
# Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags
# Super+Space to toggle float
riverctl map normal Alt T toggle-float
# Super+F to toggle fullscreen
riverctl map normal Alt F toggle-fullscreen
# Super+{Up,Right,Down,Left} to change layout orientation
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Super+F11 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'brillo -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'brillo -U 5'
done
# Set background and border color
riverctl background-color 0x002b36
riverctl border-color-focused 0x93a1a1
riverctl border-color-unfocused 0x586e75
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make certain views start floating
riverctl float-filter-add app-id float
riverctl float-filter-add title "rofi - drun"
# Set app-ids and titles of views which should use client side decorations
# riverctl csd-filter-add app-id "gedit"
# Set the default layout generator to be rivertile and start it.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivertile
rivertile -view-padding 1 -outer-padding 1 &
way-displays &
waybar &
~/.azotebg
# Default cfg.yaml for way-displays.
# Copy this to ~/.config/way-displays/cfg.yaml and edit it to your liking.
#
# See https://github.com/alex-courtis/way-displays/blob/master/doc/CONFIGURATION.md
# Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom)
ARRANGE: ROW
# Align ROWs at the TOP (default), MIDDLE or BOTTOM
# Align COLUMNs at the LEFT (default), MIDDLE or RIGHT
ALIGN: TOP
# The default ORDER is simply the order in which the displays are discovered.
# Define your own.
ORDER:
- 'eDP-1'
- 'DP-1'
- 'HDMI-1'
# The default is to scale each display by DPI.
# This may be disabled and scale 1 will be used, unless a SCALE has been specified.
AUTO_SCALE: FALSE
# Auto scale may be overridden for each display.
SCALE:
- NAME_DESC: 'eDP-1'
SCALE: 1.5
- NAME_DESC: 'DP-1'
SCALE: 1.3
# Override the preferred mode.
# WARNING: this may result in an unusable display. See https://github.com/alex-courtis/way-displays#known-issues-with-workarounds
# for a possible workaround.
MODE:
# Resolution and refresh
#- NAME_DESC: HDMI-A-1
# WIDTH: 1920
# HEIGHT: 1080
# HZ: 60
# Resolution with highest refresh
#- NAME_DESC: 'monitor description'
# WIDTH: 2560
# HEIGHT: 1440
# Highest available
#- NAME_DESC: DP-2
# MAX: TRUE
# Laptop displays usually start with eDP e.g. eDP-1. This may be overridden if
# your laptop is different.
#LAPTOP_DISPLAY_PREFIX: 'eDP'
# One of: ERROR, WARNING, INFO (default), DEBUG
LOG_THRESHOLD: INFO
# Disable the specified displays.
DISABLED:
#- "eDP-1"
{
"position": "bottom",
"gtk-layer-shell": false,
"output": "eDP-1",
"mode": "dock",
"height": 30,
"modules-left": ["river/tags", "river/window"],
"modules-center": ["tray"],
"modules-right": ["pulseaudio", "backlight", "network", "battery", "cpu", "clock"],
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %H:%M}",
"on-click": "galendae -c $HOME/.config/galendae/galendae.conf"
},
"cpu": {
"format": "{usage}% "
},
"backlight": {
"format": "{percent}% {icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"on-scroll-up": "brillo -A 5",
"on-scroll-down": "brillo -U 5"
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"pulseaudio": {
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"network": {
"format": "{ifname}",
"format-wifi": "Connected ",
"format-ethernet": "{ipaddr}/{cidr} ",
"format-disconnected": "Disconnected 睊", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
},
}
* {
border: none;
border-radius: 0;
font-family: RobotoMono Nerd Font;
font-size: 12px;
font-weight: 500;
}
window#waybar {
background-color: #282828;
color: #82AAFF;
transition-property: background-color;
transition-duration: 0.5s;
border-bottom: solid 0px #3c3836;
}
window#waybar.hidden {
opacity: 0.2;
}
#tags button {
color: #546E7A;
border-radius: 5px;
margin: 0px;
padding: 0px 5px;
}
#tags button.occupied {
color: #A6ACCD;
}
#tags button.focused {
color: #192227;
background-color: #82AAFF;
}
widget > * {
margin-top: 2px;
margin-bottom: 2px;
}
.modules-left > widget > * {
margin-left: 12px;
margin-right: 12px;
}
.modules-left > widget:first-child > * {
margin-left: 6px;
}
.modules-left > widget:last-child > * {
margin-right: 18px;
}
.modules-right > widget > * {
padding: 0 6px;
padding-left: 10px;
padding-right: 10px;
margin-left: 0;
margin-right: 0;
color: #282828;
background-color: #82AAFF;
}
.modules-right > widget:first-child > * {
border-radius: 5px 0 0 5px;
}
.modules-right > widget:last-child > * {
border-radius: 0 5px 5px 0;
margin-right: 6px;
}
#mode {
background: transparent;
color: #fb4934;
}
@keyframes blink {
to {
color: #ebdbb2;
}
}
#battery.critical:not(.charging) {
animation-name: blink;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #282828;
}
tooltip {
border-radius: 5px;
background: #504945;
}
tooltip label {
color: #ebdbb2;
}
......@@ -5,7 +5,11 @@ return {
color_scheme = "DoomOne",
--color_scheme = "Gruvbox (Gogh)",
font = wezterm.font 'Fira Code',
font = wezterm.font_with_fallback {
'Fira Code',
'JetBrains Mono'
},
font_size = 9.0,
hide_tab_bar_if_only_one_tab = true,
......@@ -17,6 +21,8 @@ return {
bottom = 1,
},
enable_wayland = true,
window_frame = {
-- The font used in the tab bar.
-- Roboto Bold is the default; this font is bundled
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment