Skip Navigation
Posts
20
Comments
15
Joined
5 yr. ago
  • You can also put this in ~/.config/xkb/symbols/us-custom (create the parent directories if necessary) and set the environment variable XKB_DEFAULT_LAYOUT=us-custom. This works in most Wayland compositors, including river and niri. For Hyprland, you can add this to your config file:

     conf
        
    input {
        kb_layout = us-custom
    }
    
    
      

    If you use GNOME, run

     undefined
        
    gsettings set org.gnome.desktop.input-sources mru-sources "[('xkb', 'us-custom')]"
    gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us-custom')]"
    
    
      

    and restart GNOME.


    This is my keyboard layout (I explained some bits of it here):

     undefined
        
    default partial alphanumeric_keys
    xkb_symbols "basic" {
    include "us(de_se_fi)" // Umlauts (ä, ö, ü) and €
    
    include "level5(rctrl_switch)"
    
    key.type[Group1] = "EIGHT_LEVEL";
    
    // Number row
    key <TLDE> {[ grave,      asciitilde,  dead_grave,           dead_tilde                                       ]};
    key <AE01> {[ 1,          exclam,      onesuperior,          U2081                                            ]}; // x₁
    key <AE02> {[ 2,          at,          twosuperior,          U2082                                            ]}; // x₂
    key <AE03> {[ 3,          numbersign,  threesuperior,        U2083                                            ]}; // x₃
    key <AE06> {[ 6,          asciicircum, dead_circumflex,      dead_caron                                       ]};
    key <AE08> {[ 8,          asterisk,    enfilledcircbullet,   U22C5,               infinity                    ]}; // dot operator
    key <AE10> {[ 0,          parenright,  NoSymbol,             NoSymbol                                         ]};
    key <AE11> {[ minus,      underscore,  endash,               emdash,              U207B                       ]}; // x⁻
    key <AE12> {[ equal,      plus,        notequal,             approxeq                                         ]};
    
    // Top row
    key <AD01> {[ q,          Q,           NoSymbol,             U211A,               NoSymbol,      NoSymbol     ]}; // ℚ
    key <AD02> {[ w,          W,           NoSymbol,             NoSymbol,            Greek_omega,   Greek_OMEGA  ]};
    key <AD03> {[ e,          E,           NoSymbol,             NoSymbol,            Greek_epsilon, U2203        ]}; // ∃
    key <AD04> {[ r,          R,           NoSymbol,             U211D,               Greek_rho,     U03F1        ]}; // ℝ ϱ
    key <AD05> {[ t,          T,           U03D1,                Greek_tau,           Greek_theta,   Greek_THETA  ]}; // ϑ
    key <AD08> {[ i,          I,           U21d2,                U21d4,               Greek_iota,    integral     ]}; // ⇒ ⇔
    key <AD09> {[ o,          O,           NoSymbol,             NoSymbol,            Greek_omega,   Greek_OMEGA  ]};
    key <AD10> {[ p,          P,           section,              paragraph,           Greek_pi,      Greek_PI     ]};
    
    // Home row
    key <AC01> {[ a,          A,           NoSymbol,             NoSymbol,            Greek_alpha,   U2200        ]}; // ∀
    key <AC02> {[ s,          S,           NoSymbol,             NoSymbol,            Greek_sigma,   Greek_SIGMA  ]};
    key <AC03> {[ d,          D,           NoSymbol,             NoSymbol,            Greek_delta,   Greek_DELTA  ]};
    key <AC04> {[ f,          F,           NoSymbol,             NoSymbol,            Greek_phi,     Greek_PHI    ]};
    key <AC05> {[ g,          G,           degree,               NoSymbol,            Greek_gamma,   Greek_GAMMA  ]};
    key <AC06> {[ h,          H,           U2190,                NoSymbol,            Greek_eta,     U2225        ]}; // ← ∥
    key <AC07> {[ j,          J,           U2193,                NoSymbol,            NoSymbol,      NoSymbol     ]}; // ↓
    key <AC08> {[ k,          K,           U2191,                NoSymbol,            Greek_kappa,   U03F0        ]}; // ↑ ϰ
    key <AC09> {[ l,          L,           U2192,                NoSymbol,            Greek_lambda,  Greek_LAMBDA ]}; // →
    key <AC10> {[ semicolon,  colon,       dead_diaeresis,       NoSymbol,            NoSymbol,      NoSymbol     ]};
    key <AC11> {[ apostrophe, quotedbl,    rightsinglequotemark, NoSymbol,            NoSymbol,      NoSymbol     ]};
    key <AC12> {[ backslash,  bar,         U2500,                U2502,               NoSymbol,      NoSymbol     ]}; // box drawing
    
    // Bottom row
    key <AB01> {[ z,          Z,           NoSymbol,             U2124,               Greek_zeta,    U2220        ]}; // ℤ ∠
    key <AB02> {[ x,          X,           multiply,             NoSymbol,            Greek_xi,      Greek_XI     ]};
    key <AB03> {[ c,          C,           NoSymbol,             U2102,               Greek_chi,     copyright    ]}; // ℂ
    key <AB04> {[ v,          V,           doublelowquotemark,   singlelowquotemark,  Greek_psi,     Greek_PSI    ]};
    key <AB05> {[ b,          B,           leftdoublequotemark,  leftsinglequotemark, Greek_beta,    NoSymbol     ]};
    key <AB06> {[ n,          N,           rightdoublequotemark, rightsinglequotemark,Greek_nu,      U2115        ]}; // ℕ
    key <AB07> {[ m,          M,           U2212,                plusminus,           Greek_mu,      NoSymbol     ]}; // minus
    key <AB08> {[ comma,      less,        dead_cedilla,         NoSymbol,            U27e8,         NoSymbol     ]}; // ⟨
    key <AB09> {[ period,     greater,     ellipsis,             dead_abovedot,       U27e9,         NoSymbol     ]}; // ⟩
    key <AB10> {[ slash,      question,    division,             questiondown,        NoSymbol,      NoSymbol     ]};
    };
    
    
      

    GNOME Settings shows a visual preview of the first four layers:

    See also this writeup by Leon Plickat.

  • Store your Firefox profile and all tabs in RAM for snappier browsing: https://wiki.archlinux.org/title/Firefox/Profile_on_RAM

  • Don't blindly run untrusted software, use Bubblewrap at the very least. Keep https://xkcd.com/538/ in mind.

  • Permanently Deleted

  • OpenStreetMap and Internet Archive because they are operating with a small budget (as opposed to Wikipedia).

  •  bash
        
    #!/bin/sh
    # Select a file with fzf from a database sorted by frecency and open it using
    # xdg-open. frece can be found at https://github.com/YodaEmbedding/frece
    
    DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
    item=$(frece print "$DB_FILE" | fzf --tiebreak=index --scheme=path)
    
    [ -z "$item" ] &amp;&amp; exit 1
    frece increment "$DB_FILE" "$item"
    
    xdg-open "$item"
    
    #!/bin/sh
    # Update frece database
    
    DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
    tmp_file=$(mktemp)
    fd -H . ~ > "$tmp_file"  # use ~/.fdignore file to exclude certain dirs
    frece update "$DB_FILE" "$tmp_file" --purge-old
    rm "$tmp_file"
    
    
      
  • Wired has removed the story because it “does not meet [their] editorial standards”.

  • Wired has removed the story because it "does not meet [their] editorial standards".

  • Hollow Knight @lemmy.ml
    Ordoviz @lemmy.ml

    Pale Court now available on Linux and macOS

    In case you somehow missed it, Pale Court is a Hollow Knight mod that adds several well-made boss fights. It released a month ago, but the Linux and macOS versions had problems. This was fixed with the new 1.0.1.0 release.

  • Make sure that toolkit.legacyUserProfileCustomizations.stylesheets is enabled in about:config.

  • Hollow Knight: Silksong

  • A place for everything about math @lemmy.ml
    Ordoviz @lemmy.ml

    How to Take the Factorial of Any Number

    Beginner-friendly derivation of an alternative expression of the gamma function.

  • Thanks, I was confused because I thought "not supporting Taiwan independence" means being fine with China annexing Taiwan. In both versions of the readout, Biden wants to keep the status quo in Cross-Strait relations, but this is phrased differently in each readout.

  • It's good that China and the US keep up the communication. However, I would like to see an US version of this: Did Biden really “reiterated that the one-China policy of the US has not changed and will not change, and that the US does not support ‘Taiwan independence’.”?

  • Open Source Fonts @lemmy.ml
    Ordoviz @lemmy.ml
  • 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.

  • Indie Games @lemmy.ml
    Ordoviz @lemmy.ml

    Itch.io video game bundle for Ukraine

    cross-posted from: https://lemmy.ml/post/188331

    Get Celeste, Baba is You, A Short Hike, Minit and many other indie games while supporting charity.

    Itch.io @lemmy.ml
    Ordoviz @lemmy.ml

    Itch.io video game bundle for Ukraine

    Get Celeste, Baba is You, A Short Hike, Minit and many other indie games while supporting charity.

    Chess @lemmy.ml
    Ordoviz @lemmy.ml

    Chess Visualization, Aphantasia, and a Very Early Fischer Game

    I have aphantasia but managed to follow the moves in the video and notice the pin.

    Aphantasia is the inability to create mental images in one's mind. You can check for yourself if you have aphantasia by imaging a ball on a table.

    Do you have aphantasia? Can you play blind chess?

    A place for everything about math @lemmy.ml
    Ordoviz @lemmy.ml

    The Perfect Road for a Square Wheel

    A place for everything about math @lemmy.ml
    Ordoviz @lemmy.ml

    How Big Can Balanced Trees Get? (Fibonacci, AVL Trees, and Binet's Formula)

    RSS - Really Simple Syndication @lemmy.ml
    Ordoviz @lemmy.ml

    How to use yt-dlp instead of yt-dl with mpv

    I use RSS feeds and mpv to watch YouTube without visiting youtube.com. This post shows how you can configure mpv to use yt-dlp instead of the abandoned youtube-dl.

    OSS Video Software @lemmy.ml
    Ordoviz @lemmy.ml

    How to use yt-dlp instead of yt-dl with mpv

    Asklemmy @lemmy.ml
    Ordoviz @lemmy.ml

    What are your favorite online games to play with friends?

    Statistics @lemmy.ml
    Ordoviz @lemmy.ml

    How lucky is too lucky? The Minecraft Speedrunning Controversy Explained | Stand-up Maths

    Nintendo @lemmy.ml
    Ordoviz @lemmy.ml

    Everything Wrong With Nintendo’s Design Philosophy and Why Paper Mario had to Die.

    Eye-opening video which explains Nintendo’s new design philosophy by comparing Origami King, Breath of the Wild, and Odyssey to older Nintendo games and similar games from other publishers.

    The title sounds more negative than the video actually is.

    Statistics @lemmy.ml
    Ordoviz @lemmy.ml

    Why do Biden's votes not follow Benford's Law?

    Video in which Matt Parker explains Benford's Law and why it cannot be applied to elections

    Command Line @lemmy.ml
    Ordoviz @lemmy.ml

    Linux Command Library

    Impressive resource

    Command Line @lemmy.ml
    Ordoviz @lemmy.ml

    Bash one-liner challenge

    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.

    The C Programming Language @lemmy.ml
    Ordoviz @lemmy.ml

    dwl is a dwm-like Wayland compositor based on wlroots

    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.

    Computer Keyboards @lemmy.ml
    Ordoviz @lemmy.ml

    How I created a custom keyboard layout for special characters with XKB

    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:

     undefined
        
    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,       
      
    Computer Keyboards @lemmy.ml
    Ordoviz @lemmy.ml

    Niu Mini 40% Review – Wolfgang's Channel

    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
    Command Line @lemmy.ml
    Ordoviz @lemmy.ml

    frece: Maintain a database sorted by frecency (frequency recency)

    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.