Merge 'trunk' (gitlab.com/C-Ren/config) into tilde

This commit is contained in:
Gender Demon 2021-05-22 19:37:29 +01:00
commit 51f935f0ef
10 changed files with 498 additions and 2748 deletions

View File

@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2020, Callum Renwick
Copyright (c) 2021, Callum Renwick
All rights reserved.
Redistribution and use in source and binary forms, with or without

18
README
View File

@ -9,11 +9,25 @@ 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
* bspwm (binary space partition window manager)
* sxhkd (simple x hotkey daemon)
## Fair warning

19
bspwmrc Normal file
View File

@ -0,0 +1,19 @@
#! /bin/sh
# run sxhkd if it's not already running
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d I II III IV V VI VII VIII IX X
bspc config border_width 2
bspc config window_gap 12
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a Chromium desktop='^2'
bspc rule -a mplayer2 state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off

162
foot/foot.ini Normal file
View File

@ -0,0 +1,162 @@
# -*- 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=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# line-height=<font metrics>
# 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=<COLSxROWS>
# initial-window-mode=windowed
pad=10x7 center # 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=<number of logical CPUs>
# 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]
<<<<<<< HEAD
alpha=1.0
foreground=ffffff
background=111217
regular0=171717 # black
regular1=ea4458 # red
regular2=d3e947 # green
regular3=fbde47 # yellow
regular4=5454b4 # blue
regular5=a54780 # magenta
regular6=5494b4 # cyan
regular7=969696 # white
bright0=303030 # bright black
bright1=ef7280 # bright red
bright2=deee75 # bright green
bright3=fce679 # bright yellow
bright4=7878c3 # bright blue
bright5=bf5494 # bright magenta
bright6=78aac4 # bright cyan
bright7=b0b0b0 # bright white
=======
# 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
>>>>>>> 4959b89adae53ffde6fcaf0d2fb7bce7e27057cf
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3>
# urls=<regular3>
[csd]
# preferred=server
# size=26
# color=<foreground color>
# button-width=26
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[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

View File

@ -1,24 +0,0 @@
The following is the licence for the plugin manager `vim-plug`, stored
as the file `plug.vim`.
MIT License
Copyright (c) 2017 Junegunn Choi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -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
@ -94,5 +101,5 @@ else
endif
set background=dark
syntax off
colorscheme sourcerer
syntax on
colorscheme srcery

168
river/init Executable file
View File

@ -0,0 +1,168 @@
#!/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+Q to close the focused view
riverctl map normal $mod 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
# Set wallpaper
riverctl spawn 'wbg ~/images/wallpapers/facets-la-ghosts_ii.jpg'
# Colour scheme
riverctl border-color-focused "#EA4458"
riverctl border-color-unfocused "#828282"
# 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 -main-factor 0.5 -view-padding 12 -outer-padding 24

120
sxhkdrc Normal file
View File

@ -0,0 +1,120 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
alacritty
# program launcher
super + @space
rofi -show run
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }w
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}

View File

@ -7,4 +7,7 @@ export PATH=$PATH:/home/cren/bin:/home/cren/.local/bin:/home/cren/.local/share/p
export PF_INFO="ascii title os kernel shell wm memory pkgs palette"
export PF_ASCII="linux"
# xorg display scaling. what a pain
export QT_SCALE_FACTOR=1.3
export TZ='Europe/London'