Giter Site home page Giter Site logo

key_layout toggle about i3blocks-contrib HOT 3 CLOSED

vivien avatar vivien commented on August 20, 2024
key_layout toggle

from i3blocks-contrib.

Comments (3)

kb100 avatar kb100 commented on August 20, 2024

After much searching, setxkbmap can only show you the layout rules, not the actual layout. Thus in order for this script to work as expected, you will have to have i3 symbind CTRL+ALT to a script that toggles between the layouts e.g. like the one here: https://superuser.com/questions/505466/2-and-more-keyboard-layout-groups-in-linux-changed-by-different-hot-keys

Sorry for this, I don't see any way to fix it at this time. Don't close the issue.

from i3blocks-contrib.

yakir12 avatar yakir12 commented on August 20, 2024

For what it's worth, this works perfectly (for me):
in .i3blocks.conf:

[key_layout]
interval=once
command=~/.i3blocks/key_layout
signal=11

in .i3/config:

bindsym $mod+z exec --no-startup-id "~/.i3blocks/changeLayout && pkill -RTMIN+11 i3blocks"

and this changeLayout file is:

#!/usr/bin/env bash
LO=$(~/.i3blocks/key_layout)
if [ "$LO" == 'us' ]
then
        setxkbmap -layout se
else
        setxkbmap -layout us
fi

from i3blocks-contrib.

kb100 avatar kb100 commented on August 20, 2024

key_layout's functionality is now duplicated in the kbdd_layout script. key_layout works if you are switching between simple layouts (i.e. "us" is ok but not "us,se") , whereas kbdd_layout works when using group toggling.

from i3blocks-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.