Skip to content

Commit

Permalink
copy paste from arcolinux-app
Browse files Browse the repository at this point in the history
  • Loading branch information
arcolinuxz committed May 6, 2023
0 parents commit 1a12e41
Show file tree
Hide file tree
Showing 34 changed files with 3,064 additions and 0 deletions.
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions setup-our-git-credentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/bash
#set -e
##################################################################################################################
# Author : Erik Dubois
# Website : https://www.erikdubois.be
# Website : https://www.alci.online
# Website : https://www.arcolinux.info
# Website : https://www.arcolinux.com
# Website : https://www.arcolinuxd.com
# Website : https://www.arcolinuxb.com
# Website : https://www.arcolinuxiso.com
# Website : https://www.arcolinuxforum.com
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
#tput setaf 0 = black
#tput setaf 1 = red
#tput setaf 2 = green
#tput setaf 3 = yellow
#tput setaf 4 = dark blue
#tput setaf 5 = purple
#tput setaf 6 = cyan
#tput setaf 7 = gray
#tput setaf 8 = light blue
##################################################################################################################

echo
tput setaf 3
echo "################################################################"
echo "################### Start"
echo "################################################################"
tput sgr0
echo

# Problem solving commands

# Read before using it.
# https://www.atlassian.com/git/tutorials/undoing-changes/git-reset
# git reset --hard orgin/master
# ONLY if you are very sure and no coworkers are on your github.

# Command that have helped in the past
# Force git to overwrite local files on pull - no merge
# git fetch all
# git push --set-upstream origin master
# git reset --hard orgin/master


#setting up git
#https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config
#https://medium.com/clarusway/how-to-use-git-github-without-asking-for-authentication-always-passwordless-usage-of-private-git-8c32489bc2e9
#https://blog.nillsf.com/index.php/2021/05/27/github-sso-using-password-protected-ssh-keys

project=$(basename `pwd`)
githubdir="arcolinux"
echo "-----------------------------------------------------------------------------"
echo "this is project https://github.com/$githubdir/$project"
echo "-----------------------------------------------------------------------------"

git config --global pull.rebase false
git config --global push.default simple
git config --global user.name "arcolinuxz"
git config --global user.email "arcolinuxinfo@gmail.com"
sudo git config --system core.editor nano
git remote set-url origin git@github.com-arc:$githubdir/$project

echo
tput setaf 3
echo "################################################################"
echo "################### End"
echo "################################################################"
tput sgr0
echo
96 changes: 96 additions & 0 deletions up+.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/bin/bash
#set -e
##################################################################################################################
# Author : Erik Dubois
# Website : https://www.erikdubois.be
# Website : https://www.alci.online
# Website : https://www.ariser.eu
# Website : https://www.arcolinux.info
# Website : https://www.arcolinux.com
# Website : https://www.arcolinuxd.com
# Website : https://www.arcolinuxb.com
# Website : https://www.arcolinuxiso.com
# Website : https://www.arcolinuxforum.com
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
#tput setaf 0 = black
#tput setaf 1 = red
#tput setaf 2 = green
#tput setaf 3 = yellow
#tput setaf 4 = dark blue
#tput setaf 5 = purple
#tput setaf 6 = cyan
#tput setaf 7 = gray
#tput setaf 8 = light blue
##################################################################################################################

# reset - commit your changes or stash them before you merge
# git reset --hard - personal alias - grh

workdir=$(pwd)

if [ -d $workdir/usr/share/arcolinux-app/work ]; then
echo "Removing work directory"
sudo rm -rv $workdir/usr/share/arcolinux-app/work
fi

# checking if I have the latest files from github
echo "Checking for newer files online first"
git pull


echo "Keyring from ArcoLinux"
rm -v $workdir/usr/share/arcolinux-app/packages/arcolinux-keyring/*
cp -v /home/erik/ARCO/ARCOLINUX-REPO/arcolinux_repo/x86_64/arcolinux-keyring*pkg.tar.zst $workdir/usr/share/arcolinux-app/packages/arcolinux-keyring

echo "Mirror from ArcoLinux"
rm -v $workdir/usr/share/arcolinux-app/packages/arcolinux-mirrorlist/*
cp -v /home/erik/ARCO/ARCOLINUX-REPO/arcolinux_repo/x86_64/arcolinux-mirror*pkg.tar.zst $workdir/usr/share/arcolinux-app/packages/arcolinux-mirrorlist

#pacman.conf
echo "get the pacman.conf from ArchLinux"
wget https://gitlab.archlinux.org/archlinux/archiso/-/raw/master/configs/releng/pacman.conf -O $workdir/usr/share/arcolinux-app/data/arch/pacman.conf

echo "get the pacman.conf from ArcoLinux"
wget https://raw.githubusercontent.com/arcolinux/arcolinuxl-iso/master/archiso/airootfs/etc/pacman.conf -O $workdir/usr/share/arcolinux-app/data/arco/pacman.conf


echo "get the pacman.conf from EOS"
wget https://raw.githubusercontent.com/endeavouros-team/EndeavourOS-ISO/main/airootfs/etc/pacman.conf -O $workdir/usr/share/arcolinux-app/data/eos/pacman.conf

echo "get the pacman.conf from EOS"
wget https://gitlab.com/garuda-linux/tools/garuda-tools/-/raw/master/data/pacman-multilib.conf -O $workdir/usr/share/arcolinux-app/data/garuda/pacman.conf


# Below command will backup everything inside the project folder
git add --all .

# Give a comment to the commit if you want
echo "####################################"
echo "Write your commit comment!"
echo "####################################"

read input

# Committing to the local repository with a message containing the time details and commit text

git commit -m "$input"

# Push the local files to github

if grep -q main .git/config; then
echo "Using main"
git push -u origin main
fi

if grep -q master .git/config; then
echo "Using master"
git push -u origin master
fi

echo "################################################################"
echo "################### Git Push Done ######################"
echo "################################################################"
1 change: 1 addition & 0 deletions usr/bin/aa
51 changes: 51 additions & 0 deletions usr/bin/arcolinux-app
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env sh

# this script should not be run as root
# the polkit agent running on the desktop environment should prompt for root password

echo "---------------------------------------------------------------------------"
echo "[INFO] Checking session"
test $(whoami) == "root" && echo "[ERROR] Do not run this script as root." && exit 1
test -z $DISPLAY && echo "[ERROR] DISPLAY variable is not set." && exit 1

# check session is either one of X11, Wayland or TTY
session=$(loginctl show-session $(loginctl|grep $(whoami) | awk '{print $1}') -p Type | awk -F= '{print $2}' | grep "x11\|wayland\|tty")

test -z "$session" && echo "[ERROR] Failed to verify session for user." && exit 1

xauth_file=$(xauth info | awk -F"Authority file:" '{print $2}' | tr -d ' ')
test -s "$xauth_file" || touch "$xauth_file"

case "$session" in
"wayland")
# Wayland session, generate Xauth session cookie for $DISPLAY
xauth gen $DISPLAY &> /dev/null
echo "[INFO] Display = $DISPLAY"
echo "[INFO] Session = $session"

test -z "$(xauth list)" || echo "[INFO] Xauth session = OK"
;;
"x11")
# X11 session, don't do anything here
echo "[INFO] Display = $DISPLAY"
echo "[INFO] Session = $session"

# just show msg on whether the Xauth session cookie is setup
test -z "$(xauth list)" || echo "[INFO] Xauth session = OK"
;;
"tty")
# TTY session, as user may not use a display manager
echo "[INFO] Display = $DISPLAY"
echo "[INFO] Session = $session"

test -z "$(xauth list)" || echo "[INFO] Xauth session = OK"
;;
*)
# anything here is an unknown session, most likely ATT will fail to load
echo "[WARN] Cannot verify session for user."
;;
esac
echo "---------------------------------------------------------------------------"

echo "[INFO] Starting ArcoLinux-App"
pkexec '/usr/share/arcolinux-app/arcolinux_application.py'
12 changes: 12 additions & 0 deletions usr/share/applications/arcolinux-app.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Name=Arcolinux Application
GenericName=Arcolinux Application
X-GNOME-FullName=Arcolinux Application
Comment=Application
Exec=/usr/bin/arcolinux-app
Icon=arcolinux-hello
Terminal=false
Type=Application
Categories=GTK;Settings;Security;X-GNOME-Settings-Panel;X-GNOME-SystemSettings;X-Unity-Settings-Panel;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
Keywords=welcome;tool;
StartupNotify=true
Loading

0 comments on commit 1a12e41

Please sign in to comment.