From 7b6cbaf8ffdadb4cccb5deffe9ada63b28af3e4e Mon Sep 17 00:00:00 2001 From: aleidk Date: Fri, 26 Jan 2024 16:05:14 -0300 Subject: [PATCH] update test configuration of hyprland --- config/hypr/gdm-wrapper.sh | 39 ++++++++++++++++++++++++++++++++++++++ config/hypr/hyprland.conf | 28 +++++++++++++-------------- config/waybar/config | 21 +++----------------- 3 files changed, 56 insertions(+), 32 deletions(-) create mode 100755 config/hypr/gdm-wrapper.sh diff --git a/config/hypr/gdm-wrapper.sh b/config/hypr/gdm-wrapper.sh new file mode 100755 index 0000000..3b0982d --- /dev/null +++ b/config/hypr/gdm-wrapper.sh @@ -0,0 +1,39 @@ +#!/usr/bin/sh + +if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && + [ "x$XDG_SESSION_CLASS" != "xgreeter" ] && + [ -n "$SHELL" ] && + grep -q "$SHELL" /etc/shells && + ! (echo "$SHELL" | grep -q "false") && + ! (echo "$SHELL" | grep -q "nologin"); then + if [ "$1" != '-l' ]; then + exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" + else + shift + fi +fi + +SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region) +REGION=${SETTING#\'} +REGION=${REGION%\'} + +if [ -n "$REGION" ]; then + unset LC_TIME LC_NUMERIC LC_MONETARY LC_MEASUREMENT LC_PAPER + + if [ "$LANG" != "$REGION" ]; then + # LC_CTYPE + export LC_NUMERIC=$REGION + export LC_TIME=$REGION + # LC_COLLATE + export LC_MONETARY=$REGION + # LC_MESSAGES + export LC_PAPER=$REGION + # LC_NAME + export LC_ADDRESS=$REGION + export LC_TELEPHONE=$REGION + export LC_MEASUREMENT=$REGION + # LC_IDENTIFICATION + fi +fi + +exec Hyprland diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 00dda98..b484ab6 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -4,8 +4,7 @@ # # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,auto - +monitor=,highrr,auto,1 # Execute your favorite apps at launch exec-once = waybar & hyprpaper @@ -47,17 +46,18 @@ general { decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more - rounding = 10 - blur = true - blur_size = 3 - blur_passes = 1 - blur_new_optimizations = true - drop_shadow = true shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) + + blur { + enabled = true + size = 3 + passes = 1 + new_optimizations = true + } } animations { @@ -114,15 +114,15 @@ bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, E, exec, dolphin bind = $mainMod, V, togglefloating, -bind = $mainMod, R, exec, wofi --show drun +bind = $mainMod, D, exec, wofi --show drun bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle # Move focus with mainMod + arrow keys -bind = $mainMod, left, movefocus, l -bind = $mainMod, right, movefocus, r -bind = $mainMod, up, movefocus, u -bind = $mainMod, down, movefocus, d +bind = $mainMod, h, movefocus, l +bind = $mainMod, j, movefocus, d +bind = $mainMod, k, movefocus, u +bind = $mainMod, l, movefocus, r # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 @@ -137,7 +137,7 @@ bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1false +bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 diff --git a/config/waybar/config b/config/waybar/config index 898d187..ef406f2 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -4,9 +4,7 @@ "spacing": 4, // Gaps between modules (4px) // Choose the order of the modules "modules-left": [ - "sway/workspaces", - "sway/mode", - "sway/scratchpad", + "hyprland/workspaces", "custom/media" ], "modules-center": [ @@ -14,16 +12,13 @@ ], "modules-right": [ "idle_inhibitor", - "cpu", - "memory", - "temperature", "pulseaudio", "network", "battery", "clock" ], // Modules configuration - "sway/workspaces": { + "hyprland/workspaces": { "disable-scroll": true, "warp-on-scroll": true, "format": "{icon}", @@ -45,16 +40,6 @@ "unlocked": "" } }, - "sway/mode": { - "format": "{}" - }, - "sway/scratchpad": { - "format": "{icon} {count}", - "show-empty": false, - "format-icons": ["", ""], - "tooltip": true, - "tooltip-format": "{app}: {title}" - }, "mpd": { "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", "format-disconnected": "Disconnected ", @@ -101,7 +86,7 @@ "cpu": { "format": "{usage}% ", "tooltip": false - }, + }, "memory": { "format": "{}% " },