From ee4f05860cb02c695384b09bb37c212aca64d566 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 13 Jan 2024 11:38:48 +0800 Subject: [PATCH] feat: use fuzzel --- .config/fuzzel/fuzzel-dark.ini | 91 +++++++++++++++++++++++++++++++ .config/fuzzel/fuzzel-light.ini | 91 +++++++++++++++++++++++++++++++ .config/hypr/scripts/logout.sh | 2 +- .config/qt5ct/dark.conf | 2 +- .config/sway/conf.d/keybinds | 2 +- .config/sway/scripts/logout.sh | 4 +- .config/sway/scripts/themes.sh | 7 ++- .config/waybar/config | 6 +- .config/waybar/config.sway | 97 --------------------------------- .config/wofi/config | 1 + .zshrc | 29 +++++----- 11 files changed, 209 insertions(+), 123 deletions(-) create mode 100644 .config/fuzzel/fuzzel-dark.ini create mode 100644 .config/fuzzel/fuzzel-light.ini delete mode 100644 .config/waybar/config.sway diff --git a/.config/fuzzel/fuzzel-dark.ini b/.config/fuzzel/fuzzel-dark.ini new file mode 100644 index 0000000..bfd9ea4 --- /dev/null +++ b/.config/fuzzel/fuzzel-dark.ini @@ -0,0 +1,91 @@ +# output= +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= + +# lines=15 +width=18 +tabs=4 +horizontal-pad=24 +vertical-pad=16 +inner-pad=8 + +# image-size-ratio=0.5 + +# line-height= +# 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 diff --git a/.config/fuzzel/fuzzel-light.ini b/.config/fuzzel/fuzzel-light.ini new file mode 100644 index 0000000..75812fc --- /dev/null +++ b/.config/fuzzel/fuzzel-light.ini @@ -0,0 +1,91 @@ +# output= +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= + +# lines=15 +width=18 +tabs=4 +horizontal-pad=24 +vertical-pad=16 +inner-pad=8 + +# image-size-ratio=0.5 + +# line-height= +# 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 diff --git a/.config/hypr/scripts/logout.sh b/.config/hypr/scripts/logout.sh index 30c2a54..a8fceab 100755 --- a/.config/hypr/scripts/logout.sh +++ b/.config/hypr/scripts/logout.sh @@ -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 diff --git a/.config/qt5ct/dark.conf b/.config/qt5ct/dark.conf index 96a4673..9193460 100644 --- a/.config/qt5ct/dark.conf +++ b/.config/qt5ct/dark.conf @@ -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 diff --git a/.config/sway/conf.d/keybinds b/.config/sway/conf.d/keybinds index 997bc7f..0440279 100644 --- a/.config/sway/conf.d/keybinds +++ b/.config/sway/conf.d/keybinds @@ -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 diff --git a/.config/sway/scripts/logout.sh b/.config/sway/scripts/logout.sh index f2b3723..408a9a1 100755 --- a/.config/sway/scripts/logout.sh +++ b/.config/sway/scripts/logout.sh @@ -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 diff --git a/.config/sway/scripts/themes.sh b/.config/sway/scripts/themes.sh index f75f38c..714e7b4 100755 --- a/.config/sway/scripts/themes.sh +++ b/.config/sway/scripts/themes.sh @@ -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 diff --git a/.config/waybar/config b/.config/waybar/config index d54093f..656cf90 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -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" } } diff --git a/.config/waybar/config.sway b/.config/waybar/config.sway deleted file mode 100644 index d54093f..0000000 --- a/.config/waybar/config.sway +++ /dev/null @@ -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": "{:%Y %B}\n{calendar}" - }, - "custom/notification": { - "tooltip": true, - "format": "{icon}", - "format-icons": { - "notification": " 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" - } -} diff --git a/.config/wofi/config b/.config/wofi/config index 4c9ebea..4b5025d 100644 --- a/.config/wofi/config +++ b/.config/wofi/config @@ -2,6 +2,7 @@ style=/home/ryan/.config/wofi/dark.css width=600 height=500 +cache_file=/home/ryan/.cache/wofi # opts show=drun diff --git a/.zshrc b/.zshrc index db281ac..5e10bbc 100644 --- a/.zshrc +++ b/.zshrc @@ -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