From 6fabac6cd8df5b211646569264f346a36de17e4d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 16 Jan 2022 15:18:07 +0100 Subject: [PATCH] kitty: Switch to kitty terminal emulator Finally made the switch from alacritty to kitty. I have been thinking about this for a while. Both, fundamentally, serve my purposes just fine. Both are fast, customizable, gpu accelerated, and so on. Kitty feels a little faster on the input, but this should not provide major differences. One big difference, however, is now very apparent and I can feel it: Alacritty, on wayland, does not support any picture preview. It does not support sixel, and things like w3mimg or ueberzug are based on and require X11 to run. Kitty brings its own graphics display library and it seems both pretty stable and fast. I have not done much more with it than use it in things like vifm image previews but it should be much more stable than things like ueberzug, much faster than things like sixel. Time will tell. Switched other modules to make use of kitty instead of alacritty: vifm uses kitty previews, river spawns kitty instances, systemd units use kitty instances, waybar presents extra mouse-click interactions through kitty, and styler contains a processor to style kitty permanently. I would love to converge this all a bit more on the `$TERMINAL` env var, but this is unfortunately difficult for things like systemd and waybar. For waybar I currently see no real way except for a custom `ideal-terminal` script which just goes down the list of terminal emulators I want to run, depending on which is installed, since it does not read env vars, while for systemd it might be feasible to import user environment variables, but also connected to additional complexity and overhead which it does not seem worth for the currently two simple service units it affects. Also removed some obsolete sxhkd and sh settings from the move to wayland. --- README.md | 12 +++--- bootstrap/packages.txt | 3 +- qutebrowser/.config/qutebrowser/config.py | 6 ++- .../systemd/user/dropdown-terminal.service | 4 +- .../systemd/user/dropdown-todo.service | 4 +- services/README.md | 4 +- sh/.config/sh/env | 4 +- vifm/.config/vifm/vifmrc | 42 ++++--------------- wayland/.config/waybar/config | 12 +++--- wayland/README.md | 20 ++++++--- 10 files changed, 47 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index e827554..a6bca26 100644 --- a/README.md +++ b/README.md @@ -43,19 +43,19 @@ Enjoy! ![Overview - an older image of the dotfile desktop with gaps, showing git logs, styler logs, duckduckgo in a browser, and a vifm view of the dotfiles themselves](https://gitlab.com/marty-oehme/dotfiles/-/wikis/uploads/aaf0319d575dc192ea0f4bd6eaf83c08/gaps.png) -* [`alacritty`](https://github.com/jwilm/alacritty) - Terminal emulator (GPU accelerated and customizable) * [`wayland`](https://github.com/wayland-project/wayland) - Containing basics for fully functional tiling wayland setup: * [`river`](https://github.com/riverwm/river) - Tiling window manager for wayland * [`waybar`](https://github.com/Alexays/Waybar) - Easily customizable statusbar for wayland * [`bemenu`](https://github.com/Cloudef/bemenu) - Extended dmenu replacement for wayland, X11 and ncurses * [`fontconfig`] - System-wide font replacements and styling settings -* [`git`](git/README.md) - distributed version control system. -* [`pass`](pass/README.md) - Password management suite -* [`nvim`](https://neovim.io/) - Neovim configuration -* [`bibtex`](bibtex/README.md) - LateX/BibteX/pandoc plaintext writing & reference suite -* [`qutebrowser`](https://github.com/qutebrowser/qutebrowser) - vim-key enabled web browser +* [`kitty`](https://sw.kovidgoyal.net/kitty/) - Terminal emulator (GPU accelerated and configurable) * [`tmux`](https://github.com/tmux/tmux/) - terminal multiplexer +* [`nvim`](https://neovim.io/) - Neovim configuration * [`vifm`](https://github.com/vifm/vifm) - vim-like file-manager +* [`qutebrowser`](https://github.com/qutebrowser/qutebrowser) - vim-key enabled web browser +* [`pass`](pass/README.md) - Password management suite +* [`bibtex`](bibtex/README.md) - LateX/BibteX/pandoc plaintext writing & reference suite +* [`git`](git/README.md) - distributed version control system. ## Notes diff --git a/bootstrap/packages.txt b/bootstrap/packages.txt index 59a2787..39c42e7 100644 --- a/bootstrap/packages.txt +++ b/bootstrap/packages.txt @@ -1,7 +1,6 @@ acpid activitywatch-bin afew -alacritty alias-tips-git alsa-utils an2linuxserver-git @@ -173,7 +172,6 @@ speedtest-cli sshfs stow surfraw -sxhkd sxiv systemd-sysvcompat task @@ -224,6 +222,7 @@ devour htop jrnl khard +kitty mopidy-autoplay mopidy-iris mopidy-local diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 359a28e..bb24bd7 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -11,10 +11,12 @@ from qutebrowser.config.configfiles import ConfigAPI # noqa: F401 # load additional settings configured via autoconfig.yml config.load_autoconfig() +term = os.getenv("TERMINAL", "xterm") + c.completion.web_history.max_items = 1000 c.hints.uppercase = True c.editor.command = [ - "alacritty", + term, "-e", "nvim", "-f", @@ -26,7 +28,7 @@ c.editor.command = [ # change filepicker c.fileselect.handler = "external" picker = [ - "alacritty", + term, "--class", "float", "-e", diff --git a/services/.config/systemd/user/dropdown-terminal.service b/services/.config/systemd/user/dropdown-terminal.service index 78755de..d541a9d 100644 --- a/services/.config/systemd/user/dropdown-terminal.service +++ b/services/.config/systemd/user/dropdown-terminal.service @@ -1,12 +1,12 @@ [Unit] -Description=Alacritty window hidden on i3 scratchpad +Description=Terminal window hidden to be called at any point Requires=x-started-confirm.service After=x-started-confirm.service [Service] Type=simple # workaround to allow relative executable invocation (i.e. current users' home dir) -ExecStart=/bin/bash -c 'alacritty --title "dropdown-terminal" --class Alacritty,scratchpad' +ExecStart=/bin/bash -c 'kitty --title "dropdown-terminal" --class scratchpad' Restart=always [Install] diff --git a/services/.config/systemd/user/dropdown-todo.service b/services/.config/systemd/user/dropdown-todo.service index 28f804d..ed6a646 100644 --- a/services/.config/systemd/user/dropdown-todo.service +++ b/services/.config/systemd/user/dropdown-todo.service @@ -1,12 +1,12 @@ [Unit] -Description=Todo.md floating vim instance +Description=Todo.md hidden vim instance Requires=x-started-confirm.service After=x-started-confirm.service [Service] Type=simple # workaround to allow relative executable invocation (i.e. current users' home dir) -ExecStart=/bin/bash -c 'alacritty --title "dropdown-todo" --class "Alacritty,scratchpad" -e nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F | :Limelight" %h/documents/records/todo.md' +ExecStart=/bin/bash -c 'kitty --title "dropdown-todo" --class scratchpad nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F | :Limelight" %h/documents/records/todo.md' Restart=always [Install] diff --git a/services/README.md b/services/README.md index d3a139e..4b40271 100644 --- a/services/README.md +++ b/services/README.md @@ -62,12 +62,12 @@ As another example, if you want to check for changes every 30 seconds but still ## Dropdown services -The `dropdown-terminal.service` is very simple, and always keeps a (`alacritty`) terminal window running. +The `dropdown-terminal.service` is very simple, and always keeps a terminal window running. The program is started with a `scratchpad` class, which is picked up by [`i3`](i3) and automatically hidden. You can then show/hide the terminal as a floating overlay as you need, mimicking a floating terminal (by default with `super + shift + return`, though this may change). When you close the window in any way, systemd automatically restarts it in the background. -The `dropdown-todo.service` is similar but instead of an empty (`alacritty`) terminal window, +The `dropdown-todo.service` is similar but instead of an empty terminal window, it starts up a `nvim` instance which hides most of its interface and shows a to-do list. The list, by default, is situated in `~/documents/records/todo.md` and can be displayed with `super + t`. diff --git a/sh/.config/sh/env b/sh/.config/sh/env index 7d180ed..8e8a25f 100644 --- a/sh/.config/sh/env +++ b/sh/.config/sh/env @@ -25,7 +25,7 @@ export BIBFILE="${BIBFILE:-$LIBRARYROOT/academia/academia.bib}" # these are my personal 'important' application settings export EDITOR="nvim" export BROWSER="qutebrowser" -export TERMINAL="alacritty" +export TERMINAL="kitty" export PAGER="less" export FILEREADER="zathura" @@ -45,5 +45,5 @@ export SHELL=${SHELL:-/bin/bash} export TERM=xterm-256color if exist fzf; then - export FZF_DEFAULT_OPTS="--bind 'tab:toggle+down,shift-tab:toggle+up,ctrl-g:top,ctrl-t:toggle-preview,ctrl-d:preview-half-page-down,ctrl-u:preview-half-page-up' --color=light -1 -m --delimiter :" + export FZF_DEFAULT_OPTS="--bind 'tab:toggle+down,shift-tab:toggle+up,ctrl-g:top,ctrl-t:toggle-preview,ctrl-d:preview-half-page-down,ctrl-u:preview-half-page-up' --color=light -1 -m --delimiter :" fi diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 135bd2d..72bcbd6 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -348,37 +348,6 @@ set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.pp " You can also add %CLEAR if you want to clear screen before running FUSE " program. - -fileviewer *.pdf - \ vifm-sixel pdf %pw %ph %c %pd - \ %pc - \ vifm-sixel clear - -fileviewer *.epub - \ vifm-sixel epub %pw %ph %c %pd - \ %pc - \ vifm-sixel clear - -fileviewer