Initial updating/templating for laptop

This commit is contained in:
Andrew Scott 2023-06-16 00:44:03 -04:00
parent bbc71a84c4
commit f30a6d1cad
Signed by: a
GPG key ID: 7CD5A5977E4931C1
9 changed files with 114 additions and 29 deletions

View file

@ -32,7 +32,7 @@ fade=1
;brightness-night=0.4 ;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel ; Set the screen gamma (for all colors, or each color channel
; individually) ; individually)
;gamma=0.8 gamma=0.9
;gamma=0.8:0.7:0.8 ;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since ; This can also be set individually for day and night since
; version 1.10. ; version 1.10.

View file

@ -1,6 +1,8 @@
profile dual { profile dual {
#output * background ~/Pictures/Wallpapers/dark-forest-path.jpg scale
output DP-1 mode 1920x1080@144.00Hz position 0,0 output DP-1 mode 1920x1080@144.00Hz position 0,0
output DP-2 mode 1920x1080@60.00Hz position 1920,0 output DP-2 mode 1920x1080@60.00Hz position 1920,0
} }
profile laptop {
output eDP-1 mode 3840x2160@60Hz position 0,0 scale 2
}

View file

@ -114,20 +114,41 @@ riverctl map normal Super F11 enter-mode passthrough
# Return to normal mode # Return to normal mode
riverctl map passthrough Super F11 enter-mode normal riverctl map passthrough Super F11 enter-mode normal
{{ if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) -}}
# Function/Media keys # Function/Media keys
for mode in normal locked for mode in normal locked
do do
# Pipewire volume # Volume
riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%'
riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%'
riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
# Backlight brightness riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%'
riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%'
riverctl map $mode None XF86AudioMicMute spawn 'pactl set-source-mute @DEFAULT_SOURCE@ toggle'
# Backlight
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
# Display
#riverctl map $mode None XF86Display spawn ''
# WiFi
riverctl map $mode None XF86WLAN spawn 'toggle-wifi'
# Notifications
#riverctl map $mode None XF86NotificationCenter spawn ''
# Phone
#riverctl map $mode None XF86PickupPhone spawn ''
#riverctl map $mode None XF86HangupPhone spawn ''
# Favorites
#riverctl map $mode None XF86Favorites spawn ''
done done
{{- end }}
# Set background and border # Set background and border
riverctl background-color 0x323d43 riverctl background-color 0x323d43
@ -138,6 +159,21 @@ riverctl border-width 1
# Keyboard repeat rate # Keyboard repeat rate
riverctl set-repeat 50 300 riverctl set-repeat 50 300
{{- if eq .chezmoi.hostname "helix" }}
# Touchpad
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad accel-profile adaptive
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad pointer-accel .5
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad disable-while-typing enabled
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad tap enabled
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad tap-button-map left-right-middle
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad scroll-method two-finger
# Lid switch
riverctl map-switch normal lid close "waylock -fork-on-lock -init-color 0x000000"
{{- end }}
### "rule-add" not implemented yet??? ### "rule-add" not implemented yet???
# Make all views with an app-id that starts with "float" and title "foo" start floating. # Make all views with an app-id that starts with "float" and title "foo" start floating.
@ -153,9 +189,9 @@ riverctl set-repeat 50 300
# Make all views with app-id "bar" and any title use client-side decorations # Make all views with app-id "bar" and any title use client-side decorations
# riverctl rule-add csd -app-id "bar" # riverctl rule-add csd -app-id "bar"
# Default layoout generator - rivertile(1) # Default layout generator - rivertile(1)
riverctl default-layout rivertile riverctl default-layout rivertile
rivertile -view-padding 6 -outer-padding 6 -main-ratio .5 & rivertile -view-padding 4 -outer-padding 4 -main-ratio .5 &
# Autostart # Autostart
/usr/lib/at-spi-bus-launcher --launch-immediately & /usr/lib/at-spi-bus-launcher --launch-immediately &
@ -165,11 +201,18 @@ gnome-keyring-daemon --start --components=secrets &
gnome-keyring-daemon --start --components=ssh & gnome-keyring-daemon --start --components=ssh &
pipewire-launcher & pipewire-launcher &
kanshi & kanshi &
swayidle -w timeout 600 waylock -fork-on-lock -init-color 0x000000 &
swaybg -m fill -i $HOME/Pictures/Wallpapers/dark-forest-path.jpg &
dunst & dunst &
{{- if eq .chezmoi.hostname "hydrus" }}
swaybg -m fill -i $HOME/Pictures/Wallpapers/dark-forest-path.jpg &
swayidle -w timeout 600 "waylock -fork-on-lock -init-color 0x000000" &
{{- else if eq .chezmoi.hostname "helix" }}
swaybg -m center -i "$HOME/Pictures/Wallpapers/Mountain Retreat.jpg" &
swayidle-laptop &
{{- else }}
swayidle -w timeout 600 "waylock -fork-on-lock -init-color 0x000000" &
{{- end }}
gammastep -r & gammastep -r &
waybar & waybar-launcher &
blueman-applet & blueman-applet &
evolution & evolution &
mattermost-desktop & mattermost-desktop &

View file

@ -1,7 +1,12 @@
{ {
"layer": "top", {{- if eq .chezmoi.hostname "hydrus"}}
"output": "DP-1", "output": "DP-1",
"position": "bottom", "position": "bottom",
{{- else }}
"output": "eDP-1",
"position": "top",
{{- end }}
"layer": "top",
"height": 24, "height": 24,
// "width": 1280, // "width": 1280,
"spacing": 4, "spacing": 4,
@ -42,8 +47,8 @@
}, },
"river/tags": { "river/tags": {
"tag-labels": ["1", "2", "3", "4", "5"], //"tag-labels": ["1", "2", "3", "4", "5"],
"num-tags": 5 //"num-tags": 5
}, },
"idle_inhibitor": { "idle_inhibitor": {

View file

@ -5,8 +5,12 @@
} }
window#waybar { window#waybar {
background-color: rgba(50, 61, 67, 0.8); background-color: rgba(50, 61, 67, 0.85);
border-bottom: 3px solid rgba(100, 114, 125, 0.5); {{- if eq .chezmoi.hostname "hydrus"}}
border-bottom: 3px solid rgba(208, 191, 155, 0.7);
{{- else }}
border-top: 3px solid rgba(208, 191, 155, 0.7);
{{- end }}
color: #d0bf9b; color: #d0bf9b;
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
@ -162,11 +166,11 @@ label:focus {
} }
#network { #network {
background-color: #7fbbb3; background-color: #83c092;
} }
#network.disconnected { #network.disconnected {
background-color: #f53c3c; background-color: #e68183;
} }
#pulseaudio { #pulseaudio {
@ -175,8 +179,8 @@ label:focus {
} }
#pulseaudio.muted { #pulseaudio.muted {
background-color: #90b1b1; background-color: #dbbc7f;
color: #2a5c45; color: #4a555b;
} }
#wireplumber { #wireplumber {

View file

@ -1,6 +1,6 @@
{ {
"label" : "lock", "label" : "lock",
"action" : "waylock", "action" : "waylock -fork-on-lock -init-color 0x000000",
"text" : "Lock", "text" : "Lock",
"keybind" : "l" "keybind" : "l"
} }

View file

@ -0,0 +1,17 @@
#!/bin/bash
# dim screen after 2 minutes, turn screen off after 10, suspend after an hour
echo "---" | tee -a /tmp/swayidle-dim.log
swayidle -w \
timeout 120 "light -O && light -S .1" \
resume "light -I" \
2>&1 | tee -a /tmp/swayidle-dim.log & disown
echo "---" | tee -a /tmp/swayidle.log
swayidle -w \
timeout 600 "wlr-randr --output eDP-1 --off" \
timeout 3600 "loginctl suspend" \
resume "wlr-randr --output eDP-1 --on" \
before-sleep "if ![[ pgrep -x waylock ]]; then waylock -fork-on-lock -init-color 0x000000; fi" \
2>&1 | tee -a /tmp/swayidle.log & disown

View file

@ -1,9 +1,8 @@
#!/bin/sh #!/bin/sh
## A simple script to turn wifi on/off
if [ $(nmcli radio wifi | awk '/led/ {print}') = 'enabled' ] ; then if [ $(connmanctl state | awk '/State/ {print $NF}') == 'online' ]; then
nmcli radio wifi off connmanctl disable wifi
else else
nmcli radio wifi on connmanctl enable wifi
fi fi

View file

@ -0,0 +1,15 @@
#!/bin/bash
# Terminate already running bar instances
killall -q waybar
# Wait until the processes have been shut down
while pgrep -u $UID -x waybar >/dev/null; do sleep 1; done
# Make sure pipewire-pulse is running or module won't load
until pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
# Launch Waybar
echo "---" | tee -a /tmp/waybar.log
waybar 2>&1 | tee -a /tmp/waybar.log & disown