feat: use fuzzel

This commit is contained in:
Ryan 2024-01-13 11:38:48 +08:00
parent e7bc1ebc33
commit ee4f05860c
11 changed files with 209 additions and 123 deletions

View File

@ -0,0 +1,91 @@
# output=<not set>
font=sans:size=14
dpi-aware=yes
prompt="> "
# icon-theme=hicolor
# icons-enabled=yes
fields=name
# password-character=*
filter-desktop=yes
# fuzzy=yes
show-actions=true
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
# launch-prefix=<not set>
# lines=15
width=18
tabs=4
horizontal-pad=24
vertical-pad=16
inner-pad=8
# image-size-ratio=0.5
# line-height=<use font metrics>
# letter-spacing=0
layer = overlay
# exit-on-keyboard-focus-loss = yes
[colors]
background=282828ff
text=665c54ff
match=bdae93ff
selection=3c3836ff
selection-text=ebdbb2ff
selection-match=ebdbb2ff
border=bdae93ff
[border]
# width=1
radius=4
[dmenu]
# mode=text # text|index
# exit-immediately-if-empty=no
[key-bindings]
# cancel=Escape Control+g
# execute=Return KP_Enter Control+y
# execute-or-next=Tab
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w
# delete-next=Delete KP_Delete Control+d
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
# delete-line=Control+k
# prev=Up Control+p
# prev-with-wrap=ISO_Left_Tab
# prev-page=Page_Up KP_Page_Up
# next=Down Control+n
# next-with-wrap=none
# next-page=Page_Down KP_Page_Down
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
# with 12, and so on.
# custom-1=Mod1+1
# custom-2=Mod1+2
# custom-3=Mod1+3
# custom-4=Mod1+4
# custom-5=Mod1+5
# custom-6=Mod1+6
# custom-7=Mod1+7
# custom-8=Mod1+8
# custom-9=Mod1+9
# custom-10=Mod1+0
# custom-11=Mod1+exclam
# custom-12=Mod1+at
# custom-13=Mod1+numbersign
# custom-14=Mod1+dollar
# custom-15=Mod1+percent
# custom-16=Mod1+dead_circumflex
# custom-17=Mod1+ampersand
# custom-18=Mod1+asterix
# custom-19=Mod1+parentleft

View File

@ -0,0 +1,91 @@
# output=<not set>
font=sans:size=14
dpi-aware=yes
prompt="> "
# icon-theme=hicolor
# icons-enabled=yes
fields=name
# password-character=*
filter-desktop=yes
# fuzzy=yes
show-actions=true
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
# launch-prefix=<not set>
# lines=15
width=18
tabs=4
horizontal-pad=24
vertical-pad=16
inner-pad=8
# image-size-ratio=0.5
# line-height=<use font metrics>
# letter-spacing=0
layer = overlay
# exit-on-keyboard-focus-loss = yes
[colors]
background=fbf1c7ff
text=928374ff
match=665c54ff
selection=bdae93ff
selection-text=654735ff
selection-match=654735ff
border=928374ff
[border]
# width=1
radius=4
[dmenu]
# mode=text # text|index
# exit-immediately-if-empty=no
[key-bindings]
# cancel=Escape Control+g
# execute=Return KP_Enter Control+y
# execute-or-next=Tab
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w
# delete-next=Delete KP_Delete Control+d
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
# delete-line=Control+k
# prev=Up Control+p
# prev-with-wrap=ISO_Left_Tab
# prev-page=Page_Up KP_Page_Up
# next=Down Control+n
# next-with-wrap=none
# next-page=Page_Down KP_Page_Down
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
# with 12, and so on.
# custom-1=Mod1+1
# custom-2=Mod1+2
# custom-3=Mod1+3
# custom-4=Mod1+4
# custom-5=Mod1+5
# custom-6=Mod1+6
# custom-7=Mod1+7
# custom-8=Mod1+8
# custom-9=Mod1+9
# custom-10=Mod1+0
# custom-11=Mod1+exclam
# custom-12=Mod1+at
# custom-13=Mod1+numbersign
# custom-14=Mod1+dollar
# custom-15=Mod1+percent
# custom-16=Mod1+dead_circumflex
# custom-17=Mod1+ampersand
# custom-18=Mod1+asterix
# custom-19=Mod1+parentleft

View File

@ -8,7 +8,7 @@ if [[ ! $(which swayidle 2> /dev/null) ]]; then
exit 1
fi
choice=$(echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt "󰚥 Choose power option" -Oalphabetical)
choice=$(echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | fuzzel -d --prompt "󰚥: ")
if test "$choice" = lock ; then

View File

@ -1,7 +1,7 @@
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=Adwaita
icon_theme=HighContrast
standard_dialogs=gtk3
style=Adwaita-Dark

View File

@ -6,7 +6,7 @@ set $down j
set $up k
set $right l
set $term kitty -1
set $menu wofi
set $menu fuzzel
# my keybinds

View File

@ -9,13 +9,13 @@ if [[ ! $(which swayidle 2> /dev/null) ]]; then
fi
choices=("suspend" "shutdown" "poweroff" "reboot" "lock")
choice=$(printf "%s\n" "${choices[@]}" | wofi -d --prompt "󰚥 Choose power option" -Oalphabetical )
choice=$(printf "%s\n" "${choices[@]}" | fuzzel -d --prompt "󰚥: ")
if test "$choice" = lock ; then
# sleep less when power on
if acpi -a | grep -q on; then
sleep_time=3600000
sleep_time=3600
else
sleep_time=10
fi

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scheme=$(echo -e "light\ndark" | wofi -d -p "󰔎 Select color scheme")
scheme=$(echo -e "light\ndark" | fuzzel -d -p "󰔎 : ")
# simply subsitude dark and light
if [ $scheme = "light" ]; then
@ -14,7 +14,6 @@ sed -i $command ~/.config/kitty/kitty.conf
sed -i $command ~/.config/sway/conf.d/theme
sed -i $command ~/.config/swaync/style.css
sed -i $command ~/.config/waybar/style.css
sed -i $command ~/.config/wofi/config
swaync-client -rs &
@ -22,6 +21,8 @@ swaync-client -rs &
if [ $scheme = "light" ]; then
# kitty config
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/light.conf" &
# fuzzel
cp ~/.config/fuzzel/fuzzel-light.ini ~/.config/fuzzel/fuzzel.ini
# zathura
cp ~/.config/zathura/zathurarc.light ~/.config/zathura/zathurarc
# qt5ct and qt6ct
@ -36,6 +37,8 @@ else
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/dark.conf" &
# zathura
cp ~/.config/zathura/zathurarc.dark ~/.config/zathura/zathurarc
# fuzzel
cp ~/.config/fuzzel/fuzzel-dark.ini ~/.config/fuzzel/fuzzel.ini
# qt5ct and qt6ct
cp ~/.config/qt5ct/dark.conf ~/.config/qt5ct/qt5ct.conf
cp ~/.config/qt6ct/dark.conf ~/.config/qt6ct/qt6ct.conf

View File

@ -54,7 +54,7 @@
"critical": 5
},
"format": "{icon} {capacity}%",
"format-charging": "🗲 {capacity}%",
"format-charging": "󰉁 {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} ETA: {time}",
"format-icons": [
@ -90,8 +90,6 @@
"return-type": "json",
"exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"class\": \"{{status}}\"}' -F",
"max-length": 35,
"on-click-middle": "playerctl play-pause",
"on-click-right": "plaerctl next",
"on-click-left": "playerctl previous"
"on-click": "playerctl play-pause"
}
}

View File

@ -1,97 +0,0 @@
{
"layer": "top",
"modules-left": [
"sway/workspaces"
],
"fixed-center": false,
"modules-center": [
"sway/window"
],
"modules-right": [
"tray",
"custom/notification",
"custom/player",
"cpu",
"memory",
"network",
"battery",
"clock"
],
"sway/workspaces": {
"show_special": true,
"on-click": "activate",
"persistent_workspaces": {
"9": ["HDMI-A-1"]
}
},
"sway/window": {
"max-length": 50,
"separate-outputs": true
},
"tray": {
"spacing": 10
},
"cpu": {
"format": " {load}",
"format-alt": " {usage}% @ {avg_frequency}GHz"
},
"memory": {
"format": "󰍛 {used:0.1f}G / {total:0.1f}G",
"format-alt": "󰓡 Swap: {swapUsed:0.1f}G / {swapTotal:0.1f}G"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "󰈀 {ifname}",
"format-linked": " {ifname}",
"format-disconnected": "󰌙 Disconnected",
"format-alt": "󰩟 {ifname}: {ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}"
},
"battery": {
"states": {
"good": 75,
"warning": 15,
"critical": 5
},
"format": "{icon} {capacity}%",
"format-charging": "🗲 {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} ETA: {time}",
"format-icons": [
"",
"",
"",
"",
""
]
},
"clock": {
"format": "{:󰅐 %H:%M\t %m-%d}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"custom/notification": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": " <span foreground='red'><sup></sup></span> New notifications",
"none": " No notifications",
"dnd-notification": " DND on",
"dnd-none": " DND on"
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"custom/player": {
"format": "󰎈 {}",
"return-type": "json",
"exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"class\": \"{{status}}\"}' -F",
"max-length": 35,
"on-click-middle": "playerctl play-pause",
"on-click-right": "plaerctl next",
"on-click-left": "playerctl previous"
}
}

View File

@ -2,6 +2,7 @@
style=/home/ryan/.config/wofi/dark.css
width=600
height=500
cache_file=/home/ryan/.cache/wofi
# opts
show=drun

29
.zshrc
View File

@ -113,29 +113,28 @@ bindkey '' history-substring-search-down
bindkey ' ' magic-space
#config location
export GOPATH=$HOME/.cache/go
# config & cache location
export CARGO_HOME=$HOME/.cache/cargo
export GOPATH=$HOME/.cache/go
export LESSHISTFILE=/dev/null
export LYNX_CFG=$HOME/.config/lynx/lynxrc
export XDG_CACHE_HOME=$HOME/.cache
export XDG_CONFIG_HOME=$HOME/.config
export ZSHZ_DATA=$HOME/.cache/z
#settings for software
# settings for software
export BAT_THEME="base16"
export FZF_DEFAULT_OPTS="--reverse --cycle --height=40% --border sharp --prompt=🔎"
export GPG_TTY=$(tty) # fixes gpg
export HISTORY_SUBSTRING_SEARCH_FUZZY=1
export MANWIDTH=${MANWIDTH:-78}
export MANROFFOPT="-c"
export BAT_THEME="base16"
#local path
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.scripts:${HOME}/cargo/bin:${HOME}/.cache/go/bin:${HOME}/.local/share/nvim/mason/bin"
export MANPATH="${MANPATH}:${HOME}/.local/share/man"
#ccache support
export USE_CCACHE=1
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
# ssh-agent
export MANWIDTH=${MANWIDTH:-78}
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
# local path
export MANPATH="${MANPATH}:${HOME}/.local/share/man"
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.scripts:${HOME}/cargo/bin:${HOME}/.cache/go/bin:${HOME}/.local/share/nvim/mason/bin"
# ccache support
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
export USE_CCACHE=1