Giter Club home page Giter Club logo

Comments (16)

anhsirk0 avatar anhsirk0 commented on May 30, 2024

I will see about that.
I will lookup how neofetch does it, and implement that here.

I have used dwm and xmonad (on arch linux gui) , fm6000 detected the wms correctly
DESKTOP_SESSION and XDG_SESSION_DESKTOP were both setup correctly.

from fetch-master-6000.

XDream8 avatar XDream8 commented on May 30, 2024

xprop can be used too, but i think the best would be checking the running processes for window managers(pfetch uses this method as a fallback to xprop)

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

yeah neofetch does that too ps and greping.
I will implement that soon.

from fetch-master-6000.

pineapples5972 avatar pineapples5972 commented on May 30, 2024

@anhsirk0 Instead of using complicated functions why not just use wmctrl if its giving direct result?

from fetch-master-6000.

XDream8 avatar XDream8 commented on May 30, 2024

@anhsirk0 Instead of using complicated functions why not just use wmctrl if its giving direct result?

It is very easy to add support for wmctrl or xprop but when we can implement it in perl, why should we prefer an external program?

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

@anhsirk0 Instead of using complicated functions why not just use wmctrl if its giving direct result?

It is very easy to add support for wmctrl or xprop but when we can implement it in perl, why should we prefer an external program?

Exactly.

from fetch-master-6000.

pineapples5972 avatar pineapples5972 commented on May 30, 2024

Even tho its not minimal? ok doesnt matter.

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

I updated the script. can you confirm?

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

Even tho its not minimal? ok doesnt matter.

we don't want unneccessary dependencies and prefer to do things with the language (perl in this case) rather than using external program. This increases portability (bsd's core util and gnu core utils are not that compatible , for example uptime gnu's uptime supports uptime -p while bsd's does not. We are even avoiding to use grep or awk for the same reason.
Edit: typos

from fetch-master-6000.

pineapples5972 avatar pineapples5972 commented on May 30, 2024

I updated the script. can you confirm?

Yes it shows dwm correctly but in openbox it showing UNKNOWN

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

added openbox to the checks too

from fetch-master-6000.

pineapples5972 avatar pineapples5972 commented on May 30, 2024

added openbox to the checks too

So this is how it gonna be? you just add the new wm to array?
Isnt there any functional way to "just detect current wm" using perl?

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

added openbox to the checks too

So this is how it gonna be? you just add the new wm to array? Isnt there any functional way to "just detect current wm" using perl?

Sadly no
Neofetch/pfetch also does it in similar ways

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

I added wmctrl too.

from fetch-master-6000.

pineapples5972 avatar pineapples5972 commented on May 30, 2024

Nice. Sometime we need to improvise even if its add another dependancy. but thats the beauty of perl language we can beautifully integrate unix shell with it.

from fetch-master-6000.

anhsirk0 avatar anhsirk0 commented on May 30, 2024

Well I was slightly wrong about external dependencies. Its not like fm6000 won't work without wmctrl or ps etc etc.

from fetch-master-6000.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.