diff --git a/editions/sway b/editions/sway index e759da9de944fc20dd34592b335e77aca8ca1b0b..1705f0e453e70c65657b46624862f11a06cd3010 100644 --- a/editions/sway +++ b/editions/sway @@ -148,6 +148,7 @@ gedit gedit-plugins gnome-disk-utility gnome-epub-thumbnailer +gnome-keyring gradience manjaro-settings-manager matray diff --git a/overlays/sway/etc/greetd/sway b/overlays/sway/etc/greetd/sway index a68023bc1bbaa05ed403ac7cd951758f49efed6d..d1390838c3bbb5fb49176ffeccf6f8b000e7aafc 100644 --- a/overlays/sway/etc/greetd/sway +++ b/overlays/sway/etc/greetd/sway @@ -4,6 +4,8 @@ include /etc/sway/definitions # include theme specific definitions include $theme/definitions +set $gtk-theme Matcha-dark-sea + # enable default input/output devices include /etc/sway/inputs/* include /etc/sway/outputs/* diff --git a/overlays/sway/etc/skel/.bashrc b/overlays/sway/etc/skel/.bashrc index 2ce072a124a5b47df393ed6e6742f10d2f4a46c8..5c41e936409d3c6590c1cb20e735adfaa421e1bc 100644 --- a/overlays/sway/etc/skel/.bashrc +++ b/overlays/sway/etc/skel/.bashrc @@ -16,7 +16,6 @@ export SILVER_ICONS=nerd source <(silver init) # source some shell plugins for fzf -source ~/.local/share/fzf-marks/fzf-marks.plugin.bash source ~/.local/share/fif/fif.plugin.sh source ~/.local/share/bash-fzf/bash-fzf.rc diff --git a/overlays/sway/etc/skel/.config/presets/user/matcha-dark-azul.json b/overlays/sway/etc/skel/.config/presets/user/matcha-dark-azul.json index 33d0788230a69d5374bc15e12264d49178dee158..855ab828256e8940501ec6c20a0800daf3d35fc4 100644 --- a/overlays/sway/etc/skel/.config/presets/user/matcha-dark-azul.json +++ b/overlays/sway/etc/skel/.config/presets/user/matcha-dark-azul.json @@ -18,7 +18,7 @@ "error_fg_color": "#eeeeee", "window_bg_color": "#141a1b", "window_fg_color": "#eeeeee", - "view_bg_color": "#222b2e", + "view_bg_color": "#1c1d25", "view_fg_color": "#eeeeee", "headerbar_bg_color": "#141a1b", "headerbar_fg_color": "#eeeeee", @@ -28,9 +28,9 @@ "card_bg_color": "#2f3a3e", "card_fg_color": "#eeeeee", "card_shade_color": "rgba(0, 0, 0, 0.36)", - "dialog_bg_color": "#222b2e", + "dialog_bg_color": "#1c1d25", "dialog_fg_color": "#eeeeee", - "popover_bg_color": "#222b2e", + "popover_bg_color": "#1c1d25", "popover_fg_color": "#eeeeee", "shade_color": "#141a1b", "scrollbar_outline_color": "rgba(0, 0, 0, 0.5)" diff --git a/overlays/sway/etc/skel/.config/sway/themes/scripts/04-link-theme-files b/overlays/sway/etc/skel/.config/sway/themes/scripts/04-link-theme-files index 44d1ec3b8611cb93978a0bad6e488d13771c7ca2..fb8aad6bf05d00db785e739c386159a250727f68 100644 --- a/overlays/sway/etc/skel/.config/sway/themes/scripts/04-link-theme-files +++ b/overlays/sway/etc/skel/.config/sway/themes/scripts/04-link-theme-files @@ -1,6 +1,6 @@ exec_always { 'mkdir -p $HOME/.config/waybar && ln -sf $theme/theme.css $HOME/.config/waybar/' 'mkdir -p $HOME/.config/wlogout && ln -sf $theme/theme.css $HOME/.config/wlogout/' - 'mkdir -p $HOME/.config/gtk-3.0' && 'ln -sf $theme/gtk.css $HOME/.config/gtk-3.0/' - 'mkdir -p $HOME/.config/gtk-4.0' && 'ln -sf $theme/gtk.css $HOME/.config/gtk-4.0/' + 'mkdir -p $HOME/.config/gtk-3.0 && ln -sf $theme/gtk.css $HOME/.config/gtk-3.0/' + 'mkdir -p $HOME/.config/gtk-4.0 && ln -sf $theme/gtk.css $HOME/.config/gtk-4.0/' } diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/LICENSE b/overlays/sway/etc/skel/.local/share/fzf-marks/LICENSE deleted file mode 100644 index 669b712d30cb2b186533df0fcb6fee7332b9b4ac..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Urbain Vaes - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/README.md b/overlays/sway/etc/skel/.local/share/fzf-marks/README.md deleted file mode 100644 index 1837fb0707d927f4b69c3556f3ade87e705de989..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# fzf-marks -This plugin can be used to create, delete, and navigate marks in *bash* and *zsh*. -It depends on Junegunn Choi's fuzzy-finder [fzf](https://github.com/junegunn/fzf). - - -(This video was generated with `screenkey -g $(slop -n -f '%g')` and `simplescreenrecorder`.) - -# Installation - -### Zsh - -If you use *zsh*, I recommend installing with a plugin manager. -In the case of [zgen](https://github.com/tarjoilija/zgen), for example, -simply add the following line to your plugin list: -```zsh -zgen load urbainvaes/fzf-marks -``` -### Fish - -If you use *fish*, then you can use [fisher](https://github.com/jorgebucaran/fisher): -```fish -fisher install urbainvaes/fzf-marks -``` - -### Bash - -If you use *bash*, -or if you use *zsh* without a plugin manager, -source the file `fzf-marks.plugin.bash` or `fzf-marks.plugin.zsh` from your shell startup file -to enable the plugin. - - -**Bash installation example**: -```bash -# Clone the git repository in the current directory -git clone https://github.com/urbainvaes/fzf-marks.git - -# Add a line to ~/.bashrc to load the plugin whenever bash starts in interactive mode -echo "source $PWD/fzf-marks/fzf-marks.plugin.bash" >> ~/.bashrc - -# Source the plugin now so we don't have to restart bash to start using it -source fzf-marks/fzf-marks.plugin.bash -``` - -**Enabling completion**: - -In `bash`, completion should be available automatically. -In `zsh`, completion needs to be enabled explicitly before sourcing the plugin. -This is usually done automatically by plugin managers, -but it can also be achieved manually with the following command in your `.zshrc`. -```zsh -autoload -Uz compinit && compinit -``` - -# Usage -The script exposes two functions: - -- **mark \<mark\>**, to register a new mark to the current directory; -- **fzm [\<optional-initial-query\>]**, to jump to or delete a mark using `fzf`. - -Most of the keybindings in the search window are the default fzf ones. -The only additions are - -- **ctrl-y**, to jump to a match; -- **ctrl-t**, to toggle a match for deletion; -- **ctrl-d**, to delete selected matches. - -By default, the plugin binds the key `ctrl-g` to `fzm`. - -# Customization - -| Config | Default | Description | -| ------ | ------- | ----------- | -| `FZF_MARKS_FILE` | `${HOME}/.fzf-marks` | File containing the marks data | -| `FZF_MARKS_COMMAND` | `fzf --height 40% --reverse` | Command used to call `fzf` | -| `FZF_MARKS_JUMP` | `\C-g` (*bash*) or `^g` (*zsh*) | Keybinding to `fzm` | -| `FZF_MARKS_COLOR_LHS` | 39 (default) | ANSI color code of left-hand side | -| `FZF_MARKS_COLOR_RHS` | 36 (cyan) | ANSI color code of right-hand side | -| `FZF_MARKS_COLOR_COLON` | 33 (yellow) | ANSI color code of separator | -| `FZF_MARKS_NO_COLORS` | 0 | Set this to 1 to disable colors | -| `FZF_MARKS_KEEP_ORDER` | 0 | Set this to 1 to keep order of marks | - -See e.g. [here](http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html) for a description of ANSI color codes. - -# FAQ - -**Question**: *Is it possible to limit the fzf search to the mark label, i.e. to exclude the path from the search?* - -Yes, this is possible by passing the options `-n` (for the field number to use for the search) and `-d` (for the delimiter) to `fzf`. -For example, -``` -FZF_MARKS_COMMAND="fzf --height 40% --reverse -n 1 -d ' : '" -``` - -# License - -MIT diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/conf.d/fzf-marks.plugin.fish b/overlays/sway/etc/skel/.local/share/fzf-marks/conf.d/fzf-marks.plugin.fish deleted file mode 100644 index 5b07ebccf8c17f6be37f5b5beeaf670db13d0fdb..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/conf.d/fzf-marks.plugin.fish +++ /dev/null @@ -1,165 +0,0 @@ -# MIT License - -# Copyright (c) 2019 Marcel Patzwahl, Urbain Vaes - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -command -v fzf > /dev/null 2>&1 or return - -if test -z "$FZF_MARKS_FILE" - set -g FZF_MARKS_FILE "$HOME/.fzf-marks" -end - -if test ! -f "$FZF_MARKS_FILE" - touch "$FZF_MARKS_FILE" -end - -if test -z "$FZF_MARKS_COMMAND" - set -l fzf_version (fzf --version | awk -F. '{ print $1 * 1e6 + $2 * 1e3 + $3 }') - set -l minimum_version 16001 - - if test $fzf_version -gt $minimum_version - set -g FZF_MARKS_COMMAND fzf --height 40% --reverse --header=\'ctrl-y:jump, ctrl-t:toggle, ctrl-d:delete\' - else if test $FZF_TMUX -eq 1 - set -l tmux_height $FZF_TMUX_HEIGHT - set -lq tmux_height[1]; or set tmux_height[1] 40 - set -g FZF_MARKS_COMMAND "fzf-tmux -d$tmux_height" - else - set -g FZF_MARKS_COMMAND "fzf" - end -end - -function mark - set -l mark_to_add "$argv : "(pwd) - - if grep -qxFe "$mark_to_add" "$FZF_MARKS_FILE" - echo "** The following mark already exists **" - else - echo "$mark_to_add" >> "$FZF_MARKS_FILE" - echo "** The following mark has been added **" - end - echo "$mark_to_add" | _color_marks -end - -function _handle_symlinks - if test -L $FZF_MARKS_FILE - set -l link (readlink "$FZF_MARKS_FILE") - switch $link - case '/*' - echo $link - case '*' - echo (dirname $FZF_MARKS_FILE)/$link - end - else - echo $FZF_MARKS_FILE - end -end - -function _color_marks - if test "$FZF_MARKS_NO_COLORS" = "1" - cat - else - set -l esc (printf '\033') - set -l c_lhs $FZF_MARKS_COLOR_LHS - set -lq c_lhs[1]; or set c_lhs[1] 39 - set -l c_rhs $FZF_MARKS_COLOR_RHS - set -lq c_rhs[1]; or set c_rhs[1] 36 - set -l c_colon $FZF_MARKS_COLOR_COLON - set -lq c_colon[1]; or set c_colon[1] 33 - sed "s/^\\(.*\\) : \\(.*\\)\$/"$esc"["$c_lhs"m\\1"$esc"[0m "$esc"["$c_colon"m:"$esc"[0m "$esc"["$c_rhs"m\\2"$esc"[0m/" - end -end - -function fzm - set -l marks_del $FZF_MARKS_DELETE - set -lq marks_del[1]; or set marks_del[1] "ctrl-d" - - set lines (_color_marks < $FZF_MARKS_FILE | eval $FZF_MARKS_COMMAND \ - --ansi \ - --expect="$marks_del" \ - --multi \ - --bind=ctrl-y:accept,ctrl-t:toggle \ - --query=$argv \ - --select-1 \ - --tac) - if test -z "$lines" - commandline -f repaint - return 1 - end - set -l key (echo "$lines" | head -1 | string split " ") - if test $marks_del = $key[1] - dmark "-->-->-->" (echo "$key[2..-1]") - else - jump "-->-->-->" (echo "$lines" | tail -1) - end -end - -function jump - if test $argv[1] = "-->-->-->" - set jumpline $argv[2] - else - set jumpline (_color_marks < $FZF_MARKS_FILE | $FZF_MARKS_COMMAND \ - --ansi \ - --bind=ctrl-y:accept \ - --query="$argv" \ - --select-1 \ - --tac) - end - if test -n $jumpline - set -l jumpdir (echo "$jumpline" | sed 's/.*: \(.*\)$/\1/' | sed "s#^~#$HOME#") - set -l bookmarks (_handle_symlinks) - cd $jumpdir - commandline -f repaint - end -end - -function dmark - if test $argv[1] = "-->-->-->" - set marks_to_delete $argv[2] - else - set marks_to_delete (_color_marks < $FZF_MARKS_FILE | $FZF_MARKS_COMMAND \ - -m \ - --ansi \ - --bind=ctrl-y:accept,ctrl-t:toggle \ - --query="$argv" \ - --tac) - end - set -l bookmarks (_handle_symlinks) - for line in $marks_to_delete - set -l line (string replace -a "/" "\/" $line) - perl -n -i -e "print unless /^\Q$line\E\$/" "$bookmarks" - end - if test (echo $marks_to_delete | wc -l) = 1 - echo "** The following mark has been deleted **" - echo "$marks_to_delete" | _color_marks - else - echo "** The following marks have been deleted **" - echo "$marks_to_delete" | _color_marks - end - commandline -f repaint -end - -set -q FZF_MARKS_JUMP; or set FZF_MARKS_JUMP \cg -bind -M insert $FZF_MARKS_JUMP fzm -bind $FZF_MARKS_JUMP fzm - -if test -n "$FZF_MARKS_DMARK" - bind -M insert "$FZF_MARKS_DMARK" dmark - bind "$FZF_MARKS_DMARK" dmark -end diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.bash b/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.bash deleted file mode 100644 index 622239184228af43920b18a94ae43c121caf2d4f..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.bash +++ /dev/null @@ -1,351 +0,0 @@ -# MIT License - -# Copyright (c) 2018 Urbain Vaes - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -command -v fzf >/dev/null 2>&1 || return - -if [[ -z ${FZF_MARKS_FILE-} ]] ; then - FZF_MARKS_FILE=${HOME}/.fzf-marks -fi - -if [[ ! -f ${FZF_MARKS_FILE} ]]; then - touch "${FZF_MARKS_FILE}" -fi - -if [[ -z ${FZF_MARKS_COMMAND-} ]] ; then - - _fzm_FZF_VERSION=$(fzf --version | awk -F. '{ print $1 * 1e6 + $2 * 1e3 + $3 }') - _fzm_MINIMUM_VERSION=16001 - - if [[ $_fzm_FZF_VERSION -gt $_fzm_MINIMUM_VERSION ]]; then - FZF_MARKS_COMMAND="fzf --height 40% --reverse" - elif [[ ${FZF_TMUX:-1} -eq 1 ]]; then - FZF_MARKS_COMMAND="fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" - else - FZF_MARKS_COMMAND="fzf" - fi -fi - -function _fzm_setup_completion { - complete -W "$(sed 's/\(.*\) : .*$/"\1"/' < "$FZF_MARKS_FILE")" fzm -} - -function mark { - local mark_to_add - mark_to_add="$* : $(pwd)" - - if grep -qxFe "${mark_to_add}" "${FZF_MARKS_FILE}"; then - echo "** The following mark already exists **" - else - printf '%s\n' "${mark_to_add}" >> "${FZF_MARKS_FILE}" - echo "** The following mark has been added **" - fi - _fzm_color_marks <<< $mark_to_add - _fzm_setup_completion -} - -function _fzm_handle_symlinks { - local fname link - if [ -L "${FZF_MARKS_FILE}" ]; then - link=$(readlink "${FZF_MARKS_FILE}") - case "$link" in - /*) fname="$link";; - *) fname="$(dirname "$FZF_MARKS_FILE")/$link";; - esac - else - fname=${FZF_MARKS_FILE} - fi - printf '%s\n' "${fname}" -} - -function _fzm_color_marks { - if [[ "${FZF_MARKS_NO_COLORS-}" == "1" ]]; then - cat - else - local esc c_lhs c_rhs c_colon - esc=$(printf '\033') - c_lhs=${FZF_MARKS_COLOR_LHS:-39} - c_rhs=${FZF_MARKS_COLOR_RHS:-36} - c_colon=${FZF_MARKS_COLOR_COLON:-33} - sed "s/^\\(.*\\) : \\(.*\\)$/${esc}[${c_lhs}m\\1${esc}[0m ${esc}[${c_colon}m:${esc}[0m ${esc}[${c_rhs}m\\2${esc}[0m/" - fi -} - -function fzm { - local delete_key=${FZF_MARKS_DELETE:-ctrl-d} paste_key=${FZF_MARKS_PASTE:-ctrl-v} - local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --expect='"$delete_key,$paste_key"' \ - --multi \ - --bind=ctrl-y:accept,ctrl-t:toggle \ - --header='"ctrl-y:jump, ctrl-t:toggle, $delete_key:delete, $paste_key:paste"' \ - --query='"$*"' \ - --select-1 \ - --tac) - if [[ -z "$lines" ]]; then - return 1 - fi - - local key=$(head -1 <<< "$lines") - - if [[ $key == "$delete_key" ]]; then - dmark "-->-->-->" "$(sed 1d <<< "$lines")" - elif [[ $key == "$paste_key" || ! -t 1 ]]; then - pmark "-->-->-->" "$(tail -1 <<< "$lines")" - else - jump "-->-->-->" "$(tail -1 <<< "${lines}")" - fi -} - -function jump { - local jumpline jumpdir bookmarks - if [[ $1 == "-->-->-->" ]]; then - jumpline=$2 - else - jumpline=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --bind=ctrl-y:accept --header='"ctrl-y:jump"' \ - --query='"$*"' --select-1 --tac) - fi - if [[ -n ${jumpline} ]]; then - jumpdir=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< $jumpline) - bookmarks=$(_fzm_handle_symlinks) - cd "${jumpdir}" || return - if ! [[ "${FZF_MARKS_KEEP_ORDER}" == 1 ]]; then - perl -n -i -e "print unless /^\\Q${jumpline//\//\\/}\\E\$/" "${bookmarks}" - printf '%s\n' "${jumpline}" >> "${FZF_MARKS_FILE}" - fi - fi -} - -function pmark { - local selected - if [[ $1 == "-->-->-->" ]]; then - selected=$2 - else - selected=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --bind=ctrl-y:accept --header='"ctrl-y:paste"' \ - --query='"$*"' --select-1 --tac) - fi - if [[ $selected ]]; then - selected=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< $selected) - local paste_command=${FZF_MARKS_PASTE_COMMAND:-"printf '%s\n'"} - eval -- "$paste_command \"\$selected\"" - fi -} - -function dmark { - local marks_to_delete line bookmarks - if [[ $1 == "-->-->-->" ]]; then - marks_to_delete=$2 - else - marks_to_delete=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - -m --ansi \ - --bind=ctrl-y:accept,ctrl-t:toggle --header='"ctrl-y:delete, ctrl-t:toggle"' \ - --query='"$*"' --tac) - fi - bookmarks=$(_fzm_handle_symlinks) - - if [[ -n ${marks_to_delete} ]]; then - while IFS='' read -r line; do - perl -n -i -e "print unless /^\\Q${line//\//\\/}\\E\$/" "${bookmarks}" - done <<< "$marks_to_delete" - - [[ $(wc -l <<< "${marks_to_delete}") == 1 ]] \ - && echo "** The following mark has been deleted **" \ - || echo "** The following marks have been deleted **" - _fzm_color_marks <<< $marks_to_delete - fi - _fzm_setup_completion -} - -if ((BASH_VERSINFO[0] >= 4)); then - # Widget for Bash 4.0+ - - # bashbug https://lists.gnu.org/archive/html/bug-bash/2018-04/msg00040.html - function _fzm_widget_has_readline_point_bug { - [[ BASH_VERSINFO[0] -lt 5 && ! $_ble_attached ]] - } - function _fzm_widget_has_readline_mark { - [[ BASH_VERSINFO[0] -ge 5 || $_ble_attached ]] - } - function _fzm_widget_insert { - local insert=$1 - - # Work around bashbug - if _fzm_widget_has_readline_point_bug; then - # Convert READLINE_POINT from bytes to characters - local old_lc_all=$LC_ALL old_lc_ctype=$LC_CTYPE - local LC_ALL= LC_CTYPE=C - local head=${READLINE_LINE::READLINE_POINT} - LC_ALL=$old_lc_all LC_CTYPE=$old_lc_ctype - READLINE_POINT=${#head} - fi - - READLINE_LINE=${READLINE_LINE::READLINE_POINT}$insert${READLINE_LINE:READLINE_POINT} - if _fzm_widget_has_readline_mark && ((READLINE_MARK > READLINE_POINT)); then - # Bash 5.0 has new variable READLINE_MARK - ((READLINE_MARK += ${#insert})) - fi - ((READLINE_POINT += ${#insert})) - - # Work around bashbug - if _fzm_widget_has_readline_point_bug; then - # Convert READLINE_POINT from characters to bytes - local head=${READLINE_LINE::READLINE_POINT} - local LC_ALL= LC_CTYPE=C - READLINE_POINT=${#head} - LC_ALL=$old_lc_all LC_CTYPE=$old_lc_ctype - fi - } 2>/dev/null # Suppress locale error messages - function _fzm_widget_stash_line { - _fzm_line=$READLINE_LINE - _fzm_point=$READLINE_POINT - READLINE_LINE= - READLINE_POINT=0 - if _fzm_widget_has_readline_mark; then - _fzm_mark=$READLINE_MARK - READLINE_MARK=0 - fi - } - function _fzm_widget_pop_line { - READLINE_LINE=$_fzm_line - READLINE_POINT=$_fzm_point - if _fzm_widget_has_readline_mark; then - READLINE_MARK=$_fzm_mark - fi - } - function _fzm-widget { - local pwd=$PWD - local FZF_MARKS_PASTE_COMMAND=_fzm_widget_insert - fzm - - if [[ $PWD != "$pwd" ]]; then - # Force the prompt update - _fzm_widget_stash_line - bind "\"$_fzm_key2\": \"\C-m$_fzm_key3\"" - bind -x "\"$_fzm_key3\": _fzm_widget_pop_line" - else - bind "\"$_fzm_key2\": \"\"" - fi - } - -else - # Widget for Bash 3.0-3.2 - function _fzm_widget_untranslate_keyseq { - local value=$1 - if [[ $value == *[\'\"$'\001'-$'\037']* ]]; then - local a b - a='\' b='\\' value=${value//$a/$b} - a='"' b='\"' value=${value//$a/$b} - a=$'\001' b='\C-q\001' value=${value//$a/$b} - a=$'\002' b='\C-q\002' value=${value//$a/$b} - a=$'\003' b='\C-q\003' value=${value//$a/$b} - a=$'\004' b='\C-q\004' value=${value//$a/$b} - a=$'\005' b='\C-q\005' value=${value//$a/$b} - a=$'\006' b='\C-q\006' value=${value//$a/$b} - a=$'\007' b='\C-q\007' value=${value//$a/$b} - a=$'\010' b='\C-q\010' value=${value//$a/$b} - a=$'\011' b='\C-q\011' value=${value//$a/$b} - a=$'\012' b='\C-q\012' value=${value//$a/$b} - a=$'\013' b='\C-q\013' value=${value//$a/$b} - a=$'\014' b='\C-q\014' value=${value//$a/$b} - a=$'\015' b='\C-q\015' value=${value//$a/$b} - a=$'\016' b='\C-q\016' value=${value//$a/$b} - a=$'\017' b='\C-q\017' value=${value//$a/$b} - a=$'\020' b='\C-q\020' value=${value//$a/$b} - a=$'\021' b='\C-q\021' value=${value//$a/$b} - a=$'\022' b='\C-q\022' value=${value//$a/$b} - a=$'\023' b='\C-q\023' value=${value//$a/$b} - a=$'\024' b='\C-q\024' value=${value//$a/$b} - a=$'\025' b='\C-q\025' value=${value//$a/$b} - a=$'\026' b='\C-q\026' value=${value//$a/$b} - a=$'\027' b='\C-q\027' value=${value//$a/$b} - a=$'\030' b='\C-q\030' value=${value//$a/$b} - a=$'\031' b='\C-q\031' value=${value//$a/$b} - a=$'\032' b='\C-q\032' value=${value//$a/$b} - a=$'\033' b='\C-q\033' value=${value//$a/$b} - a=$'\034' b='\C-q\034' value=${value//$a/$b} - a=$'\035' b='\C-q\035' value=${value//$a/$b} - a=$'\036' b='\C-q\036' value=${value//$a/$b} - a=$'\037' b='\C-q\037' value=${value//$a/$b} - fi - _fzm_keyseq=$value - } - function _fzm-widget { - local pwd=$PWD - local FZF_MARKS_PASTE_COMMAND=_fzm_widget_untranslate_keyseq _fzm_keyseq= - fzm - - if [[ $PWD != "$pwd" ]]; then - # Force the prompt update - _fzm_keyseq=' \C-b\C-k \C-u\C-m\C-y\C-?\e \C-y\ey\C-x\C-x\C-d'$_fzm_keyseq - fi - bind "\"$_fzm_key2\": \"$_fzm_keyseq\"" - } -fi - -# Widget for ble.sh -function ble/widget/fzm { - ble/widget/.hide-current-line - ble/util/buffer.flush >&2 - - local pwd=$PWD - local FZF_MARKS_PASTE_COMMAND=ble/widget/insert-string - fzm - - # Force the prompt update - [[ $PWD != "$pwd" ]] && ble/prompt/clear -} - -function _fzm_setup_bindings { - local jump_key=${FZF_MARKS_JUMP:-'\C-g'} - if ((${_ble_version:-0} >= 400)); then - ble-bind -f keyseq:"$jump_key" 'fzm' - else - # Intiialize special keys used for key bindings - _fzm_key1='\200' - _fzm_key2='\201' - _fzm_key3='\202' - local locale=${LC_ALL:-${LC_CTYPE:-$LANG}} - local rex_utf8='\.([uU][tT][fF]-?8)$' - if [[ $locale =~ $rex_utf8 ]]; then - # Change keys for UTF-8 encodings: - # Two-byte sequence does not work for Bash 3 and 4. - # \xC0-\xC1 and \xF5-\xFF are unused bytes in UTF-8. - # Bash 4 unintendedly exits with \xFE-\xFF. - _fzm_key1='\xC0' - _fzm_key2='\xC1' - _fzm_key3='\xFD' - fi - - bind -x "\"$_fzm_key1\": _fzm-widget" - bind "\"$jump_key\":\"$_fzm_key1$_fzm_key2\"" - fi - - if [[ ${FZF_MARKS_DMARK-} ]]; then - bind -x "\"${FZF_MARKS_DMARK}\": dmark" - fi -} - -_fzm_setup_bindings -_fzm_setup_completion diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.zsh b/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.zsh deleted file mode 100644 index 778e99653baa2e828b587b205826de51ea0833ff..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/fzf-marks.plugin.zsh +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright (c) 2018 Urbain Vaes - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -command -v fzf >/dev/null 2>&1 || return - -if [[ -z "${FZF_MARKS_FILE-}" ]] ; then - FZF_MARKS_FILE="${HOME}/.fzf-marks" -fi - -if [[ ! -f "${FZF_MARKS_FILE}" ]]; then - touch "${FZF_MARKS_FILE}" -fi - -if [[ -z "${FZF_MARKS_COMMAND-}" ]] ; then - - _fzm_FZF_VERSION=$(fzf --version | awk -F. '{ print $1 * 1e6 + $2 * 1e3 + $3 }') - _fzm_MINIMUM_VERSION=16001 - - if [[ $_fzm_FZF_VERSION -gt $_fzm_MINIMUM_VERSION ]]; then - FZF_MARKS_COMMAND="fzf --height 40% --reverse" - elif [[ ${FZF_TMUX:-1} -eq 1 ]]; then - FZF_MARKS_COMMAND="fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" - else - FZF_MARKS_COMMAND="fzf" - fi -fi - -function mark { - local mark_to_add - mark_to_add="$* : $(pwd)" - - if grep -qxFe "${mark_to_add}" "${FZF_MARKS_FILE}"; then - echo "** The following mark already exists **" - else - printf '%s\n' "${mark_to_add}" >> "${FZF_MARKS_FILE}" - echo "** The following mark has been added **" - fi - _fzm_color_marks <<< "${mark_to_add}" -} - -function _fzm_handle_symlinks { - local fname link - if [ -L "${FZF_MARKS_FILE}" ]; then - link=$(readlink "${FZF_MARKS_FILE}") - case "$link" in - /*) fname="$link";; - *) fname="$(dirname "$FZF_MARKS_FILE")/$link";; - esac - else - fname=${FZF_MARKS_FILE} - fi - printf '%s\n' "${fname}" -} - -# Ensure precmds are run after cd -function redraw-prompt { - local precmd - for precmd in $precmd_functions; do - $precmd - done - zle reset-prompt -} -zle -N redraw-prompt - -function _fzm_color_marks { - if [[ "${FZF_MARKS_NO_COLORS-}" == "1" ]]; then - cat - else - local esc c_lhs c_rhs c_colon - esc=$(printf '\033') - c_lhs=${FZF_MARKS_COLOR_LHS:-39} - c_rhs=${FZF_MARKS_COLOR_RHS:-36} - c_colon=${FZF_MARKS_COLOR_COLON:-33} - sed "s/^\\(.*\\) : \\(.*\\)$/${esc}[${c_lhs}m\\1${esc}[0m ${esc}[${c_colon}m:${esc}[0m ${esc}[${c_rhs}m\\2${esc}[0m/" - fi -} - -function _fzm_paste_command { - local directory="$1" - LBUFFER="${LBUFFER}$directory" - zle reset-prompt > /dev/null 2>&1 -} - -function fzm { - local delete_key=${FZF_MARKS_DELETE:-ctrl-d} paste_key=${FZF_MARKS_PASTE:-ctrl-v} - local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --expect='"$delete_key,$paste_key"' \ - --multi \ - --bind=ctrl-y:accept,ctrl-t:toggle \ - --header='"ctrl-y:jump, ctrl-t:toggle, ${delete_key}:delete, ${paste_key}:paste"' \ - --query='"$*"' \ - --select-1 \ - --tac) - if [[ -z "$lines" ]]; then - zle && zle redraw-prompt - return 1 - fi - - local key=$(head -1 <<< "$lines") - - if [[ $key == "$delete_key" ]]; then - dmark "-->-->-->" "$(sed 1d <<< "$lines")" - elif [[ $key == "$paste_key" || ! -t 1 ]]; then - zle && local FZF_MARKS_PASTE_COMMAND=_fzm_paste_command - pmark "-->-->-->" "$(tail -1 <<< "$lines")" - else - jump "-->-->-->" "$(tail -1 <<< "${lines}")" - fi -} - -function jump { - local jumpline jumpdir bookmarks - if [[ $1 == "-->-->-->" ]]; then - jumpline=$2 - else - jumpline=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --bind=ctrl-y:accept --header='"ctrl-y:jump"' \ - --query='"$*"' --select-1 --tac) - fi - if [[ -n ${jumpline} ]]; then - jumpdir=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< "$jumpline") - bookmarks=$(_fzm_handle_symlinks) - cd "${jumpdir}" || return - if ! [[ "${FZF_MARKS_KEEP_ORDER}" == 1 ]]; then - perl -n -i -e "print unless /^\\Q${jumpline//\//\\/}\\E\$/" "${bookmarks}" - printf '%s\n' "${jumpline}" >> "${FZF_MARKS_FILE}" - fi - fi - zle && zle redraw-prompt -} - -function pmark { - local selected - if [[ $1 == "-->-->-->" ]]; then - selected=$2 - else - selected=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - --ansi \ - --bind=ctrl-y:accept --header='"ctrl-y:paste"' \ - --query='"$*"' --select-1 --tac) - fi - if [[ $selected ]]; then - selected=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< "$selected") - local paste_command=${FZF_MARKS_PASTE_COMMAND:-"printf '%s\n'"} - eval -- "$paste_command \"\$selected\"" - fi -} - -function dmark { - local marks_to_delete line bookmarks - if [[ $1 == "-->-->-->" ]]; then - marks_to_delete=$2 - else - marks_to_delete=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ - -m --ansi \ - --bind=ctrl-y:accept,ctrl-t:toggle --header='"ctrl-y:delete, ctrl-t:toggle"' \ - --query='"$*"' --tac) - fi - bookmarks=$(_fzm_handle_symlinks) - - if [[ -n ${marks_to_delete} ]]; then - while IFS='' read -r line; do - perl -n -i -e "print unless /^\\Q${line//\//\\/}\\E\$/" "${bookmarks}" - done <<< "$marks_to_delete" - - [[ $(wc -l <<< "${marks_to_delete}") == 1 ]] \ - && echo "** The following mark has been deleted **" \ - || echo "** The following marks have been deleted **" - _fzm_color_marks <<< "${marks_to_delete}" - fi - zle && zle reset-prompt -} - -zle -N dmark -zle -N fzm - -bindkey ${FZF_MARKS_JUMP:-'^g'} fzm -if [ "${FZF_MARKS_DMARK-}" ]; then - bindkey ${FZF_MARKS_DMARK} dmark -fi - -command -v compdef >/dev/null 2>&1 || return -# Completion: for documentation, see e.g. -# https://mads-hartmann.com/2017/08/06/writing-zsh-completion-scripts.html -# https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#user-content-actions -function _fzm { - _arguments -C \ - "1: :(($(sed "s/\\(.*\\) : \\(.*\\)/'\1'\\\\:'\2'/" < ~/.fzf-marks)))" \ -} - -compdef _fzm fzm diff --git a/overlays/sway/etc/skel/.local/share/fzf-marks/init.zsh b/overlays/sway/etc/skel/.local/share/fzf-marks/init.zsh deleted file mode 120000 index 923fa653589743d1e13b4db3c712be0227cb81b6..0000000000000000000000000000000000000000 --- a/overlays/sway/etc/skel/.local/share/fzf-marks/init.zsh +++ /dev/null @@ -1 +0,0 @@ -fzf-marks.plugin.zsh \ No newline at end of file diff --git a/overlays/sway/etc/sway/themes/matcha-blue/gtk.css b/overlays/sway/etc/sway/themes/matcha-blue/gtk.css index 197da8dc9eecb486841b9cc001edcca4b9873ca7..0fcd4c498e13a59a31cc2365d3c72cc76b1b59c2 100644 --- a/overlays/sway/etc/sway/themes/matcha-blue/gtk.css +++ b/overlays/sway/etc/sway/themes/matcha-blue/gtk.css @@ -15,7 +15,7 @@ @define-color error_fg_color #eeeeee; @define-color window_bg_color #14161b; @define-color window_fg_color #eeeeee; -@define-color view_bg_color #222b2e; +@define-color view_bg_color #1c1d25; @define-color view_fg_color #eeeeee; @define-color headerbar_bg_color #14161b; @define-color headerbar_fg_color #eeeeee; @@ -25,9 +25,9 @@ @define-color card_bg_color #2f3a3e; @define-color card_fg_color #eeeeee; @define-color card_shade_color rgba(0, 0, 0, 0.36); -@define-color dialog_bg_color #222b2e; +@define-color dialog_bg_color #1c1d25; @define-color dialog_fg_color #eeeeee; -@define-color popover_bg_color #222b2e; +@define-color popover_bg_color #1c1d25; @define-color popover_fg_color #eeeeee; @define-color shade_color #14161b; @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5);