Spyke

Posts

kakoune·KakounebyRAM

The latest addition to my kakrc

I've just added the following to my kakrc and I love it :)

## Equals pipe
map global normal = "ya = <esc>p|"

It does the following when I hit '=' in normal-mode:

  1. It copies the currently selected string
  2. It enters insert-mode and types " = "
  3. it pastes the previously selected string
  4. it starts a pipe with the just pasted string

I use kakoune, not just for coding, but also for writing reports.

Take the string 1011 1010. If I select it and pipe it into a cli-tool that translates it into decimal, I get 186. But if I pipe it with this new '=', I get 1011 1010 = 186.

It is not life-changing, but it has definitely improved my writing flow :)

I use it mostly with this tool for translating between binary and decimal, but also with a calculator to quickly get the result of an equation and still have the equation in my document :)

View original on discuss.tchncs.de

INVALID MIT-MAGIC-COOKIE-1 key [SOLVED]

For a long time, when using my computer (Arch linux), I would sometimes run into this problem. When trying to open an application in a new window, I'll be met by:

Invalid MIT-MAGIC-COOKIE-1 key
cannot open display: :0

I've tried a lot of "solutions" without luck, but I've finally found a way to consistently reproduce the error. It happens everytime I connect to a new wifi.

I found this 9 year old post about the same problem, but it does not include a real solution or the cause of the problem.

I'll try asking it here, to see if anybody knows why it happens and how to solve it, and perhaps to help others with the same problem find the cause of this error. It is such a relief for me, knowing that it is caused by changing wifi.

In advance, thanks for the help/feedback :)

View original on discuss.tchncs.de
kakoune·KakounebyRAM

CLI tools and kakoune

One of the things I enjoy the most about working in Kakoune, is how seamlessly it integrate with command-line tools.

This is a list of the command-line tools I use, when writing in Kakoune. You are very much encouraged to share the tools you use, in the comment section :)

I study computer science and I use Kakoune both for writing code and for writing solutions to math-questions. These tools are what helps me in my use-cases :)

Yesterday, while writing in Haskell, I selected all of my document and piped it through "grep ::" to quickly get a list of all functions I had defined.

I also often use wc -c and wc -l to count how many characters or lines a text segment takes up. I do this by selecting the text and piping it into the respective command. This replaces all the text by the answer. I then undo, to have my text back.

A few times, I've also piped into sort, to quickly sort some lines of text.

I've also written a few small CLI tools myself, that I use on a regular basis.

A small calculator, that I use for solving trivial math problems. (It only works with integers and basic operators at the moment). I've written this myself, because it keeps the original equation when writing it's output, rather than replacing my equation with the solution

A small program for repeating a string. I use this for writing trailing zeroes or other patterns. It is very fast to highlight the text you want to repeat and pipe it into this program.

I've written many other small cli tools for specific use cases, and Kakoune just makes it so easy and fast to write and use tools.

For most purposes, you don't have to use Kakoune-script, you just write whatever program you want that operates on text and you're golden. This is the beauty of the unix philosophy :)

To conclude:

Most of the tools I use, I have written myself, but I use 'grep', 'sort' and 'wc' too.

View original on discuss.tchncs.de
archlinux·Arch LinuxbyRAM

Zathura config question

Not entirely related to this community, but I don't know where else to ask.

I am looking to remap 'f' and 'F', so they better follow local pdf links. I want 'f' to follow the link without opening a new zathura instance and I want 'F' to follow the link in a new instance.

I can fix 'F' with

map F follow

but I don't know how to fix 'f'.

Say I want to open a link to b.pdf, the functionality I want from 'f' is then identical to writing ":o b.pdf" in the input bar.

It is possible to get the filepath with

map f display_link

but don't know how to pipe it into :o

Is this possible by adding something in my zathurarc ?

View original on discuss.tchncs.de
kakoune·KakounebyRAM

Trees in raw text - how about matrices ?

I think this might be relevant for this community :)

I learned of a nice way to notate trees in raw text. It is as follows:

-a
 |
 +-aa
 | |
 | +-aaa
 | |
 | +-aab
 |
 +-ab
   |
   +-aba
   |
   +-abb

I hope this example demonstrates it fine :)

I was wondering though - Are there any good ways to notate matrices in raw text ?

Please share, if you have any notation for matrices or other nice ways to notate stuff in raw text :)

View original on discuss.tchncs.de
juggling_in_movies·Juggling in moviesbyRAM

Casablanca (1942)

The lovely movie Casablanca from 1942 features a juggler in the opening scene, 2 minutes and 11 seconds in. It looks like the juggler is juggling three balls, first in a shower pattern and then a low cascade. It is only a few seconds, but it inspired me to make this community. I'm looking forward to learning about other movies, featuring juggling ^^

View original on discuss.tchncs.de
linux4noobs·Linux 101 stuff. Questions are encouraged, noobs are welcome!byRAM

[SOLVED] Wifi adapter suddenly stopped working after 1 year

//Solution:

I installed this driver (https://github.com/morrownr/8821au-20210708).

The driver however, did not work until I ran a script called remove-driver.sh from the driver that I used to use (https://github.com/morrownr/8821cu-20210916). Then the wifi adapter started working again :)

Thanks a lot for the help - I am still not really sure what the problem actually was, but I'm very thankful for having my internet connection back :)

//Original post below:

Hey :)

I've been using a wifi adapter for my computer for about a year. A few days ago, it suddenly stopped working. It no longer shows up when I run 'nmcli device' in the terminal. When running 'lsusb' it still shows up as 'Realtek Semiconductor Corp. 802.11ac NIC'.

To my knowledge I hadn't updated anything before it stopped working. After it had stopped working, I used usb-tethering from my phone to do a system update, hoping it would fix the problem. I think one of the updates was a linux firmware update. Anyways, it didn't fix anything.

The adapter didn't work out of the box. It arrived with a driver called 'RTL88x2BU' and a document stating that it was compatible with the following chip drivers for linux: RTL8811AU RTL8811CU RTL8812BU RTL8814AU

I couldn't get the driver it arrived with to work, so instead I downloaded this driver and have been using it until it stopped working. https://github.com/morrownr/8821cu-20210916

this driver only states that it supports some linux kernel version. I'm using '6.8.0-40-generic', which it does not claim to suppport. I download this driver, which should support my kernel, but it didn̈́'t work either. https://github.com/morrownr/8821au-20210708

I've tried running lsmod on my system, and it seems to be, that no wifi driver even starts. The only thing I can remember doing just prior to my internet not working, was running 'systemctl disable jellyfin.service'. I doubt that has anything to do with this, but I'm not sure what else it could be. My only other theory is, maybe the usb wifi adapter hardware just gave up.

Any help is appreciated ^^

View original on discuss.tchncs.de
askelectronics·Ask ElectronicsbyRAM

Any good beginner guides for identifying broken parts in a desktop computer ?

I've recently bought a used computer, and it has a few problems. I'm looking for a guide to help me identify which parts are causing the problem.

I've tried to watch and read a few guides on how to build a pc, but they haven't given me any information on how to identify broken parts.

I'm interesting in a guide, but I'll also post my specific problems, if any of you know how I might fix them ^^

the problems I'm experiencing are the following:

the screen will sometimes glitch out with black areas when watching movies, but only when in fullscreen. The problem usually disappears for some time when exiting and re-entering fullscreen mode.

The computer won't run certain drivers and sometimes when powering off, the computer will use a long time closing certain applications, but will fail in the end and I have to power it off manually. Also, it will sometimes reset my settings. Back to factory wallpaper and factory everything. it remembers my users and my applications.

I've grouped them into two paragraphs, because I have an idea, that the graphical problem might be caused a bad GPU.

I have no idea, what's causing the stuff in the second paragraph 😅

also, I hope this is the right community for this question - I couldn't find any communities specifically for computers.

any help is welcomed ^^

//EDIT:

Thanks for the help :))

I removed the gpu and now only use the integrated graphics in the cpu, and the visual glitches are gone :))

I've run some tests on the computer (from the boot screen), and it seems the memory is fine. The only driver I know to be a problem is the driver for my WiFi usb. I'll try to work on that, or maybe I'll buy a WiFi card and pray that works better ^^

thanks for the help :))

//EDIT2:

All my problems are fixed now ^^

the wallpaper change was because I am a doofus and forgot that I had made a new user on the computer, which of course had the default wallpaper 😅

the driver problem was only with my WiFi adapter, and I fixed that by removing the current driver (rtl8812ub) and installing another driver (rtl8811au), which fixed the problem :))

thanks for the help :))

View original on discuss.tchncs.de

2024 = 2³ + 3³ + 4³ + 5³ + 6³ + 7³ + 8³ + 9³

I just saw somebody on mastodon share this fact, and I wanted to share it here too :))

It can be explained by the follow:

2025 = 2024 + 1

2025 = 45²

45 = 1 + 2 + ... + 9

(1 + ... + n)² = 1³ + ... + n³

and since 1³ is just one, we get the above equation for 2024 :))

This also means that next year will be even nicer, as it will include the 1³ :))

Do you have any other interesting facts about 2024 ? :))

The best name I've found for the last formula is just "Sum of consecutive cubes". I had never heard about that relation before, it really is bizare how math is connected sometimes :))

View original on discuss.tchncs.de
kakoune·KakounebyRAM

Welcome :))

Hello and welcome to this new community for talking about Kakoune !

I am by no means an expert on kakoune, but I love using it. I created this community, exactly because I am not an expert, and I wanted some place to learn more and talk to other people who like kakoune :))

If you want to ask a question about kakoune, share your kakrc, your favourite plugins or your workflow using kakoune - please do so here :))

If you're not (yet 😉) using kakoune, you're also welcome to participate and ask questions :))

View original on discuss.tchncs.de
archlinux·Arch LinuxbyRAM

smooth scrolling in Zathura with j and k ?

Hey :))

I'm trying to get smooth scrolling to work with Vi bindings in Zathura. It works out of the box with "" and "". I found a solution on the internet saying you could map j and k to "" and "", which I've done by writing the following in zathurarc:

map j feedkeys "<C-Down>"
map k feedkeys "<C-Up>"

And it works :))

the only problem is - every time I press either j or k, it writes the following error to the terminal:

(org.pwmt.zathura:112248): Gdk-WARNING **: 08:53:50.919: Event with type 8 not holding a GdkDevice. It is most likely synthesized outside Gdk/GTK+

Is there a better way to get smooth scrolling with vi bindings in zathura ? ^^

// This post has been a hell with formatting, sorry

View original on discuss.tchncs.de
linux·LinuxbyRAM

help: can I move CLI tools through a usb drive ?

hello :))

I have problems with the WiFi adapter on my new pc, and in order to troubleshoot I need to use some utils that are not on already on the computer.

is it possible to just copy the binaries from a computer with internet connection onto a usb drive and move them over that way ?

And in that case, how do I make sure to also copy all the dependencies ?

or is there a smarter way do to it all together ? 😅

I hope this is the right community for this question :)) I couldn't find any community specifically for Linux tech support.

View original on discuss.tchncs.de

You reached the end