From 9050858e53fff03294d167f5fc96e91571f48835 Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Tue, 19 Jan 2021 11:50:05 +0000 Subject: [PATCH 1/9] Add Pony stuff, new Vim colours, ... Also update gitignore --- .gitignore | 2 ++ nvim/init.vim | 10 ++++++++-- zsh/zshenv | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c300df8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +nvim/plugins/ +nvim/.netrwhist diff --git a/nvim/init.vim b/nvim/init.vim index 26c454c..05e1d6e 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -52,10 +52,15 @@ Plug 'w0rp/ale' Plug 'ziglang/zig.vim' " Odin language support Plug 'Tetralux/odin.vim' +" Pony language support +Plug 'jakwings/vim-pony' " Pencil, for writing prose Plug 'reedes/vim-pencil' +" Vim Wiki +" Plug 'vimwiki/vimwiki' + " Colourschemes " Following option should be set on a 256 color " terminal to enable true colour @@ -73,6 +78,7 @@ Plug 'noahfrederick/vim-hemisu' Plug 'ajgrf/sprinkles' Plug 'xero/sourcerer.vim' Plug 'franbach/miramare' +Plug 'everard/vim-aurora' " base16 colourscheme set (very large) " Plug 'chriskempson/base16-vim' @@ -86,8 +92,8 @@ if $TERM ==# "linux" else set termguicolors endif -set background=dark -colorscheme miramare +set background=light +colorscheme aurora " Rob Pike says that syntax highlighting is juvenile so it must be true syntax off diff --git a/zsh/zshenv b/zsh/zshenv index ce57554..103e400 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -1,7 +1,7 @@ # ~/.zshenv: environment bootstrap export EDITOR=nvim export XDG_CONFIG_HOME=/home/cren/.config/ -export PATH=$PATH:/home/cren/.local/bin +export PATH=$PATH:/home/cren/.local/bin:/home/cren/.local/share/ponyup/bin # pfetch config export PF_INFO="ascii title os kernel shell wm memory pkgs palette" From 6e9ab722bc82c6d91ec8d1b0ab38d11ed0c672db Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Tue, 19 Jan 2021 14:17:47 +0000 Subject: [PATCH 2/9] Fix the mess of permissions, and rename dotfiles Now dotfiles no longer use dots (they were hidden which was causing problems) --- fehbg | 0 x/{.Xresources => Xresources} | 0 x/{.xinitrc => xinitrc} | 0 zsh/zshenv | 0 zsh/zshrc | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 fehbg rename x/{.Xresources => Xresources} (100%) mode change 100644 => 100755 rename x/{.xinitrc => xinitrc} (100%) mode change 100644 => 100755 mode change 100644 => 100755 zsh/zshenv mode change 100644 => 100755 zsh/zshrc diff --git a/fehbg b/fehbg old mode 100755 new mode 100644 diff --git a/x/.Xresources b/x/Xresources old mode 100644 new mode 100755 similarity index 100% rename from x/.Xresources rename to x/Xresources diff --git a/x/.xinitrc b/x/xinitrc old mode 100644 new mode 100755 similarity index 100% rename from x/.xinitrc rename to x/xinitrc diff --git a/zsh/zshenv b/zsh/zshenv old mode 100644 new mode 100755 diff --git a/zsh/zshrc b/zsh/zshrc old mode 100644 new mode 100755 From 75d236b7dbfad082944e99b41206736a17bd4323 Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Tue, 19 Jan 2021 14:26:35 +0000 Subject: [PATCH 3/9] alacritty.yml: Remove old comments --- alacritty.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/alacritty.yml b/alacritty.yml index a3eda5e..94555a4 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -159,8 +159,6 @@ font: # If `true`, bold text is drawn using the bright color variants. #draw_bold_text_with_bright_colors: false -# Colors (base16-espresso) -# by Alex Mirrington (https://github.com/alexmirrington) # Colors (Pnevma) colors: bright: From e818ab33b2fee1a019f48accad7a04022995938a Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Tue, 19 Jan 2021 14:55:20 +0000 Subject: [PATCH 4/9] zsh/zshrc: change prompt colour to work around a bug --- zsh/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/zshrc b/zsh/zshrc index 4b6bb52..329f9eb 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -24,5 +24,5 @@ autoload -U colors && colors # necessary. Without it, the ] from the jobs notifier fails to appear # in boldface. I think that resetting the colours is also resetting # all the character attributes. -export PS1="%(1j.%B[%{$fg[green]%}%j%{$reset_color%}%B]%b .)[%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%3~%{$reset_color%}] %# " +export PS1="%(1j.%B[%{$fg[green]%}%j%{$reset_color%}%B]%b .)[%{$fg[red]%}%m%{$reset_color%}:%{$fg[blue]%}%3~%{$reset_color%}] %# " export RPS1="%(?..%B%{$fg[red]%}%?%{$reset_color%}%b)" From 67da0e04d62ba6493ba33c8d60303beabded2855 Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Thu, 6 May 2021 16:25:13 +0100 Subject: [PATCH 5/9] nvim/init.vim: nvim directory will always be in the right place now --- nvim/init.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nvim/init.vim b/nvim/init.vim index 766b04f..f77c0f5 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -43,6 +43,13 @@ let g:zig_fmt_autosave = 0 " Plugins " Load plugin manager +" Plugin directory should be in XDG_CONFIG_HOME, or in ~/.config if that +" variable is unset +if $XDG_CONFIG_HOME ==# "" + let b:config_prefix="~/.config" +else + let b:config_prefix=$XDG_CONFIG_HOME +endif call plug#begin($XDG_CONFIG_HOME . 'nvim/plugins/') " Semantic understanding of languages From d9dd64b3a8aa66a5e07f60eeaac0e2706a4abdbb Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Thu, 6 May 2021 16:27:50 +0100 Subject: [PATCH 6/9] Add river/init --- river/init | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100755 river/init diff --git a/river/init b/river/init new file mode 100755 index 0000000..a726921 --- /dev/null +++ b/river/init @@ -0,0 +1,167 @@ +#!/bin/sh + +# This is the example configuration file for river. +# +# If you wish to edit this, you will probably want to copy it to +# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. +# +# See the river(1), riverctl(1), and river(1) man pages for complete +# documentation. + +# Use the "logo" key as the primary modifier +mod="Mod4" + +# Mod+Return to start an instance of foot (https://codeberg.org/dnkl/foot) +riverctl map normal $mod Return spawn foot + +# Mod+Shift+Q to close the focused view +riverctl map normal $mod+Shift Q close + +# Mod+Shift+E to exit +riverctl map normal $mod+Shift E exit + +# Mod+J and Mod+K to focus the next/previous view in the layout stack +riverctl map normal $mod J focus-view next +riverctl map normal $mod K focus-view previous + +# Mod+Shift+J and Mod+Shift+K to swap the focused view with the next/previous +# view in the layout stack +riverctl map normal $mod+Shift J swap next +riverctl map normal $mod+Shift K swap previous + +# Mod+Period and Mod+Comma to focus the next/previous output +riverctl map normal $mod Period focus-output next +riverctl map normal $mod Comma focus-output previous + +# Mod+Shift+{Period,Comma} to send the focused view to the next/previous output +riverctl map normal $mod+Shift Period send-to-output next +riverctl map normal $mod+Shift Comma send-to-output previous + +# Mod+Shift+Return to bump the focused view to the top of the layout stack +riverctl map normal $mod+Shift Return zoom + +# Mod+H and Mod+L to decrease/increase the main_factor value of rivertile by 0.05 +riverctl map normal $mod H mod-layout-value rivertile fixed main_factor -0.05 +riverctl map normal $mod L mod-layout-value rivertile fixed main_factor +0.05 + +# Mod+Shift+H and Mod+Shift+L to increment/decrement the main_count value of rivertile. +riverctl map normal $mod+Shift H mod-layout-value rivertile int main_count +1 +riverctl map normal $mod+Shift L mod-layout-value rivertile int main_count -1 + +# Mod+Alt+{H,J,K,L} to move views +riverctl map normal $mod+Mod1 H move left 100 +riverctl map normal $mod+Mod1 J move down 100 +riverctl map normal $mod+Mod1 K move up 100 +riverctl map normal $mod+Mod1 L move right 100 + +# Mod+Alt+Control+{H,J,K,L} to snap views to screen edges +riverctl map normal $mod+Mod1+Control H snap left +riverctl map normal $mod+Mod1+Control J snap down +riverctl map normal $mod+Mod1+Control K snap up +riverctl map normal $mod+Mod1+Control L snap right + +# Mod+Alt+Shif+{H,J,K,L} to resize views +riverctl map normal $mod+Mod1+Shift H resize horizontal -100 +riverctl map normal $mod+Mod1+Shift J resize vertical 100 +riverctl map normal $mod+Mod1+Shift K resize vertical -100 +riverctl map normal $mod+Mod1+Shift L resize horizontal 100 + +# Mod + Left Mouse Button to move views +riverctl map-pointer normal $mod BTN_LEFT move-view + +# Mod + Right Mouse Button to resize views +riverctl map-pointer normal $mod BTN_RIGHT resize-view + +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + + # Mod+[1-9] to focus tag [0-8] + riverctl map normal $mod $i set-focused-tags $tags + + # Mod+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal $mod+Shift $i set-view-tags $tags + + # Mod+Ctrl+[1-9] to toggle focus of tag [0-8] + riverctl map normal $mod+Control $i toggle-focused-tags $tags + + # Mod+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view + riverctl map normal $mod+Shift+Control $i toggle-view-tags $tags +done + +# Mod+0 to focus all tags +# Mod+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal $mod 0 set-focused-tags $all_tags +riverctl map normal $mod+Shift 0 set-view-tags $all_tags + +# Mod+Space to toggle float +riverctl map normal $mod Space toggle-float + +# Mod+F to toggle fullscreen +riverctl map normal $mod F toggle-fullscreen + +# Mod+{Up,Right,Down,Left} to change layout orientation +riverctl map normal $mod Up set-layout-value rivertile string main_location top +riverctl map normal $mod Right set-layout-value rivertile string main_location right +riverctl map normal $mod Down set-layout-value rivertile string main_location bottom +riverctl map normal $mod Left set-layout-value rivertile string main_location left + +# Declare a passthrough mode. This mode has only a single mapping to return to +# normal mode. This makes it useful for testing a nested wayland compositor +riverctl declare-mode passthrough + +# Mod+F11 to enter passthrough mode +riverctl map normal $mod F11 enter-mode passthrough + +# Mod+F11 to return to normal mode +riverctl map passthrough $mod F11 enter-mode normal + +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier +for mode in normal locked +do + # Eject the optical drive + riverctl map $mode None XF86Eject spawn eject -T + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn pamixer -i 5 + riverctl map $mode None XF86AudioLowerVolume spawn pamixer -d 5 + riverctl map $mode None XF86AudioMute spawn pamixer --toggle-mute + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn playerctl play-pause + riverctl map $mode None XF86AudioPlay spawn playerctl play-pause + riverctl map $mode None XF86AudioPrev spawn playerctl previous + riverctl map $mode None XF86AudioNext spawn playerctl next + + # Control screen backlight brighness with light (https://github.com/haikarainen/light) + riverctl map $mode None XF86MonBrightnessUp spawn light -A 5 + riverctl map $mode None XF86MonBrightnessDown spawn light -U 5 +done + +# Set repeat rate +riverctl set-repeat 50 300 + +# Set app-ids of views which should float +riverctl float-filter-add "float" +riverctl float-filter-add "popup" + +# Set app-ids of views which should use client side decorations +riverctl csd-filter-add "gedit" + +# Aesthetics +# Colour scheme +riverctl background-color "#EF5865" +riverctl border-color-focused "#7CF2C8" +riverctl border-color-unfocused "#3A606E" +# Border width +riverctl border-width 7 + +# Set opacity and fade effect +# riverctl opacity 1.0 0.75 0.0 0.1 20 + +# Set and exec into the default layout generator, rivertile. +# River will send the process group of the init executable SIGTERM on exit. +riverctl default-layout rivertile +exec rivertile From d30da7e1342921df40d1b0efe61dda116a2d2813 Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Thu, 6 May 2021 16:30:37 +0100 Subject: [PATCH 7/9] Add foot/foot.ini --- foot/foot.ini | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 foot/foot.ini diff --git a/foot/foot.ini b/foot/foot.ini new file mode 100644 index 0000000..cdb625d --- /dev/null +++ b/foot/foot.ini @@ -0,0 +1,140 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +font=terminus:pixelsize=28 +# font-bold= +# font-italic= +# font-bold-italic= +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# box-drawings-uses-font-glyphs=no +dpi-aware=yes + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +# pad=2x2 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a foot -i foot ${title} ${body} +# url-launch=xdg-open ${url} + +# bold-text-in-bright=no +# bell=none +# word-delimiters=,│`|:"'()[]{}<> +# jump-label-letters=sadfjklewcmpgh +# selection-target=primary +# workers= +# osc8-underline=url-mode + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format= + +[cursor] +# style=block +# color=111111 dcdccc +# blink=no + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[colors] +# alpha=1.0 +# foreground=dcdccc +# background=111111 +# regular0=222222 # black +# regular1=cc9393 # red +# regular2=7f9f7f # green +# regular3=d0bf8f # yellow +# regular4=6ca0a3 # blue +# regular5=dc8cc3 # magenta +# regular6=93e0e3 # cyan +# regular7=dcdccc # white +# bright0=666666 # bright black +# bright1=dca3a3 # bright red +# bright2=bfebbf # bright green +# bright3=f0dfaf # bright yellow +# bright4=8cd0d3 # bright blue +# bright5=fcace3 # bright magenta +# bright6=b3ffff # bright cyan +# bright7=ffffff # bright white +# selection-foreground= +# selection-background= +# jump-labels= +# urls= + +[csd] +# preferred=server +# size=26 +# color= +# button-width=26 +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c +# clipboard-paste=Control+Shift+v +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +font-increase=Control+plus Control+equal Control+KP_Add +font-decrease=Control+minus Control+KP_Subtract +font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+u +# show-urls-copy=none + +[search-bindings] +# cancel=Control+g Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+y +# primary-paste=Shift+Insert + +[url-bindings] +# cancel=Control+g Control+d Escape +# toggle-url-visible=t + +[mouse-bindings] +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 From 76205a84412311efa2a6c46ffa3f7bfe32f0f078 Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Thu, 6 May 2021 16:31:08 +0100 Subject: [PATCH 8/9] nvim/init.vim: turn syntax back on I experimented with not using syntax highlighting for a while but I decided I do in fact benefit from its presence. It would be nice to have proper semantic highlighting (as opposed to regex syntax highlighting) though. --- nvim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index f77c0f5..60cb4e4 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -101,5 +101,5 @@ else endif set background=dark -syntax off +syntax on colorscheme sourcerer From 4959b89adae53ffde6fcaf0d2fb7bce7e27057cf Mon Sep 17 00:00:00 2001 From: "Callum R. Renwick" Date: Thu, 6 May 2021 17:55:41 +0100 Subject: [PATCH 9/9] README: update --- README | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README b/README index e3070d5..065fad7 100644 --- a/README +++ b/README @@ -9,11 +9,23 @@ repository would not properly record my entire system configuration. ## Programs for which configuration files exist -* dwm (dynamic window manager) +### Programs I use regularly + * zsh (Z shell) -* alacritty * nvim (neovim) +* the `river` Wayland compositor +* the `foot` terminal emulator + +### Programs I no longer use regularly + +Because I don't use these programs regularly, the configuration files +for these might be for an older version of the program, and aren't +maintained. + +* dwm (dynamic window manager) * the wallpaper-setting component of feh +* xorg x server +* alacritty ## Fair warning