[-] Ordoviz@lemmy.ml 0 points 2 years ago

You guys are overreacting. DDG said they would only down-rank sites associated with Russian disinformation. It's normal for search engines to downrank low-quality sites such as SEO spam.

1
Bash one-liner challenge (cmdchallenge.com)
submitted 3 years ago by Ordoviz@lemmy.ml to c/commandline@lemmy.ml

Solve exercises by writing Bash one-liners. The server actually runs your commands and checks whether the output is correct.

If you click on View Solutions, the correct commands other people entered are sorted by character count. So if you want, you can take the optional code golfing challenge.

I gained some knowledge from solving the challenges and looking at the solutions. Mostly you will use find and grep.

1
submitted 4 years ago* (last edited 4 years ago) by Ordoviz@lemmy.ml to c/c_programming@lemmy.ml

I am not the author of dwl. Since dwl is based on wlroots (just like the popular Sway) it already supports making screenshots using grim and screencasts using wf-recorder.

You can try out dwl from within your current WM. The default modkey is Alt. If you want to use the Super key, change #define MODKEY WLR_MODIFIER_ALT in config.h to #define MODKEY WLR_MODIFIER_LOGO and recompile. The default terminal emulator is kitty but you can change termcmd to alacritty if you want.

Currently, only native Wayland applications run on it. You can enable experimental Wayland support for Firefox with MOZ_ENABLE_WAYLAND=1, see Running programs natively under Wayland in Sway Wiki.

Do not hover over the edges of windows – this will crash dwl.

1
submitted 4 years ago by Ordoviz@lemmy.ml to c/productivity@lemmy.ml
1
submitted 4 years ago by Ordoviz@lemmy.ml to c/math@lemmy.ml

You only need high-school knowledge to follow his lectures!

1
submitted 4 years ago* (last edited 4 years ago) by Ordoviz@lemmy.ml to c/keyboards@lemmy.ml

I use a German keyboard but switched to the QWERTY layout to input programming symbols more easily. I still want to be able to type German umlauts, though. My keyboard also has a alt gr key that I want to put to use. So I created the file ~/.xkb/symbols/us-custom with the following contents:

default partial alphanumeric_keys
xkb_symbols "basic" {
	// Umlauts (ä, ö, ü) and €
	include "us(de_se_fi)"

	name[Group1] = "US layout plus some Unicode symbols using altgr combinations";
	// <AC06> means: middle row, 6th key on the board from the left

	// Unicode arrows (←, ↓, ↑, →)
	key <AC06> { [ h, H, U2190 ] };
	key <AC07> { [ j, J, U2193 ] };
	key <AC08> { [ k, K, U2191 ] };
	key <AC09> { [ l, L, U2192 ] };

	// Typographic punctuation
	key <AE11> { [      minus, underscore,   endash,       emdash ] };
	key <AB09> { [     period,    greater, ellipsis               ] };
	key <AB10> { [      slash,   question, division, questiondown ] };
	key <AE08> { [          8,   asterisk,        8,     multiply ] };
	key <AC11> { [ apostrophe,   quotedbl, rightsinglequotemark   ] };

	// Quotes
	key <AB02> { [ x, X,       guillemotright,            0x100203a ] };
	key <AB03> { [ c, C,        guillemotleft,            0x1002039 ] };
	key <AB04> { [ v, V,   doublelowquotemark,   singlelowquotemark ] };
	key <AB05> { [ b, B,  leftdoublequotemark,  leftsinglequotemark ] };
	key <AB06> { [ n, N, rightdoublequotemark, rightsinglequotemark ] };
};

In line 4 I included the de_se_fi section of /usr/share/X11/xkb/symbols/us. This has the same effect as putting the following into my custom layout:

include "us(basic)"
include "eurosign(e)"

key <AC01> {[ a,          A,          adiaeresis, Adiaeresis ]};
key <AD09> {[ o,          O,          odiaeresis, Odiaeresis ]};
key <AC02> {[ s,          S,          ssharp,     U1E9E      ]};
key <AD07> {[ u,          U,          udiaeresis, Udiaeresis ]};
key <AD10> {[ p,          P,          aring,      Aring      ]};

include "level3(ralt_switch)"

Including level3(ralt_switch) allows me to access the third layer by holding down the right alt key. This is how you access the other layers:

  • 1: hold down nothing
  • 2: hold Shift
  • 4: hold Shift+alt

With the key keyword you can remap a key. In the angle brackets you specify the position of the key on the keyboard. The second letter specifies the row:

  • B: bottom row
  • C: middle row
  • D: top row
  • E: number row

The next two digits specify the position on the row starting with 01 from the left.

The next bit of syntax is self-explanatory:

{[ layer1, layer2, layer3, layer4 ]};

You can leave out layer4 to map it to nothing.

You then should be able to select your custom layout. If you use Sway, add the following to the config file.

input * xkb_layout "us-custom"

Alternatively, export the environment variable XKB_DEFAULT_LAYOUT=us-custom.

See also: XKB on ArchWiki

1
submitted 4 years ago by Ordoviz@lemmy.ml to c/keyboards@lemmy.ml

This video addresses:

  • Are tiny keyboards useful?
  • What about special characters in languages other than English?
  • How do you access numbers and function keys on a 40% keyboard?
  • Comparison of sound intensity of different switches
1
submitted 4 years ago by Ordoviz@lemmy.ml to c/commandline@lemmy.ml

If you are currently using z, autojump, fasd or similar, take a look at it. frece is the kind of tool that does one thing well and can be used in ways the authors didn’t think of.

In my case it replaced mlocate. See open-files-frece and frece-updatedb.

It is written in Rust and available in the AUR.

view more: ‹ prev next ›

Ordoviz

joined 4 years ago
MODERATOR OF