OSDN Git Service

[add] : Added thunar actions.
authorhayao <shun819.mail@gmail.com>
Thu, 11 Jun 2020 10:55:51 +0000 (19:55 +0900)
committerhayao <shun819.mail@gmail.com>
Thu, 11 Jun 2020 10:55:54 +0000 (19:55 +0900)
channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml [new file with mode: 0644]
channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml.jp [new file with mode: 0644]
channels/xfce/airootfs.any/root/customize_airootfs_xfce.sh [moved from channels/xfce/airootfs.x86_64/root/customize_airootfs_xfce.sh with 66% similarity]
channels/xfce/airootfs.i686/root/customize_airootfs_xfce.sh [deleted file]

diff --git a/channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml b/channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml
new file mode 100644 (file)
index 0000000..23b19ef
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+<action>
+       <icon>utilities-terminal</icon>
+       <name>ここでターミナルを開く</name>
+       <unique-id>1570369277037732-1</unique-id>
+       <command>exo-open --working-directory %f --launch TerminalEmulator</command>
+       <description>このディレクトリでターミナルエミュレータを起動します</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+<action>
+       <icon>system-file-manager</icon>
+       <name>Root権限でこのディレクトリを開く</name>
+       <unique-id>1570748564949968-1</unique-id>
+       <command>pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar %f</command>
+       <description>Root権限でThunarを起動します</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+<action>
+       <icon>drive-multidisk</icon>
+       <name>ファイル使用量を調べる</name>
+       <unique-id>1591871849032215-3</unique-id>
+       <command>if [[ -r %f ]] &amp;&amp; [[ -w %f ]]; then baobab %f; else pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY baobab %f; fi</command>
+       <description>Baobabを使用してディスクの使用量を調べます</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+</actions>
diff --git a/channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml.jp b/channels/xfce/airootfs.any/etc/skel/.config/Thunar/uca.xml.jp
new file mode 100644 (file)
index 0000000..23b19ef
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+<action>
+       <icon>utilities-terminal</icon>
+       <name>ここでターミナルを開く</name>
+       <unique-id>1570369277037732-1</unique-id>
+       <command>exo-open --working-directory %f --launch TerminalEmulator</command>
+       <description>このディレクトリでターミナルエミュレータを起動します</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+<action>
+       <icon>system-file-manager</icon>
+       <name>Root権限でこのディレクトリを開く</name>
+       <unique-id>1570748564949968-1</unique-id>
+       <command>pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar %f</command>
+       <description>Root権限でThunarを起動します</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+<action>
+       <icon>drive-multidisk</icon>
+       <name>ファイル使用量を調べる</name>
+       <unique-id>1591871849032215-3</unique-id>
+       <command>if [[ -r %f ]] &amp;&amp; [[ -w %f ]]; then baobab %f; else pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY baobab %f; fi</command>
+       <description>Baobabを使用してディスクの使用量を調べます</description>
+       <patterns>*</patterns>
+       <startup-notify/>
+       <directories/>
+</action>
+</actions>
@@ -75,10 +75,12 @@ rfkill unblock all
 systemctl enable bluetooth
 
 # Snap
-systemctl enable snapd.apparmor.service
-systemctl enable apparmor.service
-systemctl enable snapd.socket
-systemctl enable snapd.service
+if [[ "${arch}" = "x86_64" ]]; then
+    systemctl enable snapd.apparmor.service
+    systemctl enable apparmor.service
+    systemctl enable snapd.socket
+    systemctl enable snapd.service
+fi
 
 
 # Update system datebase
@@ -91,17 +93,29 @@ systemctl enable firewalld.service
 
 # Replace link
 if [[ "${japanese}" = true ]]; then
-    remove /etc/skel/Desktop/welcome-to-alter.desktop
-    remove /home/${username}/Desktop/welcome-to-alter.desktop
+    remove "/etc/skel/Desktop/welcome-to-alter.desktop"
+    remove "/home/${username}/Desktop/welcome-to-alter.desktop"
 
-    mv /etc/skel/Desktop/welcome-to-alter-jp.desktop /etc/skel/Desktop/welcome-to-alter.desktop
-    mv /home/${username}/Desktop/welcome-to-alter-jp.desktop /home/${username}/Desktop/welcome-to-alter.desktop
+    mv "/etc/skel/Desktop/welcome-to-alter-jp.desktop" "/etc/skel/Desktop/welcome-to-alter.desktop"
+    mv "/home/${username}/Desktop/welcome-to-alter-jp.desktop" "/home/${username}/Desktop/welcome-to-alter.desktop"
 else
-    remove /etc/skel/Desktop/welcome-to-alter-jp.desktop
-    remove /home/${username}/Desktop/welcome-to-alter-jp.desktop
+    remove "/etc/skel/Desktop/welcome-to-alter-jp.desktop"
+    remove "/home/${username}/Desktop/welcome-to-alter-jp.desktop"
 fi
 
 
+# Replace right menu
+if [[ "${japanese}" = true ]]; then
+    remove "/etc/skel/.config/Thunar/uca.xml"
+    rmeove "/home/${username}/.config/Thunar/uca.xml"
+
+    mv "/etc/skel/.config/Thunar/uca.xml.jp" "/etc/skel/.config/Thunar/uca.xml"
+    mv "/home/${username}/.config/Thunar/uca.xml.jp" "/home/${username}/.config/Thunar/uca.xml"
+else
+    remove "/etc/skel/.config/Thunar/uca.xml.jp"
+    rmeove "/home/${username}/.config/Thunar/uca.xml.jp"
+fi
+
 # Added autologin group to auto login
 groupadd autologin
 usermod -aG autologin ${username}
diff --git a/channels/xfce/airootfs.i686/root/customize_airootfs_xfce.sh b/channels/xfce/airootfs.i686/root/customize_airootfs_xfce.sh
deleted file mode 100755 (executable)
index b4f5b1c..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env bash
-#
-# Yamada Hayao
-# Twitter: @Hayao0819
-# Email  : hayao@fascode.net
-#
-# (c) 2019-2020 Fascode Network.
-#
-
-set -e -u
-
-
-# Default value
-# All values can be changed by arguments.
-password=alter
-boot_splash=false
-kernel='zen'
-theme_name=alter-logo
-rebuild=false
-japanese=false
-username='alter'
-os_name="Alter Linux"
-install_dir="alter"
-usershell="/bin/bash"
-debug=true
-
-
-# Parse arguments
-while getopts 'p:bt:k:rxju:o:i:s:da:' arg; do
-    case "${arg}" in
-        p) password="${OPTARG}" ;;
-        b) boot_splash=true ;;
-        t) theme_name="${OPTARG}" ;;
-        k) kernel="${OPTARG}" ;;
-        r) rebuild=true ;;
-        j) japanese=true;;
-        u) username="${OPTARG}" ;;
-        o) os_name="${OPTARG}" ;;
-        i) install_dir="${OPTARG}" ;;
-        s) usershell="${OPTARG}" ;;
-        d) debug=true ;;
-        x) debug=true; set -xv ;;
-        a) arch="${OPTARG}"
-    esac
-done
-
-
-# Delete file only if file exists
-# remove <file1> <file2> ...
-function 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
-        echo "${_file} was deleted."
-    done
-}
-
-
-# Replace wallpaper.
-if [[ -f /usr/share/backgrounds/xfce/xfce-stripes.png ]]; then
-    remove /usr/share/backgrounds/xfce/xfce-stripes.png
-    ln -s /usr/share/backgrounds/alter.png /usr/share/backgrounds/xfce/xfce-stripes.png
-fi
-[[ -f /usr/share/backgrounds/alter.png ]] && chmod 644 /usr/share/backgrounds/alter.png
-
-
-# Replace link
-if [[ "${japanese}" = true ]]; then
-    remove /etc/skel/Desktop/welcome-to-alter.desktop
-    remove /home/${username}/Desktop/welcome-to-alter.desktop
-
-    mv /etc/skel/Desktop/welcome-to-alter-jp.desktop /etc/skel/Desktop/welcome-to-alter.desktop
-    mv /home/${username}/Desktop/welcome-to-alter-jp.desktop /home/${username}/Desktop/welcome-to-alter.desktop
-else
-    remove /etc/skel/Desktop/welcome-to-alter-jp.desktop
-    remove /home/${username}/Desktop/welcome-to-alter-jp.desktop
-fi
-
-
-# Bluetooth
-rfkill unblock all
-systemctl enable bluetooth
-
-
-# Update system datebase
-dconf update
-
-
-# firewalld
-systemctl enable firewalld.service
-
-
-# Added autologin group to auto login
-groupadd autologin
-usermod -aG autologin ${username}
-
-
-# Enable LightDM to auto login
-if [[ "${boot_splash}" =  true ]]; then
-    systemctl enable lightdm-plymouth.service
-else
-    systemctl enable lightdm.service
-fi
-
-
-# Replace auto login user
-sed -i s/%USERNAME%/${username}/g /etc/lightdm/lightdm.conf
-