Compare commits

...

10 Commits

10 changed files with 118 additions and 20 deletions

View File

@ -1,5 +1,5 @@
# multiple codecs with the easiest to run being prefered and vp9 disabled with limit to 1080p and 60 fps
ytdl-format="bestvideo[fps<=?60][height<=?1080][vcodec!=vp9]+bestaudio/best"
ytdl-format=bestvideo[height<=?1080][fps<=?60][vcodec!=?vp9]+bestaudio/best
# fullscreen and show window immediatly
fs
force-window=immediate

View File

@ -18,8 +18,15 @@ catppuccin.setup(c, "Machiatto", True)
# load custom configs
config.source("pyconfig/redirectors.py")
# enable dark mode
##-- Dark Mode Settings --##
c.colors.webpage.preferred_color_scheme = "dark"
c.colors.webpage.darkmode.enabled = True
c.colors.webpage.bg = "black"
c.colors.webpage.darkmode.algorithm = "lightness-cielab"
c.colors.webpage.darkmode.threshold.text = 150
c.colors.webpage.darkmode.threshold.background = 100
c.colors.webpage.darkmode.policy.images = "always"
c.colors.webpage.darkmode.grayscale.images = 0.35
# change startpage and default page
c.url.start_pages = ["https://startpage.cronyakatsuki.xyz"]
@ -44,12 +51,22 @@ c.content.canvas_reading = False
c.content.webgl = False
c.content.webrtc_ip_handling_policy = "default-public-interface-only"
c.content.geolocation = False
c.content.blocking.method = "both"
c.content.javascript.enabled = False
c.content.notifications.enabled = False
c.content.cookies.accept = "never"
c.content.private_browsing = False
##-- AdBLock Settings --##
c.content.blocking.method = "both"
c.content.blocking.adblock.lists = [
"https://easylist.to/easylist/easylist.txt",
"https://easylist.to/easylist/easyprivacy.txt",
"https://secure.fanboy.co.nz/fanboy-annoyance.txt",
"https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt",
"https://www.i-dont-care-about-cookies.eu/abp/",
]
# History disable
c.completion.web_history.max_items = 0
c.completion.cmd_history_max_items = 0
@ -88,22 +105,53 @@ c.aliases["buku"] = "spawn --userscript buku"
##-- Bindings --##
# launch with mpv
config.bind(",m", "spawn mpv {url}")
config.bind(",M", "hint links spawn mpv {hint-url}")
config.bind("<Space>m", "spawn mpv {url}")
config.bind("<Space>fm", "hint links spawn mpv {hint-url}")
# buku bundings
config.bind("b", "buku open")
config.bind(",ba", "buku add")
config.bind(",be", "buku edit")
config.bind(",bd", "buku delete")
config.bind("<Space>ba", "buku add")
config.bind("<Space>be", "buku edit")
config.bind("<Space>bd", "buku delete")
# yt-dlp
config.bind(",y", "spawn --userscript yt-dlp")
config.bind(",Y", "hint links userscript yt-dlp")
config.bind("<Space>y", "spawn --userscript yt-dlp")
config.bind("<Space>fy", "hint links userscript yt-dlp")
# search current selection
config.bind(",f", "open {primary}")
config.bind(",F", "open --tab {primary}")
config.bind("<Space>f", "open {primary}")
config.bind("<Space>F", "open --tab {primary}")
# yank found url
config.bind("yf", "hint links yank")
# fix escape
config.bind(
"<Escape>", "mode-leave ;; jseval -q document.activeElement.blur()", mode="insert"
)
# fix scrolling
config.bind("j", "jseval --quiet scrollHelper.scrollBy(200)")
config.bind("k", "jseval --quiet scrollHelper.scrollBy(-200)")
config.bind("<Ctrl-D>", "jseval --quiet scrollHelper.scrollPage(0.8)")
config.bind("<Ctrl-U>", "jseval --quiet scrollHelper.scrollPage(-0.8)")
config.bind("gg", "jseval --quiet scrollHelper.scrollTo(0)")
config.bind("G", "jseval --quiet scrollHelper.scrollToPercent(100)")
# remove clickbard and gdpr banners
config.bind(
"ek",
"jseval (function () { "
+ ' var i, elements = document.querySelectorAll("body *");'
+ ""
+ " for (i = 0; i < elements.length; i++) {"
+ " var pos = getComputedStyle(elements[i]).position;"
+ ' if (pos === "fixed" || pos == "sticky") {'
+ " elements[i].parentNode.removeChild(elements[i]);"
+ " }"
+ " }"
+ "})();",
)
##-- Font Settings --##
c.fonts.default_family = '"Source Code Pro"'

View File

@ -31,7 +31,7 @@ super + Return
# Browser run
# super + {_, shift + }b
super + b
librewolf
$BROWSER
# {$BROWSER, librewolf -P unsecure}
# Gui Programs
@ -77,5 +77,8 @@ super + F1
super + F2
recorder
super + m
mpv $(xclip -sel c -o)
super + F3
bash -c 'killall xdotool || while xdotool key --repeat 100 --delay 100 Enter; do :; done'

View File

@ -0,0 +1,38 @@
[xboxdrv]
rumble = false
mimic-xpad = true
evdev-debug = true
evdev-grab = true
evdev = /dev/input/by-id/usb-HP__Inc_HyperX_Clutch_V1.2.1_20210714_2-event-joystick
[evdev-absmap]
ABS_HAT0X = dpad_x
ABS_HAT0Y = dpad_y
ABS_X = X1
ABS_Y = Y1
ABS_Z = X2
ABS_RZ = Y2
ABS_GAS=rt
ABS_BRAKE=lt
[axismap]
-Y1 = Y1
-Y2 = Y2
[evdev-keymap]
BTN_EAST=b
BTN_NORTH=x
BTN_SOUTH=a
BTN_WEST=y
BTN_TR2=rt
BTN_TL2=lt
BTN_TR=rb
BTN_TL=lb
BTN_THUMBL=tl
BTN_THUMBR=tr
BTN_START=start
BTN_SELECT=back
BTN_MODE = guide

View File

@ -171,6 +171,7 @@ myLayoutHook = lessBorders OnlyScreenFloat
myManageHook :: ManageHook
myManageHook = composeAll
[ className =? "librewolf" --> doShiftAndGo ( myWorkspaces !! 0)
, className =? "qutebrowser" --> doShiftAndGo ( myWorkspaces !! 0)
, className =? "newsboat" --> doShiftAndGo ( myWorkspaces !! 3)
, className =? "videos" --> doShiftAndGo ( myWorkspaces !! 3)
, className =? "ytfzf" --> doShiftAndGo ( myWorkspaces !! 3)
@ -183,6 +184,8 @@ myManageHook = composeAll
, className =? "steam" --> doShiftAndGo ( myWorkspaces !! 5)
, className =? "heroic" --> doShiftAndGo ( myWorkspaces !! 5)
, className =? "cartridges" --> doShiftAndGo ( myWorkspaces !! 5)
, className =? "Cemu" --> doShiftAndGo ( myWorkspaces !! 5)
, className =? "xemu" --> doShiftAndGo ( myWorkspaces !! 5)
, isDialog --> doCenterFloat <+> doF W.swapUp
, className =? "Gimp" --> doFloat <+> doF W.swapUp
, className =? "confirm" --> doFloat <+> doF W.swapUp
@ -196,6 +199,7 @@ myManageHook = composeAll
, className =? "pinentry-gtk-2" --> doFloat <+> doF W.swapUp
, className =? "Yad" --> doCenterFloat <+> doF W.swapUp
, className =? "badd" --> doCenterFloat <+> doF W.swapUp
, className =? "filepicker" --> doRectFloat (W.RationalRect (1/12) (1/12) (5/6) (5/6)) <+> doF W.swapUp
, isFullscreen --> doFullFloat <+> doF W.swapUp
, namedScratchpadManageHook myScratchPads
]

View File

@ -2,7 +2,7 @@ export QT_QPA_PLATFORMTHEME=qt5ct
# Path exprt (.zshenv method doesn't work with gentoo for no real reason)
typeset -U PATH path
path=("$HOME/.local/share/cargo/bin" "$HOME/.local/share/go/bin/" "$HOME/.local/bin" "$HOME/bin/dmenu" "$HOME/bin/misc" "$HOME/bin/statusbar" "$HOME/bin/tmux" "$path[@]")
path=("$HOME/.local/bin" "$HOME/bin/dmenu" "$HOME/bin/misc" "$HOME/bin/statusbar" "$HOME/bin/tmux" "$path[@]")
export PATH
export SXHKD_SHELL='/bin/sh'

View File

@ -50,6 +50,7 @@ HISTFILE="$XDG_STATE_HOME"/zsh/history
[ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1"
# cd on nnn quiting
nnn_cd ()
{
if ! [ -z "$NNN_PIPE" ]; then

View File

@ -15,7 +15,7 @@ alias less='less -R'
# Easier to type
alias vi='nvim'
alias nnn='nnn -xec'
alias nnn='LC_COLLATE="C" nnn -xeaG'
# Humna readable + better output
alias df='df -h -x devtmpfs -x tmpfs -x usbfs -x loop'
@ -51,3 +51,7 @@ alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m'"
# for tmux
alias td="tmux new -s $(basename $(pwd))"
alias tu="tmux -f ~/.config/tmux/update.conf attach"
alias irssi="tmux attach -t irssi || tmux new -s irssi irssi"
alias xboxdrv='tmux attach -t xboxdrv ||\
tmux new -s xboxdrv xboxdrv --config $HOME/.config/xboxdrv/hyperx-clutch.conf\
--type xbox --detach-kernel-driver --silent'

View File

@ -115,7 +115,7 @@ n () {
}
# Tempfile location
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
nnn "$@"

View File

@ -5,7 +5,7 @@ export EDITOR="nvim"
export READER="zathura"
export BOOK_READER="foliate"
export TERMINAL="alacritty"
export BROWSER="librewolf"
export BROWSER="qutebrowser"
export VIDEO="mpv"
export IMAGE="nsxiv"
export OPENER="xdg-open"
@ -22,9 +22,10 @@ export CM_DIR="$HOME/.cache"
# NNN settings
export NNN_FIFO="/tmp/nnn.fifo"
export NNN_PLUG="s:!zsh -i*;u:nmount;c:chksum;r:gitroot;v:imgview;m:mtpmount;d:xdgdefault;x:togglex"
export NNN_COLORS="2136"
export NNN_PLUG="s:!zsh -i*;u:nmount;c:chksum;r:gitroot;v:imgview;m:mtpmount;d:xdgdefault;x:togglex;p:preview-tui"
export NNN_SSHFS="sshfs -o follow_symlinks"
export NNN_TERMINAL="alacritty --class preview,preview"
export NNN_OPENER="nuke"
# Catppuccin colors nnn
BLK="03" CHR="03" DIR="04" EXE="02" REG="07" HARDLINK="05" SYMLINK="05" MISSING="08" ORPHAN="01" FIFO="06" SOCK="03" UNKNOWN="01"
@ -78,4 +79,3 @@ export BEMENU_OPTS='-H 24 --fb "#303446" --ff "#81c8be" \
# bat theme
export BAT_THEME="Catppuccin-mocha"
. "/home/crony/.local/share/cargo/env"