added ensure-niri script

This commit is contained in:
2025-09-20 23:11:02 +02:00
parent df51925710
commit 341f5fdff7
2 changed files with 49 additions and 3 deletions

13
niri/ensure-niri Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
user_home=$(bash -c "cd ~$(printf %q "$USER") && pwd")
configfile="$user_home/.config/niri/config.kdl"
if [ ! -L ${configfile} ] && [ -f ${configfile} ] ; then
echo Backing up existin config to $configfile.bak
mv $configfile $configfile.bak
echo Linking
ln -s $user_home/dotfiles/niri/config.kdl $configfile
fi
if [ ! -f ${configfile} ]; then
echo Linking
ln -s $user_home/dotfiles/niri/config.kdl $configfile
fi