domsson / succade

Run, feed and style your Lemonbar with ease
Creative Commons Zero v1.0 Universal
55 stars 3 forks source link

Are the dependencies available in the AUR by any chance? #33

Closed Joe23232 closed 4 years ago

Joe23232 commented 4 years ago

Hey man are the dependencies available in the AUR by any chance?

domsson commented 4 years ago

I'm not sure about inih, but it is available in Debian's repositories as libinih-dev. Seeing how Debian is much more conservative, I would assume it can also be found in Arch.

libkita is another project of mine and still a bit of a work in progress. It can definitely not be found in any package managers. Currently, you'd just need to clone and install (see README over there) it manually. This is a bit of a pain I have to admit and I just opened another issue, #34, which aims at resolving this dependency. If everything goes according to plan, I'll do that tomorrow.

Joe23232 commented 4 years ago

This is a bit of a pain I have to admit and I just opened another issue, #34, which aims at resolving this dependency.

Hey man sorry what do you mean by resolving this dependency?

domsson commented 4 years ago

Currently, libkita is written in a way that requires you to install it. Therefore, software that uses libkita then depends on it being present on the user's system.

I'm going to change libkita into a so-called header-only library. What that means is that instead of relying on the library being installed on the user's system, I can just include it directly into succade.

Long story short, once I've got the dependency resolved, you won't have to clone/install libkita anymore. The dependency will be gone.

domsson commented 4 years ago

Hey @Joe23232 - with the latest commit, succade doesn't depend on libkita anymore. Were you able to locate inih / libinih in your distro's repositories? If not, I might consider resolving that dependency as well.

Joe23232 commented 4 years ago

Hey @Joe23232 - with the latest commit, succade doesn't depend on libkita anymore.

Oh that is great mate :)

Were you able to locate inih / libinih in your distro's repositories? If not, I might consider resolving that dependency as well.

Sorry mate neither of them exist neither in the AUR or official ARchLinux repo :/ It is possible for the maintainer of that particular package to upload into the AUR.

domsson commented 4 years ago

Probably, that's what the AUR is for if I understand correctly. However, packaging software is usually pretty involved and I would not expect them to make the effort. For the interim, there are two options:

I'm also currently looking into resolving the inih dependency, similarly to how I did it with libkita. However, this is a bit more involved and might not happen as quickly.

Joe23232 commented 4 years ago

@domsson All good thanks for letting me know. I wish i could help with your project but I really am not a developer over here :(

domsson commented 4 years ago

@Joe23232 I've just pushed some code that might solve the inih dependency for you, but it would be great if you could test it and let me know if it works.

Could you follow the installation instructions, but replace build with build-inih and check if that compiles for you? It would be much appreciated.

Joe23232 commented 4 years ago

@domsson Sure mate give me some time for me to test it out, thanks mate :)

Joe23232 commented 4 years ago

@domsson Hmm it fails to build for some reason, let me show you the error.

Failed to execute process './build-inih'. Reason:
exec: Exec format error
The file './build-inih' is marked as an executable but could not be run by the operating system.

I did clone succade by typing git clone https://github.com/domsson/succade.git. Am I supposed to use some special flags or something?

domsson commented 4 years ago

I have a suspicion this might be due to the missing shebang. I added a shebang now. Could you pull the latest changes (git pull origin master) and try again? Thank you!

Joe23232 commented 4 years ago

Hey mate, so I ran it and it successfully built but I am getting some error warnings.

rc/succade.c: In function ‘main’:
src/succade.c:1295:9: warning: variable ‘delta’ set but not used [-Wunused-but-set-variable]
 1295 |  double delta;
      |         ^~~~~
In function ‘barstr’,
    inlined from ‘feed_lemon’ at src/succade.c:877:16,
    inlined from ‘main’ at src/succade.c:1313:3:
src/succade.c:471:13: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  471 |  bar_str[0] = '\0';
      |  ~~~~~~~~~~~^~~~~~
src/succade.c: In function ‘main’:
src/succade.c:470:18: note: at offset 0 to an object with size 0 allocated by ‘malloc’ here
  470 |  char *bar_str = malloc(bar_str_len);
      |                  ^~~~~~~~~~~~~~~~~~~
Joe23232 commented 4 years ago

Hey man another issue cp succaderc ~/.config/succade where is this succaderc file?

domsson commented 4 years ago

Ah, thanks for the update. I'll look into the warnings ASAP, but I think we can proceed despite them for now. Regarding the config, the README was recently updated and now reads:

cp ./cfg/succaderc.1 ~/.config/succade/succaderc

As I've added a second example config at some point. The above should work. :)

Joe23232 commented 4 years ago

Hey man so I have done everything, how do I start this up? Also is it compatbile with lemonbar-xft?

domsson commented 4 years ago

Cool! Yes, it should be working with lemonbar-xft, but I haven't tested it. If you do, please let me know if it does indeed work.

Once you've added succade to your PATH (by placing it into a directory that's in your PATH), you should be able to start it up by simply typing succade. Otherwise, just do ./bin/succade from within the succade directory.

Joe23232 commented 4 years ago

Cool! Yes, it should be working with lemonbar-xft, but I haven't tested it. If you do, please let me know if it does indeed work.

Sure mate.

Once you've added succade to your PATH (by placing it into a directory that's in your PATH), you should be able to start it up by simply typing succade.

Sorry I am a bit of a noob over here, how would I add it to my PATH?

domsson commented 4 years ago

If you do:

echo $PATH

It will show you your PATH environment variable. This variable holds a colon-separated list of directories that your system will search whenever you try to start a program. As long as the program is in one of those directories, you can start it simply by typing its name. For me, PATH looks like this:

/home/domsson/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Therefore, I put self-compiled programs into /home/domsson/.local/bin, which can be more easily reached via ~/.local/bin (because ~ always expands to your home directory). If your PATH also has your ~/.local/bin directory and you've copied the succade binary into there, then you should be good to go. That's why the last installation step reads:

cp ./bin/succade ~/.local/bin/
Joe23232 commented 4 years ago

Oh ~/.local/bin/ this is not even in my PATH, would you happen to know how to add this directory to my PATH then?

domsson commented 4 years ago

Could you show me the output of echo $PATH?

And yeah. Replace username with your actual username:

export PATH=/home/username/.local/bin:$PATH
Joe23232 commented 4 years ago
/home/test/bin /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl

So this is my line.

I am using fish shell. I tried typing set PATH $PATH ~/.local/bin/ but it only runs for the one session, I am looking into a way to perminantly save it.

domsson commented 4 years ago

To make it permanent, you can add this snippet to your .profile or .bashrc:

# include user's private bin directory in PATH if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
Joe23232 commented 4 years ago

Nevermind I already typed this set -U fish_user_paths /usr/local/bin $fish_user_paths for the fish shell so yeah everything seems to work fine.

The only question is how do I get succade to start without a terminal and it launches upon boot?

Joe23232 commented 4 years ago

ALso when I run succade each time, I get this error message on the terminal Failed to connect to the socket.

domsson commented 4 years ago

I assume your ~/.config/bspwm/bspwmrc has this at the top, right?

sxhkd &

You can just add succade to the mix to have it start up together with bspwm:

sxhkd &
succade &

The socket error is puzzling me. succade doesn't connect to any sockets, I don't quite see where that could even come from. You've got lemonbar installed, right?

domsson commented 4 years ago

Ah, I think I have an idea. The example succaderc config runs a couple blocks/modules, one of them is bspc. bspc connects to bspwm via a UNIX domain socket. So the error probably comes from there. The question of course is: why?

Could you check if running these individually works for you?

Joe23232 commented 4 years ago

@domsson I am actually not using bspwm and I don;t think I want to use it since it may be potentially abandoned and even then like I want to use something a bit different. Currently I am just using XFCE at the moment and eventually I will use a tilling window manager.

The socket error is puzzling me. succade doesn't connect to any sockets, I don't quite see where that could even come from. You've got lemonbar installed, right?

I have lemonbar-xft installed instead. The bar seems to be working regardless though so I don't know what is going on?

domsson commented 4 years ago

Ah, that explains it, of course. :) In that case, you should just remove the desktop block from your ~/.config/succade/succaderc. Or change it in a way that it works with your setup. I'm afraid I can't help you there as I'm using bspwm myself.

Also, to use lemonbar-xft, add this to the [bar] section in your config:

command="lemonbar-xft"

This way, succade will run that instead of the default (lemonbar).

By the way, I appreciate you giving succade a try.

Joe23232 commented 4 years ago

@domsson Hey bro. I added it

image

And I guess I should remove anything to do with bspwm since I am not using it now.

By the way, I appreciate you giving succade a try.

Thank you mate very much for all your support. succade does seem pretty nice and I would for sure use it. I wish I could help out with the project but I hardly have experience with C/C++.

domsson commented 4 years ago

Don't worry, you're helping out plenty by finding and reporting issues, as well as letting me be part of your user experience. It is very valuable for me to learn what hurdles users might stumble upon. You're the first user I know about (other than myself, of course), so this is really good stuff. It also helps with my motivation to further work on and better document succade.

Yep, remove the bspc/bspwm stuff for now. You can simply remove the entire [desktop] section, then remove desktop from the blocks option in the [bar] section. You can now play around with different config options. The documentation isn't exactly great yet, so don't hesitate to ask if something doesn't make sense or doesn't (seem to) work as it should.

Also, remember: succade simply runs other scripts/programs. This means you can now think about what kind of information you want to display on your bar and how to get that. Again, the candies provide some nice options, but you can probably also use any script from polybar-scripts, i3blocklets, fetch-utils and many other projects. Generally, anything that can print a line to stdout should work.

Feel free to open new issues for questions or issues you encounter configuring / running succade.

Joe23232 commented 4 years ago

Don't worry, you're helping out plenty by finding and reporting issues, as well as letting me be part of your user experience. It is very valuable for me to learn what hurdles users might stumble upon. You're the first user I know about (other than myself, of course), so this is really good stuff. It also helps with my motivation to further work on and better document succade.

Cool mate thanks :) :+1:

Yep, remove the bspc/bspwm stuff for now. You can simply remove the entire [desktop] section, then remove desktop from the blocks option in the [bar] section. You can now play around with different config options. The documentation isn't exactly great yet, so don't hesitate to ask if something doesn't make sense or doesn't (seem to) work as it should.

Sure mate. I will :)

Also, remember: succade simply runs other scripts/programs. This means you can now think about what kind of information you want to display on your bar and how to get that. Again, the candies provide some nice options, but you can probably also use any script from polybar-scripts, i3blocklets, fetch-utils and many other projects. Generally, anything that can print a line to stdout should work.

In regards to candies, are you behind the project? I will give it a shot with candies.

Feel free to open new issues for questions or issues you encounter configuring / running succade.

Sure mate of course.


I know I am about to go off topic but I am looking for a good tiling window manager. I just need to know can bspwm add this sort of decoration on the top of the window (this image is from awesome WM):

Full window

And the top color changes based on what work space I am in, say in work space 1, it is blue, but in work space 2 it is red. Is it possible to script it like this?

domsson commented 4 years ago

In regards to candies, are you behind the project? I will give it a shot with candies.

Yup. I'm writing those specifically with succade and lemonbar in mind, in order to stay low on CPU usage. Almost all programs you'll find over there have the option to keep them running (using -m), which enables you to use the live = true option for them in the succade config. This means succade doesn't have to run them over and over again (as is the case with most other lemonbar managers and/or fetch scripts), but can keep them running instead.

I know I am about to go off topic but I am looking for a good tiling window manager. I just need to know can bspwm add this sort of decoration on the top of the window (this image is from awesome WM):

I'm not sure. I think bspwm only has the option to color the border on all sides at the same time, but I could be wrong. bspwm is supposed to be simple and therefore low on resources, which is why it is often used in conjunction with lemonbar. This also means, however, that it isn't quite as fancy. I've only heard great things about awesomewm as well though. And I remember a lot of good comments about herbstluftwm as well. Don't be afraid to just try them out. You can always remove them again.

This video might be of interest to you. They showcase the following tiling WMs there:

And the top color changes based on what work space I am in, say in work space 1, it is blue, but in work space 2 it is red. Is it possible to script it like this?

Yes (although I think only for the entire border). bspwm is controlled via bspc. To change the color of the focused window's border, you could just do this, it will take effect immediately:

bspc config focused_border_color "#678cb1"

Now you'd need to somehow hook that up to changes in the active desktop / workspace. You can catch those events with:

bspc subscribe

But some more work would have to go into it to tie it all together.

Joe23232 commented 4 years ago

Yup. I'm writing those specifically with succade and lemonbar in mind, in order to stay low on CPU usage. Almost all programs you'll find over there have the option to keep them running (using -m), which enables you to use the live = true option for them in the succade config. This means succade doesn't have to run them over and over again (as is the case with most other lemonbar managers and/or fetch scripts), but can keep them running instead.

Ah I see.

I'm not sure. I think bspwm only has the option to color the border on all sides at the same time, but I could be wrong. bspwm is supposed to be simple and therefore low on resources, which is why it is often used in conjunction with lemonbar. This also means, however, that it isn't quite as fancy. I've only heard great things about awesomewm as well though. And I remember a lot of good comments about herbstluftwm as well. Don't be afraid to just try them out. You can always remove them again.

I tried awesomeWM but it was a complete clusterfuck when scripting, the code was just a complete mess so I ended up not using it.

With herbstluftwm would it do what I want it to do in the image you saw?

This video might be of interest to you. They showcase the following tiling WMs there: bspwm dwm Xmonad i3 awesome herbstluft

THanks mate I will check it out :)

Yes (although I think only for the entire border). bspwm is controlled via bspc. To change the color of the focused window's border, you could just do this, it will take effect immediately:

that top blue bar is not part of the focused window, its like a separate bar was added to the top of the window or something,, but thanks anyways mate :)

But some more work would have to go into it to tie it all together.

Understandable mate :)

domsson commented 4 years ago

With herbstluftwm would it do what I want it to do in the image you saw?

I'm afraid I don't know. When looking for a tiling window manager, bspwm immediately caught my attention and I've never used a different one ever since. :)

Joe23232 commented 4 years ago

Hey man, one thing, with conky is this a tool that allows you to create your own widgets, right? Can the widgets be created using Rust?

domsson commented 4 years ago

I haven't used conky yet, so I can't say. Best to consult the Wiki over there.

Joe23232 commented 4 years ago

THanks mate :)

Joe23232 commented 4 years ago

@domsson Hey man, one question, how do I start succade everytime I login to my PC?

domsson commented 4 years ago

@Joe23232 that depends on your setup. As I said earlier, I've put succade & in my bspwmrc config file, as that will be run when bspwm starts up, which is a good time to also start up succade / lemonbar. Maybe there is a similar file for XFCE? If not, then you might be able to use your .xinitrc or .xsession (probably the latter; for the difference, check here).

Joe23232 commented 4 years ago

Ah I see, I forgot, thanks mate :)