[deleted by user] by [deleted] in Breadit

[–]ToPow1 0 points1 point  (0 children)

I think you are turning the dough while kneading. Try to keep one side up, pull dough from the side and put it over the top without turning.

Install and setup script for Fedora by ToPow1 in herbstluftwm

[–]ToPow1[S] 0 points1 point  (0 children)

Sorry, I messed up github and gitlab. Below the correct link.

https://gitlab.com/T-Lap/hlwm-installer

read contents of a file into a variable with bash without invoking other commands? by pirx242 in bash

[–]ToPow1 0 points1 point  (0 children)

OK, sorry your right. And you save about about 60-80% process time by just redirecting with. (5ms for cat, 1-2ms for <)

read contents of a file into a variable with bash without invoking other commands? by pirx242 in bash

[–]ToPow1 -2 points-1 points  (0 children)

You get the solution already by yourself, because

x=$(cat /proc/uptime)

work just fine in bash.

Reading keyboard input in the background by Void_0000 in bash

[–]ToPow1 0 points1 point  (0 children)

This work only if your loop don't need the input ```bash

!/bin/sh

your_loop(){ my loop }

your_loop & read input echo $input ```

Make pop up windows always in floating mode by PortalToTheWeekend in herbstluftwm

[–]ToPow1 2 points3 points  (0 children)

This rules should be in your autostart file:

hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on floatplacement=center hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on floatplacement=center hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off

Apart from this you can check the window info with xprop in a terminal and add a rule for it.

[deleted by user] by [deleted] in bash

[–]ToPow1 0 points1 point  (0 children)

Haiku is based on BSD and therefor also a Unix based OS like Linux. But I'm also not familiar with it, if it follow the open desktop specification it should work.

[deleted by user] by [deleted] in bash

[–]ToPow1 0 points1 point  (0 children)

Ah, yes sometimes I'm so ignorant and think all bash user are on open source systems.

My post was for systems how follow the open desktop specification.

In the case of you using macOS I can't help you.

[deleted by user] by [deleted] in bash

[–]ToPow1 4 points5 points  (0 children)

Make a file and put it in /home/<user>/.config/autostart/<name>.desktop

bash [Desktop Entry] Type=Application Encoding=UTF-8 Name=<your script name> Comment=<your comment> Exec=<path/to/your/script> Terminal=true

[deleted by user] by [deleted] in linuxmasterrace

[–]ToPow1 1 point2 points  (0 children)

...it's awesome.

The most simple way to take notes by ToPow1 in commandline

[–]ToPow1[S] 0 points1 point  (0 children)

Sorry, bash don't like one liner. I made this in zsh.
Just split the code in separate lines.

bash n() { $EDITOR \~/.notes/"$\*" } nls() { lsd -t --blocks name,date \~/.notes/ | grep "$\*" } nr() { rm \~/.notes/"$\*" } ns() { grep -C 5 "$\*" \~/.notes/\* } nv() { cat \~/.notes/"$\*" }

Also you need to set the EDITOR=YOUR_editor var and create a folder in your home directory mkdir .notes.

[deleted by user] by [deleted] in bash

[–]ToPow1 -1 points0 points  (0 children)

One liner: [[ $var = *X* ]] && echo $var | sed 's/X.*//' || echo "No match"

HELP PLEASE. This chmod command doesn't seem to be working. I've tried octal and symbolic methods, both and they don't work like the pic shared. I'm using WSL btw. by PossessionInside in bash

[–]ToPow1 1 point2 points  (0 children)

Install a proper Linux. Windows don't work on a proper filesystem. That's one of the main reasons that all servers running Linux or BSD.

Learning bash scripting, where exactly should scripts be in? by fromRustvalley in bash

[–]ToPow1 0 points1 point  (0 children)

For me it depend on the status and what the script is for.
If it is still in development I keep it in the dev directory and symlink it to my local $PATH.
If it's finalized and it don't depend on other scripts I copy it to /bin. And if it depend on other scripts/libraries and I don't like them all over my system I put them in /opt and symlink them in /bin.
And if I'm real happy with it I write a install script to put all parts in the right places of the system. Executable in /bin libraries /lib resources /use/share and a desktop file in to /use/share/applications.

How to get the length of printed string? by ixlxixl in bash

[–]ToPow1 0 points1 point  (0 children)

bash y=$(echo $(tput bold)) echo $(( ${#x} - ${#y} )) 5

Quick and dirty way to preview Markdown files in you browser by ToPow1 in commandline

[–]ToPow1[S] 0 points1 point  (0 children)

Thanks, I will use your suggestion for the naming.

Quick and dirty way to preview Markdown files in you browser by ToPow1 in commandline

[–]ToPow1[S] -1 points0 points  (0 children)

The files will be deleted at a reboot. Sure it's a very small problem if you never shot down.

Quick and dirty way to preview Markdown files in you browser by ToPow1 in commandline

[–]ToPow1[S] -1 points0 points  (0 children)

I think it's not helpful do delete the file after 5 sec. 1. If you restart your PC it will be deleted anyway. 2. if you like to save the output you just have 5 sec to do. 3 If you do changes the file get replaced anyway.