routine changes
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
def rename_folders_and_files(directory):
|
||||
# First, rename files and directories in subdirectories
|
||||
for root, dirs, files in os.walk(directory):
|
||||
for d in dirs:
|
||||
rename_folders_and_files(os.path.join(root, d))
|
||||
|
||||
# Then, rename files in the current directory
|
||||
for root, dirs, files in os.walk(directory):
|
||||
for f in files:
|
||||
old_path = os.path.join(root, f)
|
||||
new_path = os.path.join(root, f.lower().replace(" ", "_"))
|
||||
os.rename(old_path, new_path)
|
||||
|
||||
# Finally, rename directories in the current directory
|
||||
for root, dirs, _ in os.walk(directory):
|
||||
for d in dirs:
|
||||
old_path = os.path.join(root, d)
|
||||
new_path = os.path.join(root, d.lower().replace(" ", "_"))
|
||||
os.rename(old_path, new_path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
root_directory = input("Enter the root directory path: ")
|
||||
rename_folders_and_files(root_directory)
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if argument is provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <commit_message>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add all changes
|
||||
git add .
|
||||
|
||||
# Commit with the provided argument
|
||||
commit_message="$1"
|
||||
git commit -m "$commit_message"
|
||||
|
||||
# Push changes to the master branch of the origin remote
|
||||
git push -u origin master
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if rofi is already running
|
||||
if pgrep -x "rofi" > /dev/null
|
||||
then
|
||||
# If running, kill rofi
|
||||
pkill -x rofi
|
||||
else
|
||||
# If not running, launch rofi
|
||||
rofi -show drun &
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user