Update some stuff

This commit is contained in:
foo-dogsquared 2020-04-02 23:42:52 +08:00
parent e5222304a1
commit 05c722ed53
15 changed files with 494 additions and 504 deletions

View File

@ -77,17 +77,6 @@ scrolling:
# scroll back is enabled (history > 0).
multiplier: 3
# Scroll to the bottom when new text is written to the terminal.
auto_scroll: false
# Spaces per Tab (changes require restart)
#
# This setting defines the width of a tab in cells.
#
# Some applications, like Emacs, rely on knowing about the width of a tab.
# To prevent unexpected behavior in these applications, it's also required to
# change the `it` value in terminfo when altering this setting.
tabspaces: 4
# Font configuration (changes require restart)
font:

View File

@ -28,18 +28,18 @@ help_section="Create a theme with wal and copy the theme JSON in the appropriate
Usage: $0 IMAGE_PATH [-o/--output OUTPUT_DIR] [--light-mode]
Options:
* -o, --output OUTPUT_DIR - The location where the JSON file will be copied.
The given argument should be a directory that already exists.
The default value is given from the 'OUTPUT' variable.
* -o, --output <OUTPUT_DIR> - The location of the wal config folder.
The default value is '$HOME/.config/wal'.
* --light-mode - Create a light mode theme.
Appends the resulting file name with '$LIGHT_MODE_SUFFIX'.
* -b, --background BG_COLOR - Creates the theme with the following background color.
* -b, --background <BG_COLOR> - Creates the theme with the following background color.
This is passed to the 'wal' command.
* -e, --execute <STRING> - Append the resulting wal command with the given string.
"
# Setting the variables for the program.
# Feel free to change `OUTPUT_DIR`.
OUTPUT_DIR="~/.local/share/wal"
OUTPUT_DIR="$HOME/.config/wal"
LIGHT_MODE=0
IMAGE_PATH="$1"
@ -60,6 +60,10 @@ do
BG_COLOR="$2"
shift
shift;;
-e|--execute)
EXECUTE="$2"
shift
shift;;
*)
shift;;
esac
@ -67,7 +71,7 @@ done
image_basename=$(extract_path_without_ext "$IMAGE_PATH")
wal_command_string="wal -i $IMAGE_PATH"
output_file=$([ $LIGHT_MODE -eq 1 ] && echo "$OUTPUT_DIR/$image_basename$LIGHT_MODE_SUFFIX.json" || echo "$OUTPUT_DIR/$image_basename.json")
output_file=$([ $LIGHT_MODE -eq 1 ] && echo "$OUTPUT_DIR/colorschemes/light/$image_basename" || echo "$OUTPUT_DIR/colorschemes/dark/$image_basename.json")
if [[ $LIGHT_MODE -eq 1 ]]; then
wal_command_string+=" -l"
@ -77,4 +81,8 @@ if [[ -n "$BG_COLOR" ]]; then
wal_command_string+=" -b $BG_COLOR"
fi
if [[ -n "$EXECUTE" ]]; then
wal_command_string+="$EXECUTE"
fi
command -p $wal_command_string && cp "$CACHE_DIR/colors.json" "$output_file"

View File

@ -1,15 +1,25 @@
" Plugin list (using vim-plug).
" Activate it with ':PlugInstall' for the first time.
"""""""""""
" Plugins "
"""""""""""
" 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.
call plug#begin('~/.config/nvim/plugged')
" A snippets engine.
" One of the must-haves for me.
Plug 'sirver/ultisnips'
" Setting my private snippets in a consistent home directory
let g:UltiSnipsSnippetDirectories = [$HOME . "/.config/nvim/own-snippets", "own-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="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="context"
" A completion engine.
" I chose this engine since it is linked from UltiSnips.
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
@ -19,13 +29,18 @@ else
endif
let g:deoplete#enable_at_startup = 1
" A built-in file explorer inside of Vim.
Plug 'scrooloose/nerdtree'
" Contains various snippets for UltiSnips.
Plug 'honza/vim-snippets'
" 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.
Plug 'vim-airline/vim-airline'
let g:airline_powerline_fonts = 1
@ -33,6 +48,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/).
Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
@ -48,6 +66,7 @@ let g:vimtex_compiler_latexmk = {
\ ]
\}
" I use LuaLaTeX for my documents so let me have it as the default, please?
let g:vimtex_compiler_latexmk_engines = {
\ '_' : '-lualatex',
\ 'pdflatex' : '-pdf',
@ -59,11 +78,20 @@ 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.
Plug 'airblade/vim-gitgutter'
" Plugin for distraction-free writing.
Plug 'junegunn/goyo.vim'
call plug#end()
"""""""""""""""""""""""""
" Editor configurations "
"""""""""""""""""""""""""
" Quick escape to default mode.
inoremap jk <Esc>
@ -87,6 +115,7 @@ let template_list = [
\ ["", ".synctex"],
\]
" Additional LaTeX files cleanup.
function VimtexAdditionalCleanup(template_list)
call vimtex#compiler#clean(1)
let file_name = expand("%:t:r")
@ -118,7 +147,11 @@ autocmd vimenter * NERDTree
" Set list and other listing characters (:h listchars).
set list listchars=tab:→\ ,trail
" Show leading spaces.
" Instant Goyo toggle
map <leader>f :Goyo \| set linebreak<Enter>
" Show leading spaces.
" I don't know what is happening here but I'll know it... someday.
" 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
@ -128,7 +161,7 @@ autocmd BufReadPre * syn match LeadingSpace /\(^ *\)\@<= / containedin=ALL conce
" Enabling spell checker (for your local language, anyway).
setlocal spell
set spelllang=en_gb
set spelllang=en_gb,en_us
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
" Changing style of words.

View File

@ -8,10 +8,11 @@ def relative_date(days):
return calculated_date
endglobal
snippet "reldate (\d+)" "Prints out the relative date in ISO format." ri
snippet "reldate (\d+)( ".+")?" "Prints out the relative date in ISO format." ri
`!p
reldate = relative_date(match.group(1))
snip.rv = reldate.strftime("%F")
date_format = match.group(2).strip(" \"") if match.group(2) is not None else "%F"
snip.rv = reldate.strftime(date_format)
`
endsnippet
@ -68,3 +69,19 @@ snippet #! "Quick snippet for a shebang." bi
#!${1:/usr/bin/env} ${2:sh}
endsnippet
# This is only useful for decorative comment boxes and all of the jazz.
snippet "boxen '(.*)'" "Create a box of stuff" ir
`!p snip.rv = (match.group(1) * (len(t[1]) + 4)).strip()[0:(len(t[1]) + 4)]`
`!p snip.rv = match.group(1)[0]` $1 `!p snip.rv = match.group(1)[0]`
`!p snip.rv = (match.group(1) * (len(t[1]) + 4)).strip()[0:(len(t[1]) + 4)]`
$0
endsnippet
# Also stolen from Gilles Castel's post at https://castel.dev/post/lecture-notes-1/.
snippet box "More box (that looks more like a box)."
`!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'`
│ $1 │
`!p snip.rv = '└' + '─' * (len(t[1]) + 2) + '┘'`
$0
endsnippet

View File

@ -14,7 +14,7 @@ def smart_space(next_str, auto_str=" ", loose=False):
endglobal
# Text formatting
snippet "h(\d)" "Quick header snippet" bir
snippet "h(([1-6]))" "Quick header snippet" bir
`!p
header_level = int(match.group(1))
legit_header_level = True if header_level >= 1 and header_level <= 6 else False

View File

@ -17,6 +17,12 @@ do
done
endsnippet
snippet if "If conditional" iw
if ${1:<expression>}; then
${2:<expression>}
fi
endsnippet
snippet while "While loop" iw
while ${1:<expression>};
do
@ -24,3 +30,17 @@ do
done
endsnippet
snippet getopts "An argument parser with getopts" iw
while getopts ${1:<OPTSTRING>} ${2:arg}
do
case ${2:"h"} in
h)
echo $_help
exit 0
*)
echo $_help
exit 0
esca
done
endsnippet

View File

@ -1,234 +1,226 @@
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
#glx-swap-method = "undefined";
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = false;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'picom'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
inactive-opacity = 0.75;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = true;
opacity-rule = [
"90:class_g = 'alacritty' && focused",
"60:class_g = 'alacritty' && !focused",
"100:class_g = 'slop'"
];
# Dim inactive windows. (0.0 - 1.0)
inactive-dim = 0.5;
# Do not let dimness adjust based on window opacity.
inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
blur-background = false;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, picom will try detecting this with X RandR extension.
refresh-rate = 0;
# Vertical synchronization: match the refresh rate of the monitor
vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
######################
#
# XSync
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
#glx-swap-method = "undefined";
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = false;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'picom'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
inactive-opacity = 0.5;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = true;
# Dim inactive windows. (0.0 - 1.0)
inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
blur-background = false;
# Blur background of opaque windows with transparent frames as well.
blur-background-frame = false;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, picom will try detecting this with X RandR extension.
refresh-rate = 0;
# Vertical synchronization: match the refresh rate of the monitor
vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
######################
#
# XSync
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

View File

@ -1,290 +1,197 @@
; color format is in ARGB
; Main color format is in ARGB.
; However, formats in RGB is fine.
; This is where all of the colors should be placed for those who are lazy to scroll down (like me).
[colors]
background = #000000
background-alt = #99000000
foreground = ${xrdb:color7:#eee}
foreground-alt = #aaa
primary = #d59783
secondary = #E8C4FF
tertiary = #A7DAE8
alert = #bd2c40
background = #000
foreground = #eee
module_prefix_bg = ${xrdb:color1:#ccc}
module_prefix_fg = ${xrdb:color15:#000}
module_bg = ${xrdb:color15:#fff}
module_fg = ${xrdb:color0:#000}
vol_module_bg = #ff9f1c
network_module_bg = #2ec4b6
date_module_bg = #99d122
memory_module_bg = #1a1b41
; The common style between bars
; The common style between bars.
[bar-common-style]
width = 100%
height = 30
wm-restack = bspwm
fixed-center = false
width = 100%
height = 32
wm-restack = bspwm
fixed-center = false
line-size = 3
line-color = #f00
line-size = 3
line-color = #f00
padding = 1
padding = 1
module-margin = 1
module-margin = 1
module-padding = 1
font-0 = "Iosevka"
font-1 = "Fira Code"
font-2 = siji:pixelsize=10;1
tray-position = right
tray-padding = 2
cursor-click = pointer
font-0 = "Iosevka"
font-1 = "Fira Code"
font-2 = "Noto Color Emoji:style=Regular:scale=10;1"
; This creates the illusion as if the modules are in the center.
__border-size = 5
border-top-size = ${self.__border-size}
border-top-color = ${colors.background}
border-bottom-size = ${self.__border-size}
border-bottom-color = ${colors.background}
tray-position = right
tray-padding = 1
cursor-click = pointer
; Common style between modules.
[module-common-style]
format-padding = 1
format-background = ${colors.background-alt}
format-prefix-foreground = ${colors.foreground-alt}
label-padding = 1
format-foreground = ${colors.background}
format-background = ${colors.foreground}
format-prefix-padding = 1
format-prefix-foreground = ${colors.module_prefix_fg}
format-prefix-background = ${colors.module_prefix_bg}
; The main bar.
[bar/fds-bar]
background = ${colors.background}
foreground = ${colors.foreground}
background = ${colors.background}
foreground = ${colors.foreground}
inherit = bar-common-style
enable-ipc = true
modules-left = bspwm
modules-right = pulseaudio memory cpu temperature eth date powermenu
[bar/fds-taskbar]
background = ${colors.background}
foreground = ${colors.foreground}
inherit = bar-common-style
bottom = true
modules-left = xwindow
modules-right = filesystem
[module/conv]
type = custom/text
content = "terminal"
click-left = "tdrop -ma -s dropdown alacritty"
inherit = bar-common-style
enable-ipc = true
modules-left = bspwm
modules-center = xwindow
modules-right = pulseaudio memory eth date menu-apps counter
[module/xwindow]
type = internal/xwindow
label = " %title:0:100:...% "
label-layout = %layout%
format = <label>
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
mount-1 = /home
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %free%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
label-background = ${colors.background-alt}
y-offset = 10
type = internal/xwindow
format = <label>
label = %title:0:50:%
[module/bspwm]
type = internal/bspwm
type = internal/bspwm
wrapping-scroll = false
pin-workspaces = true
label-focused = %index%
label-focused-background = ${colors.module_prefix_bg}
label-focused-padding = 1
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-padding = 1
label-occupied = %index%
label-occupied-padding = 1
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 1
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/cpu]
inherit = module-common-style
type = internal/cpu
interval = 2
format-prefix = "CPU "
label = %percentage-sum%%
label-occupied = %index%
label-occupied-padding = 1
label-urgent = %index%!
label-urgent-background = ${colors.foreground}
label-urgent-padding = 1
label-empty = %index%
label-empty-foreground = ${colors.module_prefix_fg}
label-empty-padding = 1
[module/memory]
inherit = module-common-style
type = internal/memory
interval = 2
format-prefix = "MEM "
format-prefix-foreground = ${colors.foreground-alt}
label = %percentage_used%%
inherit = module-common-style
type = internal/memory
interval = 2
format-prefix = "MEM"
format-prefix-background = ${colors.memory_module_bg}
format-prefix-foreground = ${colors.foreground}
label = %percentage_used%%
[module/wlan]
inherit = module-common-style
type = internal/network
interface = wlp0s18f2u4
interval = 3.0
format-connected = <label-connected>
format-connected-underline = #9f78e1
format-prefix = "NET "
label-connected = %essid%
format-disconnected = <label-disconnected>
label-disconnected = %ifname% disconnected
inherit = module-common-style
type = internal/network
interface = wlp0s18f2u4
interval = 3.0
format-connected = <label-connected>
format-connected-underline = #9f78e1
format-prefix = "NET "
label-connected = %essid%
format-disconnected = <label-disconnected>
label-disconnected = %ifname% disconnected
[module/eth]
inherit = module-common-style
type = internal/network
interface = enp4s0
interval = 3.0
format-connected-prefix = "ETH "
format-connected-background = ${colors.background-alt}
format-connected-padding = 1
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %ifname%
format-disconnected = <label-disconnected>
format-disconnected-background = ${colors.background-alt}
format-disconnected-padding = 1
label-disconnected = N/A
label-disconnected-foreground = ${colors.foreground-alt}
inherit = module-common-style
type = internal/network
interface = enp4s0
interval = 3.0
format-connected-prefix = "ETH"
format-connected-prefix-padding = 1
format-connected-prefix-foreground = ${colors.foreground}
format-connected-prefix-background = ${colors.network_module_bg}
format-connected-background = ${colors.foreground}
format-connected-foreground = ${colors.background}
label-connected = %ifname%
label-connected-padding = 1
format-disconnected = <label-disconnected>
format-disconnected-background = ${colors.background}
label-disconnected-padding = 1
label-disconnected = N/A
label-disconnected-foreground = ${colors.foreground}
[module/date]
inherit = module-common-style
type = internal/date
interval = 5
date = "%F"
time = %H:%M:%S
format-prefix = "DATE "
label = %date% %time%
inherit = module-common-style
type = internal/date
interval = 5
; 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-alt = "%B %d, %Y"
time = %T
time-alt = %F
format-prefix = "DATE"
format-prefix-background = ${colors.date_module_bg}
format-prefix-foreground = ${colors.background}
label = %time%
[module/pulseaudio]
inherit = module-common-style
type = internal/pulseaudio
inherit = module-common-style
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-foreground = ${colors.foreground-alt}
format-volume-background = ${colors.background-alt}
format-volume-padding = 1
format-volume = <label-volume>
label-volume = %percentage%%
label-volume-foreground = ${colors.foreground}
format-volume-prefix = "VOL"
format-volume-prefix-padding = 1
format-volume-prefix-foreground = ${colors.foreground}
format-volume-prefix-background = ${colors.vol_module_bg}
format-volume-foreground = ${colors.background}
format-volume-background = ${colors.foreground}
format-volume = <label-volume>
label-volume = %percentage%%
label-volume-padding = 1
format-muted-prefix = "VOL "
format-muted-background = ${colors.background-alt}
format-muted-padding = 1
format-muted-foreground = ${colors.foreground-alt}
label-muted = 🔇 muted
format-muted-prefix = "VOL"
format-muted-prefix-padding = 1
format-muted-prefix-foreground = ${colors.foreground}
format-muted-prefix-background = ${colors.vol_module_bg}
format-muted-foreground = ${colors.background}
format-muted-background = ${colors.foreground}
label-muted = muted
label-muted-padding = 1
[module/temperature]
inherit = module-common-style
type = internal/temperature
thermal-zone = 0
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon0/temp1_input
warn-temperature = 60
format = <label>
format-prefix = "TEMP "
format-warn = <label-warn>
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
screenchange-reload = true
[global/wm]
padding-left = 2
margin = 1
padding = 1
; vim:ft=dosini

View File

@ -7,16 +7,12 @@ super + Return
super + shift + Return
tdrop -ma -w -4 -y "$PANEL_HEIGHT" -s dropterm $TERMINAL
super + q
$TERMINAL -e ranger
super + t
$HOME/bin/toggle-bin screenkey
# Kill the focused window.
super + shift + q
bspc node -c
# kill -9 `xdotool getwindowfocus getwindowpid`
super + {_, shift +} + q
bspc node -{c,k}
@ -36,9 +32,9 @@ super + F11
super + F12
$HOME/bin/prompt "Exit from X session?" "killall Xorg"
# Screenshot shortcuts.
{_, control +} {_,shift +} Print
$HOME/bin/screenshot {_,--select} {_,--delay 3}
# Screenshot and screencast launcher.
Print
$HOME/bin/rofi-screen
# Screenshot with OCR capability
super + shift + w

View File

@ -0,0 +1,28 @@
{
"wallpaper": "/home/foo-dogsquared/wallpapers/dormant.jpg",
"alpha": "100",
"special": {
"background": "#0e0c12",
"foreground": "#cea2cc",
"cursor": "#cea2cc"
},
"colors": {
"color0": "#0e0c12",
"color1": "#562F64",
"color2": "#354754",
"color3": "#5F5851",
"color4": "#976C58",
"color5": "#C9A168",
"color6": "#6F3E87",
"color7": "#cea2cc",
"color8": "#90718e",
"color9": "#562F64",
"color10": "#354754",
"color11": "#5F5851",
"color12": "#976C58",
"color13": "#C9A168",
"color14": "#6F3E87",
"color15": "#cea2cc"
}
}

View File

@ -17,7 +17,7 @@ export PATH="$BIN_DIRECTORY:/usr/local/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.
# Common environmental variables.
# Or at least that'll be used by my setup.
export EDITOR="vim"
export EDITOR="nvim"
export TERMINAL="alacritty"
export BROWSER="firefox"
export READ="zathura"