mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
📝 Add keyboard indecator for qtile, dmne theme for rofi. Update nvim, ranger
This commit is contained in:
parent
4f3a929be0
commit
917b69171d
18 changed files with 195 additions and 88 deletions
|
|
@ -1,13 +1,13 @@
|
|||
# Qtile config
|
||||
|
||||

|
||||
------------------------
|
||||

|
||||
---------------
|
||||
|
||||
### Install
|
||||
-----------
|
||||
~~~shell
|
||||
sudo pacman -S qtile
|
||||
yay -S kbdd-git
|
||||
yay -S xkblayout
|
||||
~~~
|
||||
|
||||
### Autostart
|
||||
|
|
@ -17,12 +17,11 @@ setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps"
|
|||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
nitrogen --restore
|
||||
picom -b
|
||||
kbdd
|
||||
~~~~
|
||||
|
||||
### Keybindings
|
||||
| Hotkey | Action |
|
||||
| -------------- | --------------- |
|
||||
| --- | --- |
|
||||
| MOD + RETURN | Open termianl |
|
||||
| MOD + SHIFT + RETURN | Open program launcher(rofi) |
|
||||
| MOD + r | Open qtile spawn menu |
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@ setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps"
|
|||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
nitrogen --restore &
|
||||
picom -b &
|
||||
kbdd &
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from libqtile import bar, layout, widget, hook
|
|||
from libqtile.config import Click, Drag, Group, Key, Screen
|
||||
from libqtile.lazy import lazy
|
||||
from typing import List
|
||||
import kblayout
|
||||
import os
|
||||
|
||||
|
||||
|
|
@ -29,7 +30,6 @@ color = [
|
|||
@hook.subscribe.startup_once
|
||||
def autostart(): os.system("~/.config/qtile/autostart.sh")
|
||||
|
||||
|
||||
keys = [
|
||||
# Applications
|
||||
Key([mod], "Return",
|
||||
|
|
@ -88,7 +88,6 @@ keys = [
|
|||
),
|
||||
Key([mod, "control"], "h",
|
||||
lazy.layout.grow_left(),
|
||||
#lazy.layout.grow()),
|
||||
desc="Resize focus window(left)"
|
||||
),
|
||||
Key([mod, "control"], "j",
|
||||
|
|
@ -101,7 +100,6 @@ keys = [
|
|||
),
|
||||
Key([mod, "control"], "l",
|
||||
lazy.layout.grow_right(),
|
||||
#lazy.layout.shrink()
|
||||
desc="Resize focus window(right)"
|
||||
),
|
||||
|
||||
|
|
@ -135,12 +133,12 @@ keys = [
|
|||
|
||||
# Menus(dmenu or/and rofi)
|
||||
Key([mod, "shift"], "Return",
|
||||
lazy.spawn("j4-dmenu-desktop --dmenu=\"dmenu -h 24 -p Run\""),
|
||||
desc="(j4-dmenu) Program launcher"
|
||||
lazy.spawn("rofi -show drun"),
|
||||
desc="(Rofi) Program launcher"
|
||||
),
|
||||
Key([mod, "shift"], "apostrophe",
|
||||
lazy.spawn("dmenu_run -h 24 -p Run"),
|
||||
desc="(Dmenu) Program launcher"
|
||||
lazy.spawn("rofi -show run"),
|
||||
desc="(Rofi) Program launcher"
|
||||
),
|
||||
Key([mod],"Escape",
|
||||
lazy.spawn(f"/home/{user}/.script/dmenu/dmenu-power.sh"),
|
||||
|
|
@ -243,11 +241,10 @@ screens = [Screen(top=bar.Bar([
|
|||
),
|
||||
widget.Prompt(foreground=color[0]),
|
||||
widget.WindowName(foreground=color[0]),
|
||||
widget.KeyboardKbdd(
|
||||
kblayout.KBLayout(
|
||||
foreground=color[5],
|
||||
configured_keyboards=["us", "ru", "ua"],
|
||||
update_interval=0,
|
||||
fmt=" {}",
|
||||
fmt=" {}"
|
||||
),
|
||||
widget.CurrentLayout(
|
||||
foreground=color[8]
|
||||
|
|
@ -285,21 +282,23 @@ main = None
|
|||
follow_mouse_focus = True
|
||||
bring_front_click = False
|
||||
cursor_warp = False
|
||||
floating_layout = layout.Floating(float_rules=[
|
||||
{"wmclass": "confirm"},
|
||||
{"wmclass": "dialog"},
|
||||
{"wmclass": "download"},
|
||||
{"wmclass": "error"},
|
||||
{"wmclass": "file_progress"},
|
||||
{"wmclass": "notification"},
|
||||
{"wmclass": "splash"},
|
||||
{"wmclass": "toolbar"},
|
||||
{"wmclass": "confirmreset"},
|
||||
{"wmclass": "makebranch"},
|
||||
{"wmclass": "maketag"},
|
||||
{"wname": "branchdialog"},
|
||||
{"wname": "pinentry"},
|
||||
{"wmclass": "ssh-askpass"},
|
||||
floating_layout = layout.Floating(
|
||||
**layout_theme,
|
||||
float_rules=[
|
||||
{"wmclass": "confirm"},
|
||||
{"wmclass": "dialog"},
|
||||
{"wmclass": "download"},
|
||||
{"wmclass": "error"},
|
||||
{"wmclass": "file_progress"},
|
||||
{"wmclass": "notification"},
|
||||
{"wmclass": "splash"},
|
||||
{"wmclass": "toolbar"},
|
||||
{"wmclass": "confirmreset"},
|
||||
{"wmclass": "makebranch"},
|
||||
{"wmclass": "maketag"},
|
||||
{"wname": "branchdialog"},
|
||||
{"wname": "pinentry"},
|
||||
{"wmclass": "ssh-askpass"},
|
||||
])
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
|
|
|
|||
BIN
config/qtile/icons/layout-columns.png
Normal file
BIN
config/qtile/icons/layout-columns.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 508 B |
Binary file not shown.
|
Before Width: | Height: | Size: 218 B |
6
config/qtile/kblay.sh
Executable file
6
config/qtile/kblay.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#/bin/sh
|
||||
case "$(xkblayout)" in
|
||||
"Eng") echo "us" ;;
|
||||
"Rus") echo "ru" ;;
|
||||
"Ukr") echo "ua" ;;
|
||||
esac
|
||||
23
config/qtile/kblayout.py
Normal file
23
config/qtile/kblayout.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from libqtile.widget import base
|
||||
import os
|
||||
|
||||
|
||||
class KBLayout(base.InLoopPollText):
|
||||
"""Widget for displaying the current keyboard layout
|
||||
It requires setxkbmap and xkblayout"""
|
||||
orientations = base.ORIENTATION_HORIZONTAL
|
||||
defaults = [
|
||||
("background", "#000000", "Backbround color"),
|
||||
("foreground", "#ffffff", "Foreground color"),
|
||||
]
|
||||
|
||||
def __init__(self, **config):
|
||||
base.InLoopPollText.__init__(self, **config)
|
||||
|
||||
def get_keyboard(self):
|
||||
kb = os.popen("xkblayout").read().rstrip("\n")
|
||||
return kb
|
||||
|
||||
def poll(self):
|
||||
kb = os.popen(".config/qtile/kblay.sh").read().rstrip('\n').encode('utf-8').decode('utf-8')
|
||||
return kb
|
||||
Loading…
Add table
Add a link
Reference in a new issue