feat(Hyprland): Add Hyprland config and related changes

This commit is contained in:
histalek 2024-04-05 12:42:27 +02:00
parent 8daaef3e17
commit 739b47e037
Signed by: histalek
SSH key fingerprint: SHA256:6a6N2Wzk73nwURUHC/ubbCyqdB6yfie0Jv/NGvRcsIE
8 changed files with 323 additions and 26 deletions

View file

@ -1,16 +1,10 @@
### Set wayland specific environment variables ### Set wayland specific environment variables
# Set compositor
XDG_CURRENT_DESKTOP=sway
# Set wayland backend for GUI libraries # Set wayland backend for GUI libraries
QT_QPA_PLATFORM=wayland QT_QPA_PLATFORM=wayland;xkb
GDK_BACKEND=wayland GDK_BACKEND=wayland,xkb
CLUTTER_BACKEND=wayland
SDL_VIDEODRIVER=wayland SDL_VIDEODRIVER=wayland
CLUTTER_BACKEND=wayland
# Restore functionality for QT features by setting the theme to 'qt5ct' QT_QPA_PLATFORMTHEME=qt6ct
QT_QPA_PLATFORMTHEME=qt5ct QT_WAYLAND_DISABLE_WINDOWDECORATION=1
# Enable wayland for firefox and thunderbird
MOZ_ENABLE_WAYLAND=1

View file

@ -1,6 +1,17 @@
[Settings] [Settings]
gtk-theme-name=Adwaita-dark gtk-theme-name=Breeze
gtk-icon-theme-name=Adwaita gtk-icon-theme-name=breeze-dark
gtk-cursor-theme-name=Breeze_Snow gtk-font-name=Iosevka Nerd Font Mono
gtk-menu-images=true gtk-cursor-theme-name=xtheme_wii
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1 gtk-application-prefer-dark-theme=1

227
.config/hypr/hyprland.conf Normal file
View file

@ -0,0 +1,227 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = ,preferred,auto,1
monitor = HDMI-A-1,1920x1080,0x0,1,transform,1
monitor = DP-1,1920x1080,1080x550,1
monitor = DP-2,1920x1080@119.982,3000x550,1
# Execute your favorite apps at launch
exec-once = waybar
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nm-applet --indicator
exec-once = dbus-update-activation-environment --all --systemd
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
# env = HYPRCURSOR_THEME,Wii Pointer Player 1
env = XCURSOR_THEME,xtheme_wii
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORM,wayland;xkb
env = GDK_BACKEND,wayland,xkb
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
xwayland {
force_zero_scaling = true
}
input {
kb_layout = us
kb_variant = altgr-intl
kb_model =
kb_options = caps:escape
kb_rules =
numlock_by_default = true
follow_mouse = 2
sensitivity = 0
accel_profile = flat
}
general {
gaps_in = 0
gaps_out = 0
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
allow_tearing = false
}
decoration {
rounding = 10
blur {
enabled = true
size = 3
passes = 1
new_optimizations = true
xray = true
}
drop_shadow = false
# shadow_range = 4
# shadow_render_power = 3
# col.shadow = rgba(1a1a1aee)
}
animations {
enabled = true
first_launch_animation = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
# preserve_split = true # you probably want this # do i?
force_split = 2 # always split to right or bottom
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
}
misc {
disable_splash_rendering = true
key_press_enables_dpms = true
vrr = 1 # 2 is fullscreen only
disable_autoreload = true
focus_on_activate = false
hide_cursor_on_key_press = false
mouse_move_focuses_monitor = false
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, D, exec, fuzzel
bind = $mainMod, X, exec, tessen
bind = $mainMod, L, exec, swaylock -c 000000
bind = $mainMod SHIFT, s, exec, IMG=~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG
bind = $mainMod SHIFT, SPACE, togglefloating,
bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod SHIFT, E, exec, wlogout
bind = $mainMod SHIFT, C, exec, hyprctl reload
# 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
# Move focus with mainMod + SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# Switch workspaces with mainMod + [0-9F1-F12]
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, 0
bind = $mainMod, F1, workspace, 11
bind = $mainMod, F2, workspace, 12
bind = $mainMod, F3, workspace, 13
bind = $mainMod, F4, workspace, 14
bind = $mainMod, F5, workspace, 15
bind = $mainMod, F6, workspace, 16
bind = $mainMod, F7, workspace, 17
bind = $mainMod, F8, workspace, 18
bind = $mainMod, F9, workspace, 19
bind = $mainMod, F10, workspace, 20
bind = $mainMod, F11, workspace, 21
bind = $mainMod, F12, workspace, 22
# Move active window to a workspace with mainMod + SHIFT + [0-9F1-F12]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 0
bind = $mainMod SHIFT, F1, movetoworkspace, 11
bind = $mainMod SHIFT, F2, movetoworkspace, 12
bind = $mainMod SHIFT, F3, movetoworkspace, 13
bind = $mainMod SHIFT, F4, movetoworkspace, 14
bind = $mainMod SHIFT, F5, movetoworkspace, 15
bind = $mainMod SHIFT, F6, movetoworkspace, 16
bind = $mainMod SHIFT, F7, movetoworkspace, 17
bind = $mainMod SHIFT, F8, movetoworkspace, 18
bind = $mainMod SHIFT, F9, movetoworkspace, 19
bind = $mainMod SHIFT, F10, movetoworkspace, 20
bind = $mainMod SHIFT, F11, movetoworkspace, 21
bind = $mainMod SHIFT, F12, movetoworkspace, 22
workspace = 1, monitor:HDMI-A-1, default:true
workspace = 2, monitor:DP-1, default:true
workspace = 3, monitor:DP-2, default:true
workspace = 11, monitor:HDMI-A-1
workspace = 12, monitor:HDMI-A-1
workspace = 13, monitor:HDMI-A-1
workspace = 14, monitor:HDMI-A-1
workspace = 15, monitor:DP-1
workspace = 16, monitor:DP-1
workspace = 17, monitor:DP-1
workspace = 18, monitor:DP-1
workspace = 4, monitor:DP-2
workspace = 5, monitor:DP-2
workspace = 19, monitor:DP-2
workspace = 20, monitor:DP-2
workspace = 21, monitor:DP-2
workspace = 22, monitor:DP-2
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View file

@ -2,12 +2,12 @@
color_scheme_path=/usr/share/qt5ct/colors/darker.conf color_scheme_path=/usr/share/qt5ct/colors/darker.conf
custom_palette=true custom_palette=true
icon_theme=Adwaita icon_theme=Adwaita
standard_dialogs=gtk3 standard_dialogs=xdgdesktopportal
style=Breeze style=Fusion
[Fonts] [Fonts]
fixed="@Variant(\0\0\0@\0\0\0,\0I\0o\0s\0\x65\0v\0k\0\x61\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t\0 \0M\0o\0n\0o@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)" fixed="Iosevka Nerd Font Mono,12,-1,5,50,0,0,0,0,0"
general="@Variant(\0\0\0@\0\0\0,\0I\0o\0s\0\x65\0v\0k\0\x61\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t\0 \0M\0o\0n\0o@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)" general="Iosevka,12,-1,5,50,0,0,0,0,0"
[Interface] [Interface]
activate_item_on_single_click=1 activate_item_on_single_click=1
@ -19,7 +19,7 @@ gui_effects=@Invalid()
keyboard_scheme=2 keyboard_scheme=2
menus_have_icons=true menus_have_icons=true
show_shortcuts_in_context_menus=true show_shortcuts_in_context_menus=true
stylesheets=@Invalid() stylesheets=/usr/share/qt5ct/qss/fusion-fixes.qss, /usr/share/qt5ct/qss/scrollbar-simple.qss, /usr/share/qt5ct/qss/sliders-simple.qss, /usr/share/qt5ct/qss/tooltip-simple.qss, /usr/share/qt5ct/qss/traynotification-simple.qss
toolbutton_style=4 toolbutton_style=4
underline_shortcut=1 underline_shortcut=1
wheel_scroll_lines=3 wheel_scroll_lines=3
@ -28,7 +28,7 @@ wheel_scroll_lines=3
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce\0\0\0\0\0\0\0\0\x4\x38\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce) geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce\0\0\0\0\0\0\0\0\x4\x38\0\0\0\0\0\0\0\xdc\0\0\x2\x82\0\0\x2\xce)
[SettingsWindow] [SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x14\0\0\x3\xa6\0\0\x4\xe\0\0\0\0\0\0\0\x14\0\0\x2\xde\0\0\x2\xca\0\0\0\0\x2\0\0\0\x4\x38\0\0\0\0\0\0\0\x14\0\0\x3\xa6\0\0\x4\xe) geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\v\xb8\0\0\x2&\0\0\xfs\0\0\x6\x39\0\0\0\0\0\0\0\0\0\0\x3\xbb\0\0\x2\x86\0\0\0\x1\x2\0\0\0\a\x80\0\0\v\xb8\0\0\x2&\0\0\xfs\0\0\x6\x39)
[Troubleshooting] [Troubleshooting]
force_raster_widgets=1 force_raster_widgets=1

35
.config/qt6ct/qt6ct.conf Normal file
View file

@ -0,0 +1,35 @@
[Appearance]
color_scheme_path=/usr/share/qt6ct/colors/darker.conf
custom_palette=true
icon_theme=breeze-dark
standard_dialogs=xdgdesktopportal
style=Breeze
[Fonts]
fixed="Iosevka Nerd Font Mono,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
general="Iosevka,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=/usr/share/qt6ct/qss/fusion-fixes.qss, /usr/share/qt6ct/qss/scrollbar-simple.qss, /usr/share/qt6ct/qss/sliders-simple.qss, /usr/share/qt6ct/qss/tooltip-simple.qss, /usr/share/qt6ct/qss/traynotification-simple.qss
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[QSSEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\v\xb8\0\0\x2&\0\0\xe:\0\0\x4\x18\0\0\v\xb8\0\0\x2&\0\0\xe:\0\0\x4\x18\0\0\0\x1\x2\0\0\0\a\x80\0\0\v\xb8\0\0\x2&\0\0\xe:\0\0\x4\x18)
[SettingsWindow]
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\v\xb8\0\0\x2&\0\0\xfs\0\0\x6\x39\0\0\v\xb8\0\0\x2&\0\0\xfw\0\0\x6=\0\0\0\x1\x2\0\0\0\a\x80\0\0\v\xb8\0\0\x2&\0\0\xfs\0\0\x6\x39)"
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

View file

@ -13,6 +13,10 @@ exec_always "dbus-update-activation-environment --all --systemd"
# Running it manually works, so i suspect this is executed too early. # Running it manually works, so i suspect this is executed too early.
exec_always "xrandr --output DP-2 --primary" exec_always "xrandr --output DP-2 --primary"
# set XDG desktop vars
exec "export XDG_CURRENT_DESKTOP=sway"
exec "export XDG_SESSION_DESKTOP=sway"
# Autostart applets # Autostart applets
exec nm-applet --indicator exec nm-applet --indicator

View file

@ -4,15 +4,19 @@
"height": 31, "height": 31,
"modules-left": [ "modules-left": [
"hyprland/submap",
"sway/mode", "sway/mode",
"hyprland/workspaces",
"sway/workspaces", "sway/workspaces",
"sway/window" ],
"modules-center" : [
"hyprland/window",
"sway/window",
], ],
"modules-right": [ "modules-right": [
"tray", "tray",
"custom/flatpak",
"custom/packages",
"cpu", "cpu",
"memory", "memory",
"pulseaudio", "pulseaudio",
@ -30,6 +34,21 @@
"format": "{}", "format": "{}",
"max-length": 50, "max-length": 50,
}, },
"hyprland/submap": {
"format": " {}",
},
"hyprland/workspaces": {
"format": "{id}",
},
"hyprland/window": {
"format": "{}",
"rewrite": {
"(.*) — Mozilla Firefox": "🌎 $1",
},
"separate-outputs": true,
},
"tray": { "tray": {
"icon-size": 22, "icon-size": 22,
"spacing": 5, "spacing": 5,
@ -44,7 +63,7 @@
"tooltip": false, "tooltip": false,
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90,
}, },
}, },
"memory": { "memory": {
@ -53,7 +72,7 @@
"tooltip": false, "tooltip": false,
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90,
}, },
}, },
"pulseaudio": { "pulseaudio": {

View file

@ -47,6 +47,13 @@ window#waybar {
background-color: inherit; background-color: inherit;
} }
#workspaces button {
background-color: inherit;
padding: 0 0.5em;
color: @basecolor;
margin: 0.25em;
}
#workspaces button.focused { #workspaces button.focused {
background: @focused; background: @focused;
} }