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.
This commit is contained in:
Marty Oehme 2022-01-16 15:18:07 +01:00
parent d9e539b9ec
commit 6fabac6cd8
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
10 changed files with 47 additions and 64 deletions

View File

@ -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) ![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: * [`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 * [`river`](https://github.com/riverwm/river) - Tiling window manager for wayland
* [`waybar`](https://github.com/Alexays/Waybar) - Easily customizable statusbar 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 * [`bemenu`](https://github.com/Cloudef/bemenu) - Extended dmenu replacement for wayland, X11 and ncurses
* [`fontconfig`] - System-wide font replacements and styling settings * [`fontconfig`] - System-wide font replacements and styling settings
* [`git`](git/README.md) - distributed version control system. * [`kitty`](https://sw.kovidgoyal.net/kitty/) - Terminal emulator (GPU accelerated and configurable)
* [`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
* [`tmux`](https://github.com/tmux/tmux/) - terminal multiplexer * [`tmux`](https://github.com/tmux/tmux/) - terminal multiplexer
* [`nvim`](https://neovim.io/) - Neovim configuration
* [`vifm`](https://github.com/vifm/vifm) - vim-like file-manager * [`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 ## Notes

View File

@ -1,7 +1,6 @@
acpid acpid
activitywatch-bin activitywatch-bin
afew afew
alacritty
alias-tips-git alias-tips-git
alsa-utils alsa-utils
an2linuxserver-git an2linuxserver-git
@ -173,7 +172,6 @@ speedtest-cli
sshfs sshfs
stow stow
surfraw surfraw
sxhkd
sxiv sxiv
systemd-sysvcompat systemd-sysvcompat
task task
@ -224,6 +222,7 @@ devour
htop htop
jrnl jrnl
khard khard
kitty
mopidy-autoplay mopidy-autoplay
mopidy-iris mopidy-iris
mopidy-local mopidy-local

View File

@ -11,10 +11,12 @@ from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
# load additional settings configured via autoconfig.yml # load additional settings configured via autoconfig.yml
config.load_autoconfig() config.load_autoconfig()
term = os.getenv("TERMINAL", "xterm")
c.completion.web_history.max_items = 1000 c.completion.web_history.max_items = 1000
c.hints.uppercase = True c.hints.uppercase = True
c.editor.command = [ c.editor.command = [
"alacritty", term,
"-e", "-e",
"nvim", "nvim",
"-f", "-f",
@ -26,7 +28,7 @@ c.editor.command = [
# change filepicker # change filepicker
c.fileselect.handler = "external" c.fileselect.handler = "external"
picker = [ picker = [
"alacritty", term,
"--class", "--class",
"float", "float",
"-e", "-e",

View File

@ -1,12 +1,12 @@
[Unit] [Unit]
Description=Alacritty window hidden on i3 scratchpad Description=Terminal window hidden to be called at any point
Requires=x-started-confirm.service Requires=x-started-confirm.service
After=x-started-confirm.service After=x-started-confirm.service
[Service] [Service]
Type=simple Type=simple
# workaround to allow relative executable invocation (i.e. current users' home dir) # 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 Restart=always
[Install] [Install]

View File

@ -1,12 +1,12 @@
[Unit] [Unit]
Description=Todo.md floating vim instance Description=Todo.md hidden vim instance
Requires=x-started-confirm.service Requires=x-started-confirm.service
After=x-started-confirm.service After=x-started-confirm.service
[Service] [Service]
Type=simple Type=simple
# workaround to allow relative executable invocation (i.e. current users' home dir) # 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 Restart=always
[Install] [Install]

View File

@ -62,12 +62,12 @@ As another example, if you want to check for changes every 30 seconds but still
## Dropdown services ## 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. 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 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). (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. 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. 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`. The list, by default, is situated in `~/documents/records/todo.md` and can be displayed with `super + t`.

View File

@ -25,7 +25,7 @@ export BIBFILE="${BIBFILE:-$LIBRARYROOT/academia/academia.bib}"
# these are my personal 'important' application settings # these are my personal 'important' application settings
export EDITOR="nvim" export EDITOR="nvim"
export BROWSER="qutebrowser" export BROWSER="qutebrowser"
export TERMINAL="alacritty" export TERMINAL="kitty"
export PAGER="less" export PAGER="less"
export FILEREADER="zathura" export FILEREADER="zathura"
@ -45,5 +45,5 @@ export SHELL=${SHELL:-/bin/bash}
export TERM=xterm-256color export TERM=xterm-256color
if exist fzf; then 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 fi

View File

@ -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 " You can also add %CLEAR if you want to clear screen before running FUSE
" program. " 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 <video/*>
\ vifm-sixel video %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <image/*>
\ vifm-sixel draw %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <audio/*>
\ vifm-sixel audio %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <font/*>
\ vifm-sixel font %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
" Pdf " Pdf
filextype *.pdf filextype *.pdf
\ { view as rich file } \ { view as rich file }
@ -423,6 +392,9 @@ filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\*.as[fx] \*.as[fx]
\ tput cup %py %px > /dev/tty && ffmpeg -y -hide_banner -loglevel panic -i %c -ss 00:00:01.000 -vframes 1 /tmp/tempfile.jpg > /dev/null && kitty +kitten icat --transfer-mode=file --place=%pwx%ph@%pxx%py /tmp/tempfile.jpg %N
\ %pc
\ kitty +kitten icat --transfer-mode=file --place=%pwx%ph@%pxx%py --clear %N,
\ ffprobe -pretty %c 2>&1 \ ffprobe -pretty %c 2>&1
" Web " Web
@ -447,9 +419,9 @@ filextype *.gif
\ {Loop} \ {Loop}
\ mpv --loop=inf %f %i &, \ mpv --loop=inf %f %i &,
fileviewer *.gif fileviewer *.gif
\ vifmimg draw %px %py %pw %ph %c \ kitty +kitten icat --silent --transfer-mode=stream --place=%pwx%ph@%pxx%py %c %N
\ %pc \ %pc
\ vifmimg clear \ kitty +kitten icat --clear --silent %pd
" Images " Images
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
@ -462,9 +434,9 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ {View in gpicview} \ {View in gpicview}
\ gpicview %c, \ gpicview %c,
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ vifmimg draw %px %py %pw %ph %c \ kitty +kitten icat --silent --transfer-mode=stream --place=%pwx%ph@%pxx%py %c %N
\ %pc \ %pc
\ vifmimg clear \ kitty +kitten icat --clear --silent %pd
" OpenRaster " OpenRaster
filextype *.ora filextype *.ora

View File

@ -12,7 +12,7 @@
"return-type": "json", "return-type": "json",
"exec": "~/.config/waybar/modules/archupdates 5 json", "exec": "~/.config/waybar/modules/archupdates 5 json",
"interval": 3600, "interval": 3600,
"on-click": "alacritty --class float -e topgrade" "on-click": "kitty --class float topgrade"
}, },
"backlight": { "backlight": {
"device": "intel_backlight", "device": "intel_backlight",
@ -45,8 +45,8 @@
"warning": 50, "warning": 50,
"critical": 80 "critical": 80
}, },
"on-click": "alacritty --class float -e top", "on-click": "kitty --class float top",
"on-click-right": "alacritty --class float -e glances" "on-click-right": "kitty --class float glances"
}, },
"custom/events": { "custom/events": {
"format": "{}", "format": "{}",
@ -115,7 +115,7 @@
"tooltip-format-ethernet": "{ifname} ", "tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected", "tooltip-format-disconnected": "Disconnected",
"max-length": 50, "max-length": 50,
"on-click": "alacritty --class float -e nmtui", "on-click": "kitty --class float nmtui",
// "on-click-right": "sudo rfkill toggle wlan" // "on-click-right": "sudo rfkill toggle wlan"
}, },
"pulseaudio": { "pulseaudio": {
@ -132,7 +132,7 @@
"default": ["", ""] "default": ["", ""]
}, },
"scroll-step": 1, "scroll-step": 1,
"on-click": "alacritty --class float -e pulsemixer", "on-click": "kitty --class float pulsemixer",
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +1%", "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +1%",
"on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -1%" "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -1%"
}, },
@ -146,7 +146,7 @@
"critical-threshold": 80, "critical-threshold": 80,
// "format-critical": "{temperatureC}° ", // "format-critical": "{temperatureC}° ",
"format": "{temperatureC}° ", "format": "{temperatureC}° ",
"on-click": "alacritty --class float -e watch sensors" "on-click": "kitty --class float watch sensors"
}, },
"tray": { "tray": {
"icon-size": 21, "icon-size": 21,

View File

@ -11,7 +11,16 @@ This is only a very work-in-progress README file.
Since wayland handles key presses and so on completely differently Since wayland handles key presses and so on completely differently
from X, from X,
I can't for example use sxhkd which is a shame. I can't for example use sxhkd anymore which is a shame.
On the other hand, there is an amazing key *re* binding tool
(which also works under X I've now found out)
`keyd` which takes care of some X functionality (xcape) at a lower level.
I have not found a good replacement for `clutter`
(which automatically hides your mouse cursor after inactivity)
which is independent from the window manager.
I believe `swaywm` would include similar functionality, but `river` does not.
## Missing ## Missing
@ -22,7 +31,7 @@ not set up:
* [x] extensive run menu (clipboard, open windows) -- rofi on X * [x] extensive run menu (clipboard, open windows) -- rofi on X
* [x] clipboard manager * [x] clipboard manager
* [x] pass frontend dropdown -- clipboard and xdotool * [x] pass frontend dropdown -- clipboard and xdotool
* [ ] investigate [wtype](https://github.com/atx/wtype) over ydotool * [x] investigate [wtype](https://github.com/atx/wtype) over ydotool
* [x] file uploading (works but without url clipboard) * [x] file uploading (works but without url clipboard)
* [x] open_download (qutebrowser script) * [x] open_download (qutebrowser script)
* [x] gap regulation * [x] gap regulation
@ -34,18 +43,19 @@ not set up:
* [x] styler * [x] styler
* still works as before, only less programs respect xresources settings * still works as before, only less programs respect xresources settings
* works even for foot, if I want to switch to it * works even for foot, if I want to switch to it
* [ ] need to set it up for waybar * [x] need to set it up for waybar
* [ ] dropdown terminal and dropdown todo * [ ] dropdown terminal and dropdown todo
* [ ] rofimoji emoji dropdown -- clipboard * [ ] rofimoji emoji dropdown -- clipboard
* [ ] show current mode * [ ] show current mode
* [-] hide cursor * [-] hide cursor
* [-] dropdown calculator -- rofi on X -- could use `qalc` directly * [x] dropdown calculator -- rofi on X -- could use `qalc` directly
* [-] modes: media, academia (worth?) * [-] modes: media, academia (worth?)
* [-] picture in terminal, a-la ueberzug * [x] picture in terminal, a-la ueberzug
* ueberzug is X only * ueberzug is X only
* there is sixel rendering for foot, st, xterm, urxvt * there is sixel rendering for foot, st, xterm, urxvt
* alacritty does *not* support sixel rendering [yet](https://github.com/alacritty/alacritty/issues/910), see also [existing sixel implementation](https://github.com/betaboon/alacritty/tree/graphics). * alacritty does *not* support sixel rendering [yet](https://github.com/alacritty/alacritty/issues/910), see also [existing sixel implementation](https://github.com/betaboon/alacritty/tree/graphics).
* We have sixel support enabled in vifm and foot. It is very wonky, however. * We have sixel support enabled in vifm and foot. It is very wonky, however.
* Switched to kitty terminal for image support instead
### undecided ### undecided