forked from Shinonome/dots-hyprland
91 lines
2.4 KiB
Plaintext
Executable File
91 lines
2.4 KiB
Plaintext
Executable File
(defwidget winlang_widget []
|
|
(box
|
|
:space-evenly false
|
|
:orientation "v"
|
|
:style "
|
|
${anim_open_winlang ? 'transition: 150ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 100ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
|
|
${rev_winlang ? '' : 'margin-bottom: -700px;'}
|
|
"
|
|
(eventbox
|
|
:onclick "scripts/toggle-winlang.sh --close &"
|
|
:onmiddleclick "scripts/toggle-winlang.sh --close &"
|
|
:onrightclick "scripts/toggle-winlang.sh --close &"
|
|
(box
|
|
:class "box-that-is-there" :style "min-height: 1px;"
|
|
)
|
|
)
|
|
(box
|
|
:space-evenly false :orientation "v"
|
|
:class "winwin-top"
|
|
:width 378
|
|
(box
|
|
:space-evenly false :spacing 10
|
|
:style "padding: 15px;"
|
|
(label :xalign 0
|
|
:class "winlang-text"
|
|
:text "Keyboard layout"
|
|
)
|
|
; (label :xalign 0
|
|
; :class "winlang-subtext"
|
|
; :text "Win + Space"
|
|
; )
|
|
)
|
|
(box
|
|
:space-evenly false :orientation "v"
|
|
(for language in langs
|
|
(button
|
|
:class "winlang-lang${language.name_ibus == lang_ibus.name_ibus ? '-true' : '-false'}"
|
|
:onclick "ibus engine ${language.name_ibus} && eww update lang_ibus='${language}' &"
|
|
:height 76
|
|
(box
|
|
:orientation "h" :space-evenly false :spacing 10
|
|
; :class "winlang-lang-true"
|
|
(label :xalign 0
|
|
:width 35
|
|
:text {language.name_abbr}
|
|
)
|
|
(box
|
|
:space-evenly false :orientation "v"
|
|
(label :xalign 0
|
|
:text {language.name}
|
|
)
|
|
(label :xalign 0
|
|
:text {language.name_method}
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(box
|
|
:space-evenly false :orientation "v"
|
|
:class "winwin-bottom"
|
|
:width 420
|
|
(box
|
|
:class "winwin-bottom-pad"
|
|
(button
|
|
:class "winlang-bottom-button"
|
|
:onclick "scripts/toggle-winlang.sh --close && gnome-control-center keyboard &"
|
|
(label :xalign 0
|
|
:class "winlang-text"
|
|
:style "padding: 0 5px;"
|
|
:text "More keyboard settings"
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwindow winlang
|
|
:wm-ignore true
|
|
:monitor 0
|
|
:focusable true
|
|
:geometry (geometry
|
|
:x "0px"
|
|
:y "50px"
|
|
:anchor "bottom right"
|
|
)
|
|
(winlang_widget)
|
|
) |