5 ms·
If you would like a very silly reason, sometimes I want to copy logs to other devs really quickly from a server, but exporting them to a file and then rsyncing
by oehpr 5y ago
If you would like a very silly reason, sometimes I want to copy logs to other devs really quickly from a server, but exporting them to a file and then rsyncing it back is just a bunch of commands and files I don't want to deal with. Because I have alacritty I'll do a cheeky hack and scale the font down to like 2pt, highlight everything and then copy it.
I can copy around 500 lines of logs this way. Quick and dirty.
Other than that IDK.
And about the tabbing and splitting. I got tired of all the terminal emulators I like not supporting it, and some contexts not supporting paging, and not having a nice way to review a long running process, and took the dive to learn tmux.
Tmux. A terrible solution to a bunch of stupid problems. Highly recommend.
- chrismorgan 5y agoTo copy the entire scrollback buffer from Alacritty: <C-S-Space>gVGy<C-S-Space>. Ctrl+Shift+Space: enter Vi mode; g: move the cursor to the top of the scrollback buffer (like gg in Vi/Vim); V: start linewise selection; G: move the cursor to the bottom of the scrollback buffer; y: copy to clipboard and clear selection (like "+y in Vim); Ctrl+Shift+Space: exit Vi mode. Learn what’s possible in Vi mode from the key_bindings section of the alacritty.yml config, largely the ones with `mode: Vi` and similar. You’ve got the usual things like hjkl navigation, Ctrl+B and Ctrl+F to go Backwards and Forwards a page, / to search, all that sort of stuff. (Though I will note that ? to search backwards doesn’t work, because Alacritty is using winit’s currently utterly insufficient keyboard API for its bindings, see <https://github.com/alacritty/alacritty/issues/5251 https://github.com/alacritty/alacritty/issues/5251>.) Also in alacritty.yml, scrolling.history defines how many lines are kept in the buffer (defaults to 10,000).
- kristopolous 5y agoAnyone familiar with a less tedious way to set up copy and paste that doesn't require 3 different patterns? I'm clearly not smart enough to do it without having to think about the process every time
- birbs 5y agoOn Mac, you can pipe input into pbcopy to add it to your clipboard. cat file.txt | pbcopy This adds the contents of file.txt to your clipboard.
- kristopolous 5y agotmux has its own clipboard but this give me an idea. (linux's equivalent here is xclip btw)
- yjftsjthsd-h 5y agohttps://wiki.archlinux.org/title/Tmux#X_clipboard_integration https://wiki.archlinux.org/title/Tmux#X_clipboard_integratio... suggests preferring xsel
- kristopolous 5y agoThanks for that. Disabling copy-on-select is really in my mind, priority #1 along with not having multiple clipboards I have to pass things between. It's insane that it's still broken. It's Xorg's equivalent to Firefox's crazy 20 year long ctrl-q drama. What could they do instead? There's so many trivial solutions. A clipboard named pipe for instance, or at least something that operates like one. Read is paste, write is copy. That's a very 1970 style fix that could have been done 35 years ago. Then anything that can read and write from a file can interface the clipboard, opening up a whole new array of applications without setting aside "highlighting text" as having some special magical power. Also having multiple clipboards is trivial, just have more of these special files. You can even set one aside if say some crazy old Xt application someone is still running only works with copy-on-select for some reason A clipboard history is super trivial as well, just set up a pipe... There's so many more unixy ways this could have been done. It's so dumb how it works. Heck dbus would be a less insane fix
- yosamino 5y ago> Disabling copy-on-select is really in my mind, priority #1 reading yoru entirely comment, I am not entirely sure if you mean changing how it's implemented or if you really would like to get rid of the user interface it has. Because copy-on-select along with middle-click-to-paste is like ... the best thing. Tiny bits of data stuck that follow your cursor is the most information-at-my-fingertip feeling that I can get out of these machines.
- jasonjayr 5y agoI'm guilty of gzip + base64'ing short files, and copying and pasting them rather than scp/rsync. When the whole toolbox is there, sometimes it's fun to see what kind of Rube Goldberg machine you can make :)