Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Configs/.config/hypr/windowrules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ windowrule = float true,match:title ^(Friends List)$ # Steam Friends List
windowrule = float true,match:title ^(Steam Settings)$ # Steam Settings
windowrule = float true,match:initial_title ^(Image Editor)$,match:class ^(blender)$ # Blender Render
windowrule = size (monitor_w*0.5) (monitor_h*0.5),match:initial_title ^(Image Editor)$,match:class ^(blender)$
windowrule = float true, match:initial_title ^(Ghidra: NO ACTIVE PROJECT) #Ghidra Project manager

# workaround for jetbrains IDEs dropdowns/popups cause flickering
windowrule = no_initial_focus true,match:class ^(.*jetbrains.*)$,match:title ^(win[0-9]+)$
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,18 @@ While installing HyDE alongside another [DE](https://wiki.archlinux.org/title/De
For NixOS support there is a separate project being maintained @ [Hydenix](https://github.com/richen604/hydenix/tree/main)

> [!IMPORTANT]
> The install script will auto-detect an NVIDIA card and install nvidia-open-dkms drivers for your kernel.
> For legacy cards [check this first](./Scripts/nvidia-db/)
> Please ensure that your NVIDIA card supports dkms drivers in the list provided [here](https://wiki.archlinux.org/title/NVIDIA).
> The install script will auto-detect an NVIDIA card and install a matching DKMS driver path for your kernel.
> Newer cards may use `nvidia-dkms` / `nvidia-open-dkms`, while legacy cards should be checked first against [`Scripts/nvidia-db/`](./Scripts/nvidia-db/).
> Please ensure that your NVIDIA card supports the DKMS driver family selected for it in the list provided [here](https://wiki.archlinux.org/title/NVIDIA).
>
> If a DKMS package is selected, expect a local module build for the current kernel during installation. This can take several minutes and may happen even when an NVIDIA DKMS package was already installed, because DKMS rebuilds modules for the active kernel.

> [!CAUTION]
> The script modifies your `grub` or `systemd-boot` config to enable NVIDIA DRM.

> [!TIP]
> BigLinux / Manjaro users may want to take a snapshot with Timeshift before running the installer, especially when HyDE is being installed alongside an existing desktop environment. On older NVIDIA cards, review the legacy driver list in [`Scripts/nvidia-db/`](./Scripts/nvidia-db/) before continuing.

To install, execute the following commands:

```shell
Expand Down Expand Up @@ -110,6 +115,14 @@ View installation instructions for HyDE in [Hyde-cli - Usage](https://github.com
Please reboot after the install script completes and takes you to the SDDM login screen (or black screen) for the first time.
For more details, please refer to the [installation wiki](https://github.com/HyDE-Project/HyDE/wiki/installation).

Quick checklist for Arch-based distros such as BigLinux / Manjaro:

- Create a restore point (for example with Timeshift) before running `install.sh`.
- Expect changes to GRUB, SDDM, and `/etc/pacman.conf` during installation.
- If your GPU is an older NVIDIA model, verify whether it belongs to a legacy dkms series before accepting the default driver path.
- If a `*-dkms` NVIDIA package is selected, expect a local module build for the current kernel during install; this can take a while even if the package was already installed previously.
- Reboot after the installer finishes, then select the Hyprland / HyDE session from the display manager.

<div align="right">
<br>
<a href="#-design-by-t2"><kbd> <br> 🡅 <br> </kbd></a>
Expand Down
6 changes: 5 additions & 1 deletion Scripts/restore_shl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ fi
# set shell
if [[ "$(grep "/${USER}:" /etc/passwd | awk -F '/' '{print $NF}')" != "${myShell}" ]]; then
print_log -sec "SHELL" -stat "change" "shell to ${myShell}..."
[ ${flg_DryRun} -eq 1 ] || chsh -s "$(which "${myShell}")"
if [ ${flg_DryRun} -ne 1 ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find other unquoted flg_DryRun numeric tests in shell scripts.
fd -e sh . Scripts Configs | xargs rg -n '\[\s+\$\{?flg_DryRun\}?(\s|])'

Repository: HyDE-Project/HyDE

Length of output: 1882


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant section and nearby dry-run checks.
sed -n '85,105p' Scripts/restore_shl.sh

printf '\n---\n'

# Probe how the test behaves with normal, empty, and malformed values.
for v in 0 1 '' '1 2' '*'; do
  printf 'value=%q -> ' "$v"
  if bash -c 'v=$1; if [ $v -ne 1 ]; then echo yes; else echo no; fi' _ "$v" 2>&1; then
    : 
  fi
done

Repository: HyDE-Project/HyDE

Length of output: 1136


Quote flg_DryRun in this guard. Even with the default value earlier, an unexpected environment value can split or glob before [ evaluates the numeric comparison.

Suggested fix
-    if [ ${flg_DryRun} -ne 1 ]; then
+    if [ "${flg_DryRun}" -ne 1 ]; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [ ${flg_DryRun} -ne 1 ]; then
if [ "${flg_DryRun}" -ne 1 ]; then
🧰 Tools
🪛 Shellcheck (0.11.0)

[info] 96-96: Double quote to prevent globbing and word splitting.

(SC2086)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Scripts/restore_shl.sh` at line 96, The dry-run guard in the restore script
should quote the flg_DryRun variable before the numeric test to avoid
word-splitting or globbing from unexpected environment values. Update the
conditional around the flg_DryRun check in the script’s main guard so the shell
test evaluates a safely quoted value while preserving the existing -ne 1
comparison.

Source: Linters/SAST tools

if ! chsh -s "$(which "${myShell}")"; then
print_log -sec "SHELL" -warn "skipped" "could not change login shell automatically; continue install and run 'chsh -s $(which "${myShell}")' later if you want ${myShell} as default shell..."
fi
fi
else
print_log -sec "SHELL" -stat "exist" "${myShell} is already set as shell..."
fi
18 changes: 16 additions & 2 deletions Source/docs/README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ Embora instalar o HyDE com outro [ambiente desktop (DE)](https://wiki.archlinux.
Para o suporte a NixOS, existe um projeto separado sendo mantido em @ [Hydenix](https://github.com/richen604/hydenix/tree/main)

> [!IMPORTANT]
> O script de instalação detectará automaticamente uma placa NVIDIA e instalará os drivers nvidia-open-dkms para o seu kernel.
> Por favor, verifique se sua placa NVIDIA é compatível com os drivers nvidia-open-dkms listados [aqui](https://wiki.archlinux.org/title/NVIDIA).
> O script de instalação detectará automaticamente uma placa NVIDIA e escolherá uma trilha de driver DKMS compatível com o seu kernel.
> Placas mais novas podem usar `nvidia-dkms` / `nvidia-open-dkms`, enquanto placas legadas devem ser verificadas antes em [`Scripts/nvidia-db/`](../../Scripts/nvidia-db/).
> Por favor, verifique se sua placa NVIDIA é compatível com a família de driver DKMS selecionada na lista [aqui](https://wiki.archlinux.org/title/NVIDIA).
>
> Se um pacote DKMS for selecionado, espere uma compilação local do módulo para o kernel atual durante a instalação. Isso pode levar vários minutos e pode acontecer mesmo que um pacote NVIDIA DKMS já estivesse instalado, porque o DKMS recompila os módulos para o kernel ativo.

> [!CAUTION]
> O script de instalação modifica as configurações do seu `grub` ou `systemd-boot` para habilitar o DRM da NVIDIA.

> [!TIP]
> Usuários do BigLinux / Manjaro podem querer criar um snapshot com o Timeshift antes de executar o instalador, especialmente quando o HyDE será instalado ao lado de um ambiente desktop já existente. Em placas NVIDIA mais antigas, revise antes a lista de drivers legados em [`Scripts/nvidia-db/`](../../Scripts/nvidia-db/).

Para instalar, execute os comandos abaixo:

```shell
Expand Down Expand Up @@ -103,6 +109,14 @@ View installation instructions for HyDE in [Hyde-cli - Usage](https://github.com
Por favor, reinicie o sistema após o script concluir a instalação e levá-lo à tela de login do SDDM (ou a uma tela preta) pela primeira vez.
Para mais detalhes, por favor consulte a [wiki de instalação](https://github.com/HyDE-Project/HyDE/wiki/installation).

Checklist rápido para distros derivadas do Arch, como BigLinux / Manjaro:

- Crie um ponto de restauração (por exemplo com o Timeshift) antes de executar `install.sh`.
- Espere alterações no GRUB, SDDM e em `/etc/pacman.conf` durante a instalação.
- Se sua GPU for um modelo NVIDIA antigo, verifique antes se ela pertence a uma série legada de dkms antes de aceitar o caminho padrão de driver.
- Se um pacote NVIDIA `*-dkms` for selecionado, espere uma compilação local do módulo para o kernel atual durante a instalação; isso pode demorar mesmo quando o pacote já estava instalado anteriormente.
- Reinicie após o término do instalador e então escolha a sessão Hyprland / HyDE no gerenciador de login.

<div align="right">
<br>
<a href="#-design-by-t2"><kbd> <br> 🡅 <br> </kbd></a>
Expand Down
Loading