Re: [dev] [st] Terminal hangs after killing fcitx

2021-02-23 Thread Ivan Tham
On 2021年2月3日星期三 +08 下午5:05:39 M D wrote:
> > >Whenever I kill fcitx with
> > >"killall fcitx5", the st terminal hangs. Is this a st bug?
> > 
> > Does this happen every time or only occasionally? If only occasionally
> > the bug might be unrelated to fcitx as i also have a similar bug.
> 
> This occurs every time.

Yes, but if you restart fcitx5 it will work (maybe not the current terminal)
due to some race condition.


signature.asc
Description: This is a digitally signed message part.


Re: [dev] [st] terminal app resizing redraw artifacts

2020-06-24 Thread Ivan Tham

On Tue, Jun 23, 2020 at 10:34:59PM -0700, Kai Ting wrote:

Hello!

I have been using st for a while trying to transition fully from xterm.
However one issue I couldn't resolve for the life of me is that under dwm
and st, changing the windows size sometimes results in colored flashes
around the window area before the running application redraws the screen.
Apart from resizing windows, fast scroll back/forward also results in very
bright flashes.  I cannot reproduce the same issue with xterm. Please see
attached gif capturing this issue using vim 8.2, st 0.8.4 and dwm 6.2.

Any hints/guidance? I looked at the code briefly (xresize() etc) and don't
see anything obvious that can change such behavior.


I believe that may be the color you set on vim or the colors set on st.
I never experience these behavior using the default color settings.

Most likely is because my background color is black, sometimes if the
background colors is not the same as the default background color, the
default background color will fill up the extra space.

Regards,
Ivan Tham



Re: [dev] st: use mouse to paste from clipboard

2020-06-22 Thread Ivan Tham

On Mon, Jun 22, 2020 at 07:03:13AM -0400, Greg Reagle wrote:

I can easily paste from the primary selection using middle mouse button 
(Button2), or with the keyboard (Ctrl-Shift-y).  To paste from the clipboard I 
can use the keyboard (Ctrl-Shift-v), but there is no way to do it with the 
mouse.

Wouldn't it be great to be able to paste from the clipboard selection, using 
the mouse?  I think so.  Would the maintainer of st like to make this part of 
st?  Here is the line that I added to mkeys[] in config.h

   { Button3,  XK_NO_MOD,  clippaste,  {.i =  0}},


No, if you overwrite to paste from clipboard, how do you paste from primary
selection? I would rather keep the primary selection with mouse rather than
using shift-insert only to paste the primary selection.

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] Scrollback utility for use with st

2020-03-31 Thread Ivan Tham

Is not that the same as st scrollback patch?

On Tue, Mar 31, 2020 at 09:42:34AM +0200, Lehner Georg wrote:

Hello,

A non goal of `st` is to provide a scrollback buffer - `dvtm` or 
`tmux` is proposed for this task.


Since launching several `st`s already DOES provide multiple terminals 
I couldn't see the point in using them.  So I decided to rip the 
session and window stuff out of `dvtm` and only keep the scrollback 
buffer implementation.


The result is `sb` the scrollback buffer utility.  Get it here:

https://at.magma-soft.at/darcs/sb/
https://at.magma-soft.at/darcs/sb/sb-0.1.tar.gz

I run it as follows:

tabbed -c -r 2 st -w '' -t st sb

This gives me a vt environment similar to my battle-scarred 
xfce4-terminal but without the steroids AND I can scroll back/forth in 
history with Shift-PgUp/Shift-PgDown.


Some notes:

- `sb` does NOT pretend to be a virtual terminal, and leaves the TERM
  variable alone (mostly).

- `sb` features less then 2500 sloc and a 49k binary.
 `dvtm`: 4000+ slock and 55k.

- `dvtm` effectively implements it's own terminal emulator, which
  comprises also most of the remnant code in `sb`.

- `sb` behavior is buggy in several aspects, e.g. window redraw and
 "copy mode".

Maybe someone more savvy with vt than I can help rip out everything 
that's not needed.


Best Regards,

 Georg






Re: [dev] [st] vim breaks Delete key in an ssh session

2020-02-26 Thread Ivan Tham

Maybe you could do a bisect to find out which commit cause the issue and
try to send a patch for it?

On Wed, Feb 26, 2020 at 04:55:56PM +0100, Patrik Osgnach wrote:

Hello all,

I have this strange situation with st (compiled from git commit
895e5b5, without any patch):
When I ssh from my local Linux PC (running Gentoo) to a SLES11SP4
Server, the delete key is ineffective (nothing gets deleted).
I can fix this with "tput smkx" but, if I run vim, the delete key is
not working any more after I quit vim.
To avoid interference with my settings, I ran multiple versions (from
7.2 to 8.1) of vim with "vim -u NONE" and saw the same effect.

If I hit ^V Delete after logging in on the remote server I get
^[[P

alter running tput smkx I get
^[[3~

and after quitting vim I get again
^[[P

The output of stty -a is identical in all of these 3 scenarios.
Other terminals like xterm do not show this behaviour.
Also, I don't get this behaviour when I run vim from an st on my local Linux PC.
Any ideas?

Best regards,
Patrik





Re: [dev] Learn C

2019-03-24 Thread Ivan Tham

Hi,

K&R The C Programming Book Second Edition should be a nice book to
learn C.

On Sun, Mar 24, 2019 at 10:28:35AM +0100, Thuban wrote:

Hi,
I want to learn C. I mean, sane C.
What i read before was based on big IDE such as codeblocks. So, I don't
know how to write Makefiles from scratch. (just an example).
As an example, I found gobyexample [1] great. But it's go.
Any reading advice?


--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [dmenu] 4.9 segfault on input

2019-02-17 Thread Ivan Tham

On Sat, Feb 16, 2019 at 04:37:31PM +0100, Hiltjo Posthuma wrote:

On Sat, Feb 16, 2019 at 11:08:40PM +0800, Ivan Tham wrote:

On Sat, Feb 16, 2019 at 12:12:31PM +0100, Hiltjo Posthuma wrote:
> On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote:
> > On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote:
> > > On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen  wrote:
> > > > With the suggested patch applied, everything worked for me when using
> > > > IBus and in st we use a similar pattern to what this patch is proposing
> > > > (x.c:1007-1014). I am not sure why Patrick's IME (SCIM) is working in
> > > > st but not in dmenu with the patch applied...
> > >
> > > To be clear... the terminal I normally use is termite, not st. In
> > > termite, scim+anthy works fine for me. As a test, I just now did a git
> > > clone of st and built it. Result: scim+anthy does not work in st for
> > > me. It doesn't crash; it just doesn't do anything.
> > >
> > > If I were looking for a terminal program, I probably would not
> > > consider st because of this. But in a menu program such as dmenu, I
> > > don't care whether I can use non-ASCII characters or not.
> > >
> >
> > st was fixed with some patches for IME recently but I am surprised that
> > dmenu could be used with IME, the reason I stopped using surf because of
> > the reason not being able to search using dmenu for chinese text.
> >
> > By the way, Patrick. Why use anthy instead of mozc for japanese input? I
> > heard anthy is a dead project (from arch wiki).
> >
> Could you perhaps give feedback if IME works with dmenu correctly for you or
> any improvements?
>
> In my testing the input position is fixed and the dmenu window may overlap 
over
> this, however this can be changed in a setting in fcitx so might be a
> non-issue.
>
> @patrick:
> In my testing scim and fcitx seems to work for me in st though (latest git).

IME works correctly but the pre-edit area initial position is correct to
be right below the cursor, however it does not move to the latest
position after selecting the characters to be inserted. An improvement
is to hint the IME using a patch similar to the st patch to allow that.

Should I send in a patch for that? For me, the pre-edit not following
the cursor is fine as my font is small and only few characters are
inserted so the gap is insignificant, not sure about others.

I had also sent in another patch to allow switching to another input
method by key release passthrough to be processed by IME.



Thanks, I'll look look at it. However there was a (vague) report on IRC for
this broke keyrelease input in some cases for st in commit
e85b6b64660214121164ea97fb098eaa4935f7db .


Okay, I haven't seen any issues so far, what are the steps to reproduce?


By the way, what do you mean by changed in a setting in fcitx?



In some editors there is a setting to show the displayed input at a fixed
position, so in my opinion this makes the patch to set the pre-edit area less
relevant.


Yes but I don't think fixed pre-edit area are useful, that reduces focus
when editing, inserting CJK characters are unlike typing latin
characters, even though one can touch type but most of the time needs a
few page scroll to insert a rarely used character, especially when
inserting chinese characters as compared to japanese characters.



Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Ivan Tham

On Sat, Feb 16, 2019 at 12:12:31PM +0100, Hiltjo Posthuma wrote:

On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote:

On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote:
> On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen  wrote:
> > With the suggested patch applied, everything worked for me when using
> > IBus and in st we use a similar pattern to what this patch is proposing
> > (x.c:1007-1014). I am not sure why Patrick's IME (SCIM) is working in
> > st but not in dmenu with the patch applied...
>
> To be clear... the terminal I normally use is termite, not st. In
> termite, scim+anthy works fine for me. As a test, I just now did a git
> clone of st and built it. Result: scim+anthy does not work in st for
> me. It doesn't crash; it just doesn't do anything.
>
> If I were looking for a terminal program, I probably would not
> consider st because of this. But in a menu program such as dmenu, I
> don't care whether I can use non-ASCII characters or not.
>

st was fixed with some patches for IME recently but I am surprised that
dmenu could be used with IME, the reason I stopped using surf because of
the reason not being able to search using dmenu for chinese text.

By the way, Patrick. Why use anthy instead of mozc for japanese input? I
heard anthy is a dead project (from arch wiki).


Could you perhaps give feedback if IME works with dmenu correctly for you or
any improvements?

In my testing the input position is fixed and the dmenu window may overlap over
this, however this can be changed in a setting in fcitx so might be a
non-issue.

@patrick:
In my testing scim and fcitx seems to work for me in st though (latest git).


IME works correctly but the pre-edit area initial position is correct to
be right below the cursor, however it does not move to the latest
position after selecting the characters to be inserted. An improvement
is to hint the IME using a patch similar to the st patch to allow that.

Should I send in a patch for that? For me, the pre-edit not following
the cursor is fine as my font is small and only few characters are
inserted so the gap is insignificant, not sure about others.

I had also sent in another patch to allow switching to another input
method by key release passthrough to be processed by IME.

By the way, what do you mean by changed in a setting in fcitx?



Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Ivan Tham

On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote:

On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen  wrote:

With the suggested patch applied, everything worked for me when using
IBus and in st we use a similar pattern to what this patch is proposing
(x.c:1007-1014). I am not sure why Patrick's IME (SCIM) is working in
st but not in dmenu with the patch applied...


To be clear... the terminal I normally use is termite, not st. In
termite, scim+anthy works fine for me. As a test, I just now did a git
clone of st and built it. Result: scim+anthy does not work in st for
me. It doesn't crash; it just doesn't do anything.

If I were looking for a terminal program, I probably would not
consider st because of this. But in a menu program such as dmenu, I
don't care whether I can use non-ASCII characters or not.



st was fixed with some patches for IME recently but I am surprised that
dmenu could be used with IME, the reason I stopped using surf because of
the reason not being able to search using dmenu for chinese text.

By the way, Patrick. Why use anthy instead of mozc for japanese input? I
heard anthy is a dead project (from arch wiki).

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [st] IBus is not working properly in st

2019-02-12 Thread Ivan Tham

Nice to hear that. But there is an issue where you stop the IME without
restarting straight away. This will result in IME not being detected and
used in st. In other way, IME started after st is not usable.

On Mon, Feb 11, 2019 at 05:07:22PM +0100, Wolf wrote:

Hi,

On , Hiltjo Posthuma wrote:

On Sun, Feb 10, 2019 at 11:31:23PM +0100, Wolf wrote:
[..]

Also have a look at this patch:
https://st.suckless.org/patches/fix_ime/

I want to integrate this patch upstream, but in my testing this patch doesn't
improve much. Maybe it improves things for you?


This seems to fix my issue completely. What issue are remaining for you
since you say "doesn't improve much"?

Anything I can do to help this get upstream-ready?

W.

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


--
Do what you like, like what you do.  -- Pickfire


signature.asc
Description: PGP signature


Re: [dev] [st] IBus is not working properly in st

2019-02-11 Thread Ivan Tham

Opps, I forgot to attach the image previous reply. Here's it.

On Sun, Feb 10, 2019 at 11:31:23PM +0100, Wolf wrote:

Greetings,
I've decided to give a st a try but I've hit a problem quite quickly. It
seems that IBus input is not handled completely correctly. While trying
to input japanese inside rxvt-unicode (using IBus with Anthy), it shows
the prompt around the cursor (urxvt.png). While for st, the prompt is
displayed at the bottom of the terminal window (st.png), which makes it
hard to us.

I guess I'm not asking to get this fixed (since I can see it's probably
not a problem to the current users), however I want to know, if I put
together a patch for this, would it be accepted?

Thank you for your time.

W.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


--
Do what you like, like what you do.  -- Pickfire


signature.asc
Description: PGP signature


Re: [dev] [st] IBus is not working properly in st

2019-02-11 Thread Ivan Tham

Yes, I have noticed the problem and most of the stuff are fixed in

https://st.suckless.org/patches/fix_ime/

Except on the part where st started before IME, maybe I will look into
that in the future but that is not critical for me such that I only want
to find way to quickly switch between chinese and japanese input as well
as for the pre-edit area to be right below the cursor.

I personally use fcitx with shuangpin (or mozc) but there is no issues
so probably ibus does not have issue as well.

Thanks for submitting this issue though.

On Mon, Feb 11, 2019 at 09:51:45AM +0100, Hiltjo Posthuma wrote:

On Sun, Feb 10, 2019 at 11:31:23PM +0100, Wolf wrote:

Greetings,
I've decided to give a st a try but I've hit a problem quite quickly. It
seems that IBus input is not handled completely correctly. While trying
to input japanese inside rxvt-unicode (using IBus with Anthy), it shows
the prompt around the cursor (urxvt.png). While for st, the prompt is
displayed at the bottom of the terminal window (st.png), which makes it
hard to us.

I guess I'm not asking to get this fixed (since I can see it's probably
not a problem to the current users), however I want to know, if I put
together a patch for this, would it be accepted?



Maybe, and only if the patch is good ofcourse.

Also have a look at this patch:
https://st.suckless.org/patches/fix_ime/

I want to integrate this patch upstream, but in my testing this patch doesn't
improve much. Maybe it improves things for you?

In these specific problems it is very important to describe the problem exactly
and with reproducable steps. Sometimes I cannot reproduce a problem at all or
it is costs me way too much time.


Thank you for your time.

W.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


--
Kind regards,
Hiltjo


--
Do what you like, like what you do.  -- Pickfire


signature.asc
Description: PGP signature


Re: [dev] Patch apply status overview

2019-02-01 Thread Ivan Tham

Thanks for the effort for automatically patches.

Please note that st-scrollback-mouse-altscreen failed to be patched
because it was meant to be patched in a particular order.

1. st-scrollback
2. st-scrollback-mouse
3. st-scrollback-mouse-altscreen

I thought the patch failed but it was no the case though.

Any suggestion for this? Should the patched be made a single shot?

On Thu, Jan 31, 2019 at 08:47:35PM +0100, Hiltjo Posthuma wrote:

I'd like to show an experiment I made for automatically testing patches on the
wiki.  Its purpose is it to have a quick overview of broken patches on the wiki.
I hope this will also help the community and patch authors in fixing these
patches together and pushing them to the public wiki repository.

HTML view: https://gunther.suckless.org/patches/
CSV parsable list: https://gunther.suckless.org/patches/index.csv

It is sorted currently by: project, patch name, project version.

The HTML view links to the original index page of the patch and the stderr and
stdout output of the patch command. Patches are tested with the command:

patch -p1 -t -C < patchfile

The exitcode is the exitcode of this command ($?).

It works by parsing the project, version/revision from the patch filename then
it creates a clean tree from the project git repository of this revision and
tries to apply the patch. It is important the patches are consistent and
correctly named on the wiki. For format guidelines see:
https://suckless.org/hacking/

It also finds incorrect revision names, these are shown on this link for now:
https://gunther.suckless.org/patches/err.log

I'm unsure if this will be run automated or so, but it was fun to write anyway.


--
Do what you like, like what you do.  -- Pickfire



Re: [dev] suckless too to minify CSS, JS and html

2018-05-18 Thread Ivan Tham

On Fri, May 18, 2018 at 05:46:15PM +0200, Thuban wrote:

Hello,

Does anyone has advice for a suckless tool to minify JS, CSS and HTML
files? I use sed for now, but it might not be the best solution.

Furthermore, I was wondering what is the opinion of the list about minifying 
CSS, JS
and html files?
- Do you minify on your websites ? Why ?
- What tool do you use to do so?


I did this for my website.

CSS was already partly written minimally and optimized with sed + tr.
HTML is also optimized with sed with optional tags manually removed.

source: https://git.pickfire.tk/www/

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [st] Larger HISTSIZE consumes huge memory

2017-06-22 Thread Ivan Tham

I find urxvtd and find it very useful when using a bunch or terminals
since it uses far less memory than st when there are 6 terminals opened.

Just run `urxvtd -q -o -f` on startup and after that just run urxvtc and
subsequent terminal startup.

On Wed, Jun 21, 2017 at 11:00:22PM +0600, Techno Implant wrote:

urxvt's daemon mode does not give many benefits. It groups terminals
together , so less memory consumption. And It's supposed to be faster,
this part I'm not sure though.

On 21 June 2017 at 21:19, hiro <23h...@gmail.com> wrote:

i tried urxvt's daemon mode. it doesn't offer any benefit. i'm also a
bit ashamed now that i wasted that time trying, could have known, by
principle instead of experience.


--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [sbase] Changing BUFSIZ

2017-06-14 Thread Ivan Tham
Mattias Andrée  wrote:

> On Linux, the performance of cat(1) can be doubled
> when cat(1):ing from one pipe to another, by compiling
> with -DBUFSIZ=(1<<16) (the default pipe capacity).
> This is close to optimial for a read(3)/write(3)
> implementation.

I have seen people mentioning how is GNU yes fast:

https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/



Re: Re: [dev] Interesting Web Browser Decoupling Concept

2017-06-13 Thread Ivan Tham
Kamil Cholewiński  wrote:

> On Tue, 13 Jun 2017, sylvain.bertr...@gmail.com wrote:
> > When mentioning souldcloud, I usually refer to the "sound editing" feature.
> 
> As a person that does most of his music making in plain old analog
> (including a tape recorder), I miss the point of having a web service
> doing audio stuff, i.e. what can SC do in the browser that I couldn't do
> with a desktop app?
> 
> > For youtube, we agree 100%, but it seems that the javascript/modern web 
> > engine
> > combo is used as a kind of DRM... namely the dependency by complexity is _on
> > purpose_ (see the user agreement of youtube: you MUST use the 
> > javascript/modern
> > web engine video player. [...]
> 
> In principle, in practice youtube-dl[1] still works pretty well ;)
> However not without labor on the part of the developer.
> I suspect there will be a way, as long as YT allows watching videos
> without logging in - which would get a lot of people upset.
> 
> [1]: https://rg3.github.io/youtube-dl/

youtube-dl is quite fat, I prefer you-get which is simpler and smaller.

https://you-get.org/



Re: [dev] [st] Input methods display in wrong position

2017-05-31 Thread Ivan Tham
David Elliott  wrote:

> Hi everyone,
> 
> I'm using fcitx for Chinese input, and noticed that the fcitx window
> always appears at the bottom left of the st window rather than at the
> cursor, where it should. This issue makes it difficult to use CJK
> input methods with st because the user must constantly look back and
> forth between the bottom of the screen and the current cursor
> position.
> 
> I have tried using both on-the-spot and over-the-spot settings for
> xim, but the input method still won't follow the cursor. I tried using
> ibus instead of fcitx, and the results were the same: the input method
> could enter characters properly, but did not display at the cursor. I
> have verified that both input methods display properly in urxvt. I
> read the fcitx wiki page, and it seems that this is a problem with st
> not reporting the cursor position properly.
> 
> I am using Arch Linux with dwm (patched with gaplessgrid).
> 
> Let me know if you have any suggestions how this could be fixed.
> 
> Thanks,
> David

Yup, this is a know issue. Maybe you can get some help from
Weng Xuetian , he helped to fix st XIM issue.

By the way, I think there is another issue with fcitx, when fcitx is
restarted, all instances of st that started before fcitx will die.



Re: [dev] [st] Cannot figure out how to get ibus input to work

2017-04-29 Thread Ivan Tham
Jordan Timmerman  wrote:

> I'd like to be able to use my pinyin IME input methods in st, but
> while after installing and configuring ibus I can input Chinese in
> Chrome and libreoffice and other GUI applications, it doesn't seem to
> work in st. I know in urxvt you can specify ibus in the configuration
> - is there something similar for st? Apologies if I've failed to
> adequately rtfm...

I used fcitx for pinyin input, it works in st but just doesn't show up
at the right position, it shows at the left bottom of st.

Weng Xuetian, contributor of fcitx have fixed IME in st twice, I can
confirm that it works now.



Re: Re: [dev] [surf] Web inspector not working

2017-04-27 Thread Ivan Tham
xant...@openmailbox.org wrote:

> On 27-04-2017 06:08, David Kennedy wrote:
> > When I attempt to open the web inspector with Ctrl-Shift-o, nothing 
> > happens.
> > No errors are generated in the console or anything. I've enabled the 
> > inspector
> > feature in config.h with the following line:
> > 
> > SETB(Inspector,  1),
> > 
> > I haven't changed the default key binding from:
> > 
> > { MODKEY|GDK_SHIFT_MASK, GDK_KEY_o,  toggleinspector, { 0 } },
> > 
> > Has anyone else noticed this problem?
> 
> Is it built with musl ?
> It seems to be a known problem : [1]
> Don't know if it's fix now.
> 
> [1] http://www.openwall.com/lists/musl/2014/11/04/1
> 

Ah, I tried it with musl and it doesn't work.



Re: [dev] [surf] Web inspector not working

2017-04-26 Thread Ivan Tham
David Kennedy  wrote:

> When I attempt to open the web inspector with Ctrl-Shift-o, nothing happens.
> No errors are generated in the console or anything. I've enabled the inspector
> feature in config.h with the following line:
> 
> SETB(Inspector,  1),
> 
> I haven't changed the default key binding from:
> 
> { MODKEY|GDK_SHIFT_MASK, GDK_KEY_o,  toggleinspector, { 0 } },
> 
> Has anyone else noticed this problem?
> 

I find it working fine here with the latest surf-webkit2.



Re: [dev] [st/dwm] Alt-Shift-C and Mod1-Shift-C

2017-01-13 Thread Ivan Tham

On Thu, Jan 12, 2017 at 07:25:06PM +0100, Patrick Bucher wrote:

I'm using st and dwm at the same time, and today I discovered a little problem
when using the default config of both programs. st uses Alt-Shift-C to copy text
into the clipboard, dwm uses Mod1-Shift-C for closing the selected window,
whereas Mod1 is Alt by default, at least on my machine. (Maybe some of you use
Super_L, vulgo "the Windows key".)


Windows key is a better choice most of the time since it's unused except
in qemu where windows uses super key so it clashes. Alt would be bad
since most applications uses Alt like Alt+1 in firefox, Alt+f in
terminal.


So guess what happened when I was trying to copy some code into the clipboard
today ;-)


Try using the primary clipboard, I use that most of the time. I only use
the clipboard when it comes to Google drive stuff since they clipboard
sucks and don't support primary keyboard.


PS: Anybody using Arch Linux here? Since the fontconfig update today st no
longer works with my font of choice Terminus. Just in case somebody has the same
problem... here's my font[] definition:

static char font[] = 
"Terminus:pixelsize=24:antialias=true:autohint=true:lang=ru";


I use Arch here with Void (Musl is broken with locale so no Chinese
LC_DATETIME), I heard that there is some issues with the latest update
where my friend can't use Inifinity but I am still be able to use
ttf-mononoki here fine.

I don't know how to solve that but still hope you good luck!

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] Request for name suggestions: suckless video editor

2017-01-12 Thread Ivan Tham

I would suggest TV (Text-based Video editor).

On Wed, Jan 11, 2017 at 08:39:44PM -0800, Louis Santillan wrote:

(ht) Hot Tub
(httm) Hot Tub Time Machine
(ufeh) *nix Flying Erase-Head (an early video editing machines)
(ued) *nix EditDroid
(vzmx) Vision Mixer


Github suggests:
(pos) psychic-octo-spork
(sdd) super-duper-doodle
(syen) symmetrical-enigma
(vpara) vigilant-parakeet
(sspoon) super-spoon

On Wed, Jan 11, 2017 at 7:56 PM, Mattias Andrée  wrote:

On Thu, 12 Jan 2017 05:52:27 +0200
Amer  wrote:


>I want the tools to have a common prefix of 2 to 4
>characters plus a dash. Any other ideas of awesome
>arbitrary things, I cannot think of anything else that
>is not already used?

Short names were exhausted, really?)
At least AUR is free of them.

eiv
eivy
evior
eviour
ouvie
muv
cvq
veq
yvi
vidj
vwet
koe
koan
fyu
hevu
...



The name can be long, but it must have a short
abbreviation that I can use as a prefix for the
names of the commands.




--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [surf] Webkit2 with proxy server

2016-12-24 Thread Ivan Tham


On Sat, Dec 24, 2016 at 10:03:51PM +, Teodoro Santoni wrote:

Hi Laslo,

2016-12-24 10:11 GMT, Laslo Hunhold :

Anything else can be solved by finding your way into scraping the
website and building a proxy that sends you a very simplified version
of it at your w3m, links, lynx, dillo, mosaic or shell script.
It isn't easier and should be packed into a standard distribution,
but it isn't all that much of an enigma.


Never go full Stallman.


I'm just lazy, like very lazy, and the youtube-dl model looks appealing
to me: trusting someone dedicated to a naked representation
of a single website, not doing the scraper yourself... I although know
well that a package manager or a single standard distrib leads
to drawbacks like dbus, keith packard and the funny story of lpad
on npm (node devs deserved it in full!) [0].



youtube-dl:  A small command-line program to download videos from
YouTube.com and a few more sites


And don't forget that there is you-get which is 10x smaller than
youtube-dl. Youtube-dl isn't considered small.

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [surf] Webkit2 with proxy server

2016-12-16 Thread Ivan Tham

On Sat, Dec 17, 2016 at 01:19:54AM +0100, Quentin Rameau wrote:

Hi,

Hi Ian,


I have been using 'standard' surf through a proxy server for some time
by just setting 'http_proxy' in the env. This doesn't work with
webkit2. Does anyone know a fix? Otherwise surf2 seems to be working
fine.

Works for me.


Works for me too.


With webkit2gtk, the proxy handling is delegated down to libsoup which
uses libproxy which supports http_proxy.


Yeah, libsoup automatically sets the proxy with libproxy by detecting
the environment variables but in surf1, it's hardcoded.

But I think surf2 uses https_proxy and no_proxy too but it isn't
documented in the manual.

--
Do what you like, like what you do.  -- Pickfire



[dev] [spt] 0.4 release

2016-10-31 Thread Ivan Tham

Greetings to all suckless folks.

I am grateful to all that have helped in the great transition to 0.4
release of spt. There are a lot more major features now and things have
become more stable since then.

Notable major changes:
- Sensitivity greatly increase, from seconds to nanoseconds
- More portable, pause(2) -> sigsuspend(2), signal(2) -> sigaction(2)

Minor fix:
- Whether NOTIFY being defined, -m will be runned

Great thanks to Simon Lieb (pips-) for adding the new features.

Sincerely,
Ivan Tham

spt - simple pomodoro timer
http://git.pickfire.tk/spt, https://github.com/pickfire/spt
http://git.pickfire.tk/spt/snapshot/spt-0.4.tar.gz

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] I'm leaving.

2016-09-29 Thread Ivan Tham


On Wed, Sep 28, 2016 at 09:43:27PM +0200, Markus Teich wrote:

Christoph Lohmann wrote:

I  am  stepping  back  from my maintainership and my role as an admin of
suckless.


Thanks a lot for the philosophy that you had thought me, hope that you
can live with the suckless spirit still.

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] several questions

2016-09-21 Thread Ivan Tham

Hi, Stephen.

On Tue, Sep 20, 2016 at 04:32:18PM -0400, stephen Turner wrote:

Bash and Make, I'm looking for compatible replacements for these. As i
currently understand it bash at the least is expected to compile the linux
kernel. Is there any suitable projects that you may have seen around the
net or considered a bash rewrite? I see you recommend mksh and dash but
neither have bashisms that some projects seem to expect.


For me, I think bach it very much bloated. I would definitely agree that
mksh or dash is a lot better. Well about rc, I wouldn't recommend that
since it's a total different syntax compared to POSIX shell, although
posix shell definitely have some weaknesses, it's still more portable.

And about make, I would recommend make, I didn't check the source code
for both make and mk but I did some benchmark back then, make is still
the fastest build system that I have tested and it have a clean but
weird syntax. But just beware of autotools and autoconf.


I love the site and the list of tools you have found to "suck less" looking
great!


Nice, hope you could help us out starting with some of the project
ideas. http://suckless.org/project_ideas

--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [st] Ibus

2016-09-04 Thread Ivan Tham

It should as it's fixed around a commit in between 0.6 and 0.7 by Weng
Xuetian (author of fcitx).

On Sun, Sep 04, 2016 at 10:42:12AM -0400, Daniel Norris wrote:

Hi Ivan,

Thanks for your help. I think I had ibus improperly set up. It now
works fine on 0.7.

On Sun, Sep 4, 2016 at 3:06 AM, Ivan Tham  wrote:

Well, it works here as Weng Xue Tian had patched it. I used fcitx here
and it it works find. Had you tried the latest git?


On Sat, Sep 03, 2016 at 08:38:12PM -0400, Daniel Norris wrote:


Hi There,

Thanks for all of your great work -- I've loved using Suckless tools.

I'd like to be able to use Ibus or a similar IME to input pinyin /
Chinese characters.

From searching the web, it doesn't look like ST supports this
functionality. Is that true or is there a patch I can use? Something
like that is referenced here:

http://lists.suckless.org/dev/1506/27121.html


--
Do what you like, like what you do.  -- Pickfire



Re: [dev] [st] Ibus

2016-09-04 Thread Ivan Tham

Well, it works here as Weng Xue Tian had patched it. I used fcitx here
and it it works find. Had you tried the latest git?

On Sat, Sep 03, 2016 at 08:38:12PM -0400, Daniel Norris wrote:

Hi There,

Thanks for all of your great work -- I've loved using Suckless tools.

I'd like to be able to use Ibus or a similar IME to input pinyin /
Chinese characters.

From searching the web, it doesn't look like ST supports this
functionality. Is that true or is there a patch I can use? Something
like that is referenced here:

http://lists.suckless.org/dev/1506/27121.html


--
Do what you like, like what you do.  -- Pickfire



[dev] [dmenu][PATCH] Improve spacing in config.h

2016-07-26 Thread Ivan Tham
---
 config.def.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h
index 1edb647..b53885b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -8,10 +8,10 @@ static const char *fonts[] = {
 };
 static const char *prompt  = NULL;  /* -p  option; prompt to the left 
of input field */
 static const char *colors[SchemeLast][2] = {
-   /* fg bg   */
+   /* fg bg  */
[SchemeNorm] = { "#bb", "#22" },
-   [SchemeSel] = { "#ee", "#005577" },
-   [SchemeOut] = { "#00", "#00" },
+   [SchemeSel]  = { "#ee", "#005577" },
+   [SchemeOut]  = { "#00", "#00" },
 };
 /* -l option; if nonzero, dmenu uses vertical list with given number of lines 
*/
 static unsigned int lines  = 0;
-- 
2.8.3




Re: [dev] scrollback with st

2015-11-25 Thread Ivan Tham

On Tue, Nov 24, 2015 at 07:36:01PM -0500, Greg Reagle wrote:

I recommend using dvtm [2] with st in order to get scrolling.  Someone
ought to change the FAQ.  dvtm sucks considerably less than both tmux
and screen.  It works very well, Shift+PageUp and Shift+PageDown will
scroll.  If you use dvtm (or tmux or screen) for scrollback then there
is no need to bother with the scrollback patch for st.  Or you can use
the scrollback patch for st and forget about dvtm (or tmux or screen).

[1] http://suckless.org/community [2]
http://www.brain-dump.org/projects/dvtm/


Hi, Greg. There is actually a patch for st to use scrollback with mouse
support, I would like to advertise it as a maintainer. I would like to
use dvtm too but too bad, not support for true colors. If there is,
broadcast it to me so and I will switch to it.

Good luck and have a nice day!

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] Input method under break (again) under st

2015-07-02 Thread Ivan Tham

Hi, this is cause by the commit d2937b05aed9cee8d6651cd806d31682a853c773
which revert the commit 84ceefe0890ee235dd736543fe30479393562fb6 and had
prevent it from using fcitx.

On Thu, Jul 02, 2015 at 08:30:30AM +0200, Roberto E. Vargas Caballero wrote:

On Wed, Jul 01, 2015 at 09:40:41AM -0700, Weng Xuetian wrote:

Some fcitx user reaches me about input method issue, and I surprisingly found
that input method is broken again in st because I have fixed it once.


Yes. Maybe it is my fault because I didn't tested this part of st.


The new issue is caused by commit 2937b05aed9cee8d6651cd806d31682a853c773
which removes a XFilterEvent call.


Are you sure this is the commit?

$ git fetch
$ git log -n1
commit bdd649a10289ade364f3deab3bbf6ee3169d67ca
Author: Quentin Rameau 
Date:   Sun May 31 12:26:11 2015 +0200
   do not truncate font size when zooming
$ git log -n1 2937b05aed9cee8d6651cd806d31682a853c773
fatal: ambiguous argument '2937b05aed9cee8d6651cd806d31682a853c773': unknown 
revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git  [...] -- [...]'


XFilterEvent is required to be called after you using XOpenIM, this is not
unnecessary. It does not only filter the key event, but some clientmessage for
input method as well.


I can see it. We must add a comment to avoid this kind of problems in the 
future.


--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: [dev] [st] Fcitx not working in st

2015-06-30 Thread Ivan Tham

Thanks. But I am not very good at c. I had contact the fcitx developer
named Weng Xuetian which had once help in writing st. He said that he
had fixed a problem a long time ago in commit 84ceefe08. Look at:

http://git.suckless.org/st/commit/?id=84ceefe0890ee235dd736543fe30479393562fb6

Any idea how to fix that?

On Mon, May 25, 2015 at 09:23:12AM +0200, Roberto E. Vargas Caballero wrote:

Hi,

On Sat, May 23, 2015 at 03:43:08PM +0800, Ivan Tham wrote:

>>I typed ``Ctrl + Space`` in st but it seems like it doesn't work. Fcitx
>>is a Chinese IME for XIM.
>
>As far as I know no IME works with st (please correct me if I am


St has code to deal with input methods. I cannot test it because
I am not user of such methods, but the code that deals with XIM is:

xinit():
   /* input methods */
   if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
   XSetLocaleModifiers("@im=local");
   if((xw.xim =  XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
   XSetLocaleModifiers("@im=");
   if((xw.xim = XOpenIM(xw.dpy,
   NULL, NULL, NULL)) == NULL) {
   die("XOpenIM failed. Could not open input"
   " device.\n");
   }
   }
   }
   xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing
  | XIMStatusNothing, XNClientWindow, 
xw.win,
  XNFocusWindow, xw.win, NULL);
   if(xw.xic == NULL)
   die("XCreateIC failed. Could not obtain input method.\n");


void
focus(XEvent *ev) {
   XFocusChangeEvent *e = &ev->xfocus;

   if(e->mode == NotifyGrab)
   return;

   if(ev->type == FocusIn) {
   XSetICFocus(xw.xic);
   xw.state |= WIN_FOCUSED;
   xseturgency(0);
   if(IS_SET(MODE_FOCUS))
   ttywrite("\033[I", 3);
   } else {
   XUnsetICFocus(xw.xic);
   xw.state &= ~WIN_FOCUSED;
   if(IS_SET(MODE_FOCUS))
   ttywrite("\033[O", 3);
   }
}

-
kpress():
   len = XmbLookupString(xw.xic, e, buf, sizeof buf, &ksym, &status);
   /* 1. shortcuts */
   for(bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) {
   if(ksym == bp->keysym && match(bp->mod, e->state)) {
   bp->func(&(bp->arg));
   return;
   }
   }
-


>having trouble figuring out where to start (Is it a X text protocol?
>It probably is with XIM but not with ibus. Would I have to use an ibus
>API to get st to work with ibus? Etc...).


So I think it should work. With this information you can debug the issue.


Regards,





--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||
commit 84ceefe0890ee235dd736543fe30479393562fb6
Author: Weng Xuetian 
Date:   Wed Jul 16 18:36:46 2014 -0400

Fix st with input method.

XFilterEvent need to be called against every event, otherwise it would
missing some message in the xim protocol and misbehave on some im server.

Signed-off-by: Roberto E. Vargas Caballero 

diff --git a/st.c b/st.c
index 040638a..546db41 100644
--- a/st.c
+++ b/st.c
@@ -3786,6 +3786,8 @@ run(void) {
/* Waiting for window mapping */
while(1) {
XNextEvent(xw.dpy, &ev);
+   if(XFilterEvent(&ev, None))
+   continue;
if(ev.type == ConfigureNotify) {
w = ev.xconfigure.width;
h = ev.xconfigure.height;


signature.asc
Description: PGP signature


[dev] Re: [surf] Using more memory than firefox

2015-06-21 Thread Ivan Tham

On Mon, Jun 01, 2015 at 11:10:19PM +0800, Ivan Tham wrote:

Hi, I use 2 windows of surf uses more memory then using firefox with 6 tabs
opened. Is there some memory leaks?


Here is the picture to show how much memory firefox and surf used:
http://s23.postimg.org/5x84mgs1n/2015_06_21_203932_1600x900_scrot.png
http://s18.postimg.org/moh885m09/2015_06_21_204121_1600x900_scrot.png
http://s24.postimg.org/v30fwcct1/2015_06_21_204130_1600x900_scrot.png

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: [dev] [st] Viewing images in terminal with w3m

2015-06-11 Thread Ivan Tham

On Thu, Jun 11, 2015 at 10:00:58PM -0700, Eric Pruitt wrote:

On Fri, Jun 12, 2015 at 12:52:29PM +0800, Ivan Tham wrote:

>There was a patch in mainline to support viewing images in st, but it
>was removed; refer to c0a56ef4be2a0f84360f41b2d45964e7ef297746 and
>c2026a495097a7e3bcfe4b58e1b9e393433cf150. I can't find the thread in the
>message archives.
Do you know any reason why it was removed?

It's mentioned in the second commit message. See also:
http://lists.suckless.org/dev/1304/15283.html .


Thanks, now I know why it doesn't work. It is the fault of w3m. Thanks.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [st] Viewing images in terminal with w3m

2015-06-11 Thread Ivan Tham

On Thu, Jun 11, 2015 at 09:18:58PM -0700, Eric Pruitt wrote:

On Fri, Jun 12, 2015 at 12:11:33PM +0800, Ivan Tham wrote:

I know that w3m can only display images in xterm.
Is there other text browser that can display images like w3m in st? Or
is there any way to get w3m diaplay images in st?

There was a patch in mainline to support viewing images in st, but it
was removed; refer to c0a56ef4be2a0f84360f41b2d45964e7ef297746 and
c2026a495097a7e3bcfe4b58e1b9e393433cf150. I can't find the thread in the
message archives.


Do you know any reason why it was removed?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



[dev] [st] Viewing images in terminal with w3m

2015-06-11 Thread Ivan Tham

Hi,

I know that w3m can only display images in xterm.
Is there other text browser that can display images like w3m in st? Or
is there any way to get w3m diaplay images in st?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [surf] Using more memory than firefox

2015-06-03 Thread Ivan Tham

On Wed, Jun 03, 2015 at 08:32:42PM +0200, hiro wrote:

Does your polipo cache https traffic?


Thanks, I just found out that polipo doesn't cache https traffic but
some other cache server does.


If you know what /etc/hosts is and how polipo does it's dns requests
you should be able to figure out your question yourself :)


I know that a normal request uses /etc/hosts and polipo uses
/etc/polipo/forbidden. But the format is different.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [surf] Using more memory than firefox

2015-06-02 Thread Ivan Tham

On Tue, Jun 02, 2015 at 01:34:28PM -0700, tauto...@gmail.com wrote:

When I look at top, I see a lot of memory usage, but most of that is shared 
mappings. What I look at is the active memory use, and virtual memory 
statistics, to see what is going on with memory. The only performance issue I 
deal with is when crossing origin domains in links, because it opens up a whole 
new surf process, but since my browser profiles are per-origin, the cache 
lookups stay fast, and the browser doesn't get sluggish over time the way 
firefox does.


Does surf uses internal caching? I use polipo as a cache server so
I don't think I need one anymore.


Firefox actually has a feature that asks you to reset your browser profile and 
restart the process periodically, because it gets so bloated. The unified state 
design meant to improve efficiency clearly backfires in that case. 


I haven't used firefox until it is bloated although the RAM is just 1GB
so I haven't used the feature you are talking about.


Basically, memory usage is actually a topic with a lot of subtleties that 
affect performance, and to speak of it generally, if you manage state in a way 
that is generally more organized, then the VM subsystem of the OS can manage it 
more effectively. Surf has a different design, so it hangs in different places 
than other browsers do, and it is noticeable, so it may feel sluggish 
sometimes, but it also is noticeably less likely to bloat over time.


I am also a user of `uzbl-browser`, I noticed that uzbl load faster than
surf and the memory usage is about the same. But I noticed surf starts
**a lot quicker** than uzbl.


I often have a lot of browser windows open, and it doesn't seem to have more 
memory pressure than firefox. When I am taxing my system, surf and firefox both 
take some time to page back into active state, and that is the true test of 
memory issues, I think. I doubt you would see another browser beating surf in 
that test, except for dillo, and other browsers with minimal rendering engines.


Why can't surf beat dillo which is a gecko-based browser?

And is there any method to use http://surf.suckless.org/files/adblock-hosts 
with polipo?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [surf] Using more memory than firefox

2015-06-02 Thread Ivan Tham

On Mon, Jun 01, 2015 at 09:54:46AM -0700, tauto...@gmail.com wrote:

Hi Ivan,
Also, I prefer to isolate state between different browser windows/tabs. ‎If 
firefox is sharing process state between windows, and saving memory usage that 
way, then I see it as a security design issue. 


Hi,

Is there any way to share process to save memory without having
a security design issue? This may save up a lot of memory.

Extra: How do I open a link in surf using the keyboard in the current
window and in a new window?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [surf] Using more memory than firefox

2015-06-01 Thread Ivan Tham

On Mon, Jun 01, 2015 at 04:14:36PM +0100, Raphaël Proust wrote:

Hi, I use 2 windows of surf uses more memory then using firefox with 6 tabs
opened. Is there some memory leaks?

Open the six exact tabs of your FF in surf and compare that.
Open the two pages from your surf into your FF and compare that.

Some pages occupy more memory than others.


Yeah, I know about that too. When you just opened both of it, firefox
will consume much more memory. But after about 100 clicks, just look at
the momory. Firefox stays around +-2% and surf takes around 10%++ or
even 20%++ when you are loading javascript heavy sites.

Note: The percentage difference is high because my computer has lesser
ram.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [Idea] Using GitTorrent

2015-06-01 Thread Ivan Tham

On Mon, Jun 01, 2015 at 05:09:43PM +0200, Martti Kühne wrote:

...everywhere...

that should obviously git.suckless.org there. :-)

It is just in case that there are 10,000 downloads per minute,
git.suckless.org will be seeding and those other downloader will help in
the progress.

How by Dennis Ritchie's beard don't you see that's not gonna happen?
Nobody cares about suckless, give or take a few afficionados.


Be confident for apps that suck less. Drop confident for apps that suck
more. More importantly, **The Author Should Suck Less**

I don't mean any insults. And if I did it, sorry.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



[dev] [rocks] [sucks] man macros vs troff?

2015-06-01 Thread Ivan Tham

http://www.catb.org/esr/writings/taoup/html/ch04s02.html#compactness

Hi, look at it and find man. Do you think we should put it in the wiki?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



[dev] [surf] Using more memory than firefox

2015-06-01 Thread Ivan Tham

Hi, I use 2 windows of surf uses more memory then using firefox with 6 tabs
opened. Is there some memory leaks?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [Idea] Using GitTorrent

2015-06-01 Thread Ivan Tham

On Sun, May 31, 2015 at 05:01:46PM +0200, Martti Kühne wrote:

...everywhere...

that should obviously git.suckless.org there. :-)


It is just in case that there are 10,000 downloads per minute,
git.suckless.org will be seeding and those other downloader will help in
the progress.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [Idea] Using GitTorrent

2015-05-31 Thread Ivan Tham

On Sun, May 31, 2015 at 03:31:42PM +0200, Teodoro Santoni wrote:

Rather not like the implementation in node javascript.


Yeah, I thought about that too. Implementing it in C.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



[dev] [Idea] Using GitTorrent

2015-05-31 Thread Ivan Tham

http://blog.printf.net/articles/2015/05/29/announcing-gittorrent-a-decentralized-github/

Hi, I think that would make the projects in suckless more decentralized.
I am just giving and idea but I still think the current system is
better, using gittorrent may let the projects which are inspired by
suckless work together in the suckless community. What do you think?

Comments and insults are welcome.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [st] Powerline fonts to large

2015-05-26 Thread Ivan Tham

On Tue, May 26, 2015 at 09:17:20AM -0400, Alex Pilon wrote:

On Tue, May 26, 2015 at 01:04:32PM +0200, Jochen Sprickerhof wrote:

Write a patch.


Not to do the work for him, but it so happens that I do have such a
patch already.


I am trying to create a patch which uses both scrollback and scrollback
with mouse support. The only downside is that it is needed to use with
SHIFT. I am looking at LXTerminal for some help in creating a patch as
LXTerminal has better mouse support for:

* Scrolling in vim doesn't look weird (no page scroll)
* Scrolling in shell without using SHIFT


--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [st] Powerline fonts to large

2015-05-26 Thread Ivan Tham

On Tue, May 26, 2015 at 11:36:59AM +0200, Jochen Sprickerhof wrote:

Note that config.def.h changed, so you should adopt your config.h.
Apart from it, we are not the git/C help line.


Thanks, I can get it to work now. Is there any way use the scrollback
with mouse scroll?



--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [st] Powerline fonts to large

2015-05-25 Thread Ivan Tham

On Mon, May 25, 2015 at 04:49:06PM +0200, Jochen Sprickerhof wrote:

* Ivan Tham  [2015-05-25 19:57]:

I cannot patch it, when ``git apply st-scrollback.diff``::

   error: patch failed: config.def.h:7
   error: config.def.h: patch does not apply
   error: patch failed: st.c:83
   error: st.c: patch does not apply


$ git rev-parse HEAD
c03548750b2527a6ddb5edfd945c5799066a6224

$ sha256sum st-scrollback.diff
250681d44ba4c89cdaf358d89bab67f215826f84b04199427d174113f1484c06 
st-scrollback.diff

$ git apply st-scrollback.diff

Now ``git apply`` does work, but:

   $ git rev-parse HEAD
   c03548750b2527a6ddb5edfd945c5799066a6224

   $ sha256sum st-scrollback.diff
   250681d44ba4c89cdaf358d89bab67f215826f84b04199427d174113f1484c06
   st-scrollback.diff

   $ git apply st-scrollback.diff
   On branch master
   Your branch is up-to-date with 'origin/master'.
   Changes not staged for commit:
 (use "git add ..." to update what will be committed)
 (use "git checkout -- ..." to discard changes in working directory)
   modified:   config.def.h
   modified:   st.c
   Untracked files:
 (use "git add ..." to include in what will be committed)
   config.h
   log
   st-scrollback.diff
   no changes added to commit (use "git add" and/or "git commit -a")

   $ sudo make clean install




Does it works too when compiling with musl-gcc?


Should be no problem.




--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||
cleaning
st build options:
CFLAGS   = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include 
-I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz  -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz  -DVERSION="0.5" -D_XOPEN_SOURCE=600
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXext 
-lXft -lfontconfig -lfreetype  -lfreetype 
CC   = cc
CC st.c
st.c: In function ‘tlinelen’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
  ^
st.c:692:5: note: in expansion of macro ‘TLINE’
  if(TLINE(y)[i - 1].mode & ATTR_WRAP)
 ^
st.c:87:6: note: each undeclared identifier is reported only once for each 
function it appears in
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
  ^
st.c:692:5: note: in expansion of macro ‘TLINE’
  if(TLINE(y)[i - 1].mode & ATTR_WRAP)
 ^
st.c: In function ‘selsnap’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
  ^
st.c:754:13: note: in expansion of macro ‘TLINE’
   prevgp = &TLINE(*y)[*x];
 ^
st.c:744:18: warning: variable ‘xt’ set but not used [-Wunused-but-set-variable]
  int newx, newy, xt, yt;
  ^
st.c: In function ‘getsel’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
  ^
st.c:963:10: note: in expansion of macro ‘TLINE’
gp = &TLINE(y)[sel.nb.x];
  ^
st.c: In function ‘ttyread’:
st.c:1372:32: error: ‘histsize’ undeclared (first use in this function)
  if(term.scr > 0 && term.scr < histsize-1)
^
st.c: In function ‘kscrollup’:
st.c:1539:17: error: ‘histsize’ undeclared (first use in this function)
  if(term.scr <= histsize - n) {
 ^
st.c: In function ‘tscrolldown’:
st.c:1554:34: error: ‘histsize’ undeclared (first use in this function)
   term.histi = (term.histi - 1 + histsize) % histsize;
  ^
st.c: In function ‘tscrollup’:
st.c:1581:35: error: ‘histsize’ undeclared (first use in this function)
   term.histi = (term.histi + 1) % histsize;
   ^
st.c: In function ‘tresize’:
st.c:2890:36: error: ‘histsize’ undeclared (first use in this function)
  term.hist  = xrealloc(term.hist,  histsize * sizeof(Line));
^
st.c: In function ‘drawregion’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
  ^
st.c:3735:42: note: in expansion of macro ‘TLINE’
   numspecs = xmakeglyphfontspecs(specs, &TLINE(y)[x1], x2 - x1, x1, y);
  ^
st.c: At top level:
st.c:1533:1: warning: ‘kscrollup’ defined but not used [-Wunused-function]
 kscrollup(const Arg* a) {
 ^
Makefile:21: recipe for target 'st.o' failed
make: *** [st.o] Error 1


Re: [dev] [st] Powerline fonts to large

2015-05-25 Thread Ivan Tham

On Mon, May 25, 2015 at 12:11:38PM +0200, Jochen Sprickerhof wrote:

The link you gave me doesn't work either, it has problem about unused
function during compilation.


The patch is against git master and works fine over here.


I cannot patch it, when ``git apply st-scrollback.diff``::

   error: patch failed: config.def.h:7
   error: config.def.h: patch does not apply
   error: patch failed: st.c:83
   error: st.c: patch does not apply

Does it works too when compiling with musl-gcc?


--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [st] Compiling with musl libc doesn't work

2015-05-24 Thread Ivan Tham

On Sun, May 24, 2015 at 04:33:46PM +0200, koneu wrote:

You'd first have to compile Xlib & co against musl and then change the
CFLAGS to point to the musl dirs instead of /usr.

I don't really understand what you mean to compile Xlib & co against
musl as I am just learning C and doesn't have a great understanding
about it. Can you please explain about it more? And adding it to FAQ is
a good help for beginners.


Have fun, I hope tomorrow is a national holiday at wherever you are from.

Thanks, but it seems that I have exam this week.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpYO8BVaHxgN.pgp
Description: PGP signature


[dev] [st] Compiling with musl libc doesn't work

2015-05-24 Thread Ivan Tham

I tried compiling st with musl libc by changing CC to:

   musl-gcc

But it doesn't seem to work.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||
st build options:
CFLAGS   = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include 
-I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz  -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/harfbuzz  -DVERSION="0.5" -D_XOPEN_SOURCE=600
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXext 
-lXft -lfontconfig -lfreetype  -lfreetype 
CC   = musl-gcc
CC st.c
In file included from st.c:5:0:
/usr/include/limits.h:123:3: warning: #include_next is a GCC extension
 # include_next 
   ^
In file included from /usr/include/bits/local_lim.h:38:0,
 from /usr/include/bits/posix1_lim.h:160,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/linux/limits.h:6:0: warning: "NGROUPS_MAX" redefined
 #define NGROUPS_MAX65536 /* supplemental group IDs are available */
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:51:0: note: this is the location of the previous 
definition
 #define NGROUPS_MAX 32
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:64:0: warning: "PTHREAD_KEYS_MAX" redefined
 #define PTHREAD_KEYS_MAX 1024
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:63:0: note: this is the location of the previous 
definition
 #define PTHREAD_KEYS_MAX 128
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:69:0: warning: "PTHREAD_DESTRUCTOR_ITERATIONS" 
redefined
 #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:65:0: note: this is the location of the previous 
definition
 #define PTHREAD_DESTRUCTOR_ITERATIONS 4
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:81:0: warning: "PTHREAD_STACK_MIN" redefined
 #define PTHREAD_STACK_MIN 16384
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:64:0: note: this is the location of the previous 
definition
 #define PTHREAD_STACK_MIN 2048
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:84:0: warning: "DELAYTIMER_MAX" redefined
 #define DELAYTIMER_MAX 2147483647
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:68:0: note: this is the location of the previous 
definition
 #define DELAYTIMER_MAX 0x7fff
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:93:0: warning: "HOST_NAME_MAX" redefined
 #define HOST_NAME_MAX  64
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:59:0: note: this is the location of the previous 
definition
 #define HOST_NAME_MAX 255
 ^
In file included from /usr/include/bits/posix1_lim.h:160:0,
 from /usr/include/limits.h:143,
 from st.c:5:
/usr/include/bits/local_lim.h:99:0: warning: "SEM_VALUE_MAX" redefined
 #define SEM_VALUE_MAX   (2147483647)
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:66:0: note: this is the location of the previous 
definition
 #define SEM_VALUE_MAX 0x7fff
 ^
In file included from /usr/include/limits.h:147:0,
 from st.c:5:
/usr/include/bits/posix2_lim.h:88:0: warning: "RE_DUP_MAX" redefined
 #define RE_DUP_MAX (0x7fff)
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/include/limits.h:82:0: note: this is the location of the previous 
definition
 #define RE_DUP_MAX 255
 ^
In file included from /usr/include/limits.h:151:0,
 from st.c:5:
/usr/include/bits/xopen_lim.h:65:0: warning: "_XOPEN_IOV_MAX" redefined
 #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
 ^
In file included from /usr/include/limits.h:123:0,
 from st.c:5:
/usr/lib/musl/i

Re: [dev] [st] Powerline fonts to large

2015-05-23 Thread Ivan Tham

On Sun, May 24, 2015 at 08:08:31AM +0200, Jochen Sprickerhof wrote:

* Ivan Tham  [2015-05-23 15:45]:

I think the link in the patches page should redirect to the link.


No, the website is rendered from git and moderated, read:

http://suckless.org/wiki


The link you gave me doesn't work either, it has problem about unused
function during compilation.

And what about the powerline fonts, I use DejaVu Sans Mono size 12 but
it seems that the powerline fonts are too large.


--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpO2S3FQu2mP.pgp
Description: PGP signature


Re: [dev] [st] Powerline fonts to large

2015-05-23 Thread Ivan Tham

On Fri, May 22, 2015 at 09:31:46AM +0200, Jochen Sprickerhof wrote:

And the patch for scrollback does not work, is there other method to use
scrollback without using terminal multiplexer as it disable many other
things?


I've just pushed a new version of the patch against the current master.
Either wait until the website is updated, or you get it from here:

http://git.suckless.org/sites/plain/st.suckless.org/patches/st-scrollback.diff


I think the link in the patches page should redirect to the link.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpwkM0W9qxJu.pgp
Description: PGP signature


Re: [dev] [st] Fcitx not working in st

2015-05-23 Thread Ivan Tham

On Fri, May 22, 2015 at 11:09:04AM +0200, Silvan Jegen wrote:

I typed ``Ctrl + Space`` in st but it seems like it doesn't work. Fcitx
is a Chinese IME for XIM.


As far as I know no IME works with st (please correct me if I am
wrong. I use ibus which does not work either). I would actually be
interested in getting st to work with at least one of them but I am
having trouble figuring out where to start (Is it a X text protocol?
It probably is with XIM but not with ibus. Would I have to use an ibus
API to get st to work with ibus? Etc...).

I use urxvt so I know that urxvt does work with IME. I am still
learning C programming so I will be happy if there is anything that I can help 
with.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpa9BqnbvsSg.pgp
Description: PGP signature


[dev] [st] Powerline fonts to large

2015-05-21 Thread Ivan Tham

I had setup Powerline fonts using fontconfig:

   wget 
https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
   wget 
https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
   mv PowerlineSymbols.otf ~/.fonts/
   fc-cache -vf ~/.fonts/
   mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/

I had set st font to:

   static char font[] = "DejaVu Sans 
Mono:pixelsize=12:antialias=false:autohint=false,\
 WenQuanYi Zen Hei Mono:pixelsize=12";

But the Powerline fonts are too large.

And the patch for scrollback does not work, is there other method to use
scrollback without using terminal multiplexer as it disable many other
things?

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpl_cr4iVkdx.pgp
Description: PGP signature


[dev] [st] Fcitx not working in st

2015-05-21 Thread Ivan Tham

I typed ``Ctrl + Space`` in st but it seems like it doesn't work. Fcitx
is a Chinese IME for XIM.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


pgpvZ9NXYL4gw.pgp
Description: PGP signature


Re: [dev] sple - A simple PDF links/emails extracotr.

2015-05-07 Thread Ivan Tham
On Wed, May 06, 2015 at 11:19:04PM -0400, Jason Woofenden wrote:
> Hi Hypsurus,
> 
> I hope you're having fun coding. Don't let me detract from that.
> But if you just need to extract links from pdfs, you can do so with
> existing tools, eg:
> 
> pdftohtml -stdout foo.pdf | sed -ne 's/\(^\|\n\)\n\([^\n]*\)\n[^\n]*/\1\2/gp; 
> t; s/href="\([^"]\+\)"/\n\n\1\n/g; D'
> 
> Sorry if that sed thing is more complex than it needs to be. I'm
> just learning the other sed commands besides s///.
> 
> The extra complexity with the "\n"s is to handle multiple links on
> the same line.
Hi, is there any way of using sed *only* as equivalent to:

#  The code change the variable if only the variable is found or else it
#+ append to the end of file.
# $1=xyz -> $1=$2, and $3 is the filename
grep -q "^$1=" $3 && sed -i "/^$1=/c $1=$2" $3 || echo "$1=$2" >> $3

If you do find a way, can you explain it. Thanks.

-- 
 _
< Do what you like, like what you do. >
 -
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-16 Thread Ivan Tham
Thanks. I will.

On 3/16/15, Anselm R Garbe  wrote:
> On 16 March 2015 at 05:58, Ivan Tham  wrote:
>> I want to learn C, so now I am waiting for c.learncodethehardway.org
>> to release as other book may seem a bit too long for me.
>
> You should rather learn C from its inventors:
>
> http://en.wikipedia.org/wiki/The_C_Programming_Language
>
> BR,
> Anselm
>
>



Re: [dev] [st] Problems when typing

2015-03-15 Thread Ivan Tham
Sorry for that, but I didn't say that I am unwilling to read a C book.

On 3/16/15, Alexander S.  wrote:
> 2015-03-16 8:36 GMT+03:00 Christoph Lohmann <2...@r-36.net>:
>> Sincerely,
>>
>> Christoph Lohmann
> Wow, didn't ever seen ye that full of yerself, 20h. Making up
> challenges for random people at the same time you tell them to never
> come back, eh? Must make a ton of sense to you.
>
>



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
How useful is that apt-file? I had installed it, but I don't know what
are the uses for it.

On 3/16/15, Roberto E. Vargas Caballero  wrote:
>> On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
>>> Thanks, but how do I know about the -dev, but how do I know
>>> libxinerama-dev?
>>
>> Experience and / or guess-work. Compiler complaining about "$HEADER.h"?
>> Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing
>
> If you are using debian based distro you can install apt-file:
>
>   apt-file update (first time to build the database)
>   apt-file search file (it will say you which package has the file).
>
> Regards,
>
>
>



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I want to learn C, so now I am waiting for c.learncodethehardway.org
to release as other book may seem a bit too long for me.

On 3/16/15, Eric Pruitt  wrote:
> On Mon, Mar 16, 2015 at 12:32:44PM +0800, Ivan Tham wrote:
>> Thanks, I think I get the concept of what an -dev is.
>>
>> But what is a header file?
>
> Short, very simplified answer: header files generally contain
> information needed to use an API, in this case X11 and Xinerama. For the
> long answer, you should probably learn C or C++.
>
> Eric
>
>



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, I think I get the concept of what an -dev is.

But what is a header file?

On 3/16/15, Eric Pruitt  wrote:
> On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
>> Thanks, but how do I know about the -dev, but how do I know
>> libxinerama-dev?
>
> Experience and / or guess-work. Compiler complaining about "$HEADER.h"?
> Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing
> that, just Google it. If you search "debian xinerama.h", the first
> result is "Debian -- File list of package libxinerama-dev/wheezy/s...".*
> Even better, the 5th result is "[SOLVED] Cannot compile dwm window
> manager - Ubu..." (http://ubuntuforums.org/showthread.php?t=1843661).
> There are also things like apt-file or "yum whatprovides" which can aid
> in offline searching.
>
> * This is assuming Google isn't doing personalized search result
>   munging.
>
> Eric
>
>



Re: [dev] [st] Problems when typing

2015-03-15 Thread Ivan Tham
Thanks, I think you mean to paste the patch here.

On 3/16/15, Christoph Lohmann <2...@r-36.net> wrote:
> Greetings.
>
> On Sun, 15 Mar 2015 19:42:44 +0100 Ivan Tham 
> wrote:
>> When I typed `ls` in st, this show up:
>>
>> $ lls
>>
>> Does anyone know what is the problem, thanks.
>
> No.  You  first  need to learn how to do a proper bug report. First look
> into the sourcecode, find the problem and attach a patch. While  follow‐
> ing this long path your problem will most likely resolve without wasting
> many support resources.
>
>
> Sincerely,
>
> Christoph Lohmann
>
>
>



[dev] [st] Problems when typing

2015-03-15 Thread Ivan Tham
When I typed `ls` in st, this show up:

$ lls

Does anyone know what is the problem, thanks.



Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Ok, I will but it may take months. Thanks.

On 3/15/15, Markus Teich  wrote:
> Ivan Tham wrote:
>> Thanks, but it takes time reading it. For now, I just know how to push
>> code to
>> github and do a pull request. Do you know what topic is important in
>> developing for suckless.org and I hope you can add this to community to
>> help
>> some newbies in starting.
>
> Heyho Ivan,
>
> if you want to really use git, you should read the whole book. Developing
> for
> suckless implies knowing haw git works, so just read it.
>
>> [Off topic] How to learn C language the fast way, without a 100+ pages
>> book
>> (this will spoil my eyesight)?
>
> You don't. Grab that book and work through it 5 times. There is no easy/fast
> way
> to learn any programming language.
>
> --Markus
>
>



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, but I can't read french.

On 3/15/15, Sébastien Poher  wrote:
> Le dimanche 15 mars 2015 à 10:55:11, Ivan Tham a écrit :
>> I does not like to compile as when I run `make`:
>> ```
>> dwm build options:
>> CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
>> -I/usr/X11R6/include -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1"
>> -DXINERAMA
>> LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama
>> CC   = cc
>> creating config.h from config.def.h
>> CC drw.c
>> CC dwm.c
>> dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or
>> directory
>> compilation terminated.
>> Makefile:18: recipe for target 'dwm.o' failed
>> make: *** [dwm.o] Error 1
>> ```
>>
>> And what does the Xlib header files means in the README?
>
> Hi,
>
> It means that you have to install the dev library (for example libx11-dev
> as
> named in debian).
>
> As for the difference between i3 and dwm, beside the compilation point,
> here
> are some that I have noticed (I have used both but prefered dwm):
>
> - dwm is faster and simpler to use (less "functionnalities" if you want to
>   call it like that);
> - they use different paradigm : i3 "creates" workspace and associated tags
>   when a client appears or is sent to the considered workspace // dwm has
> defined tags that you apply to clients;
> - both uses different layout: in i3 windows can be tiled, stacked or tabbed
>   (or floating);
>   in dwm you have tiling, floating and maximising layout
>
> For the rest, its more or less a question of taste.
> Try both and make you're choice.
> dwm is not difficult and there is documentation.
> Take a look at the i3 config file, the first time, you may find it hard as
> well.
>
> I've written tutorials for both (french):
>
> http://www.volted.net/tutos/dwm.html
> http://www.volted.net/tutos/i3.html
>
> Regards,
> --
> Sébastien Poher
> www.volted.net
> Aidez-nous à défendre la liberté du logiciel:
> http://www.fsf.org/register_form?referrer=11902
>



Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Thanks, but it takes time reading it. For now, I just know how to push
code to github and do a pull request. Do you know what topic is
important in developing for suckless.org and I hope you can add this
to community to help some newbies in starting.

[Off topic] How to learn C language the fast way, without a 100+ pages
book (this will spoil my eyesight)?

On 3/15/15, Markus Teich  wrote:
> Ivan Tham wrote:
>> I tried to push to st repository but it seems that I cannot push. What do
>> I
>> need to do? Thanks.
>
> Heyho Ivan,
>
> read http://git-scm.com/book/en/v2 at least until chapter 3.
>
> --Markus
>
>



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, but how do I know about the -dev, but how do I know libxinerama-dev?

Thanks, I had successfully compiled it, trying now.

On 3/15/15, Markus Teich  wrote:
> Ivan Tham wrote:
>> dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or
>> directory
>
> Heyho Ivan,
>
> you need the Xlib header files. On Debian based systems just install
> xlib-dev
> and libxinerama-dev (the `-dev` packages contain the header files, if you
> stumble upon this error anytime in the future again).
>
> --Markus
>
>



[dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Hi,

I tried to push to st repository but it seems that I cannot push. What
do I need to do? Thanks.



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I does not like to compile as when I run `make`:
```
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1"
-DXINERAMA
LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama
CC   = cc
creating config.h from config.def.h
CC drw.c
CC dwm.c
dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
compilation terminated.
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
```

And what does the Xlib header files means in the README?



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I haven't tried dwm as it seems a bit hard to configure compared to i3
but i3 seems to be easier to use (I don't think it it much faster) as
it only uses split as horizontal or vertical.

On 3/15/15, Anselm R Garbe  wrote:
> On 15 March 2015 at 15:05, Ivan Tham  wrote:
>> Hi, I hope someone can add some comparison between dwm and other
>> window manager such as i3 to dwm.suckless.org. Thanks.
>
> Why? Feel free to contribute this comparison.
>
> BR,
> Anselm
>
>



[dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Hi, I hope someone can add some comparison between dwm and other
window manager such as i3 to dwm.suckless.org. Thanks.



Re: [dev] Problems install st

2015-03-12 Thread Ivan Tham
On 3/12/15, Roberto E. Vargas Caballero  wrote:
> You should have in your system a file called fontconfig.pc.
> In my machine I have it in /usr/X11R7/lib/pkgconfig/fontconfig.pc.
> See if your file is in a directory contained in PKG_CONFIG_PATH.

My PKG_CONFIG_PATH is unset and with `sudo find / -name fontconfig -print`:

/var/cache/fontconfig
/usr/share/lintian/overrides/fontconfig
/usr/share/doc/fontconfig
/usr/include/fontconfig



Re: [dev] Problems install st

2015-03-10 Thread Ivan Tham
Hi, I am still new to st and have no understanding about c language.

On 3/9/15, Roberto E. Vargas Caballero  wrote:
>> st build options:
>> Package fontconfig was not found in the pkg-config search path.
>> Perhaps you should add the directory containing `fontconfig.pc'
>> to the PKG_CONFIG_PATH environment variable
>> No package 'fontconfig' found
>
> Are you sure you have the development package of fontconfig?

I had fontconfig 2.9.0-7.1.
I have installed libfontconfig1-dev but it doesn't seem to work.
Is there any troubleshooting section in http://st.suckless.org/?

Off-topic question: What is the pros and cons of c and go language?
  And the performance of their language.

Thanks.



[dev] Problems install st

2015-03-09 Thread Ivan Tham
Hi, I had problem compiling st, I had installed `fontconfig` in
debian, but when I run `make`, these problems show up:


st build options:
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
CFLAGS   = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I.
-I/usr/include -I/usr/X11R6/include  -I/usr/include/freetype2
-DVERSION="0.5" -D_BSD_SOURCE -D_XOPEN_SOURCE=600
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil
-lXext -lXft  -lfreetype
CC   = cc
CC st.c
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
st.c:24:23: fatal error: X11/Xatom.h: No such file or directory
compilation terminated.
Makefile:21: recipe for target 'st.o' failed
make: *** [st.o] Error 1



[dev] Problems install st

2015-03-09 Thread Ivan Tham
Hi, I had problem compiling st, I had installed `fontconfig` in
debian, but when I run `make`, these problems show up:

st build options:
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
CFLAGS   = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I.
-I/usr/include -I/usr/X11R6/include  -I/usr/include/freetype2
-DVERSION="0.5" -D_BSD_SOURCE -D_XOPEN_SOURCE=600
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil
-lXext -lXft  -lfreetype
CC   = cc
CC st.c
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
st.c:24:23: fatal error: X11/Xatom.h: No such file or directory
compilation terminated.
Makefile:21: recipe for target 'st.o' failed
make: *** [st.o] Error 1