-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
I add icons #141
I add icons #141
Conversation
I made a mistake with Uptime. I have improved it. Don't really know how to change it here. Is it automatic? |
Hi again @Tobilike! I'll give this a full review later on. For the time being I have a few thoughts after a skim:
Let me know what you think 👋 |
Hi @ingrinder
Sure, I have no problem with that. GitHub is still new to me and I have to figure out how it all works. If I do something differently than I should, please give me a hand so I have a better understanding.
I'll see what I can do.
I wrote everything the file does into the file. Usage:
output:
Greetings |
archey/configuration.py
Outdated
@@ -16,6 +16,7 @@ | |||
"suppress_warnings": False, | |||
"entries_color": "", | |||
"honor_ansi_color": True, | |||
"icon": False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this configuration entry could be renamed to entries_icon
?
archey/distributions.py
Outdated
@@ -32,6 +32,7 @@ class Distributions(Enum): | |||
DARWIN = "darwin" | |||
DEBIAN = "debian" | |||
DEVUAN = "devuan" | |||
ENDEAVOUROS = "endeavouros" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch will indeed require a rebase into master
.
archey/entries/cpu.py
Outdated
|
||
|
||
class CPU(Entry): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this in every entries, I propose that a new protected _ICON
is added to them and when the configuration enables it, the value is retrieved and prepended to _PRETTY_NAME
(in Entry
base definition) as you suggested.
archey/entries/window_manager.py
Outdated
|
||
# Check Display-Server-Protokoll | ||
|
||
session = os.environ.get('XDG_SESSION_TYPE', '') | ||
if session == "x11": | ||
session = "X11" | ||
elif session == "wayland": | ||
session = "Wayland" | ||
|
||
if session != "": | ||
self.value = self.value + " (" + session + ")" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this feature (?) is a separate concern that maybe should be proposed/discussed in another PR ?
icons.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this module if it is not needed in Archey 🙏
start.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here (to allow smooth merge of your branch).
Now everything should be fine. I have reworked it again. |
Nice, this is definitely looking like a cleaner solution! 👍 There are a couple of minor things left as far as I can see:
Rebasing might be a bit tricky if you're not used to git yet, but here's the approach I'd recommend if you think you're up to it to solve the conflicts we have now (take a backup of the folder just in case...!):
If you can't manage I'm sure we (by which I mean @HorlogeSkynet, as I can't modify commits before merging PRs 😁) can clean it up when merging for you. Ciao! 👋 |
A picture says more
I have added a config option to switch the icons on and off as above. However, a nerd font is required for this to work, otherwise you will only see placeholders. https://github.com/ryanoasis/nerd-fonts
"icon": true,
Reason and / or context
I like it.
How has this been tested ?
With my start.py
Types of changes :
Checklist :
[IF BREAKING] This pull request targets next Archey version branch ;