diff options
| author | ryukamish <[email protected]> | 2026-05-19 07:56:14 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-05-19 07:56:14 +0530 |
| commit | b163e4e1fb8e58d9a27fcb95d6941fa302694e66 (patch) | |
| tree | f06f7922010bda9411d12fe4eaef3daf9602f31a | |
| parent | 254f6dcd7e51840ae343c8669723399d06e6ccc6 (diff) | |
add: debug messages for commands and start niri from different shells like bash and zsh
| -rwxr-xr-x | setup.sh | 38 |
1 files changed, 32 insertions, 6 deletions
@@ -110,23 +110,28 @@ else done fi -select qs_shell in "noctalia" "dms (Dank Material Shell)"; do +select qs_shell in "noctalia" "dms (Dank Material Shell)" "none"; do if [ "$qs_shell" == "noctalia" ]; then systemctl --user add-wants niri.service noctalia.service systemctl --user enable noctalia.service break - else + elif [ "$qs_shell" == "dms (Dank Material Shell)" ]; then systemctl --user enable dms systemctl --user start dms break + elif [ "$qs_shell" == "none" ]; then + break fi done # Bash scripts git repo +msg info "Cloning bash-utils repo" git clone https://github.com/ryukamish/bash-utils.git ~/.local/bin +msg info "Updating mime database" update-mime-database ~/.local/share/applications # Mimetype default settings +msg info "Setting default mime types" xdg-mime default librewolf.desktop x-scheme-handler/http xdg-mime default librewolf.desktop x-scheme-handler/https # pdf reader @@ -155,8 +160,29 @@ xdg-mime default mpv.desktop video/x-theora+ogg xdg-mime default mpv.desktop application/ogg # Start niri without a display manager -# if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ] && [ -z "$NIRI_LOADED" ]; then -# export NIRI_LOADED=1 -# exec niri-session -# fi +shell_chk=$(which "$SHELL") +start_niri(){ + tee -a "$1" <<EOF +if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ] && [ -z "$NIRI_LOADED" ]; then + export NIRI_LOADED=1 + exec niri-session +fi +EOF +} +case "$shell_chk" in + *bash*) + if [ -f "$HOME/.bash_profile" ]; then + start_niri "$HOME/.bash_profile" + else + touch "$HOME/.bash_profile" && start_niri "$HOME/.bash_profile" + fi + ;; + *zsh*) + if [ -f "$HOME/.zshrc" ]; then + start_niri "$HOME/.zprofile" + else + touch "$HOME/.zprofile" && start_niri "$HOME/.zprofile" + fi + ;; +esac |
