Skip to content

Commit

Permalink
Adjusted for Ubuntu-Hyprland-24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
JaKooLit committed Sep 7, 2024
1 parent 1ad0d7a commit afdd8da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
2 changes: 2 additions & 0 deletions config/hypr/UserConfigs/ENVariables.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto
#env = LIBGL_ALWAYS_SOFTWARE,1
#env = WLR_RENDERER_ALLOW_SOFTWARE,1

#env = WLR_NO_HARDWARE_CURSORS,1

# nvidia firefox (for hardware acceleration on FF)?
# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration
#env = MOZ_DISABLE_RDD_SANDBOX,1
Expand Down
15 changes: 0 additions & 15 deletions config/hypr/UserConfigs/UserSettings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dwindle {
}

master {
new_status = master
new_on_top = 1
mfact = 0.5
}
Expand Down Expand Up @@ -99,8 +98,6 @@ misc {
enable_swallow = true
swallow_regex = ^(kitty)$
focus_on_activate = false
initial_workspace_tracking = 0
middle_click_paste = false
}

#opengl {
Expand All @@ -118,16 +115,4 @@ xwayland {
force_zero_scaling = true
}

# render section for Hyprland >= v0.42.0
#render {
# explicit_sync = 2
# explicit_sync_kms = 2
# direct_scanout = false
#}

cursor {
no_hardware_cursors = false
enable_hyprcursor = true
warp_on_change_workspace = true
no_warps = true
}
14 changes: 4 additions & 10 deletions copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,19 @@ LOG="Copy-Logs/install-$(date +%d-%H%M%S)_dotfiles.log"
# update home folders
xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true

# setting up for nvidia
# uncommenting WLR_NO_HARDWARE_CURSORS if nvidia is detected
if lspci -k | grep -A 2 -E "(VGA|3D)" | grep -iq nvidia; then
echo "Nvidia GPU detected. Setting up proper env's and configs" 2>&1 | tee -a "$LOG" || true
echo "Nvidia GPU detected. Setting up proper env's" 2>&1 | tee -a "$LOG" || true
sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = LIBVA_DRIVER_NAME,nvidia/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = __GLX_VENDOR_LIBRARY_NAME,nvidia/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = NVD_BACKEND,direct/s/^#//' config/hypr/UserConfigs/ENVariables.conf
# enabling no hardware cursors if nvidia detected
sed -i 's/^\([[:space:]]*no_hardware_cursors[[:space:]]*=[[:space:]]*\)false/\1true/' config/hypr/UserConfigs/UserSettings.conf
# disabling explicit sync for nvidia for now (Hyprland 0.42.0)
sed -i 's/ explicit_sync = 2/ explicit_sync = 0/' config/hypr/UserConfigs/UserSettings.conf
fi

# uncommenting WLR_RENDERER_ALLOW_SOFTWARE,1 if running in a VM is detected
if hostnamectl | grep -q 'Chassis: vm'; then
echo "System is running in a virtual machine." 2>&1 | tee -a "$LOG" || true
# enabling proper ENV's for Virtual Environment which should help
sed -i 's/^\([[:space:]]*no_hardware_cursors[[:space:]]*=[[:space:]]*\)false/\1true/' config/hypr/UserConfigs/UserSettings.conf
sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = WLR_RENDERER_ALLOW_SOFTWARE,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = LIBGL_ALWAYS_SOFTWARE,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/monitor = Virtual-1, 1920x1080@60,auto,1/s/^#//' config/hypr/UserConfigs/Monitors.conf
fi

Expand Down

0 comments on commit afdd8da

Please sign in to comment.