diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index f120194..1c61d5c 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -39,7 +39,7 @@ family = "Fira Code" [window] dynamic_padding = true -opacity = 1 +opacity = 0.95 decorations_theme_variant = "Dark" [window.dimensions] diff --git a/bash/.bashrc b/bash/.bashrc index 6e64c8a..7f926a0 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -162,7 +162,7 @@ export PATH="$PATH:~/.local/bin" export PASSWORD_STORE_ENABLE_EXTENSIONS=true # Use gpg-agent-ssh -export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh +export SSH_AUTH_SOCK=/run/user/$(id -u)/gnupg/S.gpg-agent.ssh # Miscellaneous utilities function clamp_filename() { diff --git a/desktop-base/.config/kdeglobals b/desktop-base/.config/kdeglobals index d7d9da8..8ce325e 100644 --- a/desktop-base/.config/kdeglobals +++ b/desktop-base/.config/kdeglobals @@ -97,7 +97,7 @@ Name=Gruvbox shadeSortColumn=true [Icons] -Theme=gruvbox-dark-icons-gtk +Theme=Gruvbox-Dark [KDE] contrast=4 diff --git a/desktop-base/.config/nwg-bar/bar.json b/desktop-base/.config/nwg-bar/bar.json index 6c456e7..b5438c8 100644 --- a/desktop-base/.config/nwg-bar/bar.json +++ b/desktop-base/.config/nwg-bar/bar.json @@ -1,22 +1,12 @@ [ - { - "label": "Lock", - "exec": "swaylock -f -c 000000", - "icon": "/usr/share/nwg-bar/images/system-lock-screen.svg" - }, { "label": "Logout", "exec": "swaymsg exit", "icon": "/usr/share/nwg-bar/images/system-log-out.svg" }, - { - "label": "Reboot", - "exec": "systemctl reboot", - "icon": "/usr/share/nwg-bar/images/system-reboot.svg" - }, { "label": "Shutdown", "exec": "systemctl -i poweroff", "icon": "/usr/share/nwg-bar/images/system-shutdown.svg" } -] \ No newline at end of file +] diff --git a/desktop-base/.config/waybar/config b/desktop-base/.config/waybar/config index 592b12d..1b36cfa 100644 --- a/desktop-base/.config/waybar/config +++ b/desktop-base/.config/waybar/config @@ -3,7 +3,7 @@ "position": "bottom", "modules-left": ["custom/power", "niri/workspaces", "sway/workspaces", "sway/mode"], "modules-center": [], - "margin": "0px 10px 10px 10px", + "margin": "5px 10px 5px 10px", "include": [ "$HOME/.config/waybar/local" ], diff --git a/desktop-base/.local/share/dbus-1/services/org.freedesktop.secrets.service b/desktop-base/.local/share/dbus-1/services/org.freedesktop.secrets.service new file mode 100644 index 0000000..027a156 --- /dev/null +++ b/desktop-base/.local/share/dbus-1/services/org.freedesktop.secrets.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.freedesktop.secrets +Exec=/usr/bin/kwalletd6 diff --git a/sway/.config/environment.d/qt.conf b/sway/.config/environment.d/qt.conf new file mode 100644 index 0000000..57547ee --- /dev/null +++ b/sway/.config/environment.d/qt.conf @@ -0,0 +1 @@ +QT_QPA_PLATFORMTHEME=qt6ct diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 8126639..602b1f7 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -7,14 +7,14 @@ ### Variables # # Logo key. Use Mod1 for Alt. -set $mod Mod4 +set $mod Mod1 # Home row direction keys, like vim set $left h set $down j set $up k set $right l # Your preferred terminal emulator -set $term alacritty +set $term systemd-run --user alacritty # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. @@ -67,7 +67,7 @@ set $wallpaper /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png bindsym $mod+Return exec $term # Kill focused window - bindsym $mod+Shift+q kill + bindsym $mod+q kill # Start your launcher bindsym $mod+d exec $menu @@ -221,6 +221,7 @@ bindsym $mod+r mode "resize" include /etc/sway/config.d/* include /home/peter/.config/sway/local.d/* +include /home/peter/.config/sway/shared.d/brightness_ctl # Wrap swaybg in systemd-run to allow swaybg to be automatically restarted # if it ever crashes. The wrapper script will also automatically purge old @@ -229,20 +230,23 @@ swaybg_command /home/peter/.local/bin/swaybg-systemd-wrapper output "*" bg $wallpaper fill -# Lockscreen - requires jirutka/swaylock-effects -bindsym Ctrl+Mod1+l exec "PASSWORD_STORE_ENABLE_EXTENSIONS=true pass gocrypt close; systemctl --user stop gpg-agent; swaylock -S --effect-pixelate 30 --effect-vignette 0.4:1 --clock --indicator --indicator-thickness 6 --ring-color ebdbb2 --inside-color 00000055 --ring-ver-color 458588 --inside-ver-color 45858855 --text-ver-color 83a598 --ring-wrong-color cc241d --inside-wrong-color cc241d55 --text-wrong-color fb4934 --key-hl-color 4d4d4d --line-uses-ring --separator-color 00000000 --text-color ebdbb2 --timestr '%H:%M'" bindsym $mod+x exec bemenu-run | xargs swaymsg exec -- bindsym Print exec grimshot --notify save area -bindsym Ctrl+Print exec grimshot --notify save window -bindsym Shift+Print exec grimshot --notify save screen -# Use F10 too since on GPD WM2, Fn and Shift / Ctrl conflict -bindsym Ctrl+F10 exec grimshot --notify save window -bindsym Shift+F10 exec grimshot --notify save screen +bindsym Ctrl+Print exec grimshot --notify save screen bindsym Ctrl+Tab workspace next bindsym Ctrl+grave workspace prev +bindsym Ctrl+l exec swaylock -f -i "$wallpaper" && sleep 1 && pkill -SIGUSR1 swayidle + +exec_always swayidle -w timeout 120 "swaylock -f -i $wallpaper" timeout 130 'swaymsg "output * dpms off" && swaymsg input "7855:36:ClockworkPI_uConsole_Keyboard" events disabled && swaymsg input "7855:36:ClockworkPI_uConsole_Mouse" events disabled && sudo clockworkpi-lowpower on' resume 'swaymsg "output * dpms on" && swaymsg "input * events enabled" && sudo clockworkpi-lowpower off' +# When unlocked, lock & trigger swayidle +bindsym XF86PowerOff exec swaylock -f -i "$wallpaper" && sleep 1 && pkill -SIGUSR1 swayidle +# When locked, do nothing. Note that the power key is not disabled in the swayidle command, +# so it'll wake the device up and trigger swayidle to re-enable all inputs +bindsym --locked XF86PowerOff exec sleep 0.1 + # Audio volume (WirePlumber) bindsym --locked XF86AudioRaiseVolume exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+" bindsym --locked XF86AudioLowerVolume exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-" @@ -256,13 +260,20 @@ input "*" { repeat_rate 30 repeat_delay 300 # Input letters with diacritics - xkb_options compose:ralt + xkb_options compose:paus } input type:touchpad { tap enabled } +input type:pointer { + scroll_button button3 + scroll_method on_button_down +} + +output "DSI-2" scale 1.2 + font "Noto Sans Mono" 13px default_border pixel 2 @@ -286,11 +297,10 @@ exec_always "systemctl --user import-environment; systemctl --user start sway-se # Import environment to D-Bus as well for xdg-desktop-portals etc exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway -# Restart kanshi if it is running -# This restores monitor configuration on reload -exec_always "systemctl --user is-active kanshi && systemctl --user restart kanshi" - # Floating window rules for_window [app_id="pavucontrol"] floating enable -for_window [app_id="qalculate-qt"] floating enable, resize set width 800 px height 800 px, opacity 1 -for_window [app_id="thunderbird" title="Write.*"] floating enable, resize set width 800 px height 800 px + +# When firefox is full screen, don't idle +for_window [app_id="firefox"] inhibit_idle fullscreen +# Same for mpv +for_window [app_id="mpv"] inhibit_idle fullscreen diff --git a/sway/.config/sway/shared.d/brightness_ctl b/sway/.config/sway/shared.d/brightness_ctl index 62b415d..aa5fd5b 100644 --- a/sway/.config/sway/shared.d/brightness_ctl +++ b/sway/.config/sway/shared.d/brightness_ctl @@ -1,4 +1,2 @@ -# set brightness logarithmically by factor 1.4 -# .72 is just slightly bigger than 1 / 1.4 -bindsym --locked XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print int(($1 + .72) * 1.4) }')" -bindsym --locked XF86MonBrightnessDown exec light -S "$(light -G | awk '{ print int($1 / 1.4) }')" +bindsym --locked XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print (int($1 / 10) + 2) * 10 }')" +bindsym --locked XF86MonBrightnessDown exec light -S "$(light -G | awk '{ if (int($1 - 10) > 20) { print (int($1 / 10) - 1) * 10 } else { print 20 } }')" diff --git a/uconsole-rootfs/usr/local/bin/clockworkpi-lowpower b/uconsole-rootfs/usr/local/bin/clockworkpi-lowpower new file mode 100755 index 0000000..7a5ceb1 --- /dev/null +++ b/uconsole-rootfs/usr/local/bin/clockworkpi-lowpower @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [ "$1" == "on" ]; then + cpupower frequency-set -u 400MHz + pinctrl 9 op dl # dsi power +else + cpupower frequency-set -u 2400MHz + pinctrl 9 op dh +fi