Skip to content

Instantly share code, notes, and snippets.

Avatar Ugotsta

View GitHub Profile
View 1168292759754682368.txt
View vis-config
##Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
##Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
##Currently available ones are "mpd", "pulse" and "alsa". Defaults to "mpd".
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
##If pulse audio is not working with vis try switching the audio source. A list can be found by running the
##command pacmd list-sinks | grep -e 'name:' -e 'index'
View kitty.conf
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family Fira Code iScript
# bold_font Fira Code iScript
Ugotsta / code-to-kbd.js
Last active March 13, 2019 23:21
JavaScript to automatically convert keypress shortcuts in isolated code elements like <code>Enter</code> to kbd elements like <kbd>Enter</kbd>.
View code-to-kbd.js
let code = document.querySelectorAll("code");
code.forEach( el => el.classList.add("prettyprint") );
code.forEach( i => {
let found = false;
let h = i.innerHTML.toLowerCase();
let c = ['tab', 'esc', 'return', 'enter'];
if ( c.includes(h) ) found = true;
if ( h.length === 1 ) found = true;
c = ['ctrl', 'alt', 'cmd', 'shift', 'win', 'super', 'kbd'];
Ugotsta / config
Created February 4, 2019 12:38
NCMPCPP basic config file with slight edits, core from here:
View config
# Files
mpd_music_dir = "~/Music"
lyrics_directory = ~/.ncmpcpp/lyrics
ncmpcpp_directory = ~/.ncmpcpp
mpd_host = "localhost"
mpd_port = "6600"
mpd_connection_timeout = "5"
mpd_crossfade_time = "5"
Ugotsta / light-only.css
Last active October 3, 2018 20:29
CSS selector to target light syntax themes in Atom editor. Used here:
View light-only.css
// should result in blue editor background if a theme with keyword "dark" is used
atom-workspace[class*="-light"] atom-text-editor {
background-color: blue !important;
Ugotsta / hyper-green-scanlines.js
Last active September 21, 2018 15:51
Config file for terminal for an animated scanline effect:
View hyper-green-scanlines.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
Ugotsta / atom-subtle-shadows.css
Last active September 10, 2018 04:48
Subtle text shadow and complimentary background CSS for use in styles.less of Atom config section. Meant solely for light themes. These styles are designed to override some base syntax theme styles but in a way that should entail nice results across themes.
View atom-subtle-shadows.css
// body /deep/ atom-text-editor {
// transform: perspective(200px) rotateX(2deg) rotateZ(-3deg);
// transform-origin: center;
// transform-style: preserve-3d;
// }
atom-text-editor {
background: rgba(255,255,255,0.45);
inset 0px 0px 200px rgba(0,50,150,0.5);
Ugotsta /
Created August 30, 2018 22:24
Custom prompt for fish shell. Place in ~/.config/fish/functions
function fish_prompt
and set retc normal
or set retc red
tty | string match -q -r tty
and set tty tty
or set tty pts
set_color $retc
if [ $tty = tty ]
echo -n .-
Ugotsta /
Last active May 4, 2022 10:08
Installer script for Kitty terminal on elementary OS, or Ubuntu derivatives in general
#!/usr/bin/env bash
# ensure freetype is updated, important to avoid error:
# undefined symbol: FT_Get_Var_Blend_Coordinates
sudo add-apt-repository ppa:glasen/freetype2
sudo apt update && sudo apt install freetype2-demos
# kitty installer script from
curl -L | sh /dev/stdin