nwgp.sh done
at least the first version
This commit is contained in:
@@ -31,6 +31,14 @@ continue_if_yes() {
|
||||
|
||||
backupDeploy() {
|
||||
|
||||
# Key Options for Copy:
|
||||
# -r (recursive): Recursive copying.
|
||||
# -v (verbose): Show each file as it is copied.
|
||||
# -p (preserve): Keep original file permissions, ownership, and timestamps.
|
||||
# -i (interactive): Prompt before overwriting existing files.
|
||||
# -n (no-clobber): Skip copying if the destination file exists.
|
||||
# -u (update): Copy only when the source is newer than the destination.
|
||||
|
||||
local operation=$1
|
||||
local repo_dir="/home/poq/syncDir/gitRepos/gi.op.fo/lnx-arch/dots/nwg-panel"
|
||||
local nwgp_dir="/home/poq/.config/nwg-panel"
|
||||
@@ -38,7 +46,7 @@ backupDeploy() {
|
||||
local files=()
|
||||
|
||||
if [[ "${operation}" == "backup" ]]; then
|
||||
echo -e "\nthe following files will be copied to the repository (old files in the repo will be overwritten):"
|
||||
echo -e "\nthe following files will be copied to the repository (old files in the repo will potentially be overwritten):"
|
||||
|
||||
for filename in "${filenames[@]}"; do
|
||||
local file="${nwgp_dir}/${filename}"
|
||||
@@ -51,7 +59,7 @@ backupDeploy() {
|
||||
echo "proceeding..."
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
cp ${file} ${repo_dir}/
|
||||
cp -v -u ${file} ${repo_dir}/
|
||||
done
|
||||
|
||||
else
|
||||
@@ -60,12 +68,17 @@ backupDeploy() {
|
||||
|
||||
|
||||
elif [[ "${operation}" == "deploy" ]]; then
|
||||
echo "deploy"
|
||||
|
||||
# pkill nwg-panel
|
||||
# nwg-panel &
|
||||
echo "deploying config files and restarting nwg-panel..."
|
||||
|
||||
cp -v -u -r ${repo_dir}/* ${nwgp_dir}
|
||||
pkill nwg-panel > /dev/null 2>&1
|
||||
nwg-panel > /dev/null 2>&1 &
|
||||
|
||||
else
|
||||
|
||||
echo "error: unknown operation '${operation}'"
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -29,8 +29,9 @@ button {
|
||||
|
||||
/* Top panel in sample config uses this name */
|
||||
#panel-top {
|
||||
background: #3a0140;
|
||||
color: #eeeeee
|
||||
background: #000000;
|
||||
color: #eeeeee;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* Bottom panel in sample config uses this name */
|
||||
|
||||
Reference in New Issue
Block a user