Compare commits

...

2 Commits

Author SHA1 Message Date
435da2ee86
nvim: added stuff for neovide 2024-06-08 14:28:42 -04:00
2d712167a0
qutebrowser: non-finicky dark mode toggle
thanks mr qutebrowser maintainer and the qtwebengine folks
2024-06-08 14:27:26 -04:00
8 changed files with 53 additions and 10 deletions

View File

@ -139,6 +139,7 @@ arc-gtk-theme
lxappearance-gtk3
radare2
typst
neovide
# .local/bin/pyinstantref script
python-pydbus

View File

@ -1,12 +1,11 @@
# dynamic swallow (dwm patch)
function swal
return
if command -v dwmswallow > /dev/null
dwmswallow "$WINDOWID" $argv
end
end
alias mpv='swal -c mpv; command mpv'
alias mpv='command mpv'
# prevent clobbering files
alias mv='mv -n'
@ -15,9 +14,11 @@ alias cp='cp -n'
# run this before opening, e.g., mpv or zathura
abbr -a -- ds swal;
# neovide
alias nv 'swal -c neovide; neovide'
# zathura
alias thur='swal -c Zathura; zathura'
alias thur='zathura'
# stricter sandbox zathura
alias zathsec='/usr/bin/zathura -c ~/.config/zathura-sec'
@ -59,7 +60,7 @@ function ldg; $EDITOR ~/dox/not/journal.ldg; end
# disable history on units
alias units='units -H ""'
alias sxiv='swal; nsxiv'
alias sxiv='nsxiv'
# music recognition
# an alternative is available at ~/.local/bin/msrec

View File

@ -44,6 +44,7 @@ nmap <C-S>d "+d
vmap <C-S>d "+d
nmap <C-S>c "+c
vmap <C-S>c "+c
nmap <C-S>p "+p
" 0 is easier to reach so swap these binds
nnoremap 0 ^

View File

@ -29,6 +29,7 @@ local styles = colorbuddy.styles
Group.new("Normal", colors.noir_4, colors.none, nil)
Group.new("StatusLine", colors.noir_4, colors.none, styles.bold)
Group.link("MsgArea", groups.Normal)
-- not selected statusline
Group.new("StatusLineNC", colors.noir_7, colors.none)
Group.link("Gutter", groups.normal)
@ -83,3 +84,38 @@ Group.link("DapUIType", groups["@type.builtin"])
Group.link("DapUIVariable", groups["@variable"])
Group.link("DapUIValue", groups["@number"])
Group.link("DapUIFloatBorder", groups.FloatBorder)
--------------------------------
--------------------------------
-- gui frontend settings
--------------------------------
--------------------------------
vim.o.guifont = "JetBrains Mono:h10"
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.transparency = 0
vim.g.neovide_background_color = "#000000" .. 0
vim.g.neovide_cursor_animate_in_insert_mode = false
-- hack to unscrew the scaling issues
-- sometimes opening neovide on a tiling wm makes it not occupy the entire window until resized
vim.api.nvim_create_augroup("NeovideScale", {})
vim.api.nvim_create_autocmd(
"FocusGained",
{
group = "NeovideScale",
once = true,
callback = function()
vim.g.neovide_scale_factor = 1.01
vim.uv.new_timer():start(20, 0, vim.schedule_wrap(function()
vim.g.neovide_scale_factor = 1
end))
end,
}
)
end

View File

@ -29,7 +29,7 @@ shadow-offset-x = -7;
shadow-offset-y = -7;
# fading
fading = true;
fading = false;
fade-in-step = 0.05;
fade-out-step = 0.05;
fade-delta = 5;

View File

@ -43,7 +43,8 @@ c.fonts.web.family.sans_serif = "Inter"
c.fonts.web.family.standard = "Inter"
c.fonts.web.family.fixed = "JetBrains Mono"
config.bind("td", "config-cycle colors.webpage.darkmode.enabled true false;; restart")
# for QtWebEngine < 6.7, a :restart is needed following this
config.bind("td", "config-cycle colors.webpage.darkmode.enabled true false")
# General settings
@ -164,11 +165,11 @@ c.fileselect.single_file.command = [
# (thank you very much dima https://github.com/qutebrowser/qutebrowser/issues/6281)
config.bind(
"<Ctrl-d>",
"jseval -q window.scrollBy({top: window.innerHeight/2, left: 0, behavior: 'smooth'});",
"jseval -q window.scrollBy({top: window.innerHeight/1.5, left: 0, behavior: 'smooth'});",
)
config.bind(
"<Ctrl-u>",
"jseval -q window.scrollBy({top: -window.innerHeight/2, left: 0, behavior: 'smooth'});",
"jseval -q window.scrollBy({top: -window.innerHeight/1.5, left: 0, behavior: 'smooth'});",
)
config.bind(
"G",

View File

@ -1,3 +1,5 @@
body {
background: #000000;
@media (prefers-color-scheme: dark) {
body {
background: #000000;
}
}

View File

@ -3,3 +3,4 @@
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'" \