Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Bernie (codewiz@mstdn.io)'s status on Friday, 10-Nov-2023 16:24:04 UTC Bernie Bernie

    I've always remapped the useless Caps Lock key to CTRL key. There's a setting for it on both X11 and Wayland.

    Some #vim users remap it to ESC, another frequently used key that's hard to reach from the home row.

    So why can't we have both? Caps Lock can act as ESC when pressed alone, or CTRL when pressed in combination with another key.

    Turns out multiple people already thought about this. Here's a simple Python script that does this:
    https://github.com/wbolster/evcape

    #programming #linux #wayland

    In conversation Friday, 10-Nov-2023 16:24:04 UTC from mstdn.io permalink

    Attachments

    1. GitHub - wbolster/evcape: simulate other keys when modifier keys are pressed on their own
      simulate other keys when modifier keys are pressed on their own - GitHub - wbolster/evcape: simulate other keys when modifier keys are pressed on their own
    • Bernie (codewiz@mstdn.io)'s status on Friday, 10-Nov-2023 16:27:48 UTC Bernie Bernie
      in reply to

      Don't want a Python script running as root? There's a whole bunch of different designs that work in #wayland:
      https://news.ycombinator.com/item?id=24926031

      In conversation Friday, 10-Nov-2023 16:27:48 UTC permalink

      Attachments

      1. Invalid filename.
        FYI There are lots of alternatives to xcape (and even better ones because, in my... | Hacker News
    • Bernie (codewiz@mstdn.io)'s status on Friday, 10-Nov-2023 16:40:38 UTC Bernie Bernie
      in reply to

      Here's another one written in #Rust which drops privileges after opening the evdev input device and can be configured via #Dyon scripts:

      https://codeberg.org/valpackett/evscript/src/branch/trunk/README.md

      In conversation Friday, 10-Nov-2023 16:40:38 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Friday, 10-Nov-2023 16:44:44 UTC Bernie Bernie
      in reply to

      First time I hear about #Dyon. I'll give it a try, but I'm skeptical that the world needs another dynamically typed, interpreted language, even if it's inspired by #Rust.

      https://github.com/PistonDevelopers/dyon#readme

      In conversation Friday, 10-Nov-2023 16:44:44 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Friday, 10-Nov-2023 19:22:55 UTC Bernie Bernie
      in reply to
      • micheal65536

      @micheal65536 Bash has its own place. Have you seen Python programs trying to copy files recursively or launch a program and read its output? They are 10x the complexity, and usually buggy (they buffer all the output before starting to parse it, they forget to check the return code, they don't search for the program in the path...)

      In conversation Friday, 10-Nov-2023 19:22:55 UTC permalink
    • micheal65536 (micheal65536@mastodon.test.micheal65536.duckdns.org)'s status on Friday, 10-Nov-2023 19:23:05 UTC micheal65536 micheal65536
      in reply to

      @codewiz It doesn't.

      We already have Python.

      And Perl if you don't like Python.

      And JavaScript if you're making a webpage (or apparently anything else now as well, thanks Node/React/Electron).

      And Lua if Python's too complicated for you.

      And BASH if you hate yourself (calling BASH "dynamically typed" is a bit of a stretch I guess).

      And PHP if you're making a website but it's 200x and Node.JS doesn't exist yet.

      In conversation Friday, 10-Nov-2023 19:23:05 UTC permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.