Skip to content

Commit

Permalink
(Wayland) Finalize switch to Hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
ralgar committed Oct 21, 2022
1 parent 0ca2281 commit 23476d8
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 9 deletions.
32 changes: 28 additions & 4 deletions .config/hypr/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#
# Refer to the wiki for more information.

monitor=,1366x768@60,0x0,1
monitor=DP-1,1920x1080@144,0x0,1
#monitor=HDMI-A-1,1920x1080@60,1920x0,1
monitor=HDMI-A-1,disable
workspace=DP-1,1

input {
Expand Down Expand Up @@ -51,15 +53,20 @@ dwindle {
preserve_split=1
}

# example window rules
########################
### WINDOW RULES ###
########################
# for windows named/classed as abc and xyz
#windowrule=move 69 420,abc
#windowrule=size 420 69,abc
#windowrule=tile,xyz
#windowrule=float,abc
#windowrule=pseudo,abc
#windowrule=monitor 0,xyz

windowrule=workspace 2,title:^(Firefox)(.*)$
windowrule=center,^(Steam)$
windowrule=minsize 800 600,^(Steam)$
windowrule=fullscreen,^(gamescope)$

####################
### KEYBINDS ###
Expand All @@ -68,10 +75,11 @@ dwindle {
bind=SUPER,Return,exec,alacritty
bind=SUPER,Q,killactive,
bind=SUPERSHIFT,Q,exit,
bind=SUPER,E,exec,wofi --show drun
bind=SUPER,E,exec,wofi --show drun --gtk-dark
bind=SUPER,V,togglefloating,
bind=SUPER,P,pseudo,
bind=SUPER,L,exec,waylock
bind=SUPER,F,fullscreen

# Window focus
bind=SUPER,left,movefocus,l
Expand Down Expand Up @@ -108,9 +116,25 @@ bind=,XF86AudioLowerVolume,exec,amixer -q set Master 5%-
bind=,XF86AudioRaiseVolume,exec,amixer -q set Master 5%+


######################
### WORKSPACES ###
######################
wsbind = 1,DP-1
wsbind = 2,DP-1
wsbind = 3,DP-1
wsbind = 4,DP-1
wsbind = 5,DP-1
wsbind = 6,DP-1
wsbind = 7,DP-1
wsbind = 8,DP-1
wsbind = 9,HDMI-A-1


#####################
### Autostart ###
#####################
exec-once=hyprpaper
exec-once=waybar
exec-once=dunst
exec-once=mpd
exec-once=sh -c "ssh-agent -D -a $XDG_RUNTIME_DIR/ssh-agent.socket"
2 changes: 1 addition & 1 deletion .config/hypr/hyprpaper.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
preload = ~/Pictures/wallpaper/1-single/marshmello-space.jpg

# Wallpapers to be applied by default
wallpaper = eDP-1,~/Pictures/wallpaper/1-single/marshmello-space.jpg
wallpaper = DP-1,~/Pictures/wallpaper/1-single/marshmello-space.jpg

# Disable IPC unless needed
ipc = off
27 changes: 23 additions & 4 deletions .config/zsh/.zlogin
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Workaround for GTK themes not applying
import-gsettings() {
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
[[ -f "$config" ]] || {
printf "WARN: Could not find GTK3 config to load!\n"
return 1
}

gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
}

if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
echo
PS3="Choose a session: "
Expand All @@ -6,13 +25,13 @@ if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
"Xorg")
exec startx ;;
"Wayland")
export XDG_CURRENT_DESKTOP="Unity"
export MOZ_ENABLE_WAYLAND=1
if which nvidia-smi &> /dev/null ; then # Workaround for nvidia disappearing cursor
# Workaround for Nvidia disappearing cursor
if lsmod | grep nvidia &> /dev/null ; then
export WLR_NO_HARDWARE_CURSORS=1
fi
import-gsettings # Workaround for GTK themes not applying
exec dwl > "${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/dwltags" ;;
import-gsettings
exec Hyprland ;;
"Console")
break ;;
*)
Expand Down

0 comments on commit 23476d8

Please sign in to comment.