Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Marcus Simpkins
    @MyriaCore_gitlab
    this more or less gave me what I wanted xP

    @MyriaCore_gitlab w.r.t. respecting the gtk theme, the thing is that taffybar actually uses its own css file to allow customization of the bar

    Dope, I'll look into editing the taffybar.css. I'd been avoiding it a bit, since I didn't know how to integrate it with my project. Thanks for the tip lol

    Marcus Simpkins
    @MyriaCore_gitlab

    hey, this is just a general haskell question, but do u guys have any idea why I'd be facing encoding errors with Network.HTTP functions?

    simpleHTTP (getRequest "http://wttr.in/?0&T&Q&format=%25c+%25f") >>= getResponseBody

    This should give me something like "\127782 +76\176F", however, I'm getting "\240\159\140\166 +76\194\176F" instead.

    Marcus Simpkins
    @MyriaCore_gitlab
    oml im so dumb
    nvm i figured it out lol
    sorry for the spam, I'll take my questions elsewhere :)
    Marcus Simpkins
    @MyriaCore_gitlab
    Hey I know I said I'd take my questions elsewhere, but I'm really struggling with this bug rn and I don't know anyone else who's familiar with haskell and GI.Gtk.
    The widget I'm currently trying to make a polling box widget that uses an IO action to replace its children. Since I'm using gi-gtk 3.0.33, the way to replace the box's children is with containerRemove.
    However, when the update IO action is invoked, instead of replacing the children, the box just adds the new ones onto the end. I think the bug is in replaceInBox, but I can't find it, since this code looks correct. The newer versions of gi-gtk are all in nightlies, so i kinda want to avoid trying out a new resolver if I can.
    Ivan Malison
    @IvanMalison
    the children' assignment happens in the construction of the widget
    that value is determined when the initial widget is first constructed, and will never change
    when you write let children' = newChildren, all you are doing is shadowing the initial let binding with a new one
    there should probably be a warning about this when you compile
    have you done any haskell tutorials?
    there is no such thing as a varible that can be assigned to like this in haskell
    you would need to use something like an IORef to write this code in the way you have here
    @MyriaCore_gitlab ^
    That said, I don't think you need ioref to do this properly
    is there not some function you can call against the widget to get what its current children are?
    I'm also confused about why you would need to destroy the widgets every time
    Ivan Malison
    @IvanMalison
    couldn't you just update them?
    Marcus Simpkins
    @MyriaCore_gitlab

    have you done any haskell tutorials?
    there is no such thing as a varible that can be assigned to like this in haskell
    you would need to use something like an IORef to write this code in the way you have here

    I've basically been learning haskell as I go. I thought that when in a do block, let bindings were run sequentially, but that makes sense that they're still scoped.

    11 replies

    is there not some function you can call against the widget to get what its current children are?

    Not that I could find, but I was looking in the Box docs. I'll check Container to see

    couldn't you just update them?

    Well, I want to potentially be able to generate an entirely new list, with a potentially different size. I'm using this to write a system that parses <icon>iconName</icon> in text and adds an icon there, and wherever the text is, it's just added as a label. So in that case, I know the list won't be the same size, since I'm not always using the same configuration of icons and labels

    Marcus Simpkins
    @MyriaCore_gitlab

    hhhhhhhhhhhhhh

    thanks so much for dealing with my volley of questions @IvanMalison, you're a real hero <3

    Marcus Simpkins
    @MyriaCore_gitlab
    Srsly, thanks so much! Would you like if I PR some of this code into taffybar/taffybar? I'm sure some users would benefit from this functionality, especially Box and IconLabel, since they make working with labels and icons crazy easy. wttr.in is popular, and it does international weather (not just local), so I'm sure that'd be nice for others to have access to.
    Ivan Malison
    @IvanMalison
    @MyriaCore_gitlab PRs are always welcom
    Marcus Simpkins
    @MyriaCore_gitlab
    Hey I'm just now sitting down to do my PR. Can I rename some things, or should I try to keep the existing names as they are? I just wanna make sure I don't mess with your stuff <3
    Ivan Malison
    @IvanMalison
    @MyriaCore_gitlab what do you want to rename?
    Marcus Simpkins
    @MyriaCore_gitlab
    I thought I'd rename iconImageWidgetNew and pollingIconImageWidgetNew, but I guess its nbd lol
    Roy Sindre Norangshol
    @norrs_gitlab
    @IvanMalison do you have any plans to get stack running again or do I have to research how to use nix? I dont mind trying to learn nix packagement on my new debian laptop .. just no clue where to start :) And atm I had to fallback to old compiled binary for all your great stuff.. kinda want to be able to upgrade to latest taffybar, and github notifier etc
    Ivan Malison
    @IvanMalison
    @norrs_gitlab taffybar is in the latest lts is it not?
    We are working on getting it back into nightly as well
    Roy Sindre Norangshol
    @norrs_gitlab
    @IvanMalison : when you say into nightly here, and latest lts? do you mean the resolver definition in the stack.yaml right?
    I have some troubles at least with stack install, but if you want we could iterate on em when we're both online at the same time and I can provide error messages. I can be online in the evening today for example. (Iam GMT+2 (Europe/Oslo)) (dont want to breaking my desktop during working hours :D)
    I hope upgrading to latest version also kills this taffybar eating 100% cpu as well
    Ivan Malison
    @IvanMalison
    Yes I'm talking about the resolver
    Roy Sindre Norangshol
    @norrs_gitlab
    @IvanMalison Ill check in in the evening today, and let you know of the errors I get when trying to compile by stack , and we can see if I manage to get thru it, and I can try to help and document it as well for others.
    Roy Sindre Norangshol
    @norrs
    Debian stack install - thread trying to install 7f3b5bdc3711
    14 replies
    Ivan Malison
    @IvanMalison
    You have to post resolver details
    @norrs the idea that it should be possible to simply stack install taffybar is just nuts
    Taffybar will not work with that
    Roy Sindre Norangshol
    @norrs
    Its not that easy no, I have leeched again from your dotfiles, I\ll respond in the thread as I guess the thread will be huge in the end. To avoid spamming the channel here.
    Pi3r
    @PierreR
    Hello,
    Is taffybar broke again in nixos-20.09 ?
    I have been trying nix-shell -p taffybar with "https://releases.nixos.org/nixos/20.09/nixos-20.09beta992.7badbf18c45/nixos-minimal-20.09beta992.7badbf18c45-x86_64-linux.iso" but it won't build.
    Apparently gi-cairo-render-0.0.1. won't compile.
    I know it is not the fault of Taffybar per se but it is so annoying.
    For the record, taffybar has also been broken in nixos-20.03 (it would only work with the unstable channel).
    History is repeating itself ...
    Pi3r
    @PierreR
    I have found the relevant issue: NixOS/nixpkgs#63500
    Pi3r
    @PierreR
    taffybar.PNG
    In the meanwhile I am using the version back from a ref commit in unstable that works (around August 2020).
    After upgrading from 20.03 to 20.09 I have got this strange display
    When I launch taffybar on the command line I have these errors:
    Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "description"
    Fontconfig error: Cannot load config file from /etc/fonts/2.11/fonts.conf
    Any idea ?
    Ivan Malison
    @IvanMalison
    @PierreR I had that as well after bumping unstable a while back
    Iirc it somehow resolved itself but I'm not sure how