delete extension names of scripts
This commit is contained in:
@@ -9,7 +9,7 @@ fi
|
||||
[ -z "$image" ] && exit 1
|
||||
|
||||
ext=${image##*.}
|
||||
current_dir="$HOME/.config/wallpaper_chooser/current"
|
||||
current_dir="$HOME/.config/wallpaper-chooser/current"
|
||||
image_copied="$current_dir/wallpaper.$ext"
|
||||
|
||||
temp_img=$(mktemp --suffix=.$ext) || exit 1
|
||||
@@ -28,4 +28,4 @@ echo "wallpaper = , $image_copied" >>"$HOME/.config/hypr/hyprpaper.conf"
|
||||
notify-send "Wallpaper Changed" "$image"
|
||||
|
||||
notify-send "Extracting colors from wallpaper" "This may take a few seconds..."
|
||||
change-colortheme.py -i "$image_copied" || exit 1
|
||||
change-colortheme -i "$image_copied" || exit 1
|
||||
@@ -7,6 +7,7 @@ import os
|
||||
import gi
|
||||
gi.require_version("Notify", "0.7")
|
||||
from gi.repository import Notify, GLib
|
||||
from datetime import datetime
|
||||
# autopep8: on
|
||||
|
||||
SCREENSHOT_DIR = os.path.join(
|
||||
@@ -22,6 +23,12 @@ SCREENSHOT_CMDS = {
|
||||
# full cmd: {cmd}{filename}
|
||||
EDIT_CMD = f"gradia {SCREENSHOT_DIR}{os.sep}"
|
||||
|
||||
|
||||
def file_name(dir, prefix="screenshot", ext=".png"):
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
||||
return f"{prefix}_{timestamp}{ext}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Take screenshots with hyprshot.")
|
||||
parser.add_argument(
|
||||
@@ -33,7 +40,7 @@ if __name__ == "__main__":
|
||||
|
||||
# file path
|
||||
os.makedirs(SCREENSHOT_DIR, exist_ok=True)
|
||||
filename = f"screenshot_{args.type}_{int(os.times().elapsed * 1000)}.png"
|
||||
filename = file_name(SCREENSHOT_DIR)
|
||||
filepath = os.path.join(SCREENSHOT_DIR, filename)
|
||||
|
||||
# take screenshot
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
path="$(dirname "$(realpath "$0")")"
|
||||
|
||||
"$path/issu.sh" && {
|
||||
"issu" && {
|
||||
echo "Do not run this script in sudo mode."
|
||||
exit 1
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
path="$(dirname "$(realpath "$0")")"
|
||||
|
||||
"$path/issu.sh" && {
|
||||
"issu" && {
|
||||
echo "Do not run this script in sudo mode."
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user