Skip to content

Commit

Permalink
Split patch into two different files. One for the
Browse files Browse the repository at this point in the history
makefile and the other for the script itself.
Plus, added the udev eclass. I was not aware of it before

Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
  • Loading branch information
lima-limon-inc committed Jul 12, 2023
1 parent 3d2da89 commit caf8232
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
1 change: 1 addition & 0 deletions app-misc/devify/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST V1.1.tar.gz 96160 BLAKE2B 1381c7f3abdc5d2c19f3a058cc8efd4ab71753787219f3e36ed6c71402d9d16c0bfb148e5b9e19f37b6dc0e1fd621dede6203dcfb0055ecb0b344fc31c5c9c8c SHA512 c8181f50fd84770302f5e995def2c0ee28ee2ced60b22799cb66f67d051f64c19363ec5546aa18beb383c3858a0b5f159611d8fd80972b55e7ac2fb4c9c7ae9c
DIST v1.0.tar.gz 52585 BLAKE2B 2341ec58ac99279eefd1004d33f4004cdb7992a49c0d1b67a06896ba7ea17ca2f05af3563288a5d9dad6dd331dd21d73197a18c16df830374a2358b2b6be9781 SHA512 7ca2b3d41b382d8c0ab3bb083c086975d79b810aae934b8ffd0d3ec6af4c258d187897a20a260a9c309b3bd7d59576069227f58ed2418486b80c03b446cee6e9
11 changes: 9 additions & 2 deletions app-misc/devify/devify-1.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

EAPI=8

inherit udev

DESCRIPTION="Device notification system using udev rules for monitoring connections"
HOMEPAGE="https://github.com/pog102/devify"
# if [[ ${PV} == 9999 ]] ; then
Expand All @@ -22,15 +24,20 @@ RDEPEND="${DEPEND}"
BDEPEND=""

PATCHES=(
"${FILESDIR}/different-directories.patch"
"${FILESDIR}/different-directories-makefile.patch"
"${FILESDIR}/different-directories-script.patch"
)

pkg_postinst() {
udevadm control --reload-rules
udev_reload
elog "Besides changing directory destinations, the ebuild also"
elog "changes one thing about the script. Instead of using"
elog "DBUS_SESSION_BUS_ADDRESS it uses DISPLAY."
elog "Without it, it would not work in my machine. If it leads"
elog "to unintended behavior, leave and issue on the lemon-lime-overlay"
elog "Cheers!"
}

pkg_postrm() {
udev_reload
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,3 @@ index d186eb3..93cea41 100644

clean:
$(RM) ./devify
diff --git a/devify b/devify
index 0e16e14..6419515 100755
--- a/devify
+++ b/devify
@@ -1,13 +1,14 @@
#!/usr/bin/env bash

status=$2
-icon_pack=/usr/local/share/icons/MonoDev
+icon_pack=/usr/share/icons/MonoDev
user=$(who | head -n 1 | awk '{print $1}')
wal_dir=/home/$user/.cache/wal/colors
icon_color=$(grep -oP '#.*([A-Za-z]|[0-9])' $icon_pack/main_color.svg)

-DBUS_SESSION_BUS_ADDRESS=unix:path="/run/user/$( id -u "$user" )/bus"
-export DBUS_SESSION_BUS_ADDRESS
+# DBUS_SESSION_BUS_ADDRESS=unix:path="/run/user/$( id -u "$user" )/bus"
+# export DBUS_SESSION_BUS_ADDRESS
+export DISPLAY=:0

notify() {
if [ "$status" == "add" ]; then
22 changes: 22 additions & 0 deletions app-misc/devify/files/different-directories-script.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/devify b/devify
index 0e16e14..6419515 100755
--- a/devify
+++ b/devify
@@ -1,13 +1,14 @@
#!/usr/bin/env bash

status=$2
-icon_pack=/usr/local/share/icons/MonoDev
+icon_pack=/usr/share/icons/MonoDev
user=$(who | head -n 1 | awk '{print $1}')
wal_dir=/home/$user/.cache/wal/colors
icon_color=$(grep -oP '#.*([A-Za-z]|[0-9])' $icon_pack/main_color.svg)

-DBUS_SESSION_BUS_ADDRESS=unix:path="/run/user/$( id -u "$user" )/bus"
-export DBUS_SESSION_BUS_ADDRESS
+# DBUS_SESSION_BUS_ADDRESS=unix:path="/run/user/$( id -u "$user" )/bus"
+# export DBUS_SESSION_BUS_ADDRESS
+export DISPLAY=:0

notify() {
if [ "$status" == "add" ]; then

0 comments on commit caf8232

Please sign in to comment.