--- /dev/null
+#!/usr/bin/env bash
+
+set -eu
+
+script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
+
+[[ -z "${1-""}" ]] && echo "Set English short title for argument" >&2 && exit 1
+
+cd "${script_path}" || return 0
+filename="posts/$(date +%Y%m%d)/${1}/index.md"
+[[ ! -f "${script_path}/${filename}" ]] && hugo new "${filename}"
+type code 1>/dev/null 2>&1 && code "${script_path}/src/content/${filename}"
--- /dev/null
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Create new post
+Exec=bash ./new-post.sh
#!/usr/bin/env bash
-set -eu
-
-script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
-
-[[ -z "${1-""}" ]] && echo "Set English short title for argument" >&2 && exit 1
-
-cd "${script_path}" || return 0
-filename="posts/$(date +%Y%m%d)/${1}/index.md"
-[[ ! -f "${script_path}/${filename}" ]] && hugo new "${filename}"
-type code 1>/dev/null 2>&1 && code "${script_path}/src/content/${filename}"
+set -Eeu
+title="$(zenity --forms --add-entry="Title" --text="Set English short title for argument" | tr " " "-" | tr "[:upper:]" "[:lower:]")"
+bash "$(cd "$(dirname "${0}")" && pwd)/new-post-cli.sh" "${title}"
Set objShell = CreateObject("WScript.Shell")\r
Dim FlSysObj\r
Set FlSysObj = createObject("Scripting.FileSystemObject")\r
-objShell.Run "cmd /c " & "bash .\new-post.sh " & Input ,0,false\r
+objShell.Run "cmd /c " & "bash .\new-post-cli.sh " & Input ,0,false\r