Merge pull request 'Yet another chance for wayland.' (#3) from wayland into master

Reviewed-on: #3
This commit is contained in:
ftpd 2023-07-29 16:06:27 +02:00
commit e8f8cc4aca
15 changed files with 40 additions and 15 deletions

View File

@ -1,7 +1,7 @@
alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease' alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease'
alias gae='git add .; git commit --amend; git push --force-with-lease' alias gae='git add .; git commit --amend; git push --force-with-lease'
alias less='less -R' alias less='less -R'
alias startx='xinit ~/.config/xinitrc -- /etc/X11/xinit/xserverrc :0 -ardelay 280 -arinterval 30' alias qt="dbus-launch --sh-syntax --exit-with-session qtile start -b wayland"
if [[ $(command -v bat) ]]; then if [[ $(command -v bat) ]]; then
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright' alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'

View File

@ -31,4 +31,10 @@ foreground=c7c7c7
urls=005577 urls=005577
[key-bindings] [key-bindings]
search-start=Control+f
show-urls-launch=Control+o show-urls-launch=Control+o
[search-bindings]
commit=y
find-prev=Control+p
find-next=Control+n

View File

@ -3,6 +3,16 @@ import subprocess
from libqtile import bar, extension, hook, layout, widget from libqtile import bar, extension, hook, layout, widget
from libqtile.lazy import lazy from libqtile.lazy import lazy
from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen
from libqtile.backend.wayland import InputConfig
os.environ["MOZ_ENABLE_WAYLAND"] = "1"
os.environ["MOZ_DBUS_REMOTE"] = "1"
wl_input_rules = {
"type:pointer": InputConfig(natural_scroll=True),
"type:touchpad": InputConfig(tap=True,natural_scroll=True),
"type:keyboard": InputConfig(kb_layout="pl",kb_repeat_delay=280,kb_repeat_rate=30),
}
@hook.subscribe.startup_once @hook.subscribe.startup_once
def autostart(): def autostart():
@ -13,7 +23,7 @@ mod = "mod4"
groups = [ groups = [
Group("1", label="\uf292"), Group("1", label="\uf292"),
Group("2", label="\uf738", matches=[Match(wm_class=["firefox"])]), Group("2", label="\uf738", matches=[Match(wm_class=["firefox"])]),
Group("3", label="\uf70d", matches=[Match(wm_class=["Ferdium", "discord", "Signal"])]), Group("3", label="\uf70d", matches=[Match(wm_class=["ferdium", "discord", "Signal"])]),
Group("4", label="\uf7aa", matches=[Match(wm_class=["mutt"])]), Group("4", label="\uf7aa", matches=[Match(wm_class=["mutt"])]),
Group("5", label="\uf120"), Group("5", label="\uf120"),
Group("6", label="\uf120"), Group("6", label="\uf120"),
@ -45,14 +55,14 @@ keys = [
Key([mod, "shift"], "k", lazy.layout.grow_up()), Key([mod, "shift"], "k", lazy.layout.grow_up()),
Key([mod, "shift", "control"], "0", lazy.layout.normalize()), Key([mod, "shift", "control"], "0", lazy.layout.normalize()),
# app binds # app binds
Key([mod], "Return", lazy.spawn("sh -c 'BROWSER=firefox st'")), Key([mod], "Return", lazy.spawn("footclient")),
Key([mod], "space", lazy.spawncmd()), Key([mod], "space", lazy.spawncmd()),
Key([mod], "a", lazy.spawn("authenticator")), Key([mod], "a", lazy.spawn("authenticator")),
Key([mod], "e", lazy.spawn("selector-chars")), Key([mod], "e", lazy.spawn("selector-chars")),
Key([mod], "i", lazy.spawn("scrot -f -s 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'")), Key([mod], "i", lazy.spawn("sh -c 'grim -g \"$(slurp)\"'")),
Key([mod], "m", lazy.spawn("sh -c 'pgrep -x neomutt > /dev/null || BROWSER=firefox st -n mutt -e neomutt'")), Key([mod], "m", lazy.spawn("sh -c 'pgrep -x neomutt > /dev/null || footclient -a mutt -o bold-text-in-bright=yes neomutt'")),
Key([mod, "shift"], "i", lazy.spawn("scrot -f 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'")), Key([mod, "shift"], "i", lazy.spawn("grim")),
Key([mod, "shift"], "Return", lazy.spawn("sh -c 'terminal_profile=work BROWSER=workfx st'")), Key([mod, "shift"], "Return", lazy.spawn("sh -c 'terminal_profile=work foot -o url.launch=workfx\ \${url}'")),
Key([mod, "control"], "a", lazy.spawn("selector-audio")), Key([mod, "control"], "a", lazy.spawn("selector-audio")),
Key([mod, "control"], "b", lazy.spawn("selector-bluetooth")), Key([mod, "control"], "b", lazy.spawn("selector-bluetooth")),
# WM control # WM control
@ -165,7 +175,9 @@ screens = [
widget.Clock( widget.Clock(
format='[%d] %H:%M:%S', format='[%d] %H:%M:%S',
), ),
widget.Systray(), widget.StatusNotifier(
icon_size=18,
),
], ],
24, 24,
margin=[5, 5, 0, 5] margin=[5, 5, 0, 5]
@ -184,6 +196,13 @@ mouse = [
floating_layout = layout.Floating( floating_layout = layout.Floating(
float_rules=[ float_rules=[
*layout.Floating.default_float_rules, *layout.Floating.default_float_rules,
Match(title="File Upload"),
Match(title="Open File"),
Match(title="Open file"),
Match(title="Open Files"),
Match(title="Firefox — Sharing Indicator"),
Match(title="Enter name of file to save to…"),
Match(title="Save Image"),
], ],
border_focus='#005577', border_focus='#005577',
border_normal="#272822", border_normal="#272822",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -3,7 +3,7 @@
div="---" div="---"
set_output() { set_output() {
sel_sink=$(printf "$sinks\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select output device") sel_sink=$(printf "$sinks\\n$div\\nback\\n$div\\nexit" | wofi -G -dmenu -i -p "select output device")
case "$sel_sink" in case "$sel_sink" in
back) show_current ;; back) show_current ;;
exit) exit ;; exit) exit ;;
@ -14,7 +14,7 @@ set_output() {
} }
set_input() { set_input() {
sel_source=$(printf "$sources\\n$div\\nbluetooth profile\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select input device") sel_source=$(printf "$sources\\n$div\\nbluetooth profile\\n$div\\nback\\n$div\\nexit" | wofi -G -dmenu -i -p "select input device")
case "$sel_source" in case "$sel_source" in
back) show_current ;; back) show_current ;;
exit) exit ;; exit) exit ;;
@ -29,7 +29,7 @@ set_bt_profile() {
bt_sink=$(pactl list cards | awk -F'"' '/device.name.*bluez/ {print $2}') bt_sink=$(pactl list cards | awk -F'"' '/device.name.*bluez/ {print $2}')
[ -z "${bt_sink}" ] && [ -z "${bt_sink}" ] &&
{ notify-send -t 2000 -u critical "ﳌ no headphones connected"; exit; } { notify-send -t 2000 -u critical "ﳌ no headphones connected"; exit; }
profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | dmenu -l 20 -c -i -p "select bluettoth profile") profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | wofi -G -dmenu -i -p "select bluettoth profile")
case "$profile_chosen" in case "$profile_chosen" in
back) show_current ;; back) show_current ;;
exit) exit ;; exit) exit ;;
@ -44,7 +44,7 @@ set_bt_profile() {
show_current() { show_current() {
def_snk=$(pactl list | grep -A 1 "Name: $(pactl get-default-sink)\$" | awk -F': ' '/Description: / {print $2}') def_snk=$(pactl list | grep -A 1 "Name: $(pactl get-default-sink)\$" | awk -F': ' '/Description: / {print $2}')
def_src=$(pactl list | grep -A 1 "Name: $(pactl get-default-source)\$" | awk -F': ' '/Description: / {print $2}') def_src=$(pactl list | grep -A 1 "Name: $(pactl get-default-source)\$" | awk -F': ' '/Description: / {print $2}')
chosen=$(printf "output: $def_snk\\ninput: $def_src" | dmenu -l 20 -c -i -p "current audio devices") chosen=$(printf "output: $def_snk\\ninput: $def_src" | wofi -G -dmenu -i -p "current audio devices")
if [ "$1" = "no_switch" ]; then if [ "$1" = "no_switch" ]; then
case "$chosen" in case "$chosen" in
*) notify-send -t 2000 -u critical "婢 no device to switch" ;; *) notify-send -t 2000 -u critical "婢 no device to switch" ;;

View File

@ -287,7 +287,7 @@ show_menu() {
} }
# command to pipe into, can add any options here # command to pipe into, can add any options here
rofi_command="dmenu -l 10 -c -i -p" rofi_command="wofi -G -dmenu -i -p"
case "$1" in case "$1" in
--status) --status)

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
chosen=$(cut -d ';' -f1 $XDG_CONFIG_HOME/qtile/chars/* | dmenu -l 20 -i -p "select character to copy" | sed "s/ .*//") chosen=$(cut -d ';' -f1 $XDG_CONFIG_HOME/qtile/chars/* | wofi -G -dmenu -i -p "select character to copy" | sed "s/ .*//")
[ -z "$chosen" ] && exit [ -z "$chosen" ] && exit
if [ -n "$1" ]; then if [ -n "$1" ]; then
xdotool type "$chosen" xdotool type "$chosen"
else else
printf "$chosen" | xclip -rmlastnl printf "$chosen" | wl-copy -n
notify-send -t 2000 "'$chosen' copied to clipboard" & notify-send -t 2000 "'$chosen' copied to clipboard" &
fi fi