add script to switch kb layouts
This commit is contained in:
parent
c5618397dd
commit
17164de6ad
@ -12,7 +12,7 @@ ssh:
|
||||
git:.config/git .local/bin/ga
|
||||
ranger:.config/ranger
|
||||
gpg:
|
||||
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot .local/bin/i3_swap_workspaces .local/bin/i3blocks_helper %pomodoro
|
||||
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot .local/bin/i3_swap_workspaces .local/bin/i3blocks_helper .local/bin/switch-layout %pomodoro
|
||||
pomodoro:
|
||||
bat:.config/bat
|
||||
font:
|
||||
|
||||
@ -25,7 +25,8 @@ exec --no-startup-id unclutter -idle 0.3 -root
|
||||
|
||||
|
||||
exec_always --no-startup-id xset r rate 250 100
|
||||
exec_always --no-startup-id setxkbmap -model pc105 -layout us,ru -option grp:win_space_toggle -option ctrl:nocaps
|
||||
exec_always --no-startup-id setxkbmap -model pc105 -layout us,ru -option ctrl:nocaps
|
||||
|
||||
|
||||
# Wallpapers
|
||||
exec --no-startup-id nitrogen --restore; sleep 1; picom -b --config ~/.config/picom/picom.conf
|
||||
@ -38,6 +39,9 @@ font xft:FiraCode $font_size
|
||||
# use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3blocks exec pkill -SIGRTMIN+10 i3blocks
|
||||
set $refresh_i3blocks_language exec pkill -SIGRTMIN+11 i3blocks
|
||||
|
||||
bindsym $mod+space exec --no-startup-id switch-layout && $refresh_i3blocks_language
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3blocks
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3blocks
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3blocks
|
||||
|
||||
11
home/user/.local/bin/switch-layout
Executable file
11
home/user/.local/bin/switch-layout
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "here" > /tmp/test
|
||||
|
||||
current=$(setxkbmap -query | grep layout | awk '{print $2}')
|
||||
|
||||
if [ "${current}" = "us" ]; then
|
||||
setxkbmap -model pc105 -option ctrl:nocaps ru
|
||||
else
|
||||
setxkbmap -model pc105 -option ctrl:nocaps us
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user