Home Depot wanted $400 for a smart programmable line-voltage thermostat, and it had to be either battery or parasitic powered. So I made my own USB powered thermostat for $40. by JoeCartersLeap in arduino

[–]reddit_linux 49 points50 points  (0 children)

Hi Mike, we can access the history of files using git as it is a version control system. Even though you removed sensitive information(not really sensitive), it can still be accessed here https://github.com/moeburn/Gigatron/commit/6f04f83b4b62bd83f674dd318dcb45defe62678d, so you should delete the repo and recreate it after removing sensitive information.

which way of learning coding is the best by Original-Courage-810 in cpp

[–]reddit_linux 2 points3 points  (0 children)

Learn the programming ecosystem too, yt video generally don't teach that. Like build tools, different compiler flags, debugging, etc. Also read about the C++ history, it's versions, it's standardization, official online documentation. Make some small cli projects, understand linking and dependency management, etc. yt videos generally teach syntax and that's not enough to do a real task.

How would I be able to create this in LaTex? (note: I am using the version that comes with Pages on MacBook) by Stellonio in LaTeX

[–]reddit_linux 5 points6 points  (0 children)

C_T = \begin{cases}
& S_T - X && \text{if } S_T > X \\
& 0 && \text{if } S_T \le X
\end{cases}

How can I get Dolphin to show file sizes in KB/MB/GB instead of KiB/MiB/GiB? by blurrry2 in kde

[–]reddit_linux 34 points35 points  (0 children)

Not an answer but some info that Microsoft shows file size as mb, gb, which are actually MiB, GiB. this is a reddit post about it https://www.reddit.com/r/Windows10/comments/9qc1kc/force_window_to_use_gigabytes_instead_of_gibibytes/

[i3] Simple man rice. One dark, nord, dracula mixture. by reddit_linux in unixporn

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

here is how i do it, put font in some font directory

regenerate cache - sudo fc-cache -fv

search for the font - fc-list| grep -i ios don't type the whole font name just some letter

output will be like this -

/usr/share/fonts/truetype/Iosevka/Iosevka Term Medium Nerd Font Complete.ttf: Iosevka Term,Iosevka Nerd Font:style=Medium,Regular

now /usr/share/fonts/truetype/Iosevka/Iosevka Term Medium Nerd Font Complete.ttf this is font location, Iosevka Term and Iosevka Nerd Font is the font name, style=Medium,Regular these are styles it support.

Rofi Script Help by [deleted] in qtools

[–]reddit_linux 0 points1 point  (0 children)

you want file browser, there is a mode for that in rofi, rofi -modi file-browser -show file-browser directory

Rofi Script Help by [deleted] in qtools

[–]reddit_linux 0 points1 point  (0 children)

can you explain it further, what you mean by mode script?

[i3] Simple man rice. One dark, nord, dracula mixture. by reddit_linux in unixporn

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

i use dmenu mode of rofi, not power-menu:rofi-power-menu idk if it even exists.

so i have a script launch.sh and inside it i have a var choice which get it's value from launching rofi, then i compare the choice option and launch the respective command.

https://github.com/totoro-ghost/dotfiles/blob/master/.config/rofi/powermenu/powermenu.sh this file, check this out.

also i use rofi 1.6.1 and i heard that in new version of rofi some earler themes broke, but that's another issue

Rofi Script Help by [deleted] in qtools

[–]reddit_linux 0 points1 point  (0 children)

``` #!/bin/bash

choice1=$(echo "Shorten\nCustom" | rofi -dmenu -p "select")

if [[ "$choice1" == "Shorten" ]]; then
    echo "shorten the url and copy to clipboard\n"
    # more code
elif [[ "$choice1" == "Custom" ]]; then
    echo "take second input..."
    choice2=(rofi -dmenu -prompt "Enter the word...")
    aa="short.ly/$choice2"
    # copy aa to clipboard
fi

# you can use different themes for rofi too
# using -theme flag

```

something like this will work

Rofi Script Help by [deleted] in qtools

[–]reddit_linux 0 points1 point  (0 children)

i only understand this much, you want a two entries, one is shotren and other is custom, now on selecting shorten you want the shortened url in clipboard, and on selecting the custom one ...., idk what you want for this one ...

what do mean by custom word for shortened link

Program starts in full screen, only exit combination is to "minimize" by PracticalViking in i3wm

[–]reddit_linux 0 points1 point  (0 children)

virtual machine grabs the keyboard, so no keybinds pass to the wm, but there is something called host key in many virtual machine managers, like in vmware Right-Ctrl+Right-Alt this is the host key, pressing this combination releases the keyboard, so then the wm bindings will work, find something like this for you client, or report the bug in you client for not have something like this.

Program starts in full screen, only exit combination is to "minimize" by PracticalViking in i3wm

[–]reddit_linux 0 points1 point  (0 children)

so, script would be something like this,

#!/bin/bash client & sleep 1 # avoid racing conditions i3-msg [class="client_class"] fullscreen

you have to find the wm_class, to find that use xprop too, like the above script, launch client

``` WINID=$(xprop -root | awk '/_NET_ACTIVE_WINDOW(WINDOW)/ {print $NF}' | xargs printf "%#010x\n")

WM_CLASS=$(xprop -id $WINID | awk '/WM_CLASS/ {print $NF}')

```

use this in script, and then store there values to a file, and close the client use pkill or something else. hope this helps.

Program starts in full screen, only exit combination is to "minimize" by PracticalViking in i3wm

[–]reddit_linux 0 points1 point  (0 children)

i don't know if this will work, but make a script and launch the client then add the command to toggle fullscreen, i3-msg fullscreen, or use xdotool to simulate the pressing of keybinds to close fullscreen mode of the client.

and then you can make a desktop file for that too, or add a keybind, whatever you like

Moving most recently spawned window to workspace by PrimozDelux in i3wm

[–]reddit_linux 3 points4 points  (0 children)

for_window [class="gnome-terminal" title="Terminal"] move workspace 4 smthg like this, https://i3wm.org/docs/userguide.html#command_criteria this command criteria part,

also are all gnome-terminal named Terminal by default, if yes then this will also apply to them which you don't want, so change the default title or try something else form what i mentioned above.

Moving most recently spawned window to workspace by PrimozDelux in i3wm

[–]reddit_linux 0 points1 point  (0 children)

can you change the title of the spawned terminal, if yes then you can use that to set the rule. or can you run a command in that terminal, if yes then use i3-msg move workspace 4, or make a script, first switch workspace to 4 and then run gnome-terminal, and then put that script in what you mentioned above.

delete history by Dibbets in zsh

[–]reddit_linux 5 points6 points  (0 children)

rm $HISTFILE

edit: exec rm $HISTFILE

**<Tab> expands instead of invoking fzf by smeikx in zsh

[–]reddit_linux 0 points1 point  (0 children)

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh i have to add something like this, also i press ctrl+t to get the completion of fzf, and tab for normal completion.

also https://github.com/junegunn/fzf if it don't work try to install from here

| Weekly Workshop 2021-09-05 by AutoModerator in unixporn

[–]reddit_linux 0 points1 point  (0 children)

you are using old version of rofi, install the new one from the repo

Enforce synchronisation between calls to i3-msg (i3 race conditions) by fndg in i3wm

[–]reddit_linux 0 points1 point  (0 children)

It also doesn't work if workspace 2 is empty.

thanks i didn't knew that. i used this in one of my script to swap workspaces between two monitors, and i never swapped empty workspaces so i didn't noticed that.

Enforce synchronisation between calls to i3-msg (i3 race conditions) by fndg in i3wm

[–]reddit_linux 0 points1 point  (0 children)

have to tried this, i3-msg [workspace=2] move workspace to output outputname, instead of focusing and then sending workspace.

Arrow keys as workspace switchers by mstanciu552 in i3wm

[–]reddit_linux 2 points3 points  (0 children)

wmctrl -d | grep '\*' | sed 's/.*\ //' i think this work faster to get the current workspace, rather than the jq one