Compare commits

...

9 Commits

Author SHA1 Message Date
0ccc8380e7
dwm: screenshot entire screen instantly by default 2024-10-01 17:35:31 -04:00
5e966a1ecc
miscellaneous changes
- neovide: disable vsync (seems to reduce lag greatly)
- qutebrowser: bar color changes
- fcitx5: change quickswitch key
2024-10-01 16:59:16 -04:00
d0d4938f6e
nvim: use system plugins 2024-10-01 16:22:54 -04:00
c770958ec6
central opacity setting 2024-09-30 20:34:18 -04:00
e5691f140d
nvim: capital Y clipboard bind 2024-09-30 20:33:36 -04:00
c97f76034a
sync-res: proper matching on name 2024-09-30 20:32:50 -04:00
1b196370b3
music qutebrowser profile 2024-09-30 20:30:23 -04:00
db7cf5d9ee
picom: overhaul
animations, and use chezmoi to substitute $HOME
2024-09-30 14:59:18 -04:00
d328a324a6
sync-res: added script
also have trash now
2024-09-28 11:23:10 -04:00
30 changed files with 125 additions and 162 deletions

17
.gitmodules vendored
View File

@ -14,22 +14,13 @@
# neovim plugins
################
# git symbols in the gutter
[submodule "src/dot_local/share/nvim/site/pack/3pp/start/external_vim-gitgutter"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_vim-gitgutter
url = https://github.com/airblade/vim-gitgutter.git
# auto close brackets and quotes
# coding.vim
[submodule "src/dot_local/share/nvim/site/pack/3pp/start/external_auto-pairs"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_auto-pairs
url = https://github.com/jiangmiao/auto-pairs
# language smarts
# coding.lua
[submodule "src/dot_local/share/nvim/site/pack/3pp/start/external_nvim-lspconfig"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule "src/dot_local/share/nvim/site/pack/3pp/start/external_nvim-cmp"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_nvim-cmp
url = https://github.com/hrsh7th/nvim-cmp.git
@ -47,7 +38,7 @@
url = https://github.com/ledger/vim-ledger.git
# color theme
# init.lua
# theme.lua
[submodule "src/dot_local/share/nvim/site/pack/3pp/start/external_nvim-noirbuddy"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_nvim-noirbuddy
url = https://github.com/jesseleite/nvim-noirbuddy.git
@ -85,15 +76,9 @@
[submodule "submodule.src/dot_local/bin/external_inkscape-shortcut-manager.path"]
path = src/dot_local/bin/external_inkscape-shortcut-manager
url = https://github.com/dogeystamp/inkscape-shortcut-manager
[submodule "submodule.src/dot_local/share/nvim/site/pack/3pp/start/external_vim-gitgutter.path"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_vim-gitgutter
url = https://github.com/airblade/vim-gitgutter.git
[submodule "submodule.src/dot_local/share/nvim/site/pack/3pp/start/external_auto-pairs.path"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_auto-pairs
url = https://github.com/jiangmiao/auto-pairs
[submodule "submodule.src/dot_local/share/nvim/site/pack/3pp/start/external_nvim-lspconfig.path"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule "submodule.src/dot_local/share/nvim/site/pack/3pp/start/external_nvim-cmp.path"]
path = src/dot_local/share/nvim/site/pack/3pp/opt/external_nvim-cmp
url = https://github.com/hrsh7th/nvim-cmp.git

View File

@ -28,6 +28,8 @@ xkblayout-state
xss-lock
qutebrowser
neovim
neovim-lspconfig
vim-surround
tree-sitter-grammars
tmux
fish
@ -62,6 +64,7 @@ libappimage
nftables
sdcv
ufw
trash-cli
rofi
rink
progress
@ -72,11 +75,11 @@ which
dnsutils
man-pages
zoxide
tinyxxd
# IME input
fcitx5
fcitx5-chinese-addons
fcitx5-configtool
tinyxxd
# in the aur
tmsu

View File

@ -2,4 +2,5 @@
{{- $systemprofile := promptChoiceOnce . "systemprofile" "Select a system profile (use capital letter)" $systemprofilechoices "MINIMAL" -}}
[data]
systemprofile = {{- $systemprofile | quote -}}
systemprofile = {{ $systemprofile | quote }}
opacity = "0.7"

View File

@ -4,7 +4,7 @@ shell = "nu"
[window]
padding = { x = 8, y = 8 }
dimensions = { columns = 120, lines = 70 }
opacity = 0.6
opacity = {{ .opacity }}
[font]
normal = { family = "JetBrainsMono" }

View File

@ -62,6 +62,7 @@ let maplocalleader = " "
" easier binds to use system clipboard with
nmap <C-S>y "+y
nmap <C-S>Y "+Y
vmap <C-S>y "+y
nmap <C-S>d "+d
vmap <C-S>d "+d
@ -105,3 +106,8 @@ lua require('init')
" auto-pairs
packadd auto-pairs
let g:AutoPairsFlyMode = 0
" disable warnings in health check
let g:loaded_node_provider = 0
let g:loaded_perl_provider = 0
let g:loaded_ruby_provider = 0

View File

@ -29,12 +29,6 @@ local keymap = confutil.keymap
-- )
------
-- git gutter
------
vim.cmd.packadd("vim-gitgutter")
------
-- syntax highlighting
------
@ -89,7 +83,6 @@ keymap('<leader>dx', vim.diagnostic.open_float, { noremap = true, silent = true
------
-- language server (LSP)
------
vim.cmd.packadd("nvim-lspconfig")
local nvim_lsp = require('lspconfig')
local on_attach = function(client, bufnr)
@ -161,7 +154,7 @@ local servers = {
-- },
-- },
clangd = {},
tsserver = {},
ts_ls = {},
bashls = {},
cssls = {},
lua_ls = {

View File

@ -13,7 +13,7 @@ if vim.g.neovide then
vim.g.neovide_padding_top = 8
vim.g.neovide_padding_bottom = 8
vim.g.neovide_padding_left = 8
vim.g.neovide_transparency = 0.6
vim.g.neovide_transparency = {{ .opacity }}
vim.g.neovide_background_color = "#000000" .. 0
vim.g.neovide_cursor_trail_size = 0.1

View File

@ -7,7 +7,11 @@ vim.cmd.packadd("colorbuddy.nvim")
require("noirbuddy").setup({
colors = {
primary = "#99AABB"
primary = "#99AABB",
diagnostic_error = "#ffaaaa",
diagnostic_warning = "#aaaaaa",
diagnostic_info = "#77aacc",
diagnostic_hint = "#77aacc",
},
styles = {
italic = true,

View File

@ -1,43 +0,0 @@
backend = "glx";
# animations
# works with https://github.com/FT-Labs/picom
# if your picom doesn't support it it won't do anything
animations = false;
animation-stiffness-in-tag = 125;
animation-stiffness-tag-change = 90.0;
animation-window-mass = 0.4;
animation-dampening = 15;
animation-clamping = true;
animation-for-open-window = "slide-up";
animation-for-unmap-window = "slide-up";
animation-for-transient-window = "slide-up";
animation-for-prev-tag = "slide-up";
enable-fading-prev-tag = true;
animation-for-next-tag = "slide-in-center";
enable-fading-next-tag = true;
# enable vsync
vsync = false;
# shadow
shadow = true;
shadow-radius = 12;
shadow-offset-x = -7;
shadow-offset-y = -7;
# fading
fading = true;
fade-in-step = 1;
fade-out-step = 0.05;
fade-delta = 5;
# corner
corner-radius = 10;
blur: {
method = "dual_kawase",
strength = 8,
};

View File

@ -0,0 +1,37 @@
backend = "glx";
vsync = false;
# animations
animations = (
{
triggers = [ "open", "show" ];
preset = "appear";
duration = 0.15;
},
{
triggers = [ "close", "hide" ];
preset = "disappear";
duration = 0.1;
},
)
# shadow
shadow = true;
shadow-radius = 12;
shadow-offset-x = -7;
shadow-offset-y = -7;
# corner
corner-radius = 10;
blur: {
method = "dual_kawase",
strength = 3,
};
rules = (
{ match = "class_g = 'dwm'"; shadow = false; corner-radius = 0; blur-background = false },
{ match = "class_i = 'qutebrowser' && ! name = 'discord'"; shader = "{{ env "HOME" }}/.config/picom/shaders/transparency.glsl" },
{ match = "class_i = 'neovide'"; shader = "{{ env "HOME" }}/.config/picom/shaders/transparency.glsl" },
{ match = "class_g = 'Zathura'"; shader = "/home/dogeystamp/.config/picom/shaders/transparency.glsl" },
)

View File

@ -1,54 +0,0 @@
// transparency for sonixd and feishin (music player). use "default dark" theme
// https://github.com/ikz87/picom-shaders
#version 330
// rgb value for the maximum transparency
uniform vec3 median_color = vec3(0.063);
// maximum derivation from the median_color of each color channel (rgb)
uniform vec3 max_derivation = vec3(0.40);
// e.g. (1,0,0)±(0.2,0.2,0.2) -> gradient from #c00 to #f00 to #f33 with #f00 being the least opaque
// (0,0,0)±(0.25,0.25,0,25) -> gradient from #000 to #444 with #000 being at min_opacity
// opacity for the median_color
uniform float min_opacity = 0.1;
// exponent for the gradient (e.g. 1 for linear, 2 for quadratic, etc)
uniform int power = 2;
// use mean for a different effect
float get_float (vec3 c) {
// maximum
return max(max(c.r,c.g),c.b);
// mean
// return (v.r + v.g + v.b)/3;
}
// tweak the above variables and functions for your needs
// texture coordinate of the fragment
in vec2 texcoord;
// texture of the window
uniform sampler2D tex;
// Default window post-processing:
// 1) invert color
// 2) opacity / transparency
// 3) max-brightness clamping
// 4) rounded corners
vec4 default_post_processing(vec4 c);
// Default window shader:
// 1) fetch the specified pixel
// 2) apply default post-processing
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
// get the each colorchannels derivation from the median_color channels and normalize them
vec3 normalized_derivation = abs(c.rgb - median_color)/max_derivation;
// only add transparency, if the pixel is not already transparent
if (c.a == 1 && get_float(normalized_derivation) < 1) {
// apply the gradient curvature
normalized_derivation = vec3(1)-pow(vec3(1)-normalized_derivation, vec3(power));
// apply transparency to rgb and alpha, because glx uses premultiplied alpha
c *= min_opacity + get_float(normalized_derivation) * (1-min_opacity);
}
return default_post_processing( c );
}

View File

@ -8,7 +8,7 @@ uniform vec3 max_derivation = vec3(0.01);
// e.g. (1,0,0)±(0.2,0.2,0.2) -> gradient from #c00 to #f00 to #f33 with #f00 being the least opaque
// (0,0,0)±(0.25,0.25,0,25) -> gradient from #000 to #444 with #000 being at min_opacity
// opacity for the median_color
uniform float min_opacity = 0.6;
uniform float min_opacity = {{ .opacity }};
// exponent for the gradient (e.g. 1 for linear, 2 for quadratic, etc)
uniform int power = 2;
// use mean for a different effect

View File

@ -14,7 +14,7 @@ EnumerateSkipFirst=False
2=Hangul
[Hotkey/AltTriggerKeys]
0=Shift_L
0=Shift+Shift_R
[Hotkey/EnumerateGroupForwardKeys]
0=Super+space

View File

@ -21,3 +21,5 @@ c.fileselect.multiple_files.command = ["alacritty", "-e", "fish", "-C", "set -x
c.fileselect.single_file.command = ["alacritty", "-e", "fish", "-C", "set -x OUTPUT {}; source ~/.local/bin/fish-fm"]
c.content.user_stylesheets = ["~/.config/qbprof/dsc/config/amoled-cord.css"]
c.window.title_format = "discord"

View File

@ -0,0 +1,12 @@
config.load_autoconfig(False)
c.input.mode_override = "passthrough"
c.statusbar.show = "never"
c.tabs.show = "multiple"
c.bindings.default["passthrough"] = {}
c.bindings.commands["passthrough"] = {
"<ctrl-escape>": "mode-leave"
}
c.auto_save.session = True
c.url.start_pages = "https://mus.dogeystamp.com"

View File

@ -13,12 +13,12 @@ c.colors.statusbar.command.private.bg = "black"
c.colors.hints.bg = "black"
c.colors.hints.fg = "white"
c.colors.tabs.bar.bg = "#00000000"
c.colors.tabs.bar.bg = "black"
c.colors.tabs.even.bg = "#11111111"
c.colors.tabs.odd.bg = c.colors.tabs.even.bg
c.colors.tabs.even.fg = "#aaaaaa"
c.colors.tabs.odd.fg = c.colors.tabs.even.fg
c.colors.tabs.selected.even.bg = "#55333333"
c.colors.tabs.selected.even.bg = "#222222"
c.colors.tabs.selected.odd.bg = c.colors.tabs.selected.even.bg
c.colors.tabs.selected.even.fg = "#ffffff"
c.colors.tabs.selected.odd.fg = c.colors.tabs.selected.even.fg

View File

@ -8,7 +8,7 @@ if [ $SYSTEM_PROFILE = "MINIMAL" ]; then
fi
if [ $SYSTEM_PROFILE = "DEFAULT" ]; then
picomstart.sh &
picom &
fi
battwatch.sh &
xwallpaper --center .config/wall.png

View File

@ -4,10 +4,10 @@ set statusbar-home-tilde true
set scroll-page-aware true
set adjust-open width
set font "Liberation Sans 13"
set font "JetBrains Mono 12"
set recolor-darkcolor "#dddddd"
set recolor-lightcolor rgba(0,0,0,0.6)
set recolor-lightcolor rgba(0,0,0, {{ .opacity }})
set recolor true
set recolor-keephue true
set recolor-reverse-video true
@ -16,9 +16,10 @@ set default-bg "#00000099"
set index-bg "#000000"
set index-active-bg "#111111"
set index-active-fg "#FFFFFF"
set inputbar-bg rgba(0,0,0,0.6)
set inputbar-bg rgba(0,0,0, {{ .opacity }})
set inputbar-fg "#CCCCCC"
set statusbar-bg rgba(0,0,0,0.6)
set statusbar-bg rgba(0,0,0,1)
set statusbar-fg "#CCCCCC"
set render-loading false

View File

@ -1,6 +0,0 @@
#!/bin/sh
# Screenshot and save to disk.
rm ~/med/screen/latest.png
sleep 0.1 && scrot -fs "$HOME/med/screen/latest.png" -e "cp ~/med/screen/latest.png ~/quar/screenshot-$(date +%s).png"

View File

@ -0,0 +1,6 @@
#!/bin/sh
# Screenshot entire screen.
rm ~/med/screen/fullscreen.jpg
scrot "$HOME/med/screen/fullscreen.jpg"

View File

@ -11,5 +11,5 @@ if ! command -v neovide > /dev/null || [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPL
nvim "$@"
else
swal
neovide "$@"
neovide --no-vsync "$@"
fi

View File

@ -1,4 +1,4 @@
#!/bin/sh
# opens corresponding .typ to current .pdf
st -e nvim $(printf "%s/%s.typ" $(dirname "$1") $(basename -s .pdf "$1"))
alacritty -e nvim $(printf "%s/%s.typ" $(dirname "$1") $(basename -s .pdf "$1"))

View File

@ -1,6 +0,0 @@
#!/bin/sh
# misc opts so i don't have to use absolute path in picom config
picom --window-shader-fg-rule "$HOME/.config/picom/shaders/transparency-sonixd.glsl:class_g = 'feishin'" \
--window-shader-fg-rule "$HOME/.config/picom/shaders/transparency.glsl:class_g = 'qutebrowser'" \
--window-shader-fg-rule "$HOME/.config/picom/shaders/transparency.glsl:class_g = 'neovide'" \

View File

@ -1,5 +1,6 @@
#!/bin/sh
# Categorize files in the quarantine directory
# depends: fzf, mpv
# read -n 1 isn't POSIX-compliant so we implement something
# https://unix.stackexchange.com/questions/464930/can-i-read-a-single-character-from-stdin-in-posix-shell
@ -56,7 +57,6 @@ PREVNAME=""
find ~/quar \
-maxdepth 1 \
-type f \
-not -path '*/trash/*' \
\( \
-name '*.mov' -o \
-name '*.MOV' -o \
@ -97,7 +97,7 @@ while read -r FILE; do
break
fi;;
s ) break;;
d ) mv "$FILE" ~/quar/trash/; break;;
d ) trash "$FILE"; break;;
* )
printf "\nInvalid input! Press enter to continue\n";
read </dev/tty;

View File

@ -0,0 +1,28 @@
#!/bin/sh
# Resolve Syncthing conflicts
# depends: trash-cli
col() {
printf "\033[34m %s \033[0m" "$1"
}
die() {
echo $@ 2>&1
exit 1
}
PROGNAME=$(basename "$0")
if [ -z "$1" ]; then
die usage: $PROGNAME file.sync-conflict-XXXXXXXX-XXXXXX-XXXXXXX
fi
ORIG=$(echo "$1" | sed -E 's/\.sync-conflict-[0-9]{8}-[0-9]{6}-[A-Z]{7}//')
if [ "$ORIG" = "$1" ]; then
die Could not find original file. Is this a sync-conflict file?
else
printf "Using original file '%s'.\n" "$ORIG"
fi
diff --color=always "$1" "$ORIG" > /dev/tty
trash -i "$1"

@ -1 +0,0 @@
Subproject commit ff97d376b1d22b2eaf9274605531babf0cd0cf21

@ -1 +0,0 @@
Subproject commit 7b0b5098e3e57be86bb96cfbf2b8902381eef57c

View File

@ -11,10 +11,7 @@ all: dwm
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
${OBJ}: config.def.h config.mk
dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}

View File

@ -105,7 +105,6 @@ static const char termcmd[] = "alacritty msg create-window || alacritty";
static const char *freshtermcmd[] = { "alacritty", NULL };
static const char *browsercmd[] = { "qutebrowser", NULL };
static const char *pwdcmd[] = { "keepassxc", NULL };
static const char *musiccmd[] = { "sonixd", NULL };
static const char *upvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%", NULL };
static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%", NULL };
static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute", "0", "toggle", NULL };
@ -124,11 +123,11 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_b, spawn, {.v = browsercmd } },
{ MODKEY|ShiftMask, XK_k, spawn, {.v = pwdcmd } },
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("qbprof dsc") },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = musiccmd } },
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("qbprof mus") },
{ MODKEY|ControlMask, XK_l, spawn, {.v = (const char*[]){ "/usr/local/bin/slock", NULL} } },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("~/.local/bin/deskutils/suspend.sh") },
{ 0, XK_Print, spawn, SHCMD("~/.local/bin/deskutils/screenshot.sh") },
{ ShiftMask, XK_Print, spawn, SHCMD("~/.local/bin/deskutils/screenshot-save.sh" ) },
{ 0, XK_Print, spawn, SHCMD("~/.local/bin/deskutils/screenshot_full.sh") },
{ ShiftMask, XK_Print, spawn, SHCMD("~/.local/bin/deskutils/screenshot.sh" ) },
{ MODKEY, XK_z, spawn, TERMCMD("bookmk") },
// SHCMD because we already start a terminal from inside clipedit.sh
{ MODKEY|ShiftMask, XK_z, spawn, SHCMD("clipedit.sh") },

View File

@ -324,7 +324,7 @@ static int depth;
static Colormap cmap;
/* configuration, allows nested code to access above variables */
#include "config.h"
#include "config.def.h"
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };