From 68314f7bae3ebdf1ae663e9428b896cbba239b38 Mon Sep 17 00:00:00 2001 From: Hydroxycarbamide Date: Sun, 2 Jun 2024 12:44:51 +0200 Subject: [PATCH] Replace all gnome-polkit by kde-polkit + update other --- dot_config/hypr/hyprland.conf | 15 ++- dot_config/kanshi/config | 2 + dot_config/kanshi/executable_vrr_test.sh | 66 ++++++++++ dot_config/nvim | 2 +- dot_config/river/executable_init | 21 ++-- dot_config/sway/config | 5 +- dot_config/swaync/config.json | 153 +++++++++++------------ dot_config/waybar/config.jsonc | 6 +- dot_config/waybar/dot_gitattributes | 1 + 9 files changed, 172 insertions(+), 99 deletions(-) create mode 100644 dot_config/kanshi/executable_vrr_test.sh create mode 100644 dot_config/waybar/dot_gitattributes diff --git a/dot_config/hypr/hyprland.conf b/dot_config/hypr/hyprland.conf index 2177281..24179a0 100644 --- a/dot_config/hypr/hyprland.conf +++ b/dot_config/hypr/hyprland.conf @@ -145,11 +145,12 @@ animations { dwindle { pseudotile = true # enable pseudotiling on dwindle + no_gaps_when_only = 1 } master { always_center_master = false - mfact = 0.60 + mfact = 0.55 no_gaps_when_only = 1 } @@ -161,7 +162,7 @@ misc { # vfr = true # animate_mouse_windowdragging = true - focus_on_activate = true + focus_on_activate = false mouse_move_enables_dpms = true key_press_enables_dpms = true @@ -215,7 +216,7 @@ windowrulev2 = center, title:^(Move files)$ # windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. # transparency -windowrulev2 = opacity 1.0 override 0.9 override, class:^(kitty|foot|footclient|floating-foot|VSCodium|Code)$ +windowrulev2 = opacity 1.0 override 0.9 override, class:^(kitty|foot|footclient|floating-foot|VSCodium|Code|neovide)$ # 1 terminal windowrulev2 = workspace 1, class:^(kitty|foot|footclient)$ @@ -464,9 +465,10 @@ plugin { columns = 2 gap_size = 5 bg_col = rgb(111111) - workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1 + workspace_method = first 1 # [center/first] [workspace] e.g. first 1 or center m+1 - enable_gesture = true # laptop touchpad, 4 fingers + enable_gesture = true # laptop touchpad + gesture_fingers = 3 # 3 or 4 gesture_distance = 300 # how far is the "max" gesture_positive = true # positive = swipe down. Negative = swipe up. } @@ -509,5 +511,6 @@ exec-once = wl-paste --type image --watch cliphist store #Stores only image data exec-once = systemctl start --user foot-server exec-once = systemctl start --user sunshine exec-once = flatpak run me.kozec.syncthingtk -m & -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +# exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +exec-once = /usr/lib/polkit-kde-authentication-agent-1 & # exec-once = hyprpm reload -n diff --git a/dot_config/kanshi/config b/dot_config/kanshi/config index 51ec1b0..5a8e69b 100644 --- a/dot_config/kanshi/config +++ b/dot_config/kanshi/config @@ -1,6 +1,7 @@ profile { output HDMI-A-1 { mode 1920x1080@60 + adaptive_sync off position 1920,0 } @@ -13,6 +14,7 @@ profile { profile { output DP-1 { mode 1920x1080@144.001007 + adaptive_sync off position 0,0 } } diff --git a/dot_config/kanshi/executable_vrr_test.sh b/dot_config/kanshi/executable_vrr_test.sh new file mode 100644 index 0000000..a9f31d7 --- /dev/null +++ b/dot_config/kanshi/executable_vrr_test.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Number of tests +NUM_TESTS=5 + +# Counter for correct answers +correct_answers=0 + +# Default output variable (can be set through --output option) +output="" + +# Parse command line arguments for --output +while [[ "$1" != "" ]]; do + case $1 in + --output ) shift + output=$1 + ;; + * ) echo "Invalid option: $1" + exit 1 + esac + shift +done + +# Ensure output is set +if [ -z "$output" ]; then + echo "Usage: $0 --output " + exit 1 +fi + +# Function to activate or deactivate adaptive_sync +toggle_adaptive_sync() { + if [ "$1" -eq 1 ]; then + wlr-randr --output "$output" --adaptive-sync enabled + else + wlr-randr --output "$output" --adaptive-sync disabled + fi +} + +# Run the tests +for ((i=1; i<=NUM_TESTS; i++)); do + # Randomize adaptive_sync (0 for off, 1 for on) + adaptive_sync_state=$((RANDOM % 2)) + + # Toggle adaptive_sync + toggle_adaptive_sync $adaptive_sync_state + + # Ask user for the current state + echo "Is adaptive_sync enabled on $output? (yes/no)" + read user_input + + # Convert user input to lowercase + user_input=$(echo "$user_input" | tr '[:upper:]' '[:lower:]') + + # Determine the correct answer + if [ $adaptive_sync_state -eq 1 ] && [ "$user_input" == "yes" ]; then + correct_answers=$((correct_answers + 1)) + elif [ $adaptive_sync_state -eq 0 ] && [ "$user_input" == "no" ]; then + correct_answers=$((correct_answers + 1)) + fi +done + +# Display the number of correct answers +echo "You got $correct_answers out of $NUM_TESTS correct." + +# Reset adaptive_sync to a default state (optional) +# wlr-randr --output $output --adaptive-sync off diff --git a/dot_config/nvim b/dot_config/nvim index 4e3a087..473ad74 160000 --- a/dot_config/nvim +++ b/dot_config/nvim @@ -1 +1 @@ -Subproject commit 4e3a087d14758737717dfc8ce2f2b169eb17fb61 +Subproject commit 473ad7436c0fe5fe96794cfd11e02cb7ae8408ee diff --git a/dot_config/river/executable_init b/dot_config/river/executable_init index 52c5a25..7187219 100644 --- a/dot_config/river/executable_init +++ b/dot_config/river/executable_init @@ -184,11 +184,17 @@ riverctl border-width 2 # 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 4 -outer-padding 8 & +rivertile -view-padding 6 -outer-padding 10 & + +rivertile smart-padding 0, \ + view-padding 6, \ + outer-padding 10, & + + # cursor riverctl set-cursor-warp on-focus-change -riverctl xcursor-theme Adwaita 24 +riverctl xcursor-theme Qogir-dark 24 riverctl focus-follows-cursor always @@ -281,10 +287,10 @@ kdeconnect-indicator & ## osd swayosd-server & -# syncthing +## syncthing flatpak run me.kozec.syncthingtk -m & -# systemctl restarts +## systemctl restarts systemctl start --user foot-server systemctl start --user sunshine @@ -292,9 +298,10 @@ systemctl start --user sunshine wl-paste --type text --watch cliphist store & #Stores only text data wl-paste --type image --watch cliphist store & #Stores only image data +# polkit +## /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +/usr/lib/polkit-kde-authentication-agent-1 + ## lock swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' -# polkit -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & - diff --git a/dot_config/sway/config b/dot_config/sway/config index a3555da..ea9bc92 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -389,7 +389,7 @@ mouse_warping container # cursor -# set $my_cursor Qogir +set $my_cursor Qogir-dark set $my_cursor_size 24 seat seat0 xcursor_theme $my_cursor $my_cursor_size @@ -449,7 +449,8 @@ exec systemctl start --user sunshine exec wl-paste --type text --watch cliphist store exec wl-paste --type image --watch cliphist store exec swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +# exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +exec /usr/lib/polkit-kde-authentication-agent-1 & exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov -t 200 -n -c 1 -s $HOME/.config/sov exec nm-applet exec dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP diff --git a/dot_config/swaync/config.json b/dot_config/swaync/config.json index 1ea33a6..8c80a0f 100644 --- a/dot_config/swaync/config.json +++ b/dot_config/swaync/config.json @@ -1,82 +1,75 @@ { - "$schema": "/etc/xdg/swaync/configSchema.json", - "positionX": "right", - "positionY": "top", - "control-center-margin-top": 5, - "control-center-margin-bottom": 0, - "control-center-margin-right": 5, - "control-center-margin-left": 0, - "notification-icon-size": 64, - "notification-body-image-height": 100, - "notification-body-image-width": 200, - "timeout": 10, - "timeout-low": 5, - "timeout-critical": 0, - "fit-to-screen": false, - "control-center-width": 600, - "control-center-height": 800, - "notification-window-width": 500, - "keyboard-shortcuts": true, - "image-visibility": "when-available", - "transition-time": 100, - "hide-on-clear": false, - "hide-on-action": true, - "script-fail-notify": true, - "scripts": { - "example-script": { - "exec": "echo 'Do something...'", - "urgency": "Normal" - } - }, - "notification-visibility": { - "Spotify": { - "state": "muted", - "urgency": "Low", - "app-name": "Spotify" - } - }, - "widgets": [ - "inhibitors", - "title", - "dnd", - "notifications", - "mpris", - "volume" - ], - "widget-config": { - "inhibitors": { - "text": "Inhibitors", - "button-text": "Clear All", - "clear-all-button": true - }, - "title": { - "text": "Notifications", - "clear-all-button": true, - "button-text": "Clear All" - }, - "dnd": { - "text": "Do Not Disturb" - }, - "label": { - "max-lines": 5, - "text": "Label Text" - }, - "mpris": { - "image-size": 96, - "image-radius": 12 - }, - "buttons-grid": { - "actions": [ - { - "label": "1" - }, - { - "label": "2" - }, - { - "label": "3" - } - ] - } - } + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "control-center-margin-top": 5, + "control-center-margin-bottom": 0, + "control-center-margin-right": 5, + "control-center-margin-left": 0, + "notification-icon-size": 64, + "notification-body-image-height": 100, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": false, + "control-center-width": 600, + "control-center-height": 800, + "notification-window-width": 500, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 100, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "scripts": { + "example-script": { + "exec": "echo 'Do something...'", + "urgency": "Normal" + } + }, + "notification-visibility": { + "Spotify": { + "state": "muted", + "urgency": "Low", + "app-name": "Spotify" + } + }, + "widgets": ["inhibitors", "title", "dnd", "notifications", "mpris", "volume"], + "widget-config": { + "inhibitors": { + "text": "Inhibitors", + "button-text": "Clear All", + "clear-all-button": true + }, + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 5, + "text": "Label Text" + }, + "mpris": { + "image-size": 96, + "image-radius": 12 + }, + "buttons-grid": { + "actions": [ + { + "label": "1" + }, + { + "label": "2" + }, + { + "label": "3" + } + ] + } + } } diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc index b5cd748..23d5e60 100644 --- a/dot_config/waybar/config.jsonc +++ b/dot_config/waybar/config.jsonc @@ -5,8 +5,8 @@ "height": 32, "modules-left": [ "hyprland/workspaces", - //"sway/workspaces#sway" - //"river/tags", + "sway/workspaces#sway", + "river/tags", //"river/layout", "group/visualisation" @@ -243,7 +243,7 @@ }, "cpu": { "interval": 1, - "max-length": 15, + "max-length": 16, // "format": " {}%", "format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}", "format-icons": [ diff --git a/dot_config/waybar/dot_gitattributes b/dot_config/waybar/dot_gitattributes new file mode 100644 index 0000000..24a8e87 --- /dev/null +++ b/dot_config/waybar/dot_gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text