From 83ee5c2974adcef8d1470cb7813c7684cfc4b124 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Tue, 29 Dec 2020 08:27:05 +0200 Subject: [PATCH] Adding powerline and colour emoji support --- bashrc | 8 ++- config/alacritty/alacritty.yml | 9 ++- config/fontconfig/conf.d/99-emoji.conf | 67 ++++++++++++--------- config/powerline/colorschemes/default.json | 18 ++++++ config/powerline/config.json | 53 ++++++++++++++++ config/powerline/themes/shell/__main__.json | 18 ++++++ config/powerline/themes/shell/default.json | 34 +++++++++++ config/vim/vimrc | 3 + 8 files changed, 177 insertions(+), 33 deletions(-) create mode 100644 config/powerline/colorschemes/default.json create mode 100644 config/powerline/config.json create mode 100644 config/powerline/themes/shell/__main__.json create mode 100644 config/powerline/themes/shell/default.json diff --git a/bashrc b/bashrc index 36a2011..2f09755 100644 --- a/bashrc +++ b/bashrc @@ -3,6 +3,12 @@ if [[ $- != *i* ]] ; then return fi +# Setting up the city's powerlines +powerline-daemon -q +POWERLINE_BASH_CONTINUATION=1 +POWERLINE_BASH_SELECT=1 +. /usr/lib/python3.8/site-packages/powerline/bindings/bash/powerline.sh + # The city's finest exports! export GIT_EDITOR="vim" export PATH="$PATH:$HOME/.local/bin" @@ -11,4 +17,4 @@ export TERM=xterm-color # Fixes ssh since I use alacritty and it sets the TERM export VIMINIT="source $HOME/.config/vim/vimrc" alias ls="ls --color=auto" - +alias weather='curl wttr.in/?format="%l:+%C,+%t+(feels+like+%f)\n"' diff --git a/config/alacritty/alacritty.yml b/config/alacritty/alacritty.yml index c9f31c3..93ca83d 100644 --- a/config/alacritty/alacritty.yml +++ b/config/alacritty/alacritty.yml @@ -11,14 +11,17 @@ colors: font: size: 12.0 normal: - family: "Cascadia Code" + family: "Cascadia Code PL" style: Regular bold: - family: "Cascadia Code" + family: "Cascadia Code PL" style: Bold italic: - family: "Cascadia Code" + family: "Cascadia Code PL" style: Italic + glyph_offset: + x: 0 + y: -1 window: dimensions: diff --git a/config/fontconfig/conf.d/99-emoji.conf b/config/fontconfig/conf.d/99-emoji.conf index 1a82ec8..fb973ed 100644 --- a/config/fontconfig/conf.d/99-emoji.conf +++ b/config/fontconfig/conf.d/99-emoji.conf @@ -1,31 +1,40 @@ - - + + - - sans-serif - - Noto Serif - Noto Color Emoji - - - - - - emoji - Noto Color Emoji - - - - - Apple Color Emoji - Noto Color Emoji - - - Segoe UI Emoji - Noto Color Emoji - - - Emoji One - Noto Color Emoji - + + + sans-serif + + + Noto Serif + Noto Color Emoji + + + + + emoji + + Noto Color Emoji + + + + + Apple Color Emoji + + Noto Color Emoji + + + + Segoe UI Emoji + + Noto Color Emoji + + + + Emoji One + + Noto Color Emoji + + + ~/.fonts diff --git a/config/powerline/colorschemes/default.json b/config/powerline/colorschemes/default.json new file mode 100644 index 0000000..e688837 --- /dev/null +++ b/config/powerline/colorschemes/default.json @@ -0,0 +1,18 @@ +{ + "groups": { + "gitstatus": { "fg": "gray8", "bg": "gray2", "attrs": [] }, + "gitstatus_branch": { "fg": "gray8", "bg": "gray2", "attrs": [] }, + "gitstatus_branch_clean": { "fg": "green", "bg": "gray2", "attrs": [] }, + "gitstatus_branch_dirty": { "fg": "gray8", "bg": "gray2", "attrs": [] }, + "gitstatus_branch_detached": { "fg": "mediumpurple", "bg": "gray2", "attrs": [] }, + "gitstatus_tag": { "fg": "darkcyan", "bg": "gray2", "attrs": [] }, + "gitstatus_behind": { "fg": "gray10", "bg": "gray2", "attrs": [] }, + "gitstatus_ahead": { "fg": "gray10", "bg": "gray2", "attrs": [] }, + "gitstatus_staged": { "fg": "green", "bg": "gray2", "attrs": [] }, + "gitstatus_unmerged": { "fg": "brightred", "bg": "gray2", "attrs": [] }, + "gitstatus_changed": { "fg": "mediumorange", "bg": "gray2", "attrs": [] }, + "gitstatus_untracked": { "fg": "brightestorange", "bg": "gray2", "attrs": [] }, + "gitstatus_stashed": { "fg": "darkblue", "bg": "gray2", "attrs": [] }, + "gitstatus:divider": { "fg": "gray8", "bg": "gray2", "attrs": [] } + } +} diff --git a/config/powerline/config.json b/config/powerline/config.json new file mode 100644 index 0000000..4491885 --- /dev/null +++ b/config/powerline/config.json @@ -0,0 +1,53 @@ +{ + "common": { + "term_truecolor": false + }, + "ext": { + "ipython": { + "colorscheme": "default", + "theme": "in", + "local_themes": { + "rewrite": "rewrite", + "out": "out", + "in2": "in2" + } + }, + "pdb": { + "colorscheme": "default", + "theme": "default" + }, + "shell": { + "colorscheme": "default", + "theme": "default", + "local_themes": { + "continuation": "continuation", + "select": "select" + } + }, + "tmux": { + "colorscheme": "default", + "theme": "default" + }, + "vim": { + "colorscheme": "default", + "theme": "default", + "local_themes": { + "__tabline__": "tabline", + + "cmdwin": "cmdwin", + "help": "help", + "quickfix": "quickfix", + + "powerline.matchers.vim.plugin.nerdtree.nerdtree": "plugin_nerdtree", + "powerline.matchers.vim.plugin.commandt.commandt": "plugin_commandt", + "powerline.matchers.vim.plugin.gundo.gundo": "plugin_gundo", + "powerline.matchers.vim.plugin.gundo.gundo_preview": "plugin_gundo-preview" + } + }, + "wm": { + "colorscheme": "default", + "theme": "default", + "update_interval": 2 + } + } +} diff --git a/config/powerline/themes/shell/__main__.json b/config/powerline/themes/shell/__main__.json new file mode 100644 index 0000000..c4e7316 --- /dev/null +++ b/config/powerline/themes/shell/__main__.json @@ -0,0 +1,18 @@ +{ + "gitstatus": { + "args": { + "formats": { + "branch": "\ue0a0 {}", + "tag": " ★ {}", + "behind": " ↓ {}", + "ahead": " ↑ {}", + "staged": " ● {}", + "unmerged": " ✖ {}", + "changed": " ✚ {}", + "untracked": " … {}", + "stashed": " ⚑ {}" + }, + "detached_head_style": "ref" + } + } +} diff --git a/config/powerline/themes/shell/default.json b/config/powerline/themes/shell/default.json new file mode 100644 index 0000000..1244af7 --- /dev/null +++ b/config/powerline/themes/shell/default.json @@ -0,0 +1,34 @@ +{ + "segments": { + "left": [ + { + "function": "powerline.segments.common.net.hostname", + "priority": 10 + }, + { + "function": "powerline.segments.common.env.user", + "priority": 30 + }, + { + "function": "powerline.segments.common.env.virtualenv", + "priority": 50 + }, + { + "function": "powerline_gitstatus.gitstatus", + "priority": 40 + }, + { + "function": "powerline.segments.shell.cwd", + "priority": 10 + }, + { + "function": "powerline.segments.shell.jobnum", + "priority": 20 + }, + { + "function": "powerline.segments.shell.last_pipe_status", + "priority": 10 + } + ] + } +} diff --git a/config/vim/vimrc b/config/vim/vimrc index c8282d5..d7b0478 100644 --- a/config/vim/vimrc +++ b/config/vim/vimrc @@ -1,2 +1,5 @@ set viminfo+=n~/.config/vim/viminfo set tabstop=2 +set rtp+=/usr/lib/python3.8/site-packages/powerline/bindings/vim/ +set laststatus=2 +set t_Co=256