Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next #313

Open
wants to merge 17 commits into
base: next
Choose a base branch
from
Open

Next #313

Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add comments to several functions
SmartFinn committed Oct 26, 2017
commit ba6ec50984b9d37520982f3e3b118c817c41c889
5 changes: 4 additions & 1 deletion fix.sh
Original file line number Diff line number Diff line change
@@ -70,11 +70,13 @@ fail() {
}

_is_hardcoded() {
# returns true if Icon contains a path
local desktop_file="$1"
LANG=C grep -q '^Icon=.*/.*' -- "$desktop_file"
}

_is_hardcoded_steam_app() {
# returns true if is a Steam launcher and Icon equals 'steam'
local desktop_file="$1"
local icon_name

@@ -149,7 +151,7 @@ set_marker_value() {
}

icon_lookup() {
# returns path to an icon (icon lookup for poor man)
# looks for icon in the list of dirs and returns absolute path to the icon
local icon_name="$1"
local -a icons_dirs=(
"/usr/share/icons/hicolor/48x48/apps"
@@ -172,6 +174,7 @@ icon_lookup() {
}

get_icon_path() {
# returns absolute path to the icon
local desktop_file="$1"
local icon_value icon_path