Re: [dev] Preprocessor

2019-04-23 Thread Hadrien Lacour
On Tue, Apr 23, 2019 at 12:44:57PM -0700, Evan Gates wrote: > On Tue, Apr 23, 2019 at 12:42 PM Hadrien Lacour > wrote: > > That was just shitposting. I use `find` to avoid most of the UNIX > > braindamage > > in this case. > > Which is good as long as you use -exec correctly. Or if you're going >

Re: [dev] Preprocessor

2019-04-23 Thread Adrian Grigore
Ignore the shell stuff, I know it's bad (I also usually use find(1) for these cases), good comments however. It's good you mentioned it so anybody reading this would know it's bad, thank you! On Tue, Apr 23, 2019 at 11:07 PM Peter Nagy wrote: > > This was a question about the preprocessor, please

Re: [dev] Preprocessor

2019-04-23 Thread Peter Nagy
This was a question about the preprocessor, please take your sh (off-)topic to a different thread. That main, mostly the switch part, is huge! Having more than 3 levels of nesting of loops+conditionals (if, for, while, switch) is a code smell; it is hard to read, hard to reason about and easy t

Re: [dev] JFS filesystem

2019-04-23 Thread Cág
Daniel Cegiełka wrote: If you have a power failure, it simply can lose data (whether JFS or XFS). Unfortunately I can confirm this. We've lost data twice on a CentOS server with XFS, and once it happened on my local machine because of a freeze. -- caóc

Re: [dev] Preprocessor

2019-04-23 Thread Evan Gates
On Tue, Apr 23, 2019 at 12:42 PM Hadrien Lacour wrote: > That was just shitposting. I use `find` to avoid most of the UNIX braindamage > in this case. Which is good as long as you use -exec correctly. Or if you're going to use xargs make sure to use nul separated lists. Xargs without the nul opti

Re: [dev] Preprocessor

2019-04-23 Thread Hadrien Lacour
On Tue, Apr 23, 2019 at 09:30:14AM -0700, Evan Gates wrote: > On Tue, Apr 23, 2019 at 9:24 AM Hadrien Lacour > wrote: > > What if "$1" is empty? POSIX sh doesn't have the nullglob shop, you know. > > [ "$1" ] || exit # add a message if you want > [ -d "$1" ] || exit # if you want to check that the

Re: [dev] [st] How do I add a keybinding to open a new ST window in the current working directory?

2019-04-23 Thread Michael Buch
If you're on dwm you can try this patch: Am Di., 23. Apr. 2019 um 15:20 Uhr schrieb Alexander Krotov : > > On 23/04/2019 13:54, Enan Ajmain wrote: > > Hi, > > > > I want to add a keybinding to ST to spawn a new ST window in the > > current working directory. How do I do that? > > > > Thanks, > > E

Re: [dev] [st] How do I add a keybinding to open a new ST window in the current working directory?

2019-04-23 Thread Michael Buch
>> If you're on dwm you can try this patch: https://dwm.suckless.org/patches/spawn_cwd/ Am Di., 23. Apr. 2019 um 20:18 Uhr schrieb Michael Buch : > > If you're on dwm you can try this patch: > > Am Di., 23. Apr. 2019 um 15:20 Uhr schrieb Alexander Krotov > : > > > > On 23/04/2019 13:54, Enan Ajma

Re: [dev] Preprocessor

2019-04-23 Thread Cág
Evan Gates wrote: Not sure about the preprocessor stuff, but this right here is terrible practice. Use a for loop and glob. Assuming that "$1" is a directory: for p in "$1"/*; do ... http://mywiki.wooledge.org/ParsingLs http://porkmail.org/era/unix/award.html -- caóc

Re: [dev] [dwm] background wallpaper redraw

2019-04-23 Thread Cág
https://github.com/Gottox/bgs Also this: https://github.com/ttzhou/setroot -- caóc

Re: [dev] Preprocessor

2019-04-23 Thread Evan Gates
On Tue, Apr 23, 2019 at 9:24 AM Hadrien Lacour wrote: > What if "$1" is empty? POSIX sh doesn't have the nullglob shop, you know. [ "$1" ] || exit # add a message if you want [ -d "$1" ] || exit # if you want to check that the directory exists for p in "$1"/*; do [ -e "$p" ] || continue; ... # if

Re: [dev] Preprocessor

2019-04-23 Thread Hadrien Lacour
On Mon, Apr 22, 2019 at 01:35:02PM -0700, Evan Gates wrote: > On Mon, Apr 22, 2019 at 1:25 PM Adrian Grigore > wrote: > > > > ls -1 "$1" | while IFS= read -r p > > do > > Not sure about the preprocessor stuff, but this right here is terrible > practice. Use a for loop and glob. Assuming that "$1"

Re: [dev] [st] How do I add a keybinding to open a new ST window in the current working directory?

2019-04-23 Thread Alexander Krotov
On 23/04/2019 13:54, Enan Ajmain wrote: > Hi, > > I want to add a keybinding to ST to spawn a new ST window in the > current working directory. How do I do that? > > Thanks, > Enan > See https://st.suckless.org/patches/right_click_to_plumb/plumb_without_shell_OSC.diff for an example of how to g

Re: [dev] [st] How do I add a keybinding to open a new ST window in the current working directory?

2019-04-23 Thread Greg Reagle
On Tue, Apr 23, 2019, at 07:05, Enan Ajmain wrote: > I want to add a keybinding to ST to spawn a new ST window in the > current working directory. How do I do that? I don't really understand your question, but I'll give it a try anyway. Type st & at the shell prompt and you'll get a new st wi

[dev] [st] How do I add a keybinding to open a new ST window in the current working directory?

2019-04-23 Thread Enan Ajmain
Hi, I want to add a keybinding to ST to spawn a new ST window in the current working directory. How do I do that? Thanks, Enan

Re: [dev] [dwm] background wallpaper redraw

2019-04-23 Thread Platon Ryzhikov
If this is default in Ubuntu it is probably handled by nautilus or some else file manager. Therefore, wallpaper is just a window shown only on certain tag. In my opinion this is not good feature if you use this file manager anywhere except its own environment and it is better to be disabled. Per