diff --git a/dot_config/gammastep/config.ini b/dot_config/gammastep/config.ini index 0acbfe7..4084cf1 100644 --- a/dot_config/gammastep/config.ini +++ b/dot_config/gammastep/config.ini @@ -32,7 +32,7 @@ fade=1 ;brightness-night=0.4 ; Set the screen gamma (for all colors, or each color channel ; individually) -;gamma=0.8 +gamma=0.9 ;gamma=0.8:0.7:0.8 ; This can also be set individually for day and night since ; version 1.10. diff --git a/dot_config/kanshi/config b/dot_config/kanshi/config index 1fdf91d..d271ffc 100644 --- a/dot_config/kanshi/config +++ b/dot_config/kanshi/config @@ -1,6 +1,8 @@ - profile dual { - #output * background ~/Pictures/Wallpapers/dark-forest-path.jpg scale output DP-1 mode 1920x1080@144.00Hz position 0,0 output DP-2 mode 1920x1080@60.00Hz position 1920,0 } + +profile laptop { + output eDP-1 mode 3840x2160@60Hz position 0,0 scale 2 + } diff --git a/dot_config/river/executable_init b/dot_config/river/executable_init.tmpl similarity index 69% rename from dot_config/river/executable_init rename to dot_config/river/executable_init.tmpl index 545b5e5..5eb5118 100644 --- a/dot_config/river/executable_init +++ b/dot_config/river/executable_init.tmpl @@ -114,20 +114,41 @@ riverctl map normal Super F11 enter-mode passthrough # Return to normal mode riverctl map passthrough Super F11 enter-mode normal +{{ if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) -}} + # Function/Media keys for mode in normal locked do - # Pipewire 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' + # Volume - # Backlight brightness - riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' - riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' + riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle' + 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 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 +{{- end }} # Set background and border riverctl background-color 0x323d43 @@ -138,6 +159,21 @@ riverctl border-width 1 # Keyboard repeat rate 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??? # 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 # riverctl rule-add csd -app-id "bar" -# Default layoout generator - rivertile(1) +# Default layout generator - rivertile(1) 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 /usr/lib/at-spi-bus-launcher --launch-immediately & @@ -165,11 +201,18 @@ gnome-keyring-daemon --start --components=secrets & gnome-keyring-daemon --start --components=ssh & pipewire-launcher & kanshi & -swayidle -w timeout 600 waylock -fork-on-lock -init-color 0x000000 & -swaybg -m fill -i $HOME/Pictures/Wallpapers/dark-forest-path.jpg & 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 & -waybar & +waybar-launcher & blueman-applet & evolution & mattermost-desktop & diff --git a/dot_config/waybar/config b/dot_config/waybar/config.tmpl similarity index 94% rename from dot_config/waybar/config rename to dot_config/waybar/config.tmpl index 243b40b..57186fd 100644 --- a/dot_config/waybar/config +++ b/dot_config/waybar/config.tmpl @@ -1,7 +1,12 @@ { - "layer": "top", +{{- if eq .chezmoi.hostname "hydrus"}} "output": "DP-1", "position": "bottom", +{{- else }} + "output": "eDP-1", + "position": "top", +{{- end }} + "layer": "top", "height": 24, // "width": 1280, "spacing": 4, @@ -42,8 +47,8 @@ }, "river/tags": { - "tag-labels": ["1", "2", "3", "4", "5"], - "num-tags": 5 + //"tag-labels": ["1", "2", "3", "4", "5"], + //"num-tags": 5 }, "idle_inhibitor": { diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css.tmpl similarity index 92% rename from dot_config/waybar/style.css rename to dot_config/waybar/style.css.tmpl index b29d69a..d656e3b 100644 --- a/dot_config/waybar/style.css +++ b/dot_config/waybar/style.css.tmpl @@ -5,8 +5,12 @@ } window#waybar { - background-color: rgba(50, 61, 67, 0.8); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); + background-color: rgba(50, 61, 67, 0.85); +{{- 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; transition-property: background-color; transition-duration: 0.5s; @@ -162,11 +166,11 @@ label:focus { } #network { - background-color: #7fbbb3; + background-color: #83c092; } #network.disconnected { - background-color: #f53c3c; + background-color: #e68183; } #pulseaudio { @@ -175,8 +179,8 @@ label:focus { } #pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; + background-color: #dbbc7f; + color: #4a555b; } #wireplumber { diff --git a/dot_config/wleave/layout b/dot_config/wleave/layout index de32af4..922b5a4 100644 --- a/dot_config/wleave/layout +++ b/dot_config/wleave/layout @@ -1,6 +1,6 @@ { "label" : "lock", - "action" : "waylock", + "action" : "waylock -fork-on-lock -init-color 0x000000", "text" : "Lock", "keybind" : "l" } diff --git a/dot_local/bin/executable_swayidle-laptop b/dot_local/bin/executable_swayidle-laptop new file mode 100644 index 0000000..331b096 --- /dev/null +++ b/dot_local/bin/executable_swayidle-laptop @@ -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 + diff --git a/dot_local/bin/executable_toggle-wifi b/dot_local/bin/executable_toggle-wifi index b833313..e61ef19 100644 --- a/dot_local/bin/executable_toggle-wifi +++ b/dot_local/bin/executable_toggle-wifi @@ -1,9 +1,8 @@ #!/bin/sh -## A simple script to turn wifi on/off -if [ $(nmcli radio wifi | awk '/led/ {print}') = 'enabled' ] ; then - nmcli radio wifi off +if [ $(connmanctl state | awk '/State/ {print $NF}') == 'online' ]; then + connmanctl disable wifi else - nmcli radio wifi on + connmanctl enable wifi fi diff --git a/dot_local/bin/executable_waybar-launcher b/dot_local/bin/executable_waybar-launcher new file mode 100644 index 0000000..4f57801 --- /dev/null +++ b/dot_local/bin/executable_waybar-launcher @@ -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 +