this post was submitted on 14 Jan 2025
77 points (98.7% liked)

Linux

49001 readers
1117 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
[–] syklemil@discuss.tchncs.de 3 points 3 hours ago

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.

CTRL+SHIFT+L to sync my room lights to the screen using huenicorn. Plan on hooking up openrgb as well when I can be bothered to write a script.

[–] bjoern_tantau@swg-empire.de 3 points 3 hours 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.

[–] knolord@lemmy.zip 3 points 3 hours ago

I have a custom script, which changes the fan profile (in my case between two thinkfan config files) depending whether the dock is connected or not. That one gets triggered whenever it switches the power source (AC or BAT0). (AC gets plugged in -> script starts -> check if dock is connected -> if connected run different profile)

It's janky but very helpful when it works :D

[–] rodbiren@midwest.social 2 points 3 hours ago

I have a zellij snd micro config for journaling and writing that makes a completely borderless full screen terminal with no decoration whatsoever and narrows the terminal for micro to the upper half of the middle 1/3 of my screen.

It helps me focus and limiting to the upper half and middle 1/3 makes it easier for my eyes. I get distracted easily and this helps keep my editor from being the source of that.

[–] tankplanker@lemmy.world 2 points 3 hours ago

Mine is probably more of a combo of things to streamline my workflow than anything else.

I use Sways multiple workspaces to segregate my apps into different workspaces for different tasks on startup of that app using the assign function in my Sway config. For example VS Code and one particular Firefox window always goes to Workspace 3.

I use the Layman Sway scripts to force all my normal workspaces to different layouts that is appropriate for that function. So workspace 3 with VS Code and a Firefox window is set in a 75/25 split with VS Code set to always take the bigger share. I can switch the two sides from largest on the left to largest on the right, or swap the apps between the two splits, or make a window full-screen with simple keyboard shortcuts.

Odd workspaces are on my left monitor, even ones on the right. This coupled with per workspace wall paper (all my windows are translucent, not for everybody I know) and particular tasks locked to predefined workspaces means I am never hunting around for something. Even if I did lose something I can use rofi to switch to it. If its an essential app I can use my keyboard shortcut that I use to launch the app, switch to it using swayr by activating the shortcut again.

I have used QMK for my keyboard to reduce the number of keys I must use to activate most of my shortcuts, and move them to my number row and home row using layers, double taps, and holds. I try to layer up the same family of functions on the same key but on different layers, so for example, the VI arrow keys move between windows, resize windows, move windows, depending on which layer I have chosen.

[–] faercol@lemmy.blahaj.zone 2 points 3 hours ago (1 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)

[–] fool@discuss.tchncs.de 1 points 3 hours ago (1 children)

A custom EFI app? Is that like a handrolled Unified Kernel Image with some Proxmox-specific addons in it? How'd you make it?

[–] faercol@lemmy.blahaj.zone 2 points 2 hours ago

No, it's a EFI app I developed in Rust that does a query over multicast UDP and uses the result to select which EFI app (Windows bootloaded (yeah I know...) Or systemd-boot to start Arch)

There's nothing related to proxmox itself, it's just there that I host my LXC with the service that responds to the quey.

[–] captain_aggravated@sh.itjust.works 3 points 5 hours ago (1 children)

I'm pretty sure no one else has my shell script that takes a picture, uses imagemagick to copy a scaled down version of it to a special folder, and then build a string that allows me to just middle click paste the image into Rednotebook so it appears correctly.

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

ooh I should do that for Obsidian instead of having an enormous directory of Pasted Image 202302050124300845012.pngs. =◡=

[–] Gumus@lemmy.world 2 points 2 hours ago

I use https://github.com/trganda/obsidian-attachment-management to automatically rename and move screenshots, in conjunction with https://github.com/Mara-Li/obsidian-explorer-hider to hide them. It makes pasting screenshots organized, yet completely transparent.

If I can rant a bit...

I used to do my daily journal as plaintext in Vim. I wanted something that was a little more capable and in RedNotebook I almost got it. It stores plaintext markup (I think yaml?), the thing is it has an edit and a display mode, and you can't edit it in display mode. Inserting a picture is pasting a file path to where that picture is stored. If I linked to where the pictures are stored in my ~/Pictures directory, if I ever migrated from Rednotebook or Linux or anything like that, the links to those pictures would break. So I store teh pictures I link in my journal in a subdirectory alongside the journal itself, so the pics should go with it and it should survive a transfer easier.

This is, of course, extremely user unfriendly to do, because it would mean copying pictures, reducing their resolution so they don't take up the entire damn journal window, and then working through RedNotebook's interface to navigate to where I just stored that picture to generate the link.

Or, I wrote a couple lines of Bash that did most of that for me and put the file path link in the primary buffer so I could open my file browser, right click, select Add To Journal, and then middle click in my journal. Felt kind of clever coming up with that one, and I kind of wish A) it was a bit easier and B) we lived more in a world where we did that kind of thing where things interoperated more than trying to silo things.

[–] oldfart@lemm.ee 2 points 5 hours ago (1 children)

ChatGPT wrote a Python program that does select->Tesseract OCR for me, but it doesn't always work right with two monitors. I'm too stupid to correct it. How have you done yours, what are you using for selecting the area?

[–] fool@discuss.tchncs.de 1 points 4 hours ago* (last edited 3 hours ago)

pasting from my keybind config

# snippet based on end4 dotfiles -- FIXME edge case where a
#     preexisting tmp.png might be overwritten
# English
bind = Super+Shift,T,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
# Korean
bind = Super+Shift,K,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l kor "tmp.png" - | wl-copy && rm "tmp.png"
# Japanese
bind = Super+Shift,J,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l jpn "tmp.png" - | wl-copy && rm "tmp.png"

edit: syntax highlight

[–] tonyn@lemmy.ml 16 points 9 hours ago (1 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 12 points 6 hours ago (1 children)

an actual print screen, finally

[–] dave@feddit.uk 4 points 3 hours ago

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

[–] data1701d@startrek.website 6 points 8 hours ago

On my desktop, I wrote a Python script that pulls a random Star Trek: The Next Generation or Deep Space Nine script from a folder and prints it in STDOUT. I use this in the XScreenSaver Text Manipulation > Program option to turn Star Trek into a screen saver.

Currently, I use it with the Apple II screensaver, but in its original incarnation, I used the Star Wars intro screensaver. 😈

[–] scrooge101@lemmy.ml 2 points 6 hours ago (2 children)

I also seperate Firefox on different workspaces, but only manually. How is the extension called? Having it automated would save me some seconds every reboot.

[–] tankplanker@lemmy.world 2 points 3 hours ago

Sway (and i3) you can assign windows to workspaces based on any property that is available in the swaymsg tree. It can do parital matches, so for example if you wanted your Lemmy firefox window to always start on workspace 3 you could use:

assign [title="lemmy" app_id="firefox"] workspace number $ws3

Title can use regex so you can do some pretty neat matching if you need it.

[–] fool@discuss.tchncs.de 1 points 4 hours ago* (last edited 3 hours ago)

The main idea is:

  1. Use Window Titler to add a title. For me, if I want it on workspace 7, I title the window "7". (NOTE: The title will probably appear like [title], see below)
  2. Make a script that queries the window manager, and then dispatches a movement to the appropriate workspace. In Hyprland that might be hyprctl -j which gives
... json blahblah
"title": "[7] What's a unique customization on your Linux machine you think no one else has? - tchncs — Mozilla Firefox"
... json blahblah

but in Sway it might be something similar to using swaymsg. Only titled windows will have the bracket number thing so just regex that part

  1. Put it in autostart. Because Firefox takes a while to load on my junk machine I sleep for like 30 seconds to a minute before all the titles register.
[–] haui_lemmy@lemmy.giftedmc.com 4 points 8 hours ago* (last edited 8 hours ago) (1 children)

Definitely not nobody but statistically VERY FEW people will have this combination:

  • pop!os (fight me!)
  • script that limits accumulator charge to 80% on asus laptop
  • script that turns on vpn if out of home and kicks off a backup if at home (through wifi ssid)

Edit: nice try to fingerprint me, big tech. You succeeded! /j

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

Triangulating your location. Are you... in the Milky Way Galaxy?

(Thanks for reminding me to limit accumulator charge)

[–] dave@feddit.uk 1 points 3 hours ago

Yeah, I have a script that toggles my Dell XPS between full charge and 80%, as I’m usually on mains and only need full charge occasionally.

[–] ryannathans@aussie.zone 23 points 14 hours ago (1 children)

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

[–] SeekPie@lemm.ee 1 points 3 hours ago* (last edited 3 hours ago) (1 children)

Probably, I have about 20 extensions for GNOME and have tweaked right about every setting and keybind.

[–] ryannathans@aussie.zone 1 points 2 hours ago

I just like the extension that lets me swap audio devices without delving into settings

[–] Chimrod@jlai.lu 4 points 10 hours 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/

[–] rimu@piefed.social 24 points 17 hours 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.

[–] tankplanker@lemmy.world 2 points 3 hours ago

I do something similar.

I have a V4N4G0N that I use the top row (half the normal number row on a full sized board) for switching workspace or switching apps to another workspace, and doing other stuff like copy and paste on different layers for the keyboard.

As its QMK (via VIAL) I have set all that up directly on the keyboard so its portable to any other PC I want to use. I have eight of these, mix of alu, acrylic and 3D printed, that I can choose from, all sharing the same map. I don't like using anything else now as its become integral to my normal workflow.

[–] fool@discuss.tchncs.de 9 points 16 hours 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 10 points 16 hours 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.

[–] golden_zealot@lemmy.ml 10 points 15 hours ago (1 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 8 points 15 hours ago* (last edited 15 hours ago) (1 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.

[–] golden_zealot@lemmy.ml 10 points 15 hours ago (1 children)

There is a toggle for SFW/Sketchy which in my experience has worked pretty well in avoiding such things, but you are probably right it does not catch everything.

If such a thing happened, I would just re-run the same command to update to a different one though. I guess I generally just make sure no one is in the room when it runs haha.

[–] SeekPie@lemm.ee 1 points 3 hours ago

Whenever you get 3 in a row, you know what you have to do.

The gods have given you a sign.

[–] JetpackJackson@feddit.org 4 points 12 hours ago

Custom cowsay written in Rust that pulls German song lyrics from my favorite band from a text file?

[–] tetris11@lemmy.ml 7 points 14 hours ago (1 children)

my awesome wm config has a lot of customization. We're talking 5+ years of basically re-writing an entire theme, along with behaviours, widgets, and bindings.

[–] golden_zealot@lemmy.ml 3 points 11 hours ago (1 children)

Which WM?

I am new to themes with gnome and am interested in learning about it in that capacity if you should have any resource material saved!

[–] jordanlund@lemmy.world 18 points 18 hours ago (1 children)

Machined badge reading "Built Not Bought".

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

[–] atzanteol@sh.itjust.works 9 points 15 hours ago (1 children)

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

That's pretty rad.

[–] jordanlund@lemmy.world 7 points 12 hours ago

He was a rad guy.

[–] atzanteol@sh.itjust.works 9 points 15 hours ago* (last edited 15 hours ago) (6 children)

I've got a RPI running a full-screen 'kiosk' view from homeassitant that turns an external display on/off based on a motion sensor.

So basically it's showing current temperatures, thermostat control, etc. but I have the display turn off after X minutes of no movement and turn on when there has been movement so it's only on when you're in the room.

[–] thejevans@lemmy.ml 5 points 12 hours ago* (last edited 12 hours ago)

I have a similar display in my kitchen. It's in portrait mode and has time (my timezone and others), weather (hourly and daily), and dynamic popups for weather alerts in the top 1/3. It has a spot for dynamic content below that that shows things like time remaining for my espresso machine to heat up and the temperature of my ember mug if I'm using it. The bottom half of the screen flips every 15 seconds between calenders for my partner and I, and local scheduled transit times and live train times with a map of current train positions.

load more comments (5 replies)
[–] thejevans@lemmy.ml 13 points 17 hours ago (1 children)

I have scripts set up to switch between my desk setup and my home theater setup that swap monitor configurations with wlrandr and default audio devices in wireplumber. These scripts are triggered with the "Netflix" button on my Nvidia Shield remote via Home Assistant and SSH. Simultaneously on Home Assistant power to the peripherals on my desk is toggled, the TV input is toggled between the Nvidia Shield and the PC, my AV receiver settings are toggled, and if the PC was asleep, it's turned on with a WoL magic packet.

load more comments (1 replies)
[–] mesamunefire@lemmy.world 8 points 16 hours ago

I have a meshtastic script that runs once a day that sends a weather report for our local area at 6:00 am. It was based off a script that some awesome person did. I also have a script that once a week sends out ham/meshtastic events to all local people. Its worked out pretty well.

[–] Ephera@lemmy.ml 7 points 16 hours ago

I've got basically the bspwm workflow, but on KDE.

So, bspwm has tiling of windows and doesn't want you to minimize (nowadays, it actually has a minimize-feature, but back when I last used it, it didn't). As a result, if a window is open, it is visible on some workspace. If you want to hide windows, put them on a different workspace.
I like that workflow, because while it probably seems complex when you first hear about it, it actually simplifies things. When you're looking for a window, you don't have to check all the workspaces and minimized windows and behind other windows.

KDE adds to that, in that I can have a workspace overview in my panel, so where I can see all workspaces with the windows that are visible on them (which with this workflow is all windows on that workspace). I like to call it my minimap.
It makes the workflow a lot easier to use, but it also allows me to group workspaces by location. So, if I'm working on a topic, I often have a Firefox window on one workspace, my text editor on the workspace below and then a terminal on the workspace below that. If I then realize, I need to quickly look up something for a related topic, I'll open up a new Firefox window two workspaces below that (leaving an empty workspace as separator). If I do something completely different, I might leave a whole bunch of empty workspaces in between. Or, well, KDE actually allows grouping workspaces with a feature called "Activities", so I'll often switch Activities.

I find that works a lot better for multi-tasking than the traditional Windows workflow of one window per application, with all kinds of different topics mixed into all kinds of ungrouped windows. If I switch between topics, I just go to the right location on my minimap and I've all the topic-related information in the windows that are there.

load more comments
view more: next ›