diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 57b114e..99601b3 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,18 +1,11 @@ -# Monitors -# ----------------------------------------- - -$mainMonitor=DP-1 -$secondMonitor=HDMI-A-1 - -# See https://wiki.hyprland.org/Configuring/Monitors/ -#monitor=,preferred,auto,auto -monitor=$mainMonitor,preferred,0x0,1 -monitor=$secondMonitor,1920x1080@60,760x-1080,1 - # Variables # ----------------------------------------- +# monitors +$mainMonitor=DP-2 +$secondMonitor=HDMI-A-1 + # colors $color_border = rgb(1a1c2d) $color_active_border = $color_border @@ -23,6 +16,7 @@ $terminal = alacritty $menu = wofi --show drun $run_prog = wofi --show run $screenshot = grim -g "$(slurp)" - | wl-copy +$focusOrStart = .config/hypr/scripts/focus-or-start.sh # Settings # ----------------------------------------- @@ -32,7 +26,6 @@ env = XCURSOR_SIZE,22 env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that env = WLR_NO_HARDWARE_CURSORS,1 - general { gaps_in = 0,0,-1,-1 gaps_out = -1 @@ -45,15 +38,18 @@ general { input { kb_layout = pnx-us-se - kb_variant = - kb_model = - kb_options = - kb_rules = + # kb_variant = + # kb_model = + # kb_options = + # kb_rules = follow_mouse = 1 + accel_profile = flat + force_no_accel = true } cursor { + no_hardware_cursors = true enable_hyprcursor = true # Dont hide my cursor! @@ -102,6 +98,19 @@ debug { disable_logs = false } +ecosystem { + no_update_news = true + no_donation_nag = true +} + +# Monitors +# ----------------------------------------- + +# See https://wiki.hyprland.org/Configuring/Monitors/ +#monitor=,preferred,auto,auto +monitor=$mainMonitor,preferred,0x0,1 +monitor=$secondMonitor,1920x1080@60,760x-1080,1 + # Workspaces and windows # ----------------------------------------- @@ -120,13 +129,17 @@ windowrulev2 = workspace 5, class:org.telegram.desktop.* $mainMod = SUPER -bind = $mainMod, Return, exec, $terminal -bind = $mainMod, S, exec, $screenshot -bind = $mainMod, X, killactive, -#bind = $mainMod, M, exit, -bind = $mainMod, F, togglefloating, +# programs bind = $mainMod, D, exec, $menu bind = $mainMod, P, exec, $run_prog +bind = $mainMod, Return, exec, $terminal +bind = $mainMod, T, exec, $focusOrStart "telegram" "org.telegram" +bind = $mainMod, G, exec, $focusOrStart "vivaldi-stable" "vivaldi-stable" +bind = $mainMod, S, exec, $screenshot + +# Windows +bind = $mainMod, X, killactive, +bind = $mainMod, F, togglefloating, bind = $mainMod, V, togglesplit, # dwindle # Move focus with mainMod + arrow keys diff --git a/hypr/scripts/focus-or-start.sh b/hypr/scripts/focus-or-start.sh new file mode 100755 index 0000000..093d1eb --- /dev/null +++ b/hypr/scripts/focus-or-start.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +execCommand=$1 +className=$2 + +class=$(hyprctl -j clients | jq -r ".[] | select(.class | startswith(\"${className}\")) | .class") + +if [[ $class != "" ]] +then + hyprctl dispatch focuswindow "class:${class}" +else + ${execCommand} & +fi