Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions Configs/.local/lib/hyde/gamelauncher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# set variables
MODE=${1}
scrDir=$(dirname "$(realpath "$0")")
thumbName="library_600x900.jpg"
source $scrDir/globalcontrol.sh
# ThemeSet="${confDir}/hypr/themes/theme.conf"

Expand All @@ -19,14 +20,22 @@ icon_border=$((elem_border - 3))
r_override="element{border-radius:${elem_border}px;} element-icon{border-radius:${icon_border}px;}"

fn_steam() {
# check steam mount paths
SteamPaths=$(grep '"path"' $SteamLib | awk -F '"' '{print $4}')
ManifestList=$(find "${SteamPaths}/steamapps/" -type f -name "appmanifest_*.acf" 2>/dev/null)
# Get all manifests found within steam libs
# SteamLib might contain more than one path
ManifestList=$(grep '"path"' $SteamLib | awk -F '"' '{print $4}' | while read sp; do

#Manifests for current path
find "${sp}/steamapps" -type f -name "appmanifest_*.acf" 2>/dev/null
done)


# read installed games
GameList=$(echo "$ManifestList" | while read acf; do
appid=$(grep '"appid"' $acf | cut -d '"' -f 4)
if [ -f ${SteamThumb}/${appid}/library_600x900.jpg ]; then
game=$(grep '"name"' $acf | cut -d '"' -f 4)
gameName=$(grep '"name"' $acf | cut -d '"' -f 4)
# Ignore Proton or Steam Runtimes
if [[ ${gameName} != *"Proton"* && ${gameName} != *"Steam"* ]]; then
game=$gameName
echo "$game|$appid"
else
continue
Expand All @@ -38,8 +47,11 @@ fn_steam() {
echo "$GameList" | while read acf; do
appid=$(echo "${acf}" | cut -d '|' -f 2)
game=$(echo "${acf}" | cut -d '|' -f 1)
printf "%s\x00icon\x1f${SteamThumb}/${appid}/library_600x900.jpg\n" "${game}" >&2
printf "%s\x00icon\x1f${SteamThumb}/${appid}/library_600x900.jpg\n" "${game}"

# find the lib image
libImage=$(find "${SteamThumb}/${appid}/" -type f -name "${thumbName}")
printf "%s\x00icon\x1f${libImage}\n" "${game}" >&2
printf "%s\x00icon\x1f${libImage}\n" "${game}"
done | rofi -dmenu \
-theme-str "${r_override}" \
-config $RofiConf
Expand Down
3 changes: 0 additions & 3 deletions Configs/.local/lib/hyde/lockscreen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ scrDir="$(dirname "$(realpath "$0")")"
# shellcheck source=$HOME/.local/lib/hyde/globalcontrol.sh
# shellcheck disable=SC1091
source "${scrDir}/globalcontrol.sh"
HYDE_RUNTIME_DIR="${HYDE_RUNTIME_DIR:-$XDG_RUNTIME_DIR/hyde}"
# shellcheck disable=SC1091
source "${HYDE_RUNTIME_DIR}/environment"

"${LOCKSCREEN:-hyprlock}" "${@}"
31 changes: 18 additions & 13 deletions Configs/.local/lib/hyde/systemupdate.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Check release
if [ ! -f /etc/arch-release ] ; then
if [ ! -f /etc/arch-release ]; then
exit 0
fi

Expand All @@ -17,18 +17,18 @@ temp_file="$HYDE_RUNTIME_DIR/update_info"
[ -f "$temp_file" ] && source "$temp_file"

# Trigger upgrade
if [ "$1" == "up" ] ; then
if [ "$1" == "up" ]; then
if [ -f "$temp_file" ]; then
# refreshes the module so after you update it will reset to zero
trap 'pkill -RTMIN+20 waybar' EXIT
# Read info from env file
while IFS="=" read -r key value; do
case "$key" in
OFFICIAL_UPDATES) official=$value ;;
AUR_UPDATES) aur=$value ;;
FLATPAK_UPDATES) flatpak=$value ;;
OFFICIAL_UPDATES) official=$value ;;
AUR_UPDATES) aur=$value ;;
FLATPAK_UPDATES) flatpak=$value ;;
esac
done < "$temp_file"
done <"$temp_file"

command="
fastfetch
Expand All @@ -45,11 +45,15 @@ if [ "$1" == "up" ] ; then
fi

# Check for AUR updates
aur=$(${aurhlpr} -Qua | wc -l)
ofc=$(CHECKUPDATES_DB=$(mktemp -u) checkupdates | wc -l)
aur=$(${aurhlpr} -Qua | wc -l)
ofc=$(
temp_db=$(mktemp -t checkupdates_db_XXXXXX)
trap '[ -f "$temp_db" ] && rm "$temp_db" 2>/dev/null' EXIT INT TERM
CHECKUPDATES_DB="$temp_db" checkupdates 2>/dev/null | wc -l
)

# Check for flatpak updates
if pkg_installed flatpak ; then
if pkg_installed flatpak; then
fpk=$(flatpak remote-ls --updates | wc -l)
fpk_disp="\n󰏓 Flatpak $fpk"
else
Expand All @@ -58,19 +62,20 @@ else
fi

# Calculate total available updates
upd=$(( ofc + aur + fpk ))
upd=$((ofc + aur + fpk))
# Prepare the upgrade info
upgrade_info=$(cat <<EOF
upgrade_info=$(
cat <<EOF
OFFICIAL_UPDATES=$ofc
AUR_UPDATES=$aur
FLATPAK_UPDATES=$fpk
EOF
)

# Save the upgrade info
echo "$upgrade_info" > "$temp_file"
echo "$upgrade_info" >"$temp_file"
# Show tooltip
if [ $upd -eq 0 ] ; then
if [ $upd -eq 0 ]; then
upd="" #Remove Icon completely
# upd="󰮯" #If zero Display Icon only
echo "{\"text\":\"$upd\", \"tooltip\":\" Packages are up to date\"}"
Expand Down