OSDN Git Service

[update] : alterlinux-live-tools
authorhayao <shun819.mail@gmail.com>
Thu, 6 Aug 2020 07:14:08 +0000 (16:14 +0900)
committerhayao <shun819.mail@gmail.com>
Thu, 6 Aug 2020 07:14:08 +0000 (16:14 +0900)
channels/xfce-pro/airootfs.any/etc/skel/.bash_profile
channels/xfce-pro/airootfs.any/etc/skel/.config/autostart/gensidebar.desktop
channels/xfce-pro/airootfs.any/etc/skel/.config/autostart/welcome_page.desktop
channels/xfce-pro/airootfs.any/etc/skel/.zprofile
channels/xfce-pro/airootfs.any/root/customize_airootfs_xfce-pro.sh
channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-sidebar [deleted file]
channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-welcome-page [deleted file]
channels/xfce-pro/packages.x86_64/other.x86_64

index 0a7f380..85642fb 100755 (executable)
@@ -3,7 +3,6 @@
 #
 
 [[ -f ~/.bashrc ]] && . ~/.bashrc
-[[ -f /usr/local/bin/alterlinux-user-directory ]] && /usr/local/bin/alterlinux-user-directory
 if [[ $(systemctl is-active graphical.target) = "active" ]] && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
   exec startx
 fi
\ No newline at end of file
index 34e1a9f..2afc132 100755 (executable)
@@ -4,7 +4,7 @@ Version=1.0
 Name=AlterLinux Sidebar
 Comment=Generates sidebar items.
 Icon=utilities-terminal
-Exec=/usr/local/bin/alterlinux-sidebar -f --alterlive init
+Exec=/usr/bin/alterlinux-gtk-bookmarks -f --alterlive init
 X-GNOME-Autostart-enabled=true
 Type=Application
 RunHook=0
index 16986fa..cd9c8fb 100755 (executable)
@@ -4,7 +4,7 @@ Version=1.0
 Name=Welcome to AlterLinux
 Comment=Displays the AlterLinux welcome page.
 Icon=utilities-terminal
-Exec=/usr/local/bin/alterlinux-welcome-page -l --alterlive
+Exec=/usr/bin/alterlinux-welcome-page -l --alterlive
 X-GNOME-Autostart-enabled=true
 Type=Application
 RunHook=0
index dab7555..57e29a8 100755 (executable)
@@ -2,7 +2,6 @@
 # ~/.zsh_profile
 #
 
-[[ -f /usr/local/bin/alterlinux-user-directory ]] && /usr/local/bin/alterlinux-user-directory
 if [[ $(systemctl is-active graphical.target) = "active" ]] && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
   exec startx
 fi
index 30a1556..6ecc70b 100755 (executable)
@@ -144,8 +144,6 @@ else
 fi
 
 
-# Set script permission
-chmod 755 /usr/local/bin/alterlinux-sidebar
 
 # Replace auto login user
 sed -i s/%USERNAME%/${username}/g /etc/lightdm/lightdm.conf
diff --git a/channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-sidebar b/channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-sidebar
deleted file mode 100755 (executable)
index 8557e60..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/usr/bin/env bash
-# Yamada Hayao
-# Twitter: @Hayao0819
-# Email  : hayao@fascode.net
-#
-# (c) 2019-2020 Fascode Network.
-#
-
-
-set -e
-
-force=false
-alterlive=false
-
-remove () {
-    local _list
-    local _file
-    _list=($(echo "$@"))
-    for _file in "${_list[@]}"; do
-        if [[ -f ${_file} ]]; then
-            rm -f "${_file}"
-        elif [[ -d ${_file} ]]; then
-            rm -rf "${_file}"
-        fi
-    done
-}
-
-_help() {
-    echo "usage ${0} [options] [command]"
-    echo
-    echo " General options:"
-    echo "    -f | --force     Force overwriting."
-    echo "    -h | --help      This help message and exit."
-    echo
-    echo " General command:"
-    echo "    add <dir>        Add items to the sidebar."
-    echo "    delete           Delete all sidebar items."
-    echo "    init             Initializes the sidebar."
-    echo "    help             This help message and exit."
-}
-
-output() {
-    echo "${@}" >> "${HOME}/.config/gtk-3.0/bookmarks"
-}
-
-_msg_error() {
-    echo "${@}" >&2
-}
-
-prepare() {
-    if [[ ! -d "${HOME}/.config/gtk-3.0/" ]]; then
-        mkdir -p "${HOME}/.config/gtk-3.0/"
-    fi
-    if [[ ! -f "${HOME}/.config/gtk-3.0/bookmarks" ]]; then
-        touch "${HOME}/.config/gtk-3.0/bookmarks"
-    fi
-}
-
-add() {
-    prepare
-    local dir
-    for dir in ${@}; do
-        if [[ ! -d "${dir}" ]]; then
-            _msg_error "${dir} does not exist."
-            exit 1
-        else
-            output "file://${dir}"
-        fi
-    done
-}
-
-init() {
-    remove "${HOME}/.config/gtk-3.0/bookmarks"
-
-    prepare
-
-    source "${HOME}/.config/user-dirs.dirs"
-
-    output "file://${XDG_DOCUMENTS_DIR} Documents"
-    output "file://${XDG_DOWNLOAD_DIR} Downloads"
-    output "file://${XDG_MUSIC_DIR} Music"
-    output "file://${XDG_PICTURES_DIR} Pictures"
-    output "file://${XDG_VIDEOS_DIR} Videos"
-}
-
-
-
-# Argument analysis and processing
-options="${@}"
-_opt_short="fh"
-_opt_long="force,help,alterlive"
-OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
-if [[ ${?} != 0 ]]; then
-    exit 1
-fi
-
-eval set -- "${OPT}"
-unset OPT
-unset _opt_short
-unset _opt_long
-
-
-while true; do
-    case ${1} in
-        -f | --force)
-            force=true
-            shift 1
-            ;;
-        -h | --help)
-            _help
-            shift 1
-            exit 0
-            ;;
-        --alterlive)
-            alterlive=true
-            shift 1
-            ;;
-        --)
-            shift
-            break
-            ;;
-        *)
-            _msg_error "Invalid argument '${1}'"
-            _help
-            exit 1
-            ;;
-    esac
-done
-
-mode="${1}"
-
-case "${1}" in
-    add) 
-        shift 1
-        if [[ -z "${@}" ]]; then
-            _msg_error "Please specify a directory."
-            exit 1
-        else
-            add "${@}"
-        fi
-        exit 0
-        ;;
-    delete)
-        remove "${HOME}/.config/gtk-3.0/bookmarks"
-        exit 0
-        ;;
-    init)
-        if [[ -f "${HOME}/.config/gtk-3.0/bookmarks" ]] && [[ "${force}" = false ]]; then
-            _msg_error "The sidebar already exists. Use -f to force initialization."
-            exit 1
-        else
-            init
-        fi
-        exit 0
-        ;;
-    help)
-        _help
-        exit 0
-        ;;
-    *)
-        _msg_error "Please specify a command."
-        exit 1
-        ;;
-esac
-
-if [[ "${alterlive}" = true ]]; then
-    remove ~/.config/autostart/gensidebar.desktop
-fi
diff --git a/channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-welcome-page b/channels/xfce-pro/airootfs.any/usr/local/bin/alterlinux-welcome-page
deleted file mode 100755 (executable)
index 8102b92..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/bin/env bash
-# Yamada Hayao
-# Twitter: @Hayao0819
-# Email  : hayao@fascode.net
-#
-# (c) 2019-2020 Fascode Network.
-#
-
-set -e
-
-checklive=false
-alterlive=false
-url="https://fascode.net/projects/linux/alter/welcome.php"
-browser="chromium --start-maximized %s"
-custombrowser=false
-
-defaultbrowserlist=(
-    "firefox %s"
-    "chromium --start-maximized %s"
-    "google-chrome  --start-maximized %s"
-)
-
-remove () {
-    local _list
-    local _file
-    _list=($(echo "$@"))
-    for _file in "${_list[@]}"; do
-        if [[ -f ${_file} ]]; then
-            rm -f "${_file}"
-        elif [[ -d ${_file} ]]; then
-            rm -rf "${_file}"
-        fi
-    done
-}
-
-_help() {
-    echo "Displays the AlterLinux welcome page"
-    echo "usage alterlinux-welcome-page [options]"
-    echo
-    echo " General options:"
-    echo "    -b | --browser <cmd>  Specify the browser command."
-    echo "                          %s will be replaced with the URL"
-    echo "                          Default: ${browser}"
-    echo "    -u | --url <url>      Set the URL."
-    echo "                          Default: ${url}"
-    echo
-    echo "    -l | --live           Opens the page only in a live environment."
-    echo "    -h | --help           This help message and exit."
-}
-
-_msg_error() {
-    echo "${@}" >&2
-}
-
-
-# Argument analysis and processing
-options="${@}"
-_opt_short="b:u:lh"
-_opt_long="browser:,url:,live,help,alterlive"
-OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
-if [[ ${?} != 0 ]]; then
-    exit 1
-fi
-
-eval set -- "${OPT}"
-unset OPT
-unset _opt_short
-unset _opt_long
-
-while true; do
-    case ${1} in
-        -b | --browser)
-            browser="${2}"
-            custombrowser=true
-            shift 2
-            ;;
-        -l | --live)
-            checklive=true
-            shift 1
-            ;;
-        -u | --url)
-            url="${2}"
-            shift 2
-            ;;
-        -h | --help)
-            _help
-            shift 1
-            exit 0
-            ;;
-        --alterlive)
-            alterlive=true
-            shift 1
-            ;;
-        --)
-            shift
-            break
-            ;;
-        *)
-            _msg_error "Invalid argument '${1}'"
-            _help
-            exit 1
-            ;;
-    esac
-done
-
-if [[ "${checklive}" = true ]]; then
-    if [[ -n $(pacman -Q alterlinux-calamares) ]]; then
-        exit 0
-    fi
-fi
-
-if [[ "${custombrowser}" = false ]]; then
-    defaultbrowserlist+=("END_OF_LIST")
-    for ((_browser_count = 0; _browser_count < ${#defaultbrowserlist[@]}; _browser_count++)); do
-        _browser="${defaultbrowserlist[${_browser_count}]}"
-        if [[ -f $(type -P "$(echo ${_browser} | awk '{print $1}')") ]]; then
-            browser="${_browser}"
-            break
-        elif [[ "${_browser}" == "END_OF_LIST" ]]; then
-            _msg_error "No available browser is installed."
-            exit 1
-        fi
-    done
-fi
-
-$(printf "${browser}" "${url}")
-
-if [[ "${alterlive}" = true ]]; then
-    remove ~/.config/autostart/welcome_page.desktop
-fi
index 87b9a09..52294c0 100644 (file)
@@ -47,6 +47,12 @@ pamac-aur
 system-config-printer
 
 
+#-- scripts --#
+alterlinux-gtk-bookmarks
+alterlinux-live-tools
+alterlinux-welcome-page
+
+
 #-- text editor --#
 medit
 nano