this post was submitted on 14 Jan 2025
54 points (100.0% liked)

Linux

49424 readers
1396 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Just wondering since I know a lot of people quietly use a screen-area-select -> tesseract OCR -> clipboard shortcut.

  • I separate subjects of interest into different Firefox windows, in different workspaces -- so I have an extension title them and a startup script parse text to ask the compositor to put them in the correct workspace (lets me restart more conveniently).
  • I have automatically-set different-orientation wallpapers for using my 2-in-1 depending on whether I use it in portrait or landscape (kind of just for looks, but I don't think if anyone else adds a wallpaper change to their screen rotation keybind).
top 50 comments
sorted by: hot top controversial new old
[–] ryannathans@aussie.zone 23 points 2 weeks ago (3 children)

I use my DE mostly as it comes, that's got to be unique in this community

[–] lengau@midwest.social 5 points 2 weeks ago (1 children)

Some people use plasma because they like how configurable it is. I do like that, but I'm also drawn to it because of its great defaults.

The main ways I change it are setting my background (on my work activity I have it selecting from various company related backgrounds while on my personal activity it uses a selection of my favourites of my own photos) and adjusting the bottom panel.

load more comments (1 replies)
load more comments (2 replies)
[–] tonyn@lemmy.ml 17 points 2 weeks ago (4 children)

When I press Super + PrtSc, a bash script performs the following:

Takes a screenshot of the entire desktop (import -window root) and saves it as ~/screenshot.png..

Analyzes the screenshot to calculate the "mean brightness" value of the image. It converts the image to grayscale and determines the average pixel brightness (a value between 0 and 1, where 0 is black and 1 is white).

Checks if the image is dark by comparing the mean brightness to a threshold of 0.2. If the mean brightness is less than 0.2 (i.e., the image is very dark), it applies a negative filter to the image (convert -negate), effectively inverting the colors (black becomes white and vice versa).

Sends the image to a printer (lp command) named MF741C-743C for printing.

[–] eager_eagle@lemmy.world 18 points 2 weeks ago (1 children)

an actual print screen, finally

[–] dave@feddit.uk 5 points 2 weeks ago

A kind of ‘super’ print screen, in fact.

load more comments (3 replies)
[–] superkret@feddit.org 17 points 2 weeks ago (4 children)
[–] phoenixz@lemmy.ca 11 points 2 weeks ago

That's sick man! Get some help!

load more comments (3 replies)
[–] ThemboMcBembo@beehaw.org 14 points 2 weeks ago (2 children)

I have two mice, one for either hand, and use xinput to flip the buttons on JUST the left one. It's actually one of the main things keeping me from moving to Wayland, which doesn't seem to have the same configuration features

[–] fool@discuss.tchncs.de 4 points 2 weeks ago

LOL I've never seen that before.

Do you use them both at the same time? Or do you switch between them rapidly? (Maybe you could make a taskbar button-toggle if it's the latter!)

load more comments (1 replies)
[–] syklemil@discuss.tchncs.de 13 points 2 weeks ago (3 children)

I suspect my habit of having an alias userctl="systemctl --user" is slightly unusual, as is running Firefox, Steam, and some other graphical programs as systemd units is somewhat unusual (e.g. mod4-enter runs systemd-run --user alacritty)

But what I'm actually pretty sure is unique is my keyboard layout. I taught myself dvorak a summer some decades ago, but the norwegian dvorak layout has some annoyances, so I've made some tweaks. Used to be a Xmodmap file, but with the switch to wayland I turned it into a file in /usr/share/X11/xkb/symbols/.

Part of what I did to teach myself dvorak and touch-typing at the same time was randomize the placement of the keycaps too. It has a side effect of being a kind of security by obscurity layer: I type quickly and confidently, but others who want to use my machines have an "uhh …" reaction.

[–] farmer_bobathan@lemmy.ml 5 points 2 weeks ago* (last edited 2 weeks ago)

I have been using the same userctl alias.

load more comments (2 replies)
[–] rimu@piefed.social 13 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

I have an old gamer keyboard with extra programmable keys on the side, which I use for cut, copy, paste, close tab, close window, etc. Logitech provides drivers/software for Windows & Mac only.

To make it work I have a custom monkey-patched USB driver that I compiled from source, some weird daemon that interacts with the driver and some shell scripts on top of that. I'm not sure how but it works thanks to a 9 year old youtube video made by a guy from eastern europe somewhere.

[–] fool@discuss.tchncs.de 4 points 2 weeks ago (1 children)

Awesome...

Care to share the video/code? ~~I actually have something similar (Corsair Scimitar's macro customizer doesn't work on Linux~~

As I was writing this I found a project that deals with Corsair MMO mice on Linux so now I will be going on an egg hunt.

[–] rimu@piefed.social 5 points 2 weeks ago* (last edited 2 weeks ago)

video https://www.youtube.com/watch?v=8gAT-BbyOWw

code https://github.com/Leproide/Linux-G15-Daemon-Logitech-G110-

I'm pretty sure it will only work with a handful of old Logitech keyboards.

When I eventually upgrade my OS and can't compile the stack for some reason, I've got a Sun Type-7 waiting in the wings.

load more comments (1 replies)
[–] comfy@lemmy.ml 12 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

While I doubt the concept is unique, the script is: a keyboard shortcut will check the clipboard for a YouTube link and then show launcher options for mpv or yt-dlp, including launch arguments for lower quality format and audio only. It launches that in a terminal for easier handling when yt-dlp doesn't work properly (much more common if using proxies, but also if a video is age-restricted or deleted).

So when I see a yt link here, I can just copy it, keyboard shortcut and then it's playing in my local video player.

edit: here's the script. It assumes xsel (clipboard access), rofi (menu creator), gnome-terminal (terminal) and notify-send (system notification on failure) are installed and working, you'll need to replace any which don't match your system. My DE just runs it in bash when the shortcut is entered.

Code (click to expand)

#!/bin/bash

ARR=()
ARR+=("mpv full")
ARR+=("mpv medium")
ARR+=("yt-dlp")

NORMAL_URL=`xsel -ob | sed -r "s/.*(v=|\/)([a-zA-Z0-9_-]{11}).*/https:\/\/youtube.com\/watch?v=\2/"`

CHOICE=$(printf '%s\n' "${ARR[@]}" | rofi -dmenu -p "mpv + yt-dlp from clipboard")
DOWNLOAD="false"
MPV="false"
OPTIONS=""

if [ "$CHOICE" = "mpv full" ]; then
	MPV="true"
fi

if [ "$CHOICE" = "mpv medium" ]; then
	MPV="true"
	OPTIONS+="'--ytdl-format=bv*[height<721]+ba' "
fi

if [ "$CHOICE" = "yt-dlp" ]; then
	DOWNLOAD="true"
fi

if [ $MPV == "true" ]; then
	COMMAND="mpv $OPTIONS $NORMAL_URL"
	gnome-terminal --title "$NORMAL_URL" -- bash -c "echo $COMMAND;$COMMAND;if [ \$? -ne 0 ]; then notify-send 'yt-dlp failed' $NORMAL_URL; bash; fi;"
elif [ $DOWNLOAD == "true" ]; then
	COMMAND="yt-dlp $OPTIONS $NORMAL_URL"
        gnome-terminal --title "$NORMAL_URL" -- bash -c "echo $COMMAND;$COMMAND;if [ \$? -ne 0 ]; then notify-send 'yt-dlp failed' $NORMAL_URL; bash; fi;"
fi

[–] dino@discuss.tchncs.de 6 points 2 weeks ago (4 children)

Uh I would be interested in that actually! Nowadays Youtube generates lots of problems with freetube due to their cookie bullshit and I feel with mpv(yt-dlp) in cli I at least have the option to see whats going on.

load more comments (4 replies)
[–] prole@lemmy.blahaj.zone 4 points 2 weeks ago (1 children)

Uh this sounds awesome, care to share?

load more comments (1 replies)
[–] circuit23@lemmy.dbzer0.com 12 points 2 weeks ago (1 children)

I made a user for my partner

[–] fool@discuss.tchncs.de 11 points 2 weeks ago (1 children)

I also have a user for your partner

load more comments (1 replies)
[–] jordanlund@lemmy.world 11 points 2 weeks ago (1 children)

Machined badge reading "Built Not Bought".

My dad used to put them on the cars he built.

[–] atzanteol@sh.itjust.works 8 points 2 weeks ago (1 children)

My dad used to put them on the cars he built.

That's pretty rad.

[–] jordanlund@lemmy.world 4 points 2 weeks ago

He was a rad guy.

[–] vort3@lemmy.ml 10 points 2 weeks ago

I use compose key sequences to save time writing out long email addresses. For example, I have something like this in my ~/.XCompose:

<Multi_key> <b> <o> <s> <at>: "myangryboss@company.com" # Email of my very angry boss

So I can just type Compose (right alt on my system), bos@ and get his email address. Less error prone than typing out emails manually.

I'm probably not the only one to use compose strings as a replacement to a text expander, but I don't know anyone else who does this.

[–] bjoern_tantau@swg-empire.de 9 points 2 weeks ago

I'm one of at most a handful people in the world with a full disk encrypted Steam Deck and unlocking using the touchscreen.

Until someone implements https://github.com/ublue-os/bazzite/issues/464 in Bazzite.

[–] Eyedust@sh.itjust.works 9 points 2 weeks ago* (last edited 2 weeks ago)

Maybe a bit plain since I'm only at mediocre level in my Linux journey, but I use my favorite fonts for Kitty. Recursive Mono Linear and then for italics and comments in neovim I use Recursive Mono Casual Italic.

Recursive Linear is so tidy and neat, with just the lightest touch of personality. And Casual keeps that style but tweaks it just ever so slightly to a more comic. And they have sans versions of both as well for everything else.

I also made my own Starship prompt to match my desktop. It runs an easily reconfigurable color palette and uses color coded chevrons to denote different git statuses.

[–] IsoKiero@sopuli.xyz 8 points 2 weeks ago (1 children)

Small thing, but I really like it: I have ~/autoclean_tmp directory on most of the hosts I use as a desktop. Then on crontab I have a find-command which automatically deletes files which are 7 days or older. I can throw stuff I download from the internet and copy from other hosts, random text files when setting up new stuff and so on in there and they just vanish after a while.

[–] friend_of_satan@lemmy.world 4 points 2 weeks ago

I have the same type of thing. An alias that creates a tempdir that is based on the date, then cd's into it. Then a cron job that finds dirs that are older then N days old and deletes them. I use these for most of my scratch work. Having several days to look back at what you did and know when you did it is so nice.

[–] faercol@lemmy.blahaj.zone 8 points 2 weeks ago (4 children)

I boot on a custom EFI app to control my dualboot (instead of systemd-boot or grub) that asks a service on my proxmox server which OS I'm supposed to boot.

Overkill, but it allows me to control my dual-boot without a keyboard in my computer (because it's a Bluetooth keyboard so I can't really use it in grub anyway)

load more comments (4 replies)
[–] tanisnikana@lemmy.world 7 points 2 weeks ago (1 children)

My applications menu icon (or the “start” menu for the philistines) is a 🐢.

load more comments (1 replies)
[–] Korhaka@sopuli.xyz 7 points 2 weeks ago

Does stuff I wrote myself count?

Apache server that has a bunch of webpages that are all configured by simple JSON files and loaded by PHP. The pages have buttons on them which when pressed enter macros. So I push "Deploy Landing Gear" and Shift+alt+F8 or some obscure as fuck combination no one would ever use normally gets pressed and the game can be set to use that keybind. Most of it is for simple immediate key presses but also made a few for macros as well.

The HTML/PHP that runs the show is a grand total of 2018 bytes, including comments. Plus a fairly bloated 2444 byte CSS file that includes some button colour options that I never use now because I decided they look ugly. Should update some of the background images though, my sheet steel Faulcon DeLacy logo looks a bit basic.

[–] corsicanguppy@lemmy.ca 7 points 2 weeks ago

In all my servers I still have a cron->make routine running. It's a hold-over from 20 years ago and the state of IaC back then, and it's made its way onto every server I manage because it is simple and effective.

And it still does its job. 8 major RHEL releases later, and the thing it needs to do, it does.

Lennart would build 3 new daemons and link them all into dbus, I'm sure.

[–] SitD@lemy.lol 7 points 2 weeks ago

the ability to use two Bluetooth dongles simultaneously, each for one device. try that on Microsoft's clown os and see how pressing the gamepad triggers makes the bluetooth headphones chop up the sound 😂

[–] nycki@lemmy.world 7 points 2 weeks ago (2 children)

I have Syncthing set up to copy save data between my pc and steam deck, but not just for emulator stuff: its got my entire modded minecraft directory and my balatro modloader nn there too.

[–] Eyedust@sh.itjust.works 4 points 2 weeks ago (2 children)

Syncthing is great and incredibly easy to use. I have mine set to sync my Obsidian notes so I don't have to pay for the official service.

I have tried multiple different open source note apps that offer free local sync, but I can't find anything I like. It frustrates me because I love open source.

load more comments (2 replies)
load more comments (1 replies)
[–] lipilee@feddit.nl 6 points 2 weeks ago

I have stickers on it, some of them hand drawn by my daughters.

[–] monovergent@lemmy.ml 6 points 2 weeks ago

The text editor shortcut on my taskbar runs a sort of autosave script in ~/.drafts. I wanted my text editor to function more like the one on my phone so I can just jot down random thoughts without going through the whole ritual of naming and saving. It creates YYYYMMDD_text in ~/.drafts (or YYYYMMDD_text_1 etc. if it already exists) and launches Pluma, which I also have configured to autosave every 10 minutes.

The other thing extends beyond Linux itself a bit. I like to joke that I have the most secure NT 4 / Windows 95 lookalike ever put together. Aside from the encrypted and hardened Debian base (/boot is also encrypted), I was in part inspired by Apple's parts pairing (yikes!). So my coreboot is configured to only accept my boot disk. If it's swapped out or missing, or if I want to boot something else, it will ask for a password. In the unlikely event my machine gets stolen, the thief must at a minimum reflash the BIOS or replace the motherboard to make it useful again. Idk, it amuses me every time I think about it.

[–] twinnie@feddit.uk 5 points 2 weeks ago

I created my own openSUSE splash screen for KDE because I felt all the existing ones were a bit amateur and I wanted something professional looking. I haven’t published it because I can’t be bothered creating an account. It only took about 15 minutes because I chopped up another one which had clearly chopped up another one.

[–] golden_zealot@lemmy.ml 4 points 2 weeks ago (3 children)

I am indecisive when it comes to wallpapers so I have a script somewhere which accepts tag-words as arguments and then scrapes wallhaven.cc for those words at the resolution of my setup and picks one that contains those words at random before downloading it to my wallpapers folder and setting it as my wallpaper image.

So for example, you could just know you want something blue so you would run wallpaper blue and it just grabs one and sets it. You could get a wallpaper of the sky, of a blue car, of the ocean, whatever happens to be a wallpaper that met the criteria of the word/s supplied.

[–] LiveLM@lemmy.zip 6 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

Risky business considering there's always some horny anime crap mixed in on Wallhaven.
Filters and tags only help so much since lots of it either has poor tags or no tags at all.

load more comments (2 replies)
load more comments (2 replies)
[–] dino@discuss.tchncs.de 4 points 2 weeks ago (3 children)

I type "power..." into my cli and press tab+enter to shutdown my computer. Same for reboot... 😆

load more comments (3 replies)
[–] mlg@lemmy.world 4 points 2 weeks ago

I'm using XFCE with Compiz, and since I have two monitors I have a 3D octagon instead of a 3D cube desktop.

[–] lengau@midwest.social 4 points 2 weeks ago
  • I have bash scripts light and dark that make dbus calls to set my global theme to light or dark mode. I switch between them regularly, and opening system settings and pressing a button is too inconvenient.

Your first one sounds similar to me though - I use activity-aware Firefox to separate my personal and work accounts on my personal and work plasma activities.

[–] Chimrod@jlai.lu 4 points 2 weeks ago

My keyboard automatically change the keys depending of the app I'm using: closing a tab in the terminal or closing a tab inlthe browser are always the same key.

https://git.chimrod.com/smartcropad.git/about/

load more comments
view more: next ›