tunawasherepoo

joined 1 year ago
MODERATOR OF
[–] [email protected] 65 points 2 months ago (1 children)

i interpreted it as the user's first DE was gnome :)

[–] [email protected] 10 points 3 months ago

Lock screen

Home screen (i applied a black tint since i had trouble reading white text against it)

I got them from lurking r/wallpaper though I wish i knew more of their original sources

[–] [email protected] 3 points 3 months ago (2 children)

try https://github.com/zhichaoh/catppuccin-wallpapers/blob/main/landscapes/tropic_island_morning.jpg

if you look in the same folder there's also ones for day, evening, and night

[–] [email protected] 0 points 4 months ago

What is the freakout?!?!?!?!?!?!?!? Maybe i want to read other people's code in a wacky comic-looking silly goofy totally awesome monospaced font!?!?!?!

[–] [email protected] 29 points 4 months ago

__LINE__ returns the line of code its on, and % 10 means "remainder 10." Examples:

1 % 10 == 1
...
8 % 10 == 8
9 % 10 == 9
10 % 10 == 0 <-- loops back to 0
11 % 10 == 1
12 % 10 == 2
...
19 % 10 == 9
20 % 10 == 0
21 % 10 == 1

In code, 0 means false and 1 (and 2, 3, 4, ...) means true.

So, if on line 10, you say:

int dont_delete_database = true;

then it will expand to:

int dont_delete_database = ( 10 % 10 );
// 10 % 10 == 0 which means false
// database dies...

if you add a line before it, so that the code moves to line 11, then suddenly it works:

// THIS COMMENT PREVENTS DATABASE FROM DYING
int dont_delete_database = ( 11 % 10 );
// 11 % 10 == 1, which means true
[–] [email protected] 3 points 5 months ago (1 children)

I'm curious on the context for this one... to me i read it as not blaming your dog directly for e.g. farting on you, instead you just blame doggo's asshole for being an asshole 🤣

[–] [email protected] 2 points 5 months ago

Aw thanks! I'm glad I was able to help :)

[–] [email protected] 2 points 5 months ago* (last edited 5 months ago) (2 children)

It's two tools: c and v for copy and paste respectively.

Say you want to copy an output of a command, say

grep -i 'abc' file.txt | sed 's/b/d/'

then you can easily add | c to the end to get:

grep -i 'abc' file.txt | sed 's/b/d/' | c

and this will copy to clipboard, specifically for KDE's clipboard manager, Klipper. If you wanted to see the help text for more ways to copy, you'd run c on its own

The benefit is the tool won't break between x11 and wayland, but the downsides are that it's tied to klipper, and you cant see more clipboard metadata, like mimetypes

If you only use wayland, i'd recommend using wl-clipboard, and alias c=wl-copy and alias v=wl-paste it's a better tool, imo.

Should you still want to use my lil snippet, you will need to create these files yourself, i suggest either in your $HOME/.local/bin/ or /usr/local/bin/. And don't forget to chmod +x them so they are executable.

Happy experimenting :)

[–] [email protected] 3 points 6 months ago

maybe bring back the hyper key! (Wikipedia link)

[–] [email protected] 1 points 8 months ago (1 children)

I like this one cause there's quite a number of ways to interpret it. The first one I saw was the doggy having a big appetite, licking its lips and swallowing its saliva while the spider is losing its mind 🤣

I found there to be 3 ways to interpret the spider panicking:

  • Attack
  • Frozen in fear
  • Running away

And for the dog, the swallow could mean

  • Actually eating the spider
  • A hungry, drooling swallow
  • A nervous gulp

You can mix n match most of these to get new stories :)

[–] [email protected] 0 points 8 months ago (1 children)

Thats so sad 🥹 Doggo needs lots of support and love 🤍

[–] [email protected] 2 points 8 months ago

honestly, i check the manpages for anything else but i never have with git 🤣 however I didn't know how to access the man pages for subcommands, thanks!! :)

3
KDE cli clipboard (iusearchlinux.fyi)
 

$ cat /usr/local/bin/c

#!/bin/sh
if test -n "$1"; then
	STDIN="${1}"
elif test ! -t 0; then
	STDIN=$(cat)
else
	echo 'Usage:'
	echo '	c < /path/to/file'
	echo '	c text-to-be-copied'
	echo '	command | c'
	exit 1
fi

qdbus org.kde.klipper /klipper setClipboardContents "$STDIN"

$ cat /usr/local/bin/v

#!/bin/sh
qdbus org.kde.klipper /klipper getClipboardContents

This is what I like to use :)

3
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
 

I'm doing a solo coding project for work. It's a tool that you interact with similar to npm or cargo, where you can create a new workspace, run / test etc. Importantly, you have to be in the working directory for the commands to work...

Yesterday I decided to go home early to do remote work at home. Before i left i quickly did git add ., committed and pushed. I turned on my computer this morning, ran git pull, and noticed that... only some files got pushed, but more importantly none of the code i wrote yesterday made it through. Yup, I was still cd'd into my workspace folder and not at the project root, so I only committed the mock workspace folder 😄

Luckily i didnt write or change much this time, but lesson learned: git add -A or git commit -am '...'

view more: next ›