hyprland config

This commit is contained in:
thatscringebro
2023-09-21 18:37:25 -04:00
parent fd3d6567dc
commit 98f7bd2701
62 changed files with 2843 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#environment-variables
env = QT_QPA_PLATFORMTHEME,qt5ct #necessary to run qt5ct properly
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = XDG_SESSION_TYPE,wayland
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
# NVIDIA
# This is from Hyprland Wiki but my Hyprland keeps crashing when I enabled this variables
#env = WLR_NO_HARDWARE_CURSORS,1
#env = LIBVA_DRIVER_NAME,nvidia
#env = MOZ_ENABLE_WAYLAND,1
#env = XDG_SESSION_TYPE,wayland
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia
#env = GBM_BACKEND,nvidia-drm ## it causes issues like Hyprland crashing so care
#env = __NV_PRIME_RENDER_OFFLOAD,1
#env = __VK_LAYER_NV_optimus,NVIDIA_only
#env = WLR_DRM_NO_ATOMIC,1
#env = NVD_BACKEND,direct

View File

@@ -0,0 +1,28 @@
#Commands to be executed at launch
$scriptsDir = $HOME/.config/hypr/scripts
# wallpaper stuff
#exec-once = swww query || swww init && swww img $HOME/wallpaper.jpg #using swww utility
#exec-once = swww init
exec-once = swaybg -m fill -i $HOME/wallpaper.jpg #using swaybg
#exec-once = $scriptsDir/Wallpaper.sh #using swaybg random wallpaper
# Startup
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
#exec-once = dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = $scriptsDir/portal-arch-hyprland
exec-once = /usr/lib/polkit-kde-authentication-agent-1
# apps, blueman, network manager applet and ROG-control-Center
exec-once = $scriptsDir/Startup.sh
exec-once = blueman-applet &
exec-once = nm-applet --indicator &
#exec-once = rog-control-center &
#clipboard manager
exec-once = wl-paste --watch cliphist store
#Syncthing
exec-once = $scriptsDir/syncthing.sh

View File

@@ -0,0 +1,199 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Setting variables
$mainMod = SUPER
$files = thunar
$browser = firefox
$term = kitty
$hyprDir = $HOME/.config/hypr
$scriptsDir = $HOME/.config/hypr/scripts
# Scripts
$Mako = $scriptsDir/Mako.sh
$screenshot = $scriptsDir/ScreenShot.sh
$volume = $scriptsDir/Volume.sh
$waybar = $scriptsDir/Waybar.sh
$Wofi = $scriptsDir/Wofi.sh
$Clipboard = $scriptsDir/ClipManager.sh
# see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod SHIFT, C, exec, hyprctl reload
bind = $mainMod, D, exec, $Wofi
bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod SHIFT, Space, togglefloating,
bind = $mainMod, F, fullscreen
bind = $mainMod, Q, killactive,
bind = $mainMod, Return, exec, $term
bind = $mainMod, T, exec, $files
#bind = $mainMod SHIFT, M, exec, hyprctl dispatch splitratio -0.3
#bind = $mainMod SHIFT, Y, exec, $term --class clock -T clock -e tty-clock -c -C 7 -r -s -f "%A, %B, %d"
bind = $mainMod CTRL, D, layoutmsg, removemaster
bind = $mainMod, Escape, exec, hyprctl kill
bind = $mainMod, I, layoutmsg, addmaster
bind = $mainMod, J, layoutmsg, cyclenext
bind = $mainMod, K, layoutmsg, cycleprev
bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster
bind = $mainMod ALT, V, exec, $Clipboard
# Special Keys / Hot Keys
bind = , xf86audioraisevolume, exec, $volume --inc #volume up
bind = , xf86audiolowervolume, exec, $volume --dec #volume down
bind = , xf86AudioMicMute, exec, $volume --toggle-mic #mute mic
bind = , xf86Launch1, exec, rog-control-center # ASUS Armory crate button
bind = , xf86audiomute, exec, $volume --toggle #FN+F1
bind = , xf86audioplay, exec, playerctl play-pause
bind = , xf86audionext, exec, playerctl next
bind = , xf86audioprev, exec, playerctl previous
bind = , xf86audiostop, exec, playerctl stop
# From manual but it does not work
#bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 2560x1440@165, 0x0, 1"
#bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable"
# Resize (vim style)
binde = $mainMod SHIFT, H, resizeactive,-50 0
binde = $mainMod SHIFT, L, resizeactive,50 0
binde = $mainMod SHIFT, K, resizeactive,0 -50
binde = $mainMod SHIFT, J, resizeactive,0 50
binde = $mainMod SHIFT, left, resizeactive,-50 0
binde = $mainMod SHIFT, right, resizeactive,50 0
binde = $mainMod SHIFT, up, resizeactive,0 -50
binde = $mainMod SHIFT, down, resizeactive,0 50
# Move (vim style)
bind = $mainMod CTRL, H, movewindow, l
bind = $mainMod CTRL, L, movewindow, r
bind = $mainMod CTRL, K, movewindow, u
bind = $mainMod CTRL, J, movewindow, d
bind = $mainMod CTRL, left, movewindow, l
bind = $mainMod CTRL, right, movewindow, r
bind = $mainMod CTRL, up, movewindow, u
bind = $mainMod CTRL, down, movewindow, d
# 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
# Special workspace
bind = $mainMod SHIFT, U, movetoworkspace, special
bind = $mainMod, U, togglespecialworkspace,
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, KP_End, workspace, 1
bind = $mainMod, KP_Down, workspace, 2
bind = $mainMod, KP_Next, workspace, 3
bind = $mainMod, KP_Left, workspace, 4
bind = $mainMod, KP_Begin, workspace, 5
bind = $mainMod, KP_Right, workspace, 6
bind = $mainMod, KP_Home, workspace, 7
bind = $mainMod, KP_Up, workspace, 8
bind = $mainMod, KP_Prior, workspace, 9
bind = $mainMod, KP_Insert, workspace, 10
# Move active window and follow to workspace
bind = $mainMod CTRL, 1, movetoworkspace, 1
bind = $mainMod CTRL, 2, movetoworkspace, 2
bind = $mainMod CTRL, 3, movetoworkspace, 3
bind = $mainMod CTRL, 4, movetoworkspace, 4
bind = $mainMod CTRL, 5, movetoworkspace, 5
bind = $mainMod CTRL, 6, movetoworkspace, 6
bind = $mainMod CTRL, 7, movetoworkspace, 7
bind = $mainMod CTRL, 8, movetoworkspace, 8
bind = $mainMod CTRL, 9, movetoworkspace, 9
bind = $mainMod CTRL, 0, movetoworkspace, 10
bind = $mainMod CTRL, KP_End, movetoworkspace, 1
bind = $mainMod CTRL, KP_Down, movetoworkspace, 2
bind = $mainMod CTRL, KP_Next, movetoworkspace, 3
bind = $mainMod CTRL, KP_Left, movetoworkspace, 4
bind = $mainMod CTRL, KP_Begin, movetoworkspace, 5
bind = $mainMod CTRL, KP_Right, movetoworkspace, 6
bind = $mainMod CTRL, KP_Home, movetoworkspace, 7
bind = $mainMod CTRL, KP_Up, movetoworkspace, 8
bind = $mainMod CTRL, KP_Prior, movetoworkspace, 9
bind = $mainMod CTRL, KP_Insert, movetoworkspace, 10
bind = $mainMod CTRL, bracketleft, movetoworkspace, -1
bind = $mainMod CTRL, bracketright, movetoworkspace, +1
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
bind = $mainMod SHIFT, KP_End, movetoworkspacesilent, 1
bind = $mainMod SHIFT, KP_Down, movetoworkspacesilent, 2
bind = $mainMod SHIFT, KP_Next, movetoworkspacesilent, 3
bind = $mainMod SHIFT, KP_Left, movetoworkspacesilent, 4
bind = $mainMod SHIFT, KP_Begin, movetoworkspacesilent, 5
bind = $mainMod SHIFT, KP_Right, movetoworkspacesilent, 6
bind = $mainMod SHIFT, KP_Home, movetoworkspacesilent, 7
bind = $mainMod SHIFT, KP_Up, movetoworkspacesilent, 8
bind = $mainMod SHIFT, KP_Prior, movetoworkspacesilent, 9
bind = $mainMod SHIFT, KP_Insert, movetoworkspacesilent, 10
bind = $mainMod SHIFT, bracketleft, movetoworkspacesilent, -1
bind = $mainMod SHIFT, bracketright, movetoworkspacesilent, +1
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, period, workspace, e+1
bind = $mainMod, comma, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = $mainMod, G, togglegroup
bind = $mainMod, tab, workspace, m+1
bind = $mainMod SHIFT, tab, workspace, m-1
bind = ALT, tab, cyclenext, # change focus to another window
bind = ALT SHIFT, tab, bringactivetotop, # bring it to the top
# Screenshot keybindings NOTE:
#bind = , Print, exec, $screenshot --now
bind = $mainMod, Print, exec, $screenshot --now
bind = $mainMod CTRL SHIFT, Print, exec, $screenshot --in5
bind = $mainMod ALT, Print, exec, $screenshot --in10
#bind = CTRL, Print, exec, $screenshot --win
#bind = SHIFT, Print, exec, $screenshot --area
bind = $mainMod SHIFT, Print, exec, $screenshot --area
# screenshot with swappy
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | swappy -f -
# Screenshot keybindings for Asus G15 (no PrinSrc button)
bind = $mainMod, F6, exec, $screenshot --now
bind = $mainMod SHIFT, F6, exec, $screenshot --area
bind = $mainMod CTRL SHIFT, F6, exec, $screenshot --in5
bind = $mainMod ALT, F6, exec, $screenshot --in10

View File

@@ -0,0 +1,27 @@
# Monitor Configuration
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
# Monitors
monitor=DP-1,2560x1440@144,0x0,1
monitor=DP-2,2560x1440@144,auto,1
# my G15 Laptop
# monitor = eDP-1, preferred, auto, 1
#monitor = eDP-1, 2560x1440@165, 0x0, 1 #own screen
#monitor = DP-2, preferred, auto, 1 #my Samsung Odyssey-G7
#monitor = DP-1, preferred, auto, 1
#monitor = HDMI-A-1, preferred,auto,1
# QEMU
monitor = Virtual-1, 1920x1080@60,auto,1
# Example :
#monitor=eDP-1,2560x1440@165,0x0,1
#workspace=HDMI-A-1,1
#monitor=HDMI-A-1,2560x1440@144,0x0,1,mirror,eDP-1
#workspace=HDMI-A-2,2
#monitor=eDP-1,transform,0
#monitor=eDP-1,addreserved,10,10,10,49
#workspace=eDP-1,1

View File

@@ -0,0 +1,39 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule = float, org.kde.polkit-kde-authentication-agent-1
windowrule = float, nm-connection-editor|blueman-manager
windowrule = float, swayimg|vlc|Viewnior|pavucontrol
windowrule = float, nwg-look|qt5ct|mpv
windowrule = float, onedriver|onedriver-launcher
windowrule = float, zoom
windowrule = float, wofi
windowrule=tile,lite-xl
windowrule = fullscreen, wlogout
#windowrule = noblur,gamescope
#windowrule = fullscreen,gamescope
#windowrule = workspace 6 silent,^(gamescope)$
# windowrule v2
#windowrulev2 = workspace 2, class:^(firefox)$
#windowrulev2 = workspace 2, class:^(Microsoft-edge-beta)$ #this is on arch
#windowrulev2 = workspace 3, class:^(thunar)$
#windowrulev2 = workspace 1, class:^(thunderbird)$
#windowrulev2 = workspace 4, class:^(com.obsproject.Studio)$
#windowrulev2 = workspace 5 silent, class:^(Steam)$,title:^(Steam)$
#windowrulev2 = workspace 5 silent, class:^(lutris)$
#windowrulev2 = workspace 6, class:^(virt-manager)$
#windowrulev2 = workspace 7 silent, class:^(discord)$
#windowrulev2 = workspace 9 silent, class:^(audacious)$
#opacity (transparent) #enable as desired
#windowrulev2 = opacity 1 0.9, class:^(firefox)$
#windowrulev2 = opacity 0.9 0.7, class:^(thunar)$
#windowrulev2 = opacity 0.7 0.7, class:^(foot)$
#windowrulev2 = opacity 0.9 0.7, class:^(mousepad)$
#windowrulev2 = opacity 0.9 0.7, class:^(codium-url-handler)$
#windowrulev2 = opacity 0.9 0.7, class:^(VSCodium)$
#windowrulev2 = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1
#windowrulev2 = bordercolor rgb(282737) rgb(1E1D2D), floating:1
#windowrulev2 = opacity 0.8 0.8, pinned:1