diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ea6787d..964e13f 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -60,7 +60,7 @@ exec-once = wl-paste --type image --watch cliphist store #Stores only image data # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox -exec-once = [workspace 1 silent] qutebrowser +exec-once = [workspace 2 silent] qutebrowser exec-once = [workspace 1 silent] emacs exec-once = [workspace special:aux silent] konsole exec-once = vesktop @@ -222,7 +222,7 @@ misc { force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( no_direct_scanout = true #Important! - vfr = 0 #VRR stutter? + vfr = true #Fullscreen stutter in fullscreen videos with this on, as if VRR was disabled } group { @@ -303,23 +303,23 @@ bind = $mainMod, B, exec, cliphist list | wofi --dmenu | cliphist decode | wl-co bind = $mainMod, R, exec, $menu bind = $secondaryMod, P, pseudo, # dwindle bind = $secondaryMod, L, togglesplit, # dwindle -bind = $secondaryMod, P, layoutmsg, swapwithmaster # master -bind = $secondaryMod, L, layoutmsg, orientationnext # master +bind = $secondaryMod, P, layoutmsg, swapwithmaster # master ; +bind = $secondaryMod, code:47, layoutmsg, orientationnext # master bind = $secondaryMod, M, layoutmsg, addmaster # master bind = $secondaryMod, N, layoutmsg, removemaster # master -bind = $secondaryMod, H, layoutmsg, mfact -0.1 # master -bind = $secondaryMod, Y, layoutmsg, mfact +0.1 # master +bind = $secondaryMod, Y, layoutmsg, mfact -0.1 # master +bind = $secondaryMod, U, layoutmsg, mfact +0.1 # master bind = $secondaryMod, code:60, exec, wofi-emoji #. key # Group management -bind = SUPER, I, togglegroup, +bind = $secondaryMod, I, togglegroup, bind = ALT, Tab, changegroupactive, f bind = ALT SHIFT, Tab, changegroupactive, b -bind = SUPER, L, moveintogroup, r -bind = SUPER, K, moveintogroup, u -bind = SUPER, J, moveintogroup, d -bind = SUPER, H, moveintogroup, l -bind = SUPER, O, moveoutofgroup, active +bind = $secondaryMod, L, moveintogroup, r +bind = $secondaryMod, K, moveintogroup, u +bind = $secondaryMod, J, moveintogroup, d +bind = $secondaryMod, H, moveintogroup, l +bind = $secondaryMod, O, moveoutofgroup, active #resizeactive moveactive swapwindow movewindow # Locks and exits diff --git a/.config/qutebrowser/qsettings/QtProject.conf b/.config/qutebrowser/qsettings/QtProject.conf index 1e81e07..940ccab 100644 --- a/.config/qutebrowser/qsettings/QtProject.conf +++ b/.config/qutebrowser/qsettings/QtProject.conf @@ -1,7 +1,7 @@ [FileDialog] -history=file:///home/Hane/Downloads -lastVisited=file:///home/Hane/Downloads -qtVersion=6.6.1 +history=file:///home/Hane/Downloads, file:///home/Hane +lastVisited=file:///home/Hane +qtVersion=6.7.2 shortcuts=file:, file:///home/Hane sidebarWidth=100 treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2\t\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\x1\v\0\0\0\x1\0\0\0\0\0\0\0\x42\0\0\0\x1\0\0\0\0\0\0\0\x43\0\0\0\x1\0\0\0\0\0\0\0y\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff\0\0\0\0) diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index 4aeb734..b06924e 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -19,3 +19,5 @@ vrr repeated fix pt2 https://gitlab.freedesktop.org/mesa/mesa/-/issues/11294 shell https://www.masteringemacs.org/article/running-shells-in-emacs-overview git https://git.roboces.dev/ windmove???? https://www.reddit.com/r/emacs/comments/rj8k32/the_pgtk_pure_gtk_branch_was_merged/ +vrr pt3 https://github.com/hyprwm/Hyprland/pull/6877#issuecomment-2230423256 +first priority minor mode https://emacs.stackexchange.com/questions/352/how-to-override-major-mode-bindings diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4b3ef08..6503949 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -67,8 +67,134 @@ (use-package projectile-ripgrep :ensure t) +(use-package sudo-edit + :ensure t) + +(use-package treemacs + :ensure t + :defer t + :init + (with-eval-after-load 'winum + (define-key winum-keymap (kbd "M-0") #'treemacs-select-window)) + :config + (progn + (setq treemacs-collapse-dirs (if treemacs-python-executable 3 0) + treemacs-deferred-git-apply-delay 0.5 + treemacs-directory-name-transformer #'identity + treemacs-display-in-side-window t + treemacs-eldoc-display 'simple + treemacs-file-event-delay 2000 + treemacs-file-extension-regex treemacs-last-period-regex-value + treemacs-file-follow-delay 0.2 + treemacs-file-name-transformer #'identity + treemacs-follow-after-init t + treemacs-expand-after-init t + treemacs-find-workspace-method 'find-for-file-or-pick-first + treemacs-git-command-pipe "" + treemacs-goto-tag-strategy 'refetch-index + treemacs-header-scroll-indicators '(nil . "^^^^^^") + treemacs-hide-dot-git-directory t + treemacs-indentation 2 + treemacs-indentation-string " " + treemacs-is-never-other-window nil + treemacs-max-git-entries 5000 + treemacs-missing-project-action 'ask + treemacs-move-files-by-mouse-dragging t + treemacs-move-forward-on-expand nil + treemacs-no-png-images nil + treemacs-no-delete-other-windows t + treemacs-project-follow-cleanup nil + treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory) + treemacs-position 'left + treemacs-read-string-input 'from-child-frame + treemacs-recenter-distance 0.1 + treemacs-recenter-after-file-follow nil + treemacs-recenter-after-tag-follow nil + treemacs-recenter-after-project-jump 'always + treemacs-recenter-after-project-expand 'on-distance + treemacs-litter-directories '("/node_modules" "/.venv" "/.cask") + treemacs-project-follow-into-home nil + treemacs-show-cursor nil + treemacs-show-hidden-files t + treemacs-silent-filewatch nil + treemacs-silent-refresh nil + treemacs-sorting 'alphabetic-asc + treemacs-select-when-already-in-treemacs 'move-back + treemacs-space-between-root-nodes t + treemacs-tag-follow-cleanup t + treemacs-tag-follow-delay 1.5 + treemacs-text-scale nil + treemacs-user-mode-line-format nil + treemacs-user-header-line-format nil + treemacs-wide-toggle-width 70 + treemacs-width 35 + treemacs-width-increment 1 + treemacs-width-is-initially-locked t + treemacs-workspace-switch-cleanup nil) + + ;; The default width and height of the icons is 22 pixels. If you are + ;; using a Hi-DPI display, uncomment this to double the icon size. + ;;(treemacs-resize-icons 44) + + (treemacs-follow-mode t) + (treemacs-filewatch-mode t) + (treemacs-fringe-indicator-mode 'always) + (when treemacs-python-executable + (treemacs-git-commit-diff-mode t)) + + (pcase (cons (not (null (executable-find "git"))) + (not (null treemacs-python-executable))) + (`(t . t) + (treemacs-git-mode 'deferred)) + (`(t . _) + (treemacs-git-mode 'simple))) + + (treemacs-hide-gitignored-files-mode nil)) + :bind + (:map global-map + ("M-0" . treemacs-select-window) + ("C-x t 1" . treemacs-delete-other-windows) + ("C-x t t" . treemacs) + ("C-x t d" . treemacs-select-directory) + ("C-x t B" . treemacs-bookmark) + ("C-x t C-t" . treemacs-find-file) + ("C-x t M-t" . treemacs-find-tag))) + +;; (use-package treemacs-evil +;; :after (treemacs evil) +;; :ensure t) + +(use-package treemacs-projectile + :after (treemacs projectile) + :ensure t) + +(use-package treemacs-icons-dired + :hook (dired-mode . treemacs-icons-dired-enable-once) + :ensure t) + +(use-package treemacs-magit + :after (treemacs magit) + :ensure t) + +(use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode + :after (treemacs persp-mode) ;;or perspective vs. persp-mode + :ensure t + :config (treemacs-set-scope-type 'Perspectives)) + +(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode + :after (treemacs) + :ensure t + :config (treemacs-set-scope-type 'Tabs)) + +(treemacs-start-on-boot) + ;;; USER CONFIG ;;; +;;Remapping treemacs +(define-key treemacs-mode-map (kbd "C-j") nil) +(define-key treemacs-mode-map (kbd "C-k") nil) +(define-key treemacs-mode-map (kbd "C-;") 'treemacs-RET-action) + ;;Using helm as minibuffer autocompletion manager (setf projectile-completion-system 'helm) (setf projectile-indexing-method 'alien) @@ -97,7 +223,21 @@ (scroll-bar-mode -1) ;; Use better buffer list -(global-set-key (kbd "C-x C-b") 'ibuffer) +(global-set-key (kbd "C-x C-b") 'ibuffer) + +;; Skip windows when switching +(defvar ignore-windows-containing-buffers-matching-res '("\"hyprland.*" "Treemacs.*") + "List of regular expressions specifying windows to skip (if window contains buffer that matches, skip)") + +(defadvice other-window (before other-window-ignore-windows-containing activate) + "skip over windows containing buffers which match regular expressions in 'ignore-windows-containing-buffers-matching-res" + (if (and (= 1 (ad-get-arg 0)) (interactive-p)) + (let* ((win (next-window)) + (bname (buffer-name (window-buffer win)))) + (when (some 'identity (mapcar '(lambda (re) + (string-match re bname)) + ignore-windows-containing-buffers-matching-res)) + (ad-set-arg 0 2))))) ;; Disable splash screen and startup message (setq inhibit-startup-message t) @@ -117,6 +257,8 @@ (global-set-key (kbd "C-f") 'forward-word) (global-set-key (kbd "C-b") 'backward-word) +(global-set-key (kbd "C-S-d") (lambda () (interactive) (delete-char -1))) + (global-set-key (kbd "C-x C-u") (lambda () (interactive) (other-window -1))) (global-set-key (kbd "C-x C-o") (lambda () (interactive) (other-window 1))) (global-set-key (kbd "C-x u") 'dired-jump) @@ -223,30 +365,30 @@ (copy-region-as-kill (car region) (cdr region))))) ;; Tabulation and Tree-sitter config -(add-to-list 'auto-mode-alist '("\\.cpp\\'" . c++-ts-mode)) +(add-to-list 'auto-mode-alist '("\\.cpp\\'" . c++-mode)) -(setq major-mode-remap-alist - '( -;; (c-mode . c-ts-mode) - (bash-mode . bash-ts-mode) -;; (cpp-mode . c++-ts-mode) - (asm-mode . asm-ts-mode) - (cmake-mode . cmake-ts-mode) - (c-sharp-mode . c-sharp-mode) -;; (css-mode . css-ts-mode) - (bash-mode . bash-ts-mode) - (dockerfile-mode . dockerfile-ts-mode) - (elisp-mode . elisp-ts-mode) - (elm-mode . elm-ts-mode) - (gitcommit-mode . gitcommit-ts-mode) - (gitignore-mode . gitignore-ts-mode) - (git-rebase-mode . git-rebase-ts-mode) - (json-mode . json-ts-mode) - (latex-mode . latex-ts-mode) - (lua-mode . lua-ts-mode) - (make-mode . make-ts-mode) - (sql-mode . sql-ts-mode) - (csv-mode . csv-ts-mode))) +;; (setq major-mode-remap-alist +;; '( +;; ;; (c-mode . c-ts-mode) +;; (bash-mode . bash-ts-mode) +;; ;; (cpp-mode . c++-ts-mode) +;; (asm-mode . asm-ts-mode) +;; (cmake-mode . cmake-ts-mode) +;; (c-sharp-mode . c-sharp-mode) +;; ;; (css-mode . css-ts-mode) +;; (bash-mode . bash-ts-mode) +;; (dockerfile-mode . dockerfile-ts-mode) +;; (elisp-mode . elisp-ts-mode) +;; (elm-mode . elm-ts-mode) +;; (gitcommit-mode . gitcommit-ts-mode) +;; (gitignore-mode . gitignore-ts-mode) +;; (git-rebase-mode . git-rebase-ts-mode) +;; (json-mode . json-ts-mode) +;; (latex-mode . latex-ts-mode) +;; (lua-mode . lua-ts-mode) +;; (make-mode . make-ts-mode) +;; (sql-mode . sql-ts-mode) +;; (csv-mode . csv-ts-mode))) ;; (customize-set-variable 'treesit-font-lock-level 2) @@ -291,7 +433,7 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(benchmark-init projectile-ripgrep ripgrep helm-projectile projectile ssh-agency tangotango-theme)) + '(treemacs-tab-bar treemacs-persp treemacs-magit treemacs-icons-dired treemacs-projectile treemacs-evil treemacs sudo-edit benchmark-init projectile-ripgrep ripgrep helm-projectile projectile ssh-agency tangotango-theme)) '(ripgrep-arguments '("--follow"))) (custom-set-faces ;; custom-set-faces was added by Custom.