diff --git a/.cache/zsh/.keep b/.cache/zsh/history similarity index 100% rename from .cache/zsh/.keep rename to .cache/zsh/history diff --git a/.config/X11/xsession.d/80auto-start b/.config/X11/xsession.d/80auto-start index e794a2a7..02ce984a 100644 --- a/.config/X11/xsession.d/80auto-start +++ b/.config/X11/xsession.d/80auto-start @@ -5,6 +5,9 @@ start() { } xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share}/bg" + +remaps & +checkup & start playerctld daemon start picom start unclutter -noevents @@ -13,5 +16,3 @@ start pipewire start dwmblocks start remapd -remaps & -checkup & diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index de4450f9..4d992e46 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -109,7 +109,7 @@ map kitty_mod+minus change_font_size all -2.0 map kitty_mod+backspace change_font_size all 0 # Select and act on visible text -map kitty_mod+f>+u kitten hints --type url --program @ +map kitty_mod+f>u kitten hints --type url --program @ map kitty_mod+f>shift+u kitten hints --type url --program map kitty_mod+f>p kitten hints --type path --program @ map kitty_mod+f>shift+p kitten hints --type path --program diff --git a/.config/lf/lfrc b/.config/lf/lfrc index d9ec3560..680ea97f 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -150,7 +150,7 @@ cmd paste &{{ cmd dupe %{{ for file in $fx; do - find "$PWD" "$file" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | ( + find "$PWD" "$file" -maxdepth 0 | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | ( ext=$(($(cat /dev/stdin)+1)) filedest="$(echo "$file" | sed 's/.~[[:digit:]]*~$//').~$ext~" cp -r "$file" "$filedest" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 2295ac64..c1ea027f 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -39,6 +39,7 @@ bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'j' vi-down-line-or-history + # Change cursor shape for different vi modes. function zle-keymap-select () { case $KEYMAP in @@ -56,7 +57,7 @@ echo -ne '\e[5 q' # Use beam shape cursor on startup. preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. # Use lf to switch directories and bind it to ctrl-o -lfcd () { +function lfcd () { tmp="$(mktemp)" fid="$(mktemp)" lf -command '$printf $id > '"$fid"'' -last-dir-path="$tmp" "$@" @@ -82,7 +83,7 @@ lfcd () { tput cuu1;tput el } -_lfcd () { +function _lfcd () { BUFFER="lfcd" zle accept-line } @@ -90,7 +91,7 @@ zle -N _lfcd bindkey '^e' _lfcd # bind lazygit to ctrl-g -lg () { +function lg () { [ ! -d "$(pwd)/.git" ] && [[ $(read -ek "?Not in a git repository. Create a new git repository? (y/n): ") =~ ^[Yy]$ ]] && git init [ -d "$(pwd)/.git" ] && lazygit -p $(pwd) zle reset-prompt @@ -98,11 +99,10 @@ lg () { zle -N lg{,} bindkey '^g' lg -# This function simply writes the venv of the last executed command to a file to be read by external status indicators -function write_venv(){ - echo -n "${VIRTUAL_ENV:t}" > "/tmp/current_venv-$$" +function write_info(){ + echo -n "${VIRTUAL_ENV}" > "/tmp/current_venv-$$" } -add-zsh-hook precmd write_venv +add-zsh-hook precmd write_info # other keybinds bindkey -v '^?' backward-delete-char @@ -118,4 +118,4 @@ zle_highlight+=(paste:none) PLUGINS_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" [ -f "$PLUGINS_HOME/fzf/key-bindings.zsh" ] && source "$PLUGINS_HOME/fzf/key-bindings.zsh" [ -f "$PLUGINS_HOME/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" ] && source "$PLUGINS_HOME/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" -[ -f "$PLUGINS_HOME/autopyenv/autopyenv.plugin.zsh" ] && source "$PLUGINS_HOME/autopyenv/autopyenv.plugin.zsh" +[ -f "$PLUGINS_HOME/autopyenv/autopyenv.zsh" ] && source "$PLUGINS_HOME/autopyenv/autopyenv.zsh" diff --git a/.gitmodules b/.gitmodules index 4606cdb9..50c59fa6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,9 @@ [submodule ".local/share/themes/tokyonight"] path = .local/share/themes/tokyonight url = https://git.snaile.de/luca/tokyonight-theme +[submodule ".local/share/librewolf/chrome/cascade"] + path = .local/share/librewolf/chrome/cascade + url = https://github.com/andreasgrafen/cascade +[submodule ".local/share/librewolf/cascade"] + path = .local/share/librewolf/cascade + url = https://github.com/andreasgrafen/cascade diff --git a/.local/share/icons/tokyonight-icons b/.local/share/icons/tokyonight-icons deleted file mode 160000 index c522c6a5..00000000 --- a/.local/share/icons/tokyonight-icons +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c522c6a5dd1cb8d53c8bfc47745f313a734eea61 diff --git a/.local/share/librewolf/cascade b/.local/share/librewolf/cascade new file mode 160000 index 00000000..d6c4d700 --- /dev/null +++ b/.local/share/librewolf/cascade @@ -0,0 +1 @@ +Subproject commit d6c4d700526efef8d7b249b7618b7730ea9ca97f diff --git a/.local/share/librewolf/chrome b/.local/share/librewolf/chrome new file mode 120000 index 00000000..31800755 --- /dev/null +++ b/.local/share/librewolf/chrome @@ -0,0 +1 @@ +cascade/chrome \ No newline at end of file diff --git a/.local/share/librewolf/chrome/userChrome.css b/.local/share/librewolf/chrome/userChrome.css deleted file mode 100644 index f3200f37..00000000 --- a/.local/share/librewolf/chrome/userChrome.css +++ /dev/null @@ -1,368 +0,0 @@ -/* change these variables to get different colors */ -:root { - --userchrome-tab-active-bgcolor: #7aa2f7; - --userchrome-tab-inactive-bgcolor: #15161E; - --userchrome-tab-loading-bgcolor: #7dcfff; - --userchrome-tab-active-fgcolor: #15161E; - --userchrome-tab-inactive-fgcolor: #7aa2f7; - --userchrome-tab-loading-fgcolor: #15161E; - --userchrome-font: "JetBrains Mono"; -} - -/* change to control tabbar height */ -/* try increasing to 20px if you see a black line under tabbar */ -#titlebar { - --tab-min-height: 16px !important; -} - -/* --- GENERAL DEBLOAT ---------------------------------- */ - -/* Bottom left page loading status or url preview */ -#statuspanel { - display: none !important; -} - -/* --- DEBLOAT NAVBAR ----------------------------------- */ - -#unified-extensions-button { - display: none; -} - -#back-button { - display: none; -} - -#forward-button { - display: none; -} - -#reload-button { - display: none; -} - -#stop-button { - display: none; -} - -#home-button { - display: none; -} - -#downloads-button { - display: none; -} - -#library-button { - display: none; -} - -#fxa-toolbar-menu-button { - display: none; -} - -/* Firefox account button */ -#fxa-toolbar-menu-button { - display: none; -} - -#nav-bar-overflow-button { - display: none !important; -} - -/* General Firefox menu button */ -#PanelUI-button { - display: none; -} - -/* Empty space before and after the url bar */ -#customizableui-special-spring1, -#customizableui-special-spring2 { - display: none; -} - -#nav-bar, -#navigator-toolbox { - border-width: 0 !important; -} - -/* --- STYLE URLBAR ------------------------------------- */ - -#urlbar-container { - --urlbar-container-height: var(--tab-min-height) !important; - margin-left: 0 !important; - margin-right: 0 !important; - padding-top: 0 !important; - padding-bottom: 0 !important; - font-family: var(--userchrome-font), monospace; - font-size: 11px; -} - -#urlbar { - --urlbar-height: var(--tab-min-height) !important; - --urlbar-toolbar-height: var(--tab-min-height) !important; - min-height: var(--tab-min-height) !important; - border-color: var(--lwt-toolbar-field-border-color, hsla(240, 5%, 5%, .25)) !important; - --autocomplete-popup-highlight-background: transparent !important; -} - -#urlbar-background { - border-width: 0 !important; - border-radius: 0 !important; -} - -#urlbar-input-container { - border-width: 0 !important; - margin-left: 1em !important; -} - -#urlbar-input { - margin-left: 0.4em !important; - margin-right: 0.4em !important; -} - -.urlbarView-row { - padding-top: 0 !important; - padding-bottom: 0 !important; - line-height: var(--urlbar-height) !important; -} - -.urlbarView-row-inner { - padding-top: 0.3em !important; - padding-bottom: 0.3em !important; - height: var(--urlbar-height) !important; -} - -.urlbarView-favicon { - height: 1em !important; - width: 1em !important; - margin-bottom: 0.2em !important; -} - -/* --- DEBLOAT URLBAR ----------------------------------- */ - -#identity-box { - display: none; -} - -#pageActionButton { - display: none; -} - -#pocket-button { - display: none; -} - -#urlbar-zoom-button { - display: none; -} - -#tracking-protection-icon-container { - display: none !important; -} - -#reader-mode-button { - display: none !important; -} - -#star-button { - display: none; -} - -/* this will remove the invisible box at the end of urlbar but also will - * disable the Ctrl+D shortcut */ -#star-button-box { - display: none; -} - -/* Go to arrow button at the end of the urlbar when searching */ -#urlbar-go-button { - display: none; -} - -/* remove container indicator from urlbar */ -#userContext-label, -#userContext-indicator { - display: none !important; -} - -/* --- STYLE TAB TOOLBAR -------------------------------- */ - -#titlebar { - --proton-tab-block-margin: 0px !important; - --tab-block-margin: 0 !important; -} - -:root:not([customizing]) #TabsToolbar { - background-color: var(--userchrome-tab-inactive-bgcolor); -} - -:root:not([customizing]) #navigator-toolbox { - background-color: var(--userchrome-tab-inactive-bgcolor) !important; -} - -#TabsToolbar, -.tabbrowser-tab { - max-height: var(--tab-min-height) !important; - font-size: 11px !important; -} - -/* Change color of normal tabs */ -tab:not([selected="true"]) { - background-color: var(--userchrome-tab-inactive-bgcolor) !important; - color: var(--userchrome-tab-inactive-fgcolor) !important; -} - -/* Change color of loading tabs */ -tab[progress="true"], -tab[bursting="true"], -tab[busy="true"] { - background-color: var(--userchrome-tab-loading-bgcolor) !important; - color: var(--userchrome-tab-loading-fgcolor) !important; -} - -tab { - font-family: var(--userchrome-font), monospace; - font-weight: bold; - border: none !important; -} - -/* safari style tab width */ -.tabbrowser-tab[fadein] { - max-width: 100vw !important; - border: none -} - -/* hide tab bar if only one tab open */ -tab:only-of-type:not([progress="true"]):not([bursting="true"]):not([busy="true"]) { - display: none; -} - -/* Hide close button on tabs */ -#tabbrowser-tabs .tabbrowser-tab .tab-close-button { - display: none !important; -} - -/* hide container line on tab*/ -#tabbrowser-tabs .tab-context-line { - display: none; -} - -/* disable favicons in tab */ -.tab-icon-stack:not([pinned]) { - display: none !important; -} - -.tabbrowser-tab { - /* remove border between tabs */ - padding-inline: 0px !important; - /* remove fading effect from tab text */ - --tab-label-mask-size: 1em !important; - /* fix pinned tab behaviour on overflow */ - overflow-clip-margin: 0px !important; -} - -/* remove min-height from tabs toolbar (needed for fullscreen one tab) */ -#TabsToolbar, -#tabbrowser-tabs, -#tabbrowser-tabs>.tabbrowser-arrowscrollbox, -#tabbrowser-arrowscrollbox { - min-height: 0 !important; -} - -/* Tab: selected colors */ -#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content { - background: var(--userchrome-tab-active-bgcolor) !important; - border: none !important; - color: var(--userchrome-tab-active-fgcolor) !important; -} - -/* Tab: hovered colors */ -#tabbrowser-tabs .tabbrowser-tab:hover:not([selected]) .tab-content { - background: var(--userchrome-tab-active-bgcolor) !important; - color: var(--userchrome-tab-active-fgcolor) !important; - filter: brightness(0.55); -} - -/* Tab: loading colors */ -#tabbrowser-tabs .tabbrowser-tab[progress="true"] .tab-content, -#tabbrowser-tabs .tabbrowser-tab[bursting="true"] .tab-content, -#tabbrowser-tabs .tabbrowser-tab[busy="true"] .tab-content { - display: -moz-box !important; - background-color: var(--userchrome-tab-loading-bgcolor) !important; - color: var(--userchrome-tab-loading-fgcolor) !important; -} - -/* remove white margin around active tabs */ -#tabbrowser-tabs:not([movingtab])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[beforeselected-visible]::after, -#tabbrowser-tabs[movingtab]>#tabbrowser-arrowscrollbox>.tabbrowser-tab[visuallyselected]::before, -.tabbrowser-tab[visuallyselected]::after { - border: none !important; -} - -/*AGENT_SHEET*/ -#main-window #navigator-toolbox #TabsToolbar:not(:-moz-lwtheme) { - background: var(--userchrome-tab-active-bgcolor) !important; -} - -/* hide window controls */ -.titlebar-buttonbox-container { - display: none; -} - -/* remove titlebar spacers */ -.titlebar-spacer { - display: none !important; -} - -/* disable tab shadow */ -#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) { - box-shadow: none !important; -} - -/* remove dark space between pinned tab and first non-pinned tab */ -#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] { - margin-inline-start: 0px !important; -} - -/* remove dropdown menu button which displays all tabs on overflow */ -#alltabs-button { - display: none !important -} - -/* fix displaying of pinned tabs on overflow */ -#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container { - height: var(--tab-min-height) !important; -} - -/* remove overflow scroll buttons */ -#scrollbutton-up, -#scrollbutton-down { - display: none !important; -} - -/* --- AUTOHIDE URLBAR ---------------------------------- */ - -/* hide urlbar unless focused */ -#nav-bar { - min-height: 0 !important; - max-height: 0 !important; - height: 0 !important; - --moz-transform: scaleY(0) !important; - transform: scaleY(0) !important; -} - -/* #titlebar:hover~#nav-bar, */ -/* #nav-bar:hover, */ -#nav-bar:focus-within { - --moz-transform: scale(1) !important; - transform: scale(1) !important; - max-height: var(--urlbar-height) !important; - height: var(--urlbar-height) !important; - min-height: var(--urlbar-height) !important; -} - -/* show on toolbox focus */ -#navigator-toolbox:focus-within>.browser-toolbar { - transform: translateY(0); - opacity: 1; -} diff --git a/.local/share/themes/tokyonight-theme b/.local/share/themes/tokyonight-theme deleted file mode 160000 index 67c4bb6d..00000000 --- a/.local/share/themes/tokyonight-theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 67c4bb6d6bb415acea9d1c9a97152083d7f9c724 diff --git a/.local/share/zsh/plugins/autopyenv/autopyenv.plugin.zsh b/.local/share/zsh/plugins/autopyenv/autopyenv.zsh similarity index 81% rename from .local/share/zsh/plugins/autopyenv/autopyenv.plugin.zsh rename to .local/share/zsh/plugins/autopyenv/autopyenv.zsh index 39b61e3d..9049c7f2 100644 --- a/.local/share/zsh/plugins/autopyenv/autopyenv.plugin.zsh +++ b/.local/share/zsh/plugins/autopyenv/autopyenv.zsh @@ -2,7 +2,7 @@ PYENV_DIR="${PYENVS_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/virtualenv}" function chpwd_activate(){ [[ "$(pwd)" == "/" ]] && return 0 for pydir in $(ls $PYENV_DIR); do - if [[ "$(pwd|sed -e s@/@_@g|cut -c2-)" =~ "^${pydir}$" ]] || [[ "r-$(pwd|sed -e s@/@_@g|cut -c2-)" =~ "^${pydir}(_.+)?$" ]]; then + if [[ "$(pwd | sed -e 's|/|~|g' | cut -c2-)" =~ "^${pydir}$" ]] || [[ "r-$(pwd | sed -e 's|/|~|g' | cut -c2-)" =~ "^${pydir}(_.+)?$" ]]; then if [ "x$VIRTUAL_ENV" != "x$PYENV_DIR/$pydir" ]; then source "$PYENV_DIR/$pydir/bin/activate" fi @@ -16,7 +16,7 @@ function chpwd_activate(){ function venv(){ [[ "$(pwd)" == "/" ]] && echo "Cannot create venv at root" && return 1 - [[ "$(pwd)" != "/" ]] && envdir=$(pwd|sed -e s@/@_@g|cut -c2-) + [[ "$(pwd)" != "/" ]] && envdir=$(pwd | sed -e 's|/|~|g' | cut -c2-) [[ "$1" == "-r" ]] && envdir="r-$envdir" # create a venv that will be activated for all subdirectories as well if [ ! -e "$PYENV_DIR/${envdir}" ]; then echo "Creating python venv for ${envdir}.." diff --git a/TODO b/TODO index 3f0d8f72..1e8c5777 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ TODO: Rework lf icons for audio and video files - TODO: Move NVIM config to submodule TODO: https://sw.kovidgoyal.net/kitty/kittens/panel/ TODO: Create a better bitwarden integration TODO: Create a brightness indicator for dunst - TODO: Fix the pyenv indicator for kitty TODO: Look into nix and their home manager