diff options
Diffstat (limited to 'desktop-wayland')
| -rw-r--r-- | desktop-wayland/.config/environment.d/path.conf | 1 | ||||
| -rwxr-xr-x | desktop-wayland/.config/river/init | 95 | ||||
| -rw-r--r-- | desktop-wayland/.config/waybar/config.jsonc | 152 | ||||
| -rw-r--r-- | desktop-wayland/.config/waybar/gruvbox.css | 23 | ||||
| -rw-r--r-- | desktop-wayland/.config/waybar/style.css | 132 | ||||
| -rwxr-xr-x | desktop-wayland/.local/bin/screenlock-wayland | 19 |
6 files changed, 422 insertions, 0 deletions
diff --git a/desktop-wayland/.config/environment.d/path.conf b/desktop-wayland/.config/environment.d/path.conf new file mode 100644 index 0000000..9cb7e8f --- /dev/null +++ b/desktop-wayland/.config/environment.d/path.conf @@ -0,0 +1 @@ +PATH=$HOME/.local/bin:$PATH diff --git a/desktop-wayland/.config/river/init b/desktop-wayland/.config/river/init new file mode 100755 index 0000000..f0d9b9d --- /dev/null +++ b/desktop-wayland/.config/river/init @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------------------------- +# Key bindings + +# Workspaces +for i in $(seq 1 10); do + tags=$((1 << ($i - 1))) + n=$(($i % 10)) + riverctl map normal Super $n set-focused-tags $tags + riverctl map normal Super+Shift $n set-view-tags $tags + riverctl map normal Super+Control $n toggle-focused-tags $tags + riverctl map normal Super+Shift+Control $n toggle-view-tags $tags +done + +# Terminal +riverctl map normal Super Return spawn st +riverctl map normal Super+Shift Return spawn "st -e tmux" +riverctl map normal Super+Control Return spawn "st -z 24 -c Floating" +riverctl map normal Super+Shift+Control Return spawn "st -z 30" + +# Notifications +# Redisplay last message(s). +riverctl map normal Control grave dunstctl history-pop +# Close notification. +riverctl map normal Control+Shift grave dunstctl close +# Close all notifications. +riverctl map normal Control+Shift+Alt grave dunstctl close-all +# Context menu. +riverctl map normal Control+Shift period dunstctl context + +# Launcher +riverctl map normal Super Space spawn 'rofi -show drun -window-thumbnail -window-format "{w} {t}"' +riverctl map normal Super P spawn "rofi-pass --last-used -lines 12" +riverctl map normal Super Q spawn \ + "rofi -show session-menu -modi 'session-menu:rofi-power-menu --choices=shutdown/reboot/logout/lockscreen'" + +# Views (windows) +riverctl map normal Super F toggle-fullscreen +riverctl map normal Super S toggle-float +riverctl map normal Super T zoom + +# Move between views +riverctl map normal Super H focus-view previous +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous +riverctl map normal Super L focus-view next + +# 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+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 + +# Screen +riverctl map normal Super Escape spawn screenlock-wayland + +# Applications +riverctl map normal Super N spawn nautilus +riverctl map normal Super O spawn epiphany +riverctl map normal Super+Control P spawn epiphany --incognito-mode + + +# ------------------------------------------------------------------------------------------------- +# Settings + +riverctl keyboard-layout -rules evdev -model evdev -variant altgr-intl -options caps:escape us +riverctl focus-follows-cursor normal +riverctl output-layout rivertile +riverctl border-color-focused 0xfdf070 +riverctl border-color-unfocused 0x345985 + +# ------------------------------------------------------------------------------------------------- +# Rules + +riverctl rule-add -app-id "Floating" float + +# ------------------------------------------------------------------------------------------------- +# Processes + +riverctl spawn dunst +riverctl spawn waybar +riverctl spawn nm-applet +riverctl spawn "rivertile -view-padding 2 -outer-padding 1 -main-ratio 0.5" +riverctl spawn "swaybg -i /usr/local/share/backgrounds/dore-christ-leaving-the-praetorium.jpg" +riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river" +riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river" +riverctl spawn "swayidle -w timeout 300 screenlock-wayland \ + timeout 400 'wlr-randr --output eDP-1 --off' \ + resume 'wlr-randr --output eDP-1 --on' \ + before-sleep screenlock-wayland" diff --git a/desktop-wayland/.config/waybar/config.jsonc b/desktop-wayland/.config/waybar/config.jsonc new file mode 100644 index 0000000..d3005a9 --- /dev/null +++ b/desktop-wayland/.config/waybar/config.jsonc @@ -0,0 +1,152 @@ +{ + "layer": "top", + "position": "top", + "height": 18, + "modules-left": [ + "river/tags" + ], + "modules-center": ["river/window"], + "modules-right": [ + "cpu", + "temperature", + "memory", + "disk", + "network#vpn", + "network", + "clock", + "battery", + "group/group-power", + "tray" + ], + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "●", + "deactivated": "◌" + } + }, + + "river/tags": { + "num-tags": 10, + "tag-labels": ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"] + }, + + "cpu": { + "interval": 1, + "format": " {icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13} {usage:>2}%", + "format-icons": [ + "<span color='#69ff94'>▁</span>", // green + "<span color='#2aa9ff'>▂</span>", // blue + "<span color='#f8f8f2'>▃</span>", // white + "<span color='#f8f8f2'>▄</span>", // white + "<span color='#ffffa5'>▅</span>", // yellow + "<span color='#ffffa5'>▆</span>", // yellow + "<span color='#ff9977'>▇</span>", // orange + "<span color='#dd532e'>█</span>" // red + ] + }, + + "temperature": { + "critical-threshold": 80, + "format-critical": " {temperatureC}°C", + "format": " {temperatureC}°C" + }, + + "memory": { + "interval": 30, + "format": " {}%", + "tooltip-format": "{used:0.1f}G / {total:0.1f}G" + }, + + "disk": { + "interval": 30, + "format": " / {}%", + "path": "/" + }, + + "disk#external": { + "interval": 30, + "format": " / {}%", + "path": "/" + }, + + "battery": { + "design-capacity": true, + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""] + }, + + "network": { + "format-wifi": " {signalStrength}%", + "tooltip-format-wifi": "{essid}", + "format-ethernet": "🖧 ↓{bandwidthDownBytes} ↑{bandwidthUpBytes}", + "tooltip-format-ethernet": "{ifname}", + "format-disconnected": "⚠ Disconnected" + }, + + "network#vpn": { + "interface": "tun0", + "format": "", + "format-disconnected": "", + "tooltip-format": "{ipaddr}", + "max-length": 50 + }, + + "pulseaudio": { + "scroll-step": 1, + "format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": " ", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + + "clock": { + "interval": 60, + "format": " {:%a %b %d, %H:%M (%Z)}", + "tooltip-format": "<tt><small>{calendar}</small></tt>", + "timezones": [ + "America/Recife", + "America/Austin", + "America/Vancouver", + "Pacific/Auckland", + "Etc/UTC" + ], + "calendar": { + "mode" : "month", + "weeks-pos" : "right", + "on-scroll" : 1, + "on-click-right": "mode", + "format": { + "months": "<span color='#ffead3'><b>{}</b></span>", + "days": "<span color='#ecc6d9'><b>{}</b></span>", + "weeks": "<span color='#99ffdd'><b>W{}</b></span>", + "weekdays": "<span color='#ffcc66'><b>{}</b></span>", + "today": "<span color='#ff6699'><b><u>{}</u></b></span>" + } + }, + "actions": { + "on-click": "tz_up", + "on-click-right": "tz_down", + "on-click-middle": "mode" + } + }, + + "tray": { + "icon-size": 21, + "spacing": 10 + } +} diff --git a/desktop-wayland/.config/waybar/gruvbox.css b/desktop-wayland/.config/waybar/gruvbox.css new file mode 100644 index 0000000..28a9d8a --- /dev/null +++ b/desktop-wayland/.config/waybar/gruvbox.css @@ -0,0 +1,23 @@ +@define-color background #282828; +@define-color foreground #ebdbb2; +@define-color black #282828; +@define-color red #cc241d; +@define-color green #98971a; +@define-color yellow #d79921; +@define-color blue #458588; +@define-color magenta #b16286; +@define-color cyan #689d6a; +@define-color white #a89984; +@define-color aqua #689d6a; +@define-color orange #d65d0e; + +@define-color magenta_b #d3869b; +@define-color cyan_b #8ec07c; +@define-color yellow_b #fabd2f; +@define-color white_b #ebdbb2; +@define-color black_b #928374; +@define-color red_b #fb4934; +@define-color green_b #b8bb26; +@define-color blue_b #83a598; +@define-color aqua_b #8ec07c; +@define-color orange_b #fe8010; diff --git a/desktop-wayland/.config/waybar/style.css b/desktop-wayland/.config/waybar/style.css new file mode 100644 index 0000000..eb1ef62 --- /dev/null +++ b/desktop-wayland/.config/waybar/style.css @@ -0,0 +1,132 @@ +* { + border: none; + border-radius: 6px; + font-family: mononoki Nerd Font Mono; + font-size: 14px; + min-height: 0; +} + +@import "gruvbox.css"; + +window#waybar { + background: rgba(40, 40, 40, 1); + color: @white_b; +} + +#tags button { + border-radius: 0; + padding: 2px 8px; + background: transparent; + border-bottom: 1px solid transparent; +} + +#tags button.occupied { + background: rgba(255, 255, 255, 0.2); + border-bottom: 1px solid transparent; +} + +#tags button.focused { + color: #f6af2b; + background: #625233; + border-bottom: 1px solid #f6af2b; +} + +#tags button:hover { + background: rgba(0, 0, 0, 0.2); + box-shadow: inherit; + /*border-bottom: 1px solid @fg-color;*/ + border-bottom: 1px solid #f6af2b; +} + +#mode, #clock, #battery { + padding: 0 10px; + margin: 0 5px; +} + +#mode { + background: @red; + /* border-bottom: 3px solid @white_b; */ +} + +#cpu { + background: @black; +} + +#temperature { + background: @yellow; +} + +#temperature .value { + color: @red; +} + +#memory { + background: @orange; +} + +#network { + background: @green_b; + color: @black; +} + +#network.vpn { + background: @green; + margin: 0 0 0 3px; +} + +#disk { + background: @blue; +} + +#clock { + background-color: @aqua_b; + color: @black; +} + +#battery { + background-color: @white_b; + color: @background; +} + +#battery.discharging { + color: @white_b; + background-color: @red_b; +} + +#battery.charging { + color: @black; + background-color: @yellow_b; +} + +@keyframes blink { + to { + background-color: @white_b; + color: @background; + } +} + +#idle_inhibitor, +#pulseaudio, +#custom-openvpn, +#network, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#battery, +#clock, +#tray { + padding: 0 6px; + margin: 0 3px; +} + +#battery.warning:not(.charging) { + background: @red; + color: @white_b; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} diff --git a/desktop-wayland/.local/bin/screenlock-wayland b/desktop-wayland/.local/bin/screenlock-wayland new file mode 100755 index 0000000..f722e0f --- /dev/null +++ b/desktop-wayland/.local/bin/screenlock-wayland @@ -0,0 +1,19 @@ +#!/bin/env bash + +BACKGROUND_DIR=/usr/local/share/backgrounds +IMAGES=( + bag-end.jpg + book-of-kells.jpg + gandalf-1.jpg + in-hoc-signo-vinces-fire.png + mount-st-michel.jpg + odysseus-and-the-sirens-by-waterhouse.jpg + saint-michael.png +) +IMAGE=$(printf "%s\n" "${IMAGES[@]}" | shuf -n 1) + +swaylock --indicator-radius 200 \ + --indicator-thickness 30 \ + --show-failed-attempts \ + --daemonize \ + --image $BACKGROUND_DIR/$IMAGE |
