2025.04.30-20:50
This commit is contained in:
20
nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Chown.sh
Executable file
20
nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Chown.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set IFS so that it won't consider spaces as entry separators. Without this, spaces in file/folder names can make the loop go wacky.
|
||||
IFS=$'\n'
|
||||
|
||||
# See if the Nautilus environment variable is empty
|
||||
if [ -z $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ]; then
|
||||
# If it's blank, set it equal to $1
|
||||
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$1
|
||||
fi
|
||||
|
||||
# Loop through the list (from either Nautilus or the command line)
|
||||
for ARCHIVE_FULLPATH in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
|
||||
NEWDIRNAME=${ARCHIVE_FULLPATH%.*}
|
||||
FILENAME=${ARCHIVE_FULLPATH##*/}
|
||||
NAME=${ARCHIVE_FULLPATH##*/.*}
|
||||
|
||||
gnome-terminal -x sudo chown -R zulumann:zulumann "$ARCHIVE_FULLPATH"
|
||||
notify-send -t 5000 -i /usr/share/icons/gnome/32x32/status/info.png "Chowning Of File(s)/Folder(s) Finished"
|
||||
done
|
Reference in New Issue
Block a user