Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-192 committed Oct 2, 2023
2 parents bdbecff + 09e5ab1 commit ac4ea3d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
17 changes: 7 additions & 10 deletions eos-settings-i3wm/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@
_pkgname=endeavouros-i3wm-setup
pkgname=eos-settings-i3wm
pkgver=1.3
pkgrel=2
pkgrel=3
pkgdesc="pre user creation skel setup for i3-wm under EndeavourOS"
arch=('any')
groups=('EndeavourOS')
arch=("any")
groups=("EndeavourOS")
url="https://github.com/endeavouros-team/${_pkgname}"
license=('GPL')
conflics=('endeavouros-skel-xfce4'
'endeavouros-skel-default'
'endeavouros-skel-i3wm')
makedepends=('git')
depends=()
license=("GPL")
conflics=("endeavouros-skel-xfce4" "endeavouros-skel-default" "endeavouros-skel-i3wm")
makedepends=("git")
source=("https://github.com/endeavouros-team/${_pkgname}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('56b876b48ce67fbb6d8ab52dc13cfbbb6805746748339552c1e510f8592026c8')
sha256sums=("56b876b48ce67fbb6d8ab52dc13cfbbb6805746748339552c1e510f8592026c8")

package() {
cd "$_pkgname-$pkgver"
Expand Down
8 changes: 3 additions & 5 deletions eos-settings-xfce4/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
_pkgname=endeavouros-xfce4-theming
pkgname=eos-settings-xfce4
pkgver=1.1
pkgrel=2
pkgrel=3
pkgdesc="pre user creation skel setup for xfce4 under EndeavourOS"
arch=("any")
url="https://github.com/endeavouros-team/${_pkgname}"
license=("GPL")
conflics=('endeavouros-skel-xfce4'
'endeavouros-skel-default'
'endeavouros-skel-i3wm')
conflics=("endeavouros-skel-xfce4" "endeavouros-skel-default" "endeavouros-skel-i3wm")
makedepends=("git")
source=("https://github.com/endeavouros-team/${_pkgname}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('6b9103ddc4550a92318605662860f1d0fa1b6169798debf52bcdbefb5d8ada84')
sha256sums=("6b9103ddc4550a92318605662860f1d0fa1b6169798debf52bcdbefb5d8ada84")

package() {
cd "$_pkgname-$pkgver"
Expand Down
4 changes: 2 additions & 2 deletions eos-update-notifier/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname=eos-update-notifier
pkgdesc="Software update notifier and 'news for you' for EndeavourOS users."
pkgver=23
pkgrel=12
pkgrel=13
arch=('any')
license=('GPL')
depends=(eos-bash-shared pacman-contrib xdg-utils libnotify)
Expand Down Expand Up @@ -34,7 +34,7 @@ source=(
$_url/$pkgname.service
$_url/checkupdatesext
)
sha512sums=('fd1ce5f2189c4fca2b04c25f89bc17a5eb8f6152987aaf42958a61286407d32d490e9132f69c7b4552378562829659ac99bec6af1ad5b35bc2d1f1fe2ae8ec99'
sha512sums=('a064ced9673f405248043216566572adb9aa948a4ca5bc15523a38b684ae92cb67f1ff781f3693db4303e1159db4177487936ff6c898d8a7c087b313eb69ebfc'
'566f6cb295d3bc0af6ee85e33dde9df1a0cde9a043f501c99571db13b26394406a6d8017c7564a3e38ff5365f6dfe1e095b7c1f50674e85b2d9c8ef1a5c822b2'
'd046e675f98a52b9c310e970c5a0b0bc92b08b60d55b9d39140516977e8a6ceb4b3f9d9b05d12fce377b5744f4563e5e66a86ceecafb57f5bd486f968dc57234'
'27acf7725d0e760b9dbc9d96e7dabf64339214163615155ae4fe2b4999c741e15590fc708866d830c584e321d7298d0ed5d0566adb6791c09c743289dbbebd6a'
Expand Down
37 changes: 24 additions & 13 deletions eos-update-notifier/eos-update-notifier
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,16 @@ Initialize() { # initialize service and timer for the current user
test "$fetch_files" = "1" && UseInitialFiles "$configdir" "$progname"
case "$arg" in
-conf | --conf)
# add any missing setting
[ -n "$(grep "^Persistent=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \Persistent=$persistent"
[ -n "$(grep "^OnCalendar=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \OnCalendar=$oncalendar"
[ -n "$(grep "^OnStartupSec=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \OnStartupSec=$onstartupsec"
# add any missing setting under [Timer] (in reverse order)
[ -n "$(grep ".*Persistent=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \Persistent=$persistent"
[ -n "$(grep ".*OnCalendar=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \OnCalendar=$oncalendar"
[ -n "$(grep ".*OnStartupSec=" "$timer")" ] || sed -i "$timer" -e "/^\[Timer\]/a \OnStartupSec=$onstartupsec"
# write new settings
case "${onstartupsec,,}" in
""|false) sed -E -i "$timer" -e "s|.*OnStartupSec=.*|# OnStartupSec=|" ;;
*) sed -E -i "$timer" -e "s|.*OnStartupSec=.*|OnStartupSec=30sec|" ;;
esac
sed -i "$timer" \
-e "s|^OnStartupSec=.*|OnStartupSec=$onstartupsec|" \
-e 's|^OnCalendar=.*$|OnCalendar='"$oncalendar"'|' \
-e "s|^Persistent=.*|Persistent=$persistent|"
;;
Expand Down Expand Up @@ -510,23 +513,28 @@ Configure() {
*) oncalendar=daily ;;
esac
times=$(echo "$times" | sed "s|$oncalendar|^$oncalendar|")
# temporarily set this to boolean value:
case "${onstartupsec,,}" in
""|false) onstartupsec=false ;;
*) onstartupsec=true ;;
esac
cmd=(
eos_yad
--form
--title="Configure update checking"
--text="$progname: configure the schedule of system update checks."
--image=preferences-system
--field="First check after system startup!See <b>man systemd.time</b> how to set time" "$onstartupsec"
--field="Check period!How often checks will be executed":CB "$times"
--field="Check always after system startup!Enable/disable update check right after boot":CHK "$onstartupsec"
--field="Persistent!If selected and checks are missed, a check will be done at next login":CHK "$persistent"
--button=yad-ok
)
result=$("${cmd[@]}")
retval=$?
[ "$retval" -eq 0 ] || return 1

onstartupsec=$(echo "$result" | cut -d'|' -f1)
oncalendar=$( echo "$result" | cut -d'|' -f2)
oncalendar=$( echo "$result" | cut -d'|' -f1)
onstartupsec=$(echo "$result" | cut -d'|' -f2)
persistent=$( echo "$result" | cut -d'|' -f3 | tr '[:upper:]' '[:lower:]')
;;
1)
Expand Down Expand Up @@ -697,13 +705,16 @@ Main()
local EOS_UPDATE_NOTIFIER_CONF=/etc/$progname.conf
#local NOTIFIER_LOG_FILE=/tmp/$progname.log

local oncalendar="$( grep "^OnCalendar=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"
local onstartupsec="$(grep "^OnStartupSec=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"
local persistent="$( grep "^Persistent=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"
local oncalendar="$( grep ".*OnCalendar=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"
local onstartupsec="$(grep ".*OnStartupSec=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"
local persistent="$( grep ".*Persistent=" $configdir/$progname.timer 2>/dev/null | cut -d '=' -f 2)"

[ -n "$oncalendar" ] || oncalendar=daily
[ -n "$onstartupsec" ] || onstartupsec=30sec
[ -n "$persistent" ] || persistent=false
case "${onstartupsec,,}" in
""|false) onstartupsec="" ;;
*) onstartupsec=30sec ;;
esac

mkdir -p "$configdir"

Expand All @@ -723,7 +734,7 @@ Main()
return
;;
-show-timer | --show-timer)
RunInTerminal "systemctl --user status eos-update-notifier.timer | cat -"
RunInTerminal "systemctl --user status eos-update-notifier.timer"
return
;;
--changelog)
Expand Down

0 comments on commit ac4ea3d

Please sign in to comment.