From cb8a0128e2aca2526202882e105b2ec210470e19 Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Thu, 21 May 2020 23:16:15 +0800 Subject: [PATCH] Update muh dotfiles --- alacritty/alacritty.yml | 3 +- aur-packages.txt | 38 +-- bin/askpass | 0 bin/choose-emoji-menu | 2 +- bin/choose-manual-menu | 2 +- bin/colorpicker | 18 ++ bin/commit-pkglist | 0 bin/export-wal-theme | 0 bin/extract | 0 bin/install-wal-theme | 4 +- bin/ocr | 2 +- bin/parse-barcodes | 16 + bin/rofi-screenshot-menu | 32 +- bin/select-wal-theme | 0 bin/toggle-process | 0 bin/user-prompt | 0 bspwm/bspwmrc | 5 +- emacs/init.el | 2 +- manager.py | 13 +- nvim/init.vim | 43 +-- packages.txt | 622 ++++++++++++++++++++------------------- polybar/config | 58 ++-- polybar/launch.sh | 0 sxhkd/sxhkdrc | 58 ++-- wal/templates/bspwmrc | 3 + zsh/.profile | 3 +- 26 files changed, 494 insertions(+), 430 deletions(-) mode change 100644 => 100755 bin/askpass mode change 100644 => 100755 bin/choose-emoji-menu mode change 100644 => 100755 bin/choose-manual-menu create mode 100755 bin/colorpicker mode change 100644 => 100755 bin/commit-pkglist mode change 100644 => 100755 bin/export-wal-theme mode change 100644 => 100755 bin/extract mode change 100644 => 100755 bin/install-wal-theme mode change 100644 => 100755 bin/ocr create mode 100755 bin/parse-barcodes mode change 100644 => 100755 bin/rofi-screenshot-menu mode change 100644 => 100755 bin/select-wal-theme mode change 100644 => 100755 bin/toggle-process mode change 100644 => 100755 bin/user-prompt mode change 100644 => 100755 bspwm/bspwmrc mode change 100644 => 100755 manager.py mode change 100644 => 100755 polybar/launch.sh diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index ae76d67..29ea163 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -80,8 +80,9 @@ scrolling: # Font configuration (changes require restart) font: - # Normal (roman) font face normal: + family: monospace + family: Source Code Pro family: Fira Code family: Iosevka #normal: diff --git a/aur-packages.txt b/aur-packages.txt index c51eea9..90bda69 100644 --- a/aur-packages.txt +++ b/aur-packages.txt @@ -1,17 +1,21 @@ -buku 4.3-1 -doom1-wad 1.9-2 -ffcast 1:2.5.0-1 -freedoom 0.12.1-2 -gzdoom 4.3.3-2 -lf-bin 14-2 -otf-stix 2.0.2-1 -pipes.sh 1.3.0-1 -polybar 3.4.2-2 -screenkey 0.9-4 -tdrop-git 0.3.0.r9.geb09fc2-1 -ttf-computer-modern-fonts 1-3 -ttf-iosevka 2.3.3-1 -wpgtk-git r783.2e009c3-1 -xorg-server-xdmx 1.20.6-1 -xurls 2.2.0-1 -yay 9.4.6-2 +android-studio +buku +doom1-wad +ffcast +freedoom +gzdoom +lf-bin +nix +otf-stix +pipes.sh +polybar +python2-scour +screenkey +tabbed +tdrop-git +ttf-computer-modern-fonts +ttf-iosevka +wpgtk-git +xorg-server-xdmx +xurls +yay diff --git a/bin/askpass b/bin/askpass old mode 100644 new mode 100755 diff --git a/bin/choose-emoji-menu b/bin/choose-emoji-menu old mode 100644 new mode 100755 index f34bb8d..1a26ed5 --- a/bin/choose-emoji-menu +++ b/bin/choose-emoji-menu @@ -12,7 +12,7 @@ emoji_file="$HOME/.local/share/emoji-test.txt" selection=$(awk 'match($0, /([0-9A-F ]+)\s+; fully-qualified\s+# (\S+) E[[:digit:]]+.[[:digit:]]+ (.+)$/, a){print a[2], a[3]}' "$emoji_file" \ - | rofi -dmenu -p "Choose an emoji to copy." \ + | rofi -dmenu -i -fuzzy -p "Choose an emoji to copy." \ | awk '{print $1}') if [ -n "$selection" ]; then diff --git a/bin/choose-manual-menu b/bin/choose-manual-menu old mode 100644 new mode 100755 index 4fd0c80..f7e24e3 --- a/bin/choose-manual-menu +++ b/bin/choose-manual-menu @@ -17,6 +17,6 @@ set -o pipefail -man -k . | rofi -dmenu -p 'Choose a manual' -theme fds-mini-sidebar | awk '{print $1}' | xargs --no-run-if-empty $TERMINAL --command man +man -k . | rofi -dmenu -p 'Choose a manual' -theme fds-mini-sidebar -width 60 | awk '{print $1}' | xargs --no-run-if-empty $TERMINAL --command man diff --git a/bin/colorpicker b/bin/colorpicker new file mode 100755 index 0000000..68bb98e --- /dev/null +++ b/bin/colorpicker @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +# Selects the region, echoes the hex string (in RGBA format) of the average color of the region. + +# Depedencies: +# * maim v5.6.3 +# * ImageMagick 7.0.10 + +# It's a small script and the main code is a chain of commands so a pipeline fail is appropriate here. +set -o pipefail + +# Make some form of user feedback. +notify-send "Select a region for color picking." + +# The color picker code. +# Take note it uses a slop shader named `crosshair` from the shader examples of the official repo at https://github.com/naelstrof/slop. +maim --select --shader crosshair --tolerance 0 --hidecursor | magick convert - -resize 1x1\! -format '#%[hex:p{0,0}]' info:- + diff --git a/bin/commit-pkglist b/bin/commit-pkglist old mode 100644 new mode 100755 diff --git a/bin/export-wal-theme b/bin/export-wal-theme old mode 100644 new mode 100755 diff --git a/bin/extract b/bin/extract old mode 100644 new mode 100755 diff --git a/bin/install-wal-theme b/bin/install-wal-theme old mode 100644 new mode 100755 index 7647ed5..7139943 --- a/bin/install-wal-theme +++ b/bin/install-wal-theme @@ -6,7 +6,7 @@ readonly cache=${XDG_CACHE_HOME:-"$HOME/.cache"} readonly config=${XDG_CONFIG_HOME:-"$HOME/.config"} -readonly pywal_cache=$cache/wal +readonly pywal_cache=${PYWAL_CACHE_DIR:-"$cache/wal"} # Copying the Pywal color scheme JSON into the theme list. # This file suffix removal is based on the linked code: @@ -23,7 +23,7 @@ cp "$pywal_cache/fds-center-menu.rasi" "$XDG_CONFIG_HOME/rofi" cp "$pywal_cache/dmenu.rasi" "$XDG_CONFIG_HOME/rofi" # Copying bspwm config and reloading it. -cp "$pywal_cache/bspwmrc" "$XDG_CONFIG_HOME/bspwm" && bspc wm -r +cp "$pywal_cache/bspwmrc" "$XDG_CONFIG_HOME/bspwm" && bspc wm --restart # Reloading polybar. pkill -USR1 polybar diff --git a/bin/ocr b/bin/ocr old mode 100644 new mode 100755 index 1bae6bc..1169de8 --- a/bin/ocr +++ b/bin/ocr @@ -15,5 +15,5 @@ set -o pipefail notify-send "Select a region for the OCR" -maim -s | tesseract - stdout | xclip -in -selection clipboard && notify-send "Image content has been copied on the clipboard." +maim -s | tesseract - stdout diff --git a/bin/parse-barcodes b/bin/parse-barcodes new file mode 100755 index 0000000..e43d271 --- /dev/null +++ b/bin/parse-barcodes @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +# Parse various code from image selection with zbarimg and maim. + +# Depedencies: +# * maim v5.6.3 +# * zbarimg v0.23.1 +# * GNU awk v5.1.0 +# * perl v5.30.2 + +# This is a small script so pipeline fails can be accepted here. +set -o pipefail + +notify-send "Select a region for the barcode (QR codes, ISBN, bar codes)" +maim -s | zbarimg - --quiet | perl -pe 's|(.+?):||' + diff --git a/bin/rofi-screenshot-menu b/bin/rofi-screenshot-menu old mode 100644 new mode 100755 index 9a8c039..50847f1 --- a/bin/rofi-screenshot-menu +++ b/bin/rofi-screenshot-menu @@ -214,14 +214,14 @@ record_screen_to_mkv() { ###################### get_options() { - echo "Capture Region  Clip" - echo "Capture Region  File" - echo "Capture Screen  Clip" - echo "Capture Screen  File" - echo "Record Region  File (GIF)" - echo "Record Screen  File (GIF)" - echo "Record Region  File (MKV)" - echo "Record Screen  File (MKV)" + echo "Capture Region --> Clip" + echo "Capture Region --> File" + echo "Capture Screen --> Clip" + echo "Capture Screen --> File" + echo "Record Region --> File (GIF)" + echo "Record Screen --> File (GIF)" + echo "Record Region --> File (MKV)" + echo "Record Screen --> File (MKV)" } # Checks if the shell has the following binary in $PATH through the `hash` builtin. @@ -287,37 +287,37 @@ main() { # Run the selected command. case $choice in - 'Capture Region  Clip') + 'Capture Region --> Clip') delay=$(rofi -dmenu -p "How many seconds for delay?") capture_region_to_clipboard $delay ;; - 'Capture Screen  Clip') + 'Capture Screen --> Clip') delay=$(rofi -dmenu -p "How many seconds for delay?") capture_screen_to_clipboard $delay ;; - 'Capture Region  File') + 'Capture Region --> File') delay=$(rofi -dmenu -p "How many seconds for delay?") capture_region_to_file $delay ;; - 'Capture Screen  File') + 'Capture Screen --> File') delay=$(rofi -dmenu -p "How many seconds for delay?") _countdown $delay capture_screen_to_file ;; - 'Record Region  File (GIF)') + 'Record Region --> File (GIF)') delay=$(rofi -dmenu -p "How many seconds for delay?") record_region_to_gif $delay ;; - 'Record Screen  File (GIF)') + 'Record Screen --> File (GIF)') delay=$(rofi -dmenu -p "How many seconds for delay?") _countdown $delay record_screen_to_gif ;; - 'Record Region  File (MKV)') + 'Record Region --> File (MKV)') delay=$(rofi -dmenu -p "How many seconds for delay?") record_region_to_mkv $delay ;; - 'Record Screen  File (MKV)') + 'Record Screen --> File (MKV)') delay=$(rofi -dmenu -p "How many seconds for delay?") _countdown $delay record_screen_to_mkv diff --git a/bin/select-wal-theme b/bin/select-wal-theme old mode 100644 new mode 100755 diff --git a/bin/toggle-process b/bin/toggle-process old mode 100644 new mode 100755 diff --git a/bin/user-prompt b/bin/user-prompt old mode 100644 new mode 100755 diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc old mode 100644 new mode 100755 index 3e60978..9f3eb44 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -9,12 +9,15 @@ bspc monitor -d I II III IV V bspc config border_width 2 bspc config window_gap 9 -bspc config split_ratio 0.52 +bspc config split_ratio 0.50 bspc config borderless_monocle true bspc config gapless_monocle true bspc config focused_border_color "#88C0D0" bspc config focus_follows_pointer true +# Set the default cursor to pointer +xsetroot -cursor_name left_ptr + # Rules bspc rule -a code-oss desktop=^2 bspc rule -a firefox desktop=^1 diff --git a/emacs/init.el b/emacs/init.el index 73d9a0a..32e5f6b 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -19,7 +19,7 @@ ;;japanese :completion - companyj ; the ultimate code completion backend + company ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ivy ; a search engine for love and life diff --git a/manager.py b/manager.py old mode 100644 new mode 100755 index bdeab96..41139ac --- a/manager.py +++ b/manager.py @@ -26,23 +26,20 @@ from pathlib import Path import subprocess import sys -PACKAGE_DATA_FILE="locations.json" +DEFAULT_PACKAGE_DATA_FILE="locations.json" class PackageDir: """ A package directory should have a file named `locations.json` where it contains a top-level object of the stow packages with their usual target path. """ - def __init__(self, package_path = None): + def __init__(self, package_path = os.getcwd(), package_data_path = DEFAULT_PACKAGE_DATA_FILE): """ Creates an instance of PackageDir :param: package_path - The directory where it should contain a file named `locations.json`. """ - if package_path is None: - package_path = os.getcwd() - - package_path = Path(package_path) - self.path = package_path + self.path = Path(package_path) + self.data_path = Path(package_data_path) # Loads the packages self.packages = {} @@ -116,7 +113,7 @@ class PackageDir: @property def json_location(self): """ Simply appends the path with the required JSON file. """ - return self.path / PACKAGE_DATA_FILE + return self.path / self.data_path def setup_logging(): diff --git a/nvim/init.vim b/nvim/init.vim index 647f223..7cf86a2 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -3,28 +3,31 @@ """"""""""" " This configuration uses vim-plug (https://github.com/junegunn/vim-plug) as -" the plugin manager. -" Activate it with ':PlugInstall' for the first time (and when adding new plugins). -" And run ':PlugUpgrade' for upgrading the plugins. +" the plugin manager. +" Activate it with ':PlugInstall' for the first time (and when adding new plugins). +" And run ':PlugUpgrade' for upgrading the plugins. call plug#begin('~/.config/nvim/plugged') " Nord color scheme Plug 'arcticicestudio/nord-vim' Plug 'gruvbox-community/gruvbox' -" A snippets engine. -" One of the must-haves for me. +" Colorize common color strings +Plug 'lilydjwg/colorizer' + +" A snippets engine. +" One of the must-haves for me. Plug 'sirver/ultisnips' -" Setting my private snippets in a consistent home directory and a relative snippets directory for project-specific snippets. +" Setting my private snippets in a consistent home directory and a relative snippets directory for project-specific snippets. let g:UltiSnipsSnippetDirectories = [$HOME . "/.config/nvim/own-snippets", ".snippets"] let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" let g:UltiSnipsEditSplit="context" -" A completion engine. -" I chose this engine since it is linked from UltiSnips. +" A completion engine. +" I chose this engine since it is linked from UltiSnips. if has('nvim') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } else @@ -34,15 +37,15 @@ else endif let g:deoplete#enable_at_startup = 1 -" Contains various snippets for UltiSnips. +" Contains various snippets for UltiSnips. Plug 'honza/vim-snippets' -" Plugin for auto-saving for each change in the buffer (file). +" Plugin for auto-saving for each change in the buffer (file). Plug '907th/vim-auto-save' let g:auto_save = 1 -" One of the most popular plugins. -" Allows to create more substantial status bars. +" One of the most popular plugins. +" Allows to create more substantial status bars. Plug 'vim-airline/vim-airline' let g:airline_powerline_fonts = 1 @@ -50,9 +53,9 @@ if !exists('g:airline_symbols') let g:airline_symbols = {} endif -" A full LaTeX toolchain plugin for Vim. -" Also a must-have for me since writing LaTeX can be a PITA. -" Most of the snippets and workflow is inspired from Gilles Castel's posts (at https://castel.dev/). +" A full LaTeX toolchain plugin for Vim. +" Also a must-have for me since writing LaTeX can be a PITA. +" Most of the snippets and workflow is inspired from Gilles Castel's posts (at https://castel.dev/). Plug 'lervag/vimtex' let g:tex_flavor='latex' let g:vimtex_view_method='zathura' @@ -68,7 +71,7 @@ let g:vimtex_compiler_latexmk = { \ ] \} -" I use LuaLaTeX for my documents so let me have it as the default, please? +" I use LuaLaTeX for my documents so let me have it as the default, please? let g:vimtex_compiler_latexmk_engines = { \ '_' : '-lualatex', \ 'pdflatex' : '-pdf', @@ -80,10 +83,10 @@ let g:vimtex_compiler_latexmk_engines = { \ 'context (xetex)' : '-pdf -pdflatex=''texexec --xtx''', \} -" Enable visuals for addition/deletion of lines in the gutter (side) similar to Visual Studio Code. +" Enable visuals for addition/deletion of lines in the gutter (side) similar to Visual Studio Code. Plug 'airblade/vim-gitgutter' -" Plugin for distraction-free writing. +" Plugin for distraction-free writing. Plug 'junegunn/goyo.vim' call plug#end() @@ -148,7 +151,7 @@ highlight clear SpellRare " EVENTS " """""""""" -" Show leading spaces. +" Show leading spaces. " SOURCE: https://www.reddit.com/r/vim/comments/5fxsfy/show_leading_spaces/ hi Conceal guibg=NONE ctermbg=NONE ctermfg=DarkGrey autocmd BufWinEnter * setl conceallevel=1 @@ -163,7 +166,7 @@ let template_list = [ \ ["", ".synctex"], \] -" Additional LaTeX files cleanup. +" Additional LaTeX files cleanup. function VimtexAdditionalCleanup(template_list) call vimtex#compiler#clean(1) let file_name = expand("%:t:r") diff --git a/packages.txt b/packages.txt index 0acff3a..3e12d46 100644 --- a/packages.txt +++ b/packages.txt @@ -1,305 +1,317 @@ -0ad a23.1-8 -0ad-data a23.1-1 -adobe-source-sans-pro-fonts 3.006-1 -adobe-source-serif-pro-fonts 3.001-1 -alacritty 0.4.2-2 -alex 3.2.5-8 -alsa-plugins 1.2.2-1 -alsa-utils 1.2.2-1 -amd-ucode 20200421.78c0348-1 -anki 2.1.15-1 -apache 2.4.43-1 -arandr 0.1.10-4 -arc-gtk-theme 20190917-1 -arc-icon-theme 20161122-2 -arch-audit 0.1.15-1 -archiso 43-1 -archlinux-contrib 20190911-1 -ardour 5.12-14 -asciidoctor 2.0.10-2 -audacious 4.0.3-1 -audacity 1:2.3.3-2 -autoconf 2.69-7 -automake 1.16.2-1 -base 2-2 -bash 5.0.016-1 -bat 0.13.0-1 -binutils 2.34-2 -bison 3.5.4-1 -blender 17:2.82.a-3 -breeze-gtk 5.18.4.1-1 -breeze-icons 5.69.0-1 -bspwm 0.9.9-1 -bzip2 1.0.8-3 -cabal-install 3.2.0.0-3 -cadence 0.9.1-2 -carla 2.1-1 -chromium 81.0.4044.129-1 -clang 10.0.0-2 -code 1.44.2-1 -coreutils 8.32-1 -cowsay 3.04-1 -cronie 1.5.5-1 -cryptsetup 2.3.2-1 -device-mapper 2.02.187-1 -dhall 1.31.1-17 -dhall-json 1.6.3-21 -dhcpcd 9.0.2-1 -diffutils 3.7-3 -dmenu 4.9-1 -docker 1:19.03.8-2 -docker-compose 1.25.5-1 -dunst 1.4.1-1 -e2fsprogs 1.45.6-1 -editorconfig-core-c 0.12.3-1 -efibootmgr 17-1 -emacs 26.3-1 -entr 4.4-1 -erlang 22.2.7-1 -espeak 1:1.48.04-2 -exa 0.9.0-1 -fakeroot 1.24-2 -fd 8.0.0-1 -feh 3.4-1 -file 5.38-3 -filesystem 2019.10-2 -findutils 4.7.0-2 -firefox 75.0-2 -firefox-developer-edition 76.0b8-1 -flex 2.6.4-3 -freeglut 3.2.1-1 -fzf 0.21.1-1 -gawk 5.1.0-1 -gcc 9.3.0-1 -gcc-libs 9.3.0-1 -gdb 9.1-2 -gettext 0.20.2-1 -ghc 8.10.1-2 -gimp 2.10.18-6 -gimp-help-en 2.10.0-1 -git 2.26.2-1 -glava 1.6.3-1 -glibc 2.31-2 -gnu-netcat 0.7.1-7 -go 2:1.14.2-1 -gource 0.51-3 -graphviz 2.44.0-1 -grep 3.4-1 -groff 1.22.4-3 -gucharmap 13.0.0-1 -gvfs 1.44.1-1 -gzip 1.10-3 -happy 1.19.12-7 -hexyl 0.7.0-1 -htop 2.2.0-3 -hugo 0.69.2-1 -i3-gaps 4.18.1-1 -i3blocks 1.5-3 -i3status 2.13-2 -inetutils 1.9.4-8 -inkscape 0.92.5-1 -iproute2 5.6.0-1 -iputils 20190709-2 -jack2 1.9.14-1 -jdk-openjdk 13.0.2.u8-1 -jfsutils 1.1.15-7 -jq 1.6-2 -jre-openjdk 13.0.2.u8-1 -keybase 5.4.2-1 -kicad 5.1.5-2 -kicad-library 5.1.5-1 -krita 4.2.9-2 -less 551-3 -libtool 2.4.6+42+gb88cebd5-11 -licenses 20200427-1 -linux 5.6.8.arch1-1 -linux-firmware 20200421.78c0348-1 -lldb 10.0.0-2 -llvm 10.0.0-1 -lmms 1.2.1-3 -logrotate 3.16.0-1 -lolcat 100.0.0-2 -lvm2 2.02.187-1 -lxappearance 0.6.3-2 -lxsession 1:0.5.5-1 -m4 1.4.18-3 -maim 5.6.3-1 -make 4.3-3 -man-db 2.9.1-2 -man-pages 5.06-2 -mdadm 4.1-2 -mediawiki 1.34.1-1 -moreutils 0.63-1 -mpg123 1.25.13-1 -mpv 1:0.32.0-4 -musescore 3.4.2-1 -musl 1.2.0-1 -nano 4.9.2-1 -ncmpcpp 0.8.2-11 -neofetch 7.0.0-1 -neovim 0.4.3-3 -netctl 1.22-1 -networkmanager 1.22.11dev+36+g6abf71f05-1 -nnn 3.1-1 -nodejs 14.1.0-1 -nodejs-material-design-icons 3.0.1-2 -noto-fonts 20190926-4 -noto-fonts-emoji 20191016-6 -npm 6.14.4-1 -ntfs-3g 2017.3.23-4 -obs-studio 25.0.8-1 -octave 5.2.0-2 -otf-latin-modern 2.004-3 -otf-latinmodern-math 1.959-3 -p7zip 16.02-5 -pacman 5.2.1-4 -pacman-contrib 1.3.0-1 -pamixer 1.4-3 -pandoc 2.9.2.1-25 -patch 2.7.6-8 -pavucontrol 1:4.0-1 -pciutils 3.6.4-1 -perl 5.30.2-1 -php 7.4.5-1 -picom 7.5-3 -pkgconf 1.6.3-4 -processing 3.5.4-1 -procps-ng 3.3.16-1 -psmisc 23.3-2 -pstoedit 3.75-1 -pulseaudio 13.0-3 -pulseaudio-alsa 2-5 -pulseaudio-jack 13.0-3 -pulsemixer 1.5.0-2 -pv 1.6.6-2 -python-pip 20.0.2-1 -python-pynvim 0.4.1-1 -python-pywal 3.3.0-2 -python2-scour 0.37-4 -qbittorrent 4.2.5-1 -qrencode 4.0.2-1 -qt5-script 5.14.2-1 -r 4.0.0-1 -racket 7.5-2 -reiserfsprogs 3.6.27-3 -rofi 1.5.4-1 -ruby 2.7.1-2 -ruby-rouge 3.14.0-2 -s-nail 14.9.19-1 -scrot 1.2-1 -sed 4.8-1 -shadow 4.8.1-1 -shotcut 20.04.12-1 -sonic-pi 3.2.2-1 -soundfont-fluid 3.1-2 -sox 14.4.2-5 -stack 2.3.0.1-8 -stow 2.3.1-2 -strace 5.6-1 -sudo 1.8.31.p1-1 -sxhkd 0.6.1-1 -sxiv 26-1 -sysfsutils 2.1.0-11 -systemd 245.5-2 -systemd-sysvcompat 245.5-2 -tabbed 0.6-3 -tar 1.32-3 -telegram-desktop 2.1.0-1 -tesseract 4.1.1-1 -tesseract-data-eng 1:4.0.0-1 -texinfo 6.7-3 -texlive-bibtexextra 2019.52577-1 -texlive-core 2019.52579-1 -texlive-fontsextra 2019.52580-1 -texlive-formatsextra 2019.51280-1 -texlive-latexextra 2019.52575-1 -texlive-pictures 2019.52499-1 -texlive-science 2019.52582-1 -thunar 1.8.14-1 -thunar-volman 0.9.5-2 -thunderbird 68.7.0-1 -timidity++ 2.15.0-2 -tmux 3.1_a-1 -tor 0.4.2.7-1 -tree 1.8.0-2 -ttf-bitstream-vera 1.10-12 -ttf-dejavu 2.37-2 -ttf-fira-code 3.1-1 -ttf-font-awesome 5.13.0-1 -ttf-ibm-plex 4.0.2-2 -ttf-jetbrains-mono 1.0.5-1 -ttf-joypixels 5.5.0-3 -ttf-nerd-fonts-symbols 2.1.0+36+gd0bf73a1-2 -udiskie 2.1.1-1 -upx 3.96-2 -usbutils 012-2 -util-linux 2.35.1-2 -vagrant 2.2.7-5 -vi 1:070224-4 -vim 8.2.0510-2 -vlc 3.0.10-1 -weechat 2.8-2 -wget 1.20.3-2 -which 2.21-5 -xarchiver 0.5.4.14-1 -xautomation 1.09-3 -xclip 0.13-2 -xdg-user-dirs 0.17-2 -xdotool 3.20160805.1-2 -xf86-video-nouveau 1.0.16-1 -xf86-video-vesa 2.4.0-2 -xfsprogs 5.6.0-1 -xorg-bdftopcf 1.1-1 -xorg-docs 1.7.1-2 -xorg-font-util 1.3.2-1 -xorg-fonts-100dpi 1.0.3-4 -xorg-fonts-75dpi 1.0.3-4 -xorg-fonts-encodings 1.0.5-1 -xorg-iceauth 1.0.8-1 -xorg-luit 1.1.1-3 -xorg-mkfontscale 1.2.1-2 -xorg-server 1.20.8-1 -xorg-server-common 1.20.8-1 -xorg-server-devel 1.20.8-1 -xorg-server-xephyr 1.20.8-1 -xorg-server-xnest 1.20.8-1 -xorg-server-xvfb 1.20.8-1 -xorg-server-xwayland 1.20.8-1 -xorg-sessreg 1.1.2-1 -xorg-setxkbmap 1.3.2-1 -xorg-smproxy 1.0.6-2 -xorg-x11perf 1.6.1-1 -xorg-xauth 1.1-1 -xorg-xbacklight 1.2.3-1 -xorg-xcmsdb 1.0.5-2 -xorg-xcursorgen 1.0.7-1 -xorg-xdpyinfo 1.3.2-3 -xorg-xdriinfo 1.0.6-1 -xorg-xev 1.2.3-1 -xorg-xgamma 1.0.6-2 -xorg-xhost 1.0.8-1 -xorg-xinit 1.4.1-1 -xorg-xinput 1.6.3-1 -xorg-xkbcomp 1.4.3-1 -xorg-xkbevd 1.1.4-2 -xorg-xkbutils 1.0.4-3 -xorg-xkill 1.0.5-1 -xorg-xlsatoms 1.1.3-1 -xorg-xlsclients 1.1.4-1 -xorg-xmodmap 1.0.10-1 -xorg-xpr 1.0.5-1 -xorg-xprop 1.2.4-1 -xorg-xrandr 1.5.1-1 -xorg-xrdb 1.2.0-1 -xorg-xrefresh 1.0.6-1 -xorg-xset 1.2.4-1 -xorg-xsetroot 1.1.2-1 -xorg-xvinfo 1.1.4-1 -xorg-xwd 1.0.7-1 -xorg-xwininfo 1.1.5-1 -xorg-xwud 1.0.5-1 -youtube-dl 2020.03.24-1 -zathura 0.4.5-1 -zathura-pdf-mupdf 0.3.5-3 -zsh 5.8-1 -zsh-completions 0.31.0-1 +0ad +0ad-data +adobe-source-sans-pro-fonts +adobe-source-serif-pro-fonts +alacritty +alex +alsa-plugins +alsa-utils +amd-ucode +android-tools +anki +apache +arandr +arc-gtk-theme +arc-icon-theme +arch-audit +archiso +archlinux-contrib +ardour +asciidoctor +audacious +audacity +autoconf +automake +base +bash +bat +binutils +bison +blender +breeze-gtk +breeze-icons +bspwm +bzip2 +cabal-install +cadence +carla +chromium +clang +code +coreutils +cowsay +cronie +cryptsetup +device-mapper +dhall +dhall-json +dhcpcd +diffutils +dmenu +docker +docker-compose +dunst +e2fsprogs +editorconfig-core-c +efibootmgr +emacs +entr +erlang +espeak +exa +fakeroot +fd +feh +festival +file +filesystem +findutils +firefox +firefox-developer-edition +flex +fontforge +foremost +freeglut +fzf +gawk +gcc +gcc-libs +gdb +gettext +ghc +gimp +gimp-help-en +git +glava +glibc +gnu-netcat +go +gource +graphviz +grep +groff +gucharmap +gvfs +gzip +happy +hexyl +htop +hugo +inetutils +inkscape +iproute2 +iputils +iwd +jack2 +jdk-openjdk +jfsutils +jq +jre-openjdk +kcharselect +keybase +kicad +kicad-library +krita +less +libtool +licenses +linux +linux-firmware +lldb +llvm +lmms +logrotate +lolcat +lvm2 +lxappearance +lxsession +m4 +maim +make +man-db +man-pages +mdadm +mediawiki +moreutils +mpg123 +mpv +musescore +musl +nano +ncmpcpp +neofetch +neomutt +neovim +netctl +networkmanager +newsboat +nnn +nodejs +nodejs-material-design-icons +noto-fonts +noto-fonts-cjk +noto-fonts-emoji +npm +ntfs-3g +obs-studio +octave +orca +otf-latin-modern +otf-latinmodern-math +p7zip +pacman +pacman-contrib +pamixer +pandoc +patch +pavucontrol +pciutils +perl +php +picom +pkgconf +powertop +procps-ng +psmisc +pstoedit +pulseaudio +pulseaudio-alsa +pulseaudio-jack +pulsemixer +pv +python-pip +python-pynvim +python-pywal +qbittorrent +qemu +qrencode +qt5-script +r +racket +reiserfsprogs +repo +rofi +ruby +ruby-rouge +s-nail +scrot +sed +shadow +shotcut +sonic-pi +soundfont-fluid +sox +stack +stow +strace +sudo +sxhkd +sxiv +syncthing +sysfsutils +systemd +systemd-sysvcompat +tar +telegram-desktop +tesseract +tesseract-data-eng +texinfo +texlive-bibtexextra +texlive-core +texlive-fontsextra +texlive-formatsextra +texlive-latexextra +texlive-pictures +texlive-science +thunar +thunar-volman +thunderbird +timidity++ +tmux +tor +tree +ttf-bitstream-vera +ttf-dejavu +ttf-fira-code +ttf-font-awesome +ttf-ibm-plex +ttf-jetbrains-mono +ttf-joypixels +ttf-nerd-fonts-symbols +udiskie +unison +upx +usbutils +util-linux +vagrant +vi +vim +vlc +weechat +wesnoth +wget +which +wkhtmltopdf +xarchiver +xautomation +xclip +xdg-user-dirs +xdotool +xf86-video-nouveau +xf86-video-vesa +xfsprogs +xorg-bdftopcf +xorg-docs +xorg-font-util +xorg-fonts-100dpi +xorg-fonts-75dpi +xorg-fonts-encodings +xorg-iceauth +xorg-luit +xorg-mkfontscale +xorg-server +xorg-server-common +xorg-server-devel +xorg-server-xephyr +xorg-server-xnest +xorg-server-xvfb +xorg-server-xwayland +xorg-sessreg +xorg-setxkbmap +xorg-smproxy +xorg-x11perf +xorg-xauth +xorg-xbacklight +xorg-xcmsdb +xorg-xcursorgen +xorg-xdpyinfo +xorg-xdriinfo +xorg-xev +xorg-xgamma +xorg-xhost +xorg-xinit +xorg-xinput +xorg-xkbcomp +xorg-xkbevd +xorg-xkbutils +xorg-xkill +xorg-xlsatoms +xorg-xlsclients +xorg-xmodmap +xorg-xpr +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xrefresh +xorg-xset +xorg-xsetroot +xorg-xvinfo +xorg-xwd +xorg-xwininfo +xorg-xwud +youtube-dl +zathura +zathura-pdf-mupdf +zbar +zsh +zsh-completions diff --git a/polybar/config b/polybar/config index 12c59a2..f97dc35 100644 --- a/polybar/config +++ b/polybar/config @@ -24,13 +24,13 @@ module-margin = 1 module-padding = 1 - font-0 = "Iosevka" - font-1 = "Fira Code" + font-0 = "Iosevka;2" + font-1 = "Fira Code;2" ; Our fallback fonts are mostly used as icon fonts. ; For future references, the version of Font Awesome used here is at v5.13.0. ; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/). - font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid" + font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid;2" ; This creates the illusion as if the modules are in the center. __border-size = 5 @@ -49,13 +49,6 @@ label-padding = 1 -; Usually used for -[module-button-style] - format-padding = 2 - format-background = ${colors.accent} - format-foreground = ${colors.background} - - ; The main bar. [bar/fds-bar] background = ${colors.background} @@ -64,24 +57,36 @@ inherit = bar-common-style enable-ipc = true - modules-left = start-menu bspwm - modules-right = pulseaudio memory eth date + modules-left = bspwm + modules-center = date + modules-right = pulseaudio eth memory home-fs root-fs -[module/start-menu] - inherit = module-button-style - type = custom/script - exec = echo ';' - click-left = rofi -show drun -sidebar-mode -theme fds-mini-sidebar - label = "" +[module/home-fs] + type = internal/fs + mount-0 = /home + format-margin = 0 + format-padding = 0 + label-margin = 0 + label-padding = 0 + + format-mounted-prefix = "" + format-mounted-prefix-margin-right = 1 + format-unmounted-prefix = "" + format-unmounted-prefix-margin-right = 1 + label-mounted = %free% + label-unmounted = N/A -[module/power-menu] - inherit = module-button-style - type = custom/script - exec = echo ';' - click-left = $HOME/bin/prompt "Proceed to shutdown?" "sudo -A shutdown 0" - label = "" +[module/root-fs] + type = internal/fs + mount-0 = / + format-mounted-prefix = "" + format-mounted-prefix-margin-right = 1 + format-unmounted-prefix = "" + format-unmounted-prefix-margin-right = 1 + label-mounted = %free% + label-unmounted = N/A [module/bspwm] @@ -129,7 +134,6 @@ [module/eth] - inherit = module-common-style type = internal/network interface = enp4s0 interval = 3 @@ -150,13 +154,13 @@ ; We've formatted the time string to alter between the time and the date instead. ; Although, I feel it's a hacky workaround, it still is functional as a date module. - date = "%F" + date = "%A, %F" date-alt = "%B %d, %Y" time = %T time-alt = %F format-prefix = "" - label = %time% + label = %date% %time% [module/pulseaudio] diff --git a/polybar/launch.sh b/polybar/launch.sh old mode 100644 new mode 100755 diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 79bc0e9..cb17a53 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -10,10 +10,6 @@ super + shift + Return super + t toggle-process screenkey - - -# Utility keyboard shortcuts. - # Application launcher. super + d rofi -show drun -sidebar-mode -theme fds-mini-sidebar @@ -29,16 +25,15 @@ super + F12 user-prompt "Exit from X session?" "killall Xorg" # Screenshot and screencast launcher. -{_, shift + } Print - rofi-screenshot-menu {_, --stop} +super + {_, shift + } Print + rofi-screenshot-menu {_, --stop && notify-send "All recording has stopped" || notify-send "There's no active recording process"} -# Screenshot with OCR capability -super + shift + w - ocr - -# Screen record shortcuts. -{_,shift +} {_,control +} super + Print - record --output $\{VIDEOS_DIRECTORY:-$HOME/recordings\} {_,--disable-cursor} {_,--follow-mouse} +# A bunch of miscellaneous scripts. +super + x ; {a, s, d} + set -o pipefail && \ + {ocr | xclip -in -selection clipboard && notify-send "Image content has been copied on the clipboard.", \ + parse-barcodes | xclip -selection clipboard && notify-send "Bar code content has been copied.", \ + colorpicker | xclip -selection clipboard && notify-send "Color copied to clipboard."} # Miscellaneous shortcuts. super + shift + m @@ -58,7 +53,7 @@ shift + super + r # The usual application suite shortcuts. # I'm separating them according to the keyboard row (in the QWERTY layout anyway). super + a ; {z, x, c, v, b, n, m} - { nvim, code, inkscape, gimp, blender, kdenlive, lmms } + { $TERMINAL -e nvim, code, inkscape, gimp, blender, kdenlive, lmms } super + a ; {f, a, d} { firefox, $TERMINAL -e lf, krita } @@ -73,29 +68,36 @@ super + a ; {t, r} # Over time, I may replace one of the usual shortcut # with something more generally applied (with `xdotool` for example). -# Kill the focused window. +# Close/Kill the focused window. +# Difference between closing a window and killing a window is how the process is killed. +# Closing a window only terminates the process for that window while killing a window terminates all of the related process of that window. +# For example, try opening two Firefox instance and test how it differs. super + {_, shift +} + q - bspc node -{c,k} + bspc node --{close,kill} # Move desktop/node view to the specified desktop. super + {_,shift + }{1-9,0} - bspc {desktop -f,node -d} '^{1-9,10}' - -super + z - bspc node -t '~floating' - -super + x - bspc node -t '~fullscreen' - -super + c - bspc node -t '~tiled' + bspc {desktop --focus,node --to-desktop} '^{1-9,10}' # Desktop and node movements. super + {_, shift + } Tab bspc desktop {next, prev} --focus -super + {_, shift + } + grave - bspc {desktop last --focus, node --to-desktop last} +# less is <, greater is > +super + {less, greater} + bspc node --to-desktop {prev,next} + +# Window state 'mode' +super + z ; {z,x,c,v} + bspc node --state {floating,fullscreen,tiled,pseudo_tiled} + +# Window resize 'mode' +super + r : {h,j,k,l} + bspc node --resize {left -10 0,bottom 0 10,top 0 -10,right 10 0} + +# grave is ` +super + grave + bspc desktop --focus last.occupied super + {Up,Down,Left,Right} bspc node {north,south,west,east} --focus diff --git a/wal/templates/bspwmrc b/wal/templates/bspwmrc index f770e90..9fc7500 100644 --- a/wal/templates/bspwmrc +++ b/wal/templates/bspwmrc @@ -15,6 +15,9 @@ bspc config gapless_monocle true bspc config focused_border_color "{color6}" bspc config focus_follows_pointer true +# Set the default cursor to pointer +xsetroot -cursor_name left_ptr + # Rules bspc rule -a code-oss desktop=^2 bspc rule -a firefox desktop=^1 diff --git a/zsh/.profile b/zsh/.profile index a41eb97..d363759 100644 --- a/zsh/.profile +++ b/zsh/.profile @@ -18,7 +18,8 @@ export BIN_DIRECTORY=$HOME/bin export VIDEO_DIRECTORY=$HOME/recordings # If you come from bash you might have to change your $PATH. -export PATH="$BIN_DIRECTORY:/usr/local/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$PATH" +export DENO_INSTALL="$HOME/.deno" +export PATH="$BIN_DIRECTORY:/usr/local/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$DENO_INSTALL/bin:$PATH" # export MANPATH="$MANPATH:$HOME/.local/share/man" # Common environmental variables.