diff options
| author | spl3g <spleefer6@yandex.ru> | 2023-11-29 00:22:23 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2023-11-29 00:22:23 +0300 |
| commit | 2fcdab89e98354f5a69cfe1c3dfa23e9d04f60b8 (patch) | |
| tree | f3a80376fddcf87c86c72a327ba4ba103900fd7b /home-manager | |
| parent | ddd3490dfb592417163e801994a60854dac135fe (diff) | |
update configs
Diffstat (limited to 'home-manager')
21 files changed, 950 insertions, 631 deletions
diff --git a/home-manager/home.nix b/home-manager/home.nix index f83d8a8..75c2d03 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -4,8 +4,9 @@ let username = "jerpo"; homeDirectory = "/home/${username}"; configHome = "${homeDirectory}/.config"; - sysPkgs = with pkgs; [ + cliPkgs = with pkgs; [ fd + glib tldr wget htop @@ -20,8 +21,14 @@ let libtool bluetuith steam-run + unzip + ghostscript + g-ls + wayvnc + draw + xdragon ]; - yeahGamingPkgs = with pkgs; [ + gamingPkgs = with pkgs; [ vulkan-tools vkd3d dxvk @@ -30,24 +37,28 @@ let gamemode opentabletdriver bottles + steam ]; - defaultPkgs = with pkgs; [ - firefox - source-code-pro + guiPkgs = with pkgs; [ + ansel + libreoffice-fresh + clash-verge pokemon-colorscripts - kitty telegram-desktop - xdragon transmission-gtk - rubik - osu-lazer - figma-linux + osu-lazer-bin easyeffects - # darktable obs-studio ]; + fonts = with pkgs; [ + rubik + source-code-pro + material-design-icons + font-awesome + ]; nonListImports = [ inputs.hyprland.homeManagerModules.default + inputs.ags.homeManagerModules.default ./themes ]; imports = builtins.concatMap import [ @@ -63,7 +74,7 @@ in home = { inherit username homeDirectory; stateVersion = "23.05"; - packages = defaultPkgs ++ yeahGamingPkgs ++ sysPkgs; + packages = guiPkgs ++ gamingPkgs ++ cliPkgs ++ fonts; }; xdg = { @@ -72,5 +83,4 @@ in }; programs.home-manager.enable = true; - } diff --git a/home-manager/homeold.nix b/home-manager/homeold.nix deleted file mode 100755 index 2e7a9bc..0000000 --- a/home-manager/homeold.nix +++ /dev/null @@ -1,256 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - home.username = "jerpo"; - home.homeDirectory = "/home/jerpo"; - home.stateVersion = "23.05"; - home.packages = with pkgs; [ - bat - emacs - nerdfonts - pokemon-colorscripts-mac - kitty - telegram-desktop - feh - rofi - htop - ranger - betterlockscreen - clipboard-jh - polybar - xdragon - obsidian - xclip - lutris - steam - mangohud - gamemode - vkdt - transmission-gtk - rubik - obsidian - osu-lazer - spotify - figma-linux - easyeffects - darktable - python311Packages.python-lsp-server - python311Packages.pyls-flake8 - python311Packages.python-lsp-black - ]; - programs = { - home-manager.enable = true; - firefox = { - enable = true; - profiles.Betterfox = { - isDefault = true; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - bitwarden - ghostery - switchyomega - sponsorblock - return-youtube-dislikes - ]; - extraConfig = builtins.readFile ./home/programs/firefox/user.js; - search = { - engines = { - "Brave" = { - urls = [{ template = "https://search.brave.com/search?q={searchTerms}"; }]; - iconUpdateURL = "https://cdn.search.brave.com/serp/v2/_app/immutable/assets/safari-pinned-tab.539899c7.svg"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!br" ]; - }; - "NixOS" = { - urls = [{ template = "https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query={searchTerms}"; }]; - iconUpdateURL = "https://nixos.org/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!ns" ]; - }; - "HomeManager" = { - urls = [{ template = "https://mipmip.github.io/home-manager-option-search/?query={searchTerms}"; }]; - iconUpdateURL = "https://github.com/mipmip/home-manager-option-search/blob/main/images/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!hs" ]; - }; - "ai question" = { - urls = [{ template = "https://iask.ai/?mode=question&q={searchTerms}"; }]; - iconUpdateURL = "https://iask.ai/favicons/favicon-32x32-650bd8771fdea8866630408578e381cc.png?vsn=d"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!aq" ]; - }; - "ai forums" = { - urls = [{ template = "https://iask.ai/?mode=forums&q={searchTerms}"; }]; - iconUpdateURL = "https://iask.ai/favicons/favicon-32x32-650bd8771fdea8866630408578e381cc.png?vsn=d"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!af" ]; - }; - "ai wiki" = { - urls = [{ template = "https://iask.ai/?mode=wiki&q={searchTerms}"; }]; - iconUpdateURL = "https://iask.ai/favicons/favicon-32x32-650bd8771fdea8866630408578e381cc.png?vsn=d"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!aw" ]; - }; - "FastGPT" = { - urls = [{ template = "https://labs.kagi.com/fastgpt?query={searchTerms}"; }]; - definedAliases = [ "!fq" ]; - }; - "NixWiki" = { - urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}&go=Go"; }]; - iconUpdateURL = "https://nixos.org/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "!nw" ]; - }; - }; - default = "Brave"; - }; - }; - }; - fish = { - enable = true; - interactiveShellInit = '' - set fish_greeting - pokemon-colorscripts -r | awk "NR>1 {print}" - set -gx EDITOR "emacsclient -c -a \"emacs\"" - ''; - plugins = [ - { name = "colored-man-output"; src = pkgs.fishPlugins.colored-man-pages.src; } - { name = "fzf-fish"; src = pkgs.fishPlugins.fzf-fish.src; } - { name = "pure"; src = pkgs.fishPlugins.pure.src; } - { name = "autopair"; src = pkgs.fishPlugins.autopair.src; } - ]; - }; - kitty = { - enable = true; - font.name = "Source Code Pro"; - font.size = 11.3; - theme = "Rosé Pine Moon"; - shellIntegration.enableFishIntegration = true; - extraConfig = "cursor_shape underline"; - }; - }; - xsession.windowManager.bspwm = { - enable = true; - monitors = { - "^1" = [ - "α" - "β" - "γ" - "δ" - "ε" - ]; - "^2" = [ - "α" - "β" - "γ" - "δ" - "ε" - ]; - }; - settings = { - focused_border_color = "#908caa"; - normal_border_color = "#363a4f"; - presel_feedback_color = "#752f20"; - border_width = 3; - window_gap = 12; - focus_follows_pointer = true; - split_ratio = 0.5; - }; - startupPrograms = [ - "picom -b" - "setxkbmap -option grp:alt_shift_toggle,grp:win_space_toggle us,ru" - "emacs --daemon" - "feh --bg-fill ~/dotfiles/cat.png" - ]; - }; - services = { - sxhkd = { - enable = true; - keybindings = { - # Apps - "{_,shift} + {_,control} + Print" = "xfce4-screenshooter -{r,f} {_,-c}"; # Screenshooter - "super + apostrophe" = "betterlockscreen -l"; # Lockscreen - "super + grave" = "polybar -r"; # Restart polybar - "super + q" = "kitty"; # Open terminal - "super + d" = "rofi -show-icons -show drun"; # Open app chooser - "super + shift + d" = "CM_LAUNCHER=rofi clipmenu"; - "super + b" = "firefox"; # Open browser - "super + e" = "emacsclient -c -a 'emacs'"; # Open emacs - "super + shift + o" = "obsidian"; # Open obsidian - # Bspwm - "super + Escape" = "pkill -USR1 -x sxhkd"; # Restart sxhkd - "super + shift + {e,r}" = "bspc {quit,wm -r}"; # Quit/restart bspwm - "super + {control,shift} + q" = "bspc node -{k,c}"; # Close/kill window - "super + m" = "bspc desktop -l next"; # Maximise window - "super + {t,shift + t,v,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; # Set window state - "super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}"; # Focus window in the given direction - "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; # Move a floating window - "super + s : {h,j,k,l}" = ''STEP=20; SELECTION={1,2,3,4};\ - bspc node -z $(echo "left -$STEP 0,bottom 0 $STEP,top 0 -$STEP,right $STEP 0" | cut -d',' -f$SELECTION) ||\ - bspc node -z $(echo "right -$STEP 0,top 0 $STEP,bottom 0 -$STEP,left $STEP 0" | cut -d',' -f$SELECTION)''; # Better window resize - "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; # Focus next/previos desktop - "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} $(bspc query -D -m focused | awk 'NR=={1-9,0}')"; # Focus/send window to the given desktop on the focused monitor - "super + o" = "bspc node -m last -f"; # Send window to the last used monitor - "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; # Preselect the window ratio - "super + ctrl + space" = "bspc node -p cancel"; # Cansel the preselected ratio - }; - }; - picom = { - enable = true; - settings = { - fading = true; - fade-in-step = 0.05; - fade-out-step = 0.05; - blur-background = true; - corner-radius = 8; - blur = { - method = "dual_kawase"; - size = 12; - deviation = false; - strength = 2; - kern = "3x3box"; - }; - backend = "glx"; - vsync = true; - mark = { - wmwin-focused = true; - overdir-focused = true; - }; - detect = { - rounded-corners = true; - client-opacity = true; - transient = true; - }; - use-ewmh-active-win = true; - glx-no-stencil = true; - use-damage = true; - }; - wintypes = { - tooltip = { - fade = true; - shadow = true; - full-shadow = false; - blur = false; - focus = true; - }; - dock = { - shadow = false; - }; - }; - }; - clipmenu.enable = true; - }; - gtk = { - cursorTheme = { - name = "Bibata-Modern-Ice"; - package = pkgs.bibata-cursors; - }; - iconTheme = { - name = "rose-pine-moon"; - package = pkgs.rose-pine-icon-theme; - }; - theme = { - name = "rose-pine-moon"; - package = pkgs.rose-pine-gtk-theme; - }; - }; -} diff --git a/home-manager/programs/ags/bar/config.js b/home-manager/programs/ags/bar/config.js new file mode 100644 index 0000000..8abf671 --- /dev/null +++ b/home-manager/programs/ags/bar/config.js @@ -0,0 +1,203 @@ +// importing +import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js'; +import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js'; +import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js'; +import Audio from 'resource:///com/github/Aylur/ags/service/audio.js'; +import Battery from 'resource:///com/github/Aylur/ags/service/battery.js'; +import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js'; +import App from 'resource:///com/github/Aylur/ags/app.js'; +import Widget from 'resource:///com/github/Aylur/ags/widget.js'; +import { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js'; + +// widgets can be only assigned as a child in one container +// so to make a reuseable widget, just make it a function +// then you can use it by calling simply calling it + +const Workspaces = () => Widget.Box({ + className: 'workspaces', + connections: [[Hyprland.active.workspace, self => { + // generate an array [1..10] then make buttons from the index + const arr = Array.from({ length: 10 }, (_, i) => i + 1); + self.children = arr.map(i => Widget.Button({ + onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`), + child: Widget.Label(`${i}`), + className: Hyprland.active.workspace.id == i ? 'focused' : '', + })); + }]], +}); + +const ClientTitle = () => Widget.Label({ + className: 'client-title', + binds: [ + ['label', Hyprland.active.client, 'title'], + ], +}); + +const Clock = () => Widget.Label({ + className: 'clock', + connections: [ + // this is bad practice, since exec() will block the main event loop + // in the case of a simple date its not really a problem + [1000, self => self.label = exec('date "+%H:%M:%S %b %e."')], + + // this is what you should do + [1000, self => execAsync(['date', '+%H:%M:%S %b %e.']) + .then(date => self.label = date).catch(console.error)], + ], +}); + +// we don't need dunst or any other notification daemon +// because the Notifications module is a notification daemon itself +const Notification = () => Widget.Box({ + className: 'notification', + children: [ + Widget.Icon({ + icon: 'preferences-system-notifications-symbolic', + connections: [ + [Notifications, self => self.visible = Notifications.popups.length > 0], + ], + }), + Widget.Label({ + connections: [[Notifications, self => { + self.label = Notifications.popups[0]?.summary || ''; + }]], + }), + ], +}); + +const Media = () => Widget.Button({ + className: 'media', + onPrimaryClick: () => Mpris.getPlayer('')?.playPause(), + onScrollUp: () => Mpris.getPlayer('')?.next(), + onScrollDown: () => Mpris.getPlayer('')?.previous(), + child: Widget.Label({ + connections: [[Mpris, self => { + const mpris = Mpris.getPlayer(''); + // mpris player can be undefined + if (mpris) + self.label = `${mpris.trackArtists.join(', ')} - ${mpris.trackTitle}`; + else + self.label = 'Nothing is playing'; + }]], + }), +}); + +const Volume = () => Widget.Box({ + className: 'volume', + css: 'min-width: 180px', + children: [ + Widget.Stack({ + items: [ + // tuples of [string, Widget] + ['101', Widget.Icon('audio-volume-overamplified-symbolic')], + ['67', Widget.Icon('audio-volume-high-symbolic')], + ['34', Widget.Icon('audio-volume-medium-symbolic')], + ['1', Widget.Icon('audio-volume-low-symbolic')], + ['0', Widget.Icon('audio-volume-muted-symbolic')], + ], + connections: [[Audio, self => { + if (!Audio.speaker) + return; + + if (Audio.speaker.isMuted) { + self.shown = '0'; + return; + } + + const show = [101, 67, 34, 1, 0].find( + threshold => threshold <= Audio.speaker.volume * 100); + + self.shown = `${show}`; + }, 'speaker-changed']], + }), + Widget.Slider({ + hexpand: true, + drawValue: false, + onChange: ({ value }) => Audio.speaker.volume = value, + connections: [[Audio, self => { + self.value = Audio.speaker?.volume || 0; + }, 'speaker-changed']], + }), + ], +}); + +const BatteryLabel = () => Widget.Box({ + className: 'battery', + children: [ + Widget.Icon({ + connections: [[Battery, self => { + self.icon = `battery-level-${Math.floor(Battery.percent / 10) * 10}-symbolic`; + }]], + }), + Widget.ProgressBar({ + vpack: 'center', + connections: [[Battery, self => { + if (Battery.percent < 0) + return; + + self.fraction = Battery.percent / 100; + }]], + }), + ], +}); + +const SysTray = () => Widget.Box({ + connections: [[SystemTray, self => { + self.children = SystemTray.items.map(item => Widget.Button({ + child: Widget.Icon({ binds: [['icon', item, 'icon']] }), + onPrimaryClick: (_, event) => item.activate(event), + onSecondaryClick: (_, event) => item.openMenu(event), + binds: [['tooltip-markup', item, 'tooltip-markup']], + })); + }]], +}); + +// layout of the bar +const Left = () => Widget.Box({ + children: [ + Workspaces(), + ClientTitle(), + ], +}); + +const Center = () => Widget.Box({ + children: [ + Media(), + Notification(), + ], +}); + +const Right = () => Widget.Box({ + hpack: 'end', + children: [ + Volume(), + BatteryLabel(), + Clock(), + SysTray(), + ], +}); + +const Bar = ({ monitor } = {}) => Widget.Window({ + name: `bar-${monitor}`, // name has to be unique + className: 'bar', + monitor, + anchor: ['top', 'left', 'right'], + exclusive: true, + child: Widget.CenterBox({ + startWidget: Left(), + centerWidget: Center(), + endWidget: Right(), + }), +}) + +// exporting the config so ags can manage the windows +export default { + style: App.configDir + '/style.css', + windows: [ + Bar(), + + // you can call it, for each monitor + // Bar({ monitor: 0 }), + // Bar({ monitor: 1 }) + ], +}; diff --git a/home-manager/programs/ags/bar/style.css b/home-manager/programs/ags/bar/style.css new file mode 100644 index 0000000..900d84f --- /dev/null +++ b/home-manager/programs/ags/bar/style.css @@ -0,0 +1,26 @@ +* { + font-family: Material Design Icons, Rubik Medium; + font-size: 14px; + color: #6e6a86; +} + +.window { + border-radius: 10px; + background: #1f1d2e; + border: 3px solid #363a4f; +} + +.battery { + margin-right: 6px; +} + +.workspaces button { + font-size: 15px; + transition: all 100ms ease-out; +} + +.workspaces button:active { + font-weight: bolder; + color: #908caa; + transition: all 100ms ease-out; +} diff --git a/home-manager/programs/ags/default.nix b/home-manager/programs/ags/default.nix new file mode 100644 index 0000000..dbb8228 --- /dev/null +++ b/home-manager/programs/ags/default.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + programs.ags = { + enable = true; + configDir = ./bar; + }; +} diff --git a/home-manager/programs/alacritty/default.nix b/home-manager/programs/alacritty/default.nix new file mode 100644 index 0000000..930952d --- /dev/null +++ b/home-manager/programs/alacritty/default.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + home.packages = [ pkgs.alacritty-theme ]; + programs.alacritty = { + enable = true; + settings = { + import = [ "${pkgs.alacritty-theme}/catppuccin_macchiato.yaml" ]; + font = { + normal = { + family = "Source Code Pro"; + style = "Medium"; + }; + size = 11.5; + }; + window.opacity = 0.7; + cursor = { + style = "Beam"; + thickness = 0.27; + }; + }; + }; +} diff --git a/home-manager/programs/default.nix b/home-manager/programs/default.nix index 4725825..0381598 100644 --- a/home-manager/programs/default.nix +++ b/home-manager/programs/default.nix @@ -1,7 +1,3 @@ -let - more = { pkgs, ... }: { - }; -in [ ./fish ./firefox @@ -9,5 +5,7 @@ in ./emacs ./ranger ./waybar + ./ags + ./alacritty ./kitty ] diff --git a/home-manager/programs/emacs/config.org b/home-manager/programs/emacs/config.org index a21da11..3370e88 100644 --- a/home-manager/programs/emacs/config.org +++ b/home-manager/programs/emacs/config.org @@ -7,7 +7,9 @@ * Table Of Contents :toc: - [[#progs-to-load-first][Progs to load first]] + - [[#optimise-gc][Optimise gc]] - [[#use-package][use-package]] + - [[#save-history][Save history]] - [[#meow-mode][Meow mode]] - [[#general-keybindings][General keybindings]] - [[#gui-tweaks][GUI tweaks]] @@ -31,28 +33,39 @@ - [[#better-ux][Better UX]] - [[#vertico][Vertico]] - [[#consult][Consult]] - - [[#treemacs][Treemacs]] - [[#pairs][Pairs]] - [[#debugging][Debugging]] - [[#move-lines][Move lines]] - [[#truncate-lines][Truncate lines]] -- [[#eat-terminal][EAT terminal]] + - [[#no-littering][No littering]] + - [[#rainbow-delimiters][Rainbow delimiters]] + - [[#crux][Crux]] +- [[#eat-terminal][Eat terminal]] - [[#eat][Eat]] + - [[#eat-toggle][Eat-toggle]] + - [[#eat-modes][Eat modes]] - [[#lsp][LSP]] - [[#languages][Languages]] - [[#corfu][Corfu]] - [[#flycheck][Flycheck]] - [[#tree-sitter][Tree-sitter]] - [[#snippets][Snippets]] +- [[#dired][Dired]] + - [[#bindings][Bindings]] - [[#additional-apps][Additional apps]] - [[#telegram-lol][Telegram lol]] - [[#magit][Magit]] - [[#exwm][EXWM]] -- [[#dired][Dired]] - - [[#bindings][Bindings]] - - [[#icons-1][Icons]] + - [[#jupyter][Jupyter]] + - [[#orgnote][Orgnote]] + - [[#codeium][Codeium]] +- [[#runtime-performance][Runtime Performance]] * Progs to load first +** Optimise gc +#+begin_src emacs-lisp + (setq gc-cons-threshold (* 50 1000 1000)) +#+end_src ** use-package #+begin_src emacs-lisp (require 'use-package) @@ -60,6 +73,10 @@ (setq use-package-always-ensure t use-package-expand-minimally t)) #+end_src +** Save history +#+begin_src emacs-lisp + (savehist-mode 1) +#+end_src ** Meow mode #+begin_src emacs-lisp (use-package meow @@ -190,12 +207,12 @@ "fc" '((lambda () (interactive) (find-file "~/.nixfiles/home-manager/programs/emacs/config.org")) :wk "Edit emacs config") "fu" '(sudo-edit-find-file :wk "Sudo find file") "fU" '(sudo-edit :wk "Sudo edit file") - "l" '(lsp-keymap-prefix :wk "LSP") ;; Opening.. things "o" '(:ignore t) - "ot" '(eat-toggle :wk "Eat terminal"))) + "ot" '(eat-toggle :wk "Eat terminal") + "om" '(magit-status :wk "Magit"))) + #+end_src - * GUI tweaks ** Disable gui shit #+begin_src emacs-lisp @@ -228,17 +245,16 @@ ** Display line numbers #+begin_src emacs-lisp (add-hook 'prog-mode-hook 'display-line-numbers-mode) -(add-hook 'prog-mode-hook 'visual-line-mode) +(visual-line-mode 1) #+end_src ** Theme #+begin_src emacs-lisp -(use-package autothemer) (use-package catppuccin-theme :ensure t :config (load-theme 'catppuccin t) - (setq catppuccin-flavor 'mocha) + (setq catppuccin-flavor 'macchiato) (catppuccin-reload)) #+end_src @@ -248,16 +264,29 @@ :ensure t :if (display-graphic-p)) #+end_src - ** Modeline #+begin_src emacs-lisp - (use-package doom-modeline - :init (doom-modeline-mode 1) + (use-package mood-line + + ;; Enable mood-line :config - (setq doom-modeline-height 35 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t)) ;; adds folder icon next to persp name + (mood-line-mode) + :custom + (mood-line-meow-state-alist + '((normal "N" . mood-line-meow-normal) + (insert "I" . mood-line-meow-insert) + (keypad "K" . mood-line-meow-keypad) + (beacon "B" . mood-line-meow-beacon) + (motion "M" . mood-line-meow-motion))) + (mood-line-glyph-alist mood-line-glyphs-fira-code) + :custom-face + (mood-line-meow-beacon ((t (:foreground "#f9e2af" :weight bold)))) + (mood-line-meow-insert ((t (:foreground "#a6e3a1" :weight bold)))) + (mood-line-meow-keypad ((t (:foreground "#cba6f7" :weight bold)))) + (mood-line-meow-motion ((t (:foreground "#fab387" :weight bold)))) + (mood-line-meow-normal ((t (:weight bold)))) + (mode-line-inactive ((t (:box (:line-width (2 . 6) :color "#11111b") :inverse-video nil :foreground "#6c7086" :background "#11111b")))) + (mode-line ((t (:box (:line-width (2 . 6) :color "#181825") :background "#181825"))))) #+end_src ** Smooth scroll @@ -305,23 +334,25 @@ ** Enabling toc #+begin_src emacs-lisp (use-package toc-org - :init (add-hook 'org-mode-hook 'toc-org-enable)) + :hook (org-mode-hook . toc-org-mode)) #+end_src ** Org bullets #+begin_src emacs-lisp (use-package org-bullets - :init (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) + :hook (org-mode-hook . (lambda () (org-bullets-mode 1)))) #+end_src ** Auto-tangle #+begin_src emacs-lisp - (use-package org-auto-tangle - :init (add-hook 'org-mode-hook 'org-auto-tangle-mode)) + (use-package org-auto-tangle + :config + (add-hook 'org-mode-hook 'org-auto-tangle-mode)) #+end_src ** Org-download #+begin_src emacs-lisp - (use-package org-download - :hook (dired-mode-hook . org-download-enable)) + ;; (use-package org-download + ;; :hook + ;; (dired-mode-hook . org-download-enable)) #+end_src ** Direnv #+begin_src emacs-lisp @@ -332,15 +363,17 @@ * Better UX ** Vertico #+begin_src emacs-lisp - (use-package vertico - :init - (vertico-mode) - :bind (:map vertico-map - ("M-j" . vertico-next) - ("M-k" . vertico-previous)) - :config - (savehist-mode 1)) - (use-package emacs + (use-package vertico + :init + (vertico-mode) + :bind (:map vertico-map + ("M-j" . vertico-next) + ("M-k" . vertico-previous) + ("RET" . vertico-directory-enter) + ("DEL" . vertico-directory-delete-char) + ("M-DEL" . vertico-directory-delete-word))) + + (use-package emacs :init ;; Add prompt indicator to `completing-read-multiple'. ;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. @@ -378,17 +411,15 @@ #+begin_src emacs-lisp (use-package marginalia :bind (:map minibuffer-local-map - ("M-A" . marginalia-cycle)) + ("M-A" . marginalia-cycle)) :init (marginalia-mode)) #+end_src ** Consult #+begin_src emacs-lisp - (use-package consult + (use-package consult ;; Replace bindings. Lazily loaded due by `use-package'. :bind (;; C-c bindings in `mode-specific-map' - ("C-c M-x" . consult-mode-command) - ("C-c h" . consult-history) ("C-c k" . consult-kmacro) ("C-c m" . consult-man) ("C-c i" . consult-info) @@ -398,7 +429,6 @@ ("C-x b" . consult-buffer) ;; orig. switch-to-buffer ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame - ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer ;; Custom M-# bindings for fast register access ("M-#" . consult-register-load) @@ -408,20 +438,14 @@ ("M-y" . consult-yank-pop) ;; orig. yank-pop ;; M-g bindings in `goto-map' ("M-g e" . consult-compile-error) - ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck + ("M-g f" . consult-flycheck) ;; Alternative: consult-flycheck ("M-g g" . consult-goto-line) ;; orig. goto-line ("M-g M-g" . consult-goto-line) ;; orig. goto-line ("M-g o" . consult-outline) ;; Alternative: consult-org-heading - ("M-g m" . consult-mark) - ("M-g k" . consult-global-mark) - ("M-g i" . consult-imenu) - ("M-g I" . consult-imenu-multi) ;; M-s bindings in `search-map' - ("M-s d" . consult-find) - ("M-s D" . consult-locate) + ("M-s d" . consult-fd) ("M-s g" . consult-grep) ("M-s G" . consult-git-grep) - ("M-s r" . consult-ripgrep) ("M-s l" . consult-line) ("M-s L" . consult-line-multi) ("M-s k" . consult-keep-lines) @@ -434,9 +458,8 @@ ("M-s l" . consult-line) ;; needed by consult-line to detect isearch ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch ;; Minibuffer history - :map minibuffer-local-map - ("M-s" . consult-history) ;; orig. next-matching-history-element - ("M-r" . consult-history)) ;; orig. previous-matching-history-element + :map eshell-mode-map + ("M-r" . consult-history)) ;; Enable automatic preview at point in the *Completions* buffer. This is ;; relevant when you use the default completion UI. @@ -455,10 +478,6 @@ ;; This adds thin lines, sorting and hides the mode line of the window. (advice-add #'register-preview :override #'consult-register-window) - ;; Use Consult to select xref locations with preview - (setq xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref) - ;; Configure other variables and modes in the :config section, ;; after lazily loading the package. :config @@ -475,7 +494,7 @@ consult-bookmark consult-recent-file consult-xref consult--source-bookmark consult--source-file-register consult--source-recent-file consult--source-project-recent-file) - ;; :preview-key "M-." + ;; :preview-key "M-." ;; Optionally configure the narrowing key. ;; Both < and C-+ work reasonably well. @@ -487,33 +506,19 @@ ;; By default `consult-project-function' uses `project-root' from project.el. ;; Optionally configure a different project root function. - ;;;; 1. project.el (the default) + ;;;; 1. project.el (the default) ;; (setq consult-project-function #'consult--default-project--function) - ;;;; 2. vc.el (vc-root-dir) + ;;;; 2. vc.el (vc-root-dir) ;; (setq consult-project-function (lambda (_) (vc-root-dir))) - ;;;; 3. locate-dominating-file + ;;;; 3. locate-dominating-file ;; (setq consult-project-function (lambda (_) (locate-dominating-file "." ".git"))) - ;;;; 4. projectile.el (projectile-project-root) + ;;;; 4. projectile.el (projectile-project-root) ;; (autoload 'projectile-project-root "projectile") ;; (setq consult-project-function (lambda (_) (projectile-project-root))) - ;;;; 5. No project support + ;;;; 5. No project support ;; (setq consult-project-function nil) ) #+end_src -** Treemacs -#+begin_src emacs-lisp - (use-package treemacs - :config - (setq treemacs-no-png-images t)) -#+end_src -*** Treemacs evil -#+begin_src emacs-lisp - (use-package treemacs-evil) -#+end_src -*** Treemacs all the icons -#+begin_src emacs-lisp - (use-package treemacs-all-the-icons) -#+end_src ** Pairs #+begin_src emacs-lisp (use-package smartparens @@ -538,9 +543,6 @@ :pre-handlers '(:rem sp-ruby-pre-handler) :post-handlers '(:rem sp-ruby-post-handler)) - ;; Don't eagerly escape Swift style string interpolation - (sp-local-pair 'swift-mode "\\(" ")" :when '(sp-in-string-p)) - ;; Don't do square-bracket space-expansion where it doesn't make sense to (sp-local-pair '(emacs-lisp-mode org-mode markdown-mode gfm-mode) "[" nil :post-handlers '(:rem ("| " "SPC"))) @@ -564,16 +566,15 @@ :post-handlers '(("| " "SPC") (" | " "*") ("|[i]\n[i]" "RET")))) - ;; (use-package parinfer-rust-mode - ;; :hook (lisp-mode-hook . parinfer-rust-mode)) - ;; (electric-pair-mode 1) #+end_src + ** Debugging #+begin_src emacs-lisp - (use-package dap-mode - :config - (require 'dap-python) - (setq dap-python-debugger 'debugpy)) + ;; (use-package dap-mode + ;; :defer t + ;; :config + ;; (require 'dap-python) + ;; (setq dap-python-debugger 'debugpy)) #+end_src ** Move lines #+begin_src emacs-lisp @@ -583,17 +584,29 @@ #+end_src ** Truncate lines #+begin_src emacs-lisp - (set-default 'truncate-lines t) + (global-visual-line-mode t) +#+end_src +** No littering +#+begin_src emacs-lisp + (use-package no-littering) +#+end_src +** Rainbow delimiters +#+begin_src emacs-lisp + (use-package rainbow-delimiters + :hook (prog-mode . rainbow-delimiters-mode)) +#+end_src +** Crux +#+begin_src emacs-lisp + (use-package crux) #+end_src -* EAT terminal +* Eat terminal ** Eat #+begin_src emacs-lisp - (use-package eat - :custom - (eat-semi-char-non-bound-keys - '(seq-difference eat-semi-char-non-bound-keys '([C-left] [C-right])))) + (use-package eat + :custom + (eat-enable-auto-line-mode t)) #+end_src -*** Eat-toggle +** Eat-toggle #+begin_src emacs-lisp (defun eat-toggle() "Open eat terminal as a popup." @@ -609,11 +622,31 @@ (unless (derived-mode-p 'eat-mode) (eat)))))) #+end_src +** Eat modes +#+begin_src emacs-lisp + ;; (defun eat-modes() + ;; (cond + ;; ((and (eq major-mode 'eat-mode) (member 'meow-normal-mode local-minor-modes)) + ;; (eat-emacs-mode)) + ;; ((and (eq major-mode 'eat-mode) (member 'meow-insert-mode local-minor-modes)) + ;; (eat-semi-char-mode)))) + ;; (add-hook 'meow-normal-mode-hook #'eat-modes) + ;; (add-hook 'meow-insert-mode-hook #'eat-modes) +#+end_src +** Fish completion +#+begin_src emacs-lisp + (use-package fish-completion + :config + (global-fish-completion-mode)) +#+end_src +** Eshell +#+begin_src emacs-lisp +#+end_src * LSP #+begin_src emacs-lisp (use-package lsp-mode :custom - (lsp-completion-provider :none) + (lsp-completion-provider :none) ;; we use Corfu! :init (defun my/orderless-dispatch-flex-first (_pattern index _total) @@ -623,10 +656,15 @@ (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) '(orderless))) + ;; Optionally configure the first word as flex filtered. (add-hook 'orderless-style-dispatchers #'my/orderless-dispatch-flex-first nil 'local) - (add-to-list 'completion-at-point-functions (cape-capf-buster #'lsp-completion-at-point)) + + ;; Optionally configure the cape-capf-buster. :hook + (rust-mode-hook . lsp) + (lsp-mode-hook . (lambda () + (setq-local completion-at-point-functions (list (cape-capf-buster #'lsp-completion-at-point))))) (lsp-completion-mode . my/lsp-mode-setup-completion)) #+end_src ** Languages @@ -641,34 +679,17 @@ #+end_src *** Rust #+begin_src emacs-lisp - (use-package rustic - :ensure - :bind (:map rustic-mode-map - ("M-j" . lsp-ui-imenu) - ("M-?" . lsp-find-references) - ("C-c C-c l" . flycheck-list-errors) - ("C-c C-c a" . lsp-execute-code-action) - ("C-c C-c r" . lsp-rename) - ("C-c C-c q" . lsp-workspace-restart) - ("C-c C-c Q" . lsp-workspace-shutdown) - ("C-c C-c s" . lsp-rust-analyzer-status)) - :config - ;; uncomment for less flashiness - ;; (setq lsp-eldoc-hook nil) - ;; (setq lsp-enable-symbol-highlighting nil) - ;; (setq lsp-signature-auto-activate nil) - - ;; comment to disable rustfmt on save - (setq rustic-format-on-save t)) + (use-package rust-mode + :mode "\\.rs\\'") (use-package flycheck-rust :config (with-eval-after-load 'rust-mode - (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) #+end_src *** Fish #+begin_src emacs-lisp (use-package fish-mode - :mode "(.fish)$") + :mode "\\.fish\\'") #+end_src *** Nix #+begin_src emacs-lisp @@ -684,25 +705,21 @@ :ensure nix-mode :commands (nix-repl)) #+end_src -*** Yuck -#+begin_src emacs-lisp - (use-package yuck-mode) -#+end_src *** Web #+begin_src emacs-lisp - (use-package web-mode - :config - (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))) + (use-package web-mode + :mode + ("\\.phtml\\'" + "\\.tpl\\.php\\'" + "\\.[agj]sp\\'" + "\\.as[cp]x\\'" + "\\.erb\\'" + "\\.mustache\\'" + "\\.djhtml\\'")) #+end_src *** JavaScript #+begin_src emacs-lisp - (use-package js2-mode) + (use-package js2-mode) #+end_src ** Corfu #+begin_src emacs-lisp @@ -711,6 +728,7 @@ (corfu-cycle t) (corfu-preselect 'prompt) (corfu-auto t) + (corfu-popupinfo-delay 0.0) :bind (:map corfu-map ("TAB" . corfu-next) @@ -719,7 +737,11 @@ ([backtab] . corfu-previous)) :init - (global-corfu-mode)) + (global-corfu-mode) + (corfu-history-mode) + (corfu-popupinfo-mode) + :config + (add-to-list 'savehist-additional-variables 'corfu-history)) (use-package emacs :init (setq completion-cycle-threshold 3) @@ -731,31 +753,30 @@ #+end_src *** Cape #+begin_src emacs-lisp - (use-package cape - ;; Bind dedicated completion commands - :bind (("C-c p p" . completion-at-point) ;; capf - ("C-c p t" . complete-tag) ;; etags - ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion - ("C-c p h" . cape-history) - ("C-c p f" . cape-file) - ("C-c p k" . cape-keyword) - ("C-c p s" . cape-elisp-symbol) - ("C-c p e" . cape-elisp-block) - ("C-c p a" . cape-abbrev) - ("C-c p l" . cape-line) - ("C-c p w" . cape-dict) - ("C-c p :" . cape-emoji)) - :init - (add-to-list 'completion-at-point-functions #'cape-dabbrev) - (add-to-list 'completion-at-point-functions #'cape-file) - (add-to-list 'completion-at-point-functions #'cape-elisp-block) - ) + (use-package cape + ;; Bind dedicated completion commands + ;; :bind (("C-c p p" . completion-at-point) ;; capf + ;; ("C-c p t" . complete-tag) ;; etags + ;; ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion + ;; ("C-c p h" . cape-history) + ;; ("C-c p f" . cape-file) + ;; ("C-c p k" . cape-keyword) + ;; ("C-c p s" . cape-elisp-symbol) + ;; ("C-c p e" . cape-elisp-block) + ;; ("C-c p a" . cape-abbrev) + ;; ("C-c p l" . cape-line) + ;; ("C-c p w" . cape-dict) + ;; ("C-c p :" . cape-emoji)) + :config + (add-to-list 'completion-at-point-functions #'cape-dabbrev) + (add-to-list 'completion-at-point-functions #'cape-file) + (add-to-list 'completion-at-point-functions #'cape-elisp-block) + ) #+end_src - ** Flycheck #+begin_src emacs-lisp - (use-package flycheck - :init (global-flycheck-mode)) + (use-package flycheck + :init (global-flycheck-mode)) #+end_src ** Tree-sitter #+begin_src emacs-lisp @@ -771,9 +792,22 @@ #+end_src ** Snippets #+begin_src emacs-lisp - (use-package yasnippet - :init (yas-global-mode)) - (use-package yasnippet-snippets) + ;; (use-package yasnippet + ;; :init (yas-global-mode)) + ;; (use-package yasnippet-snippets) +#+end_src +* Dired +** Bindings +#+begin_src emacs-lisp + (use-package dirvish + :init + (dirvish-override-dired-mode) + :custom + (dired-listing-switches "-Al --group-directories-first") + :bind (:map dired-mode-map + ("h" . 'dired-up-directory) + ("l" . 'dired-find-file) + ("v" . 'meow-visit))) #+end_src * Additional apps ** Telegram lol @@ -792,20 +826,57 @@ ;; (require 'exwm-config) ;; (exwm-config-example) #+end_src -* Dired -** Bindings +** Jupyter #+begin_src emacs-lisp - (use-package dired - :ensure nil - :custom ((dired-listing-switches "-agho --group-directories-first")) - :bind (:map dired-mode-map - ("h" . 'dired-up-directory) - ("l" . 'dired-find-file) - ("v" . 'meow-visit))) + ;; (use-package code-cells) #+end_src -** Icons +** Orgnote #+begin_src emacs-lisp - (use-package all-the-icons-dired - :init (add-hook 'dired-mode-hook 'all-the-icons-dired-mode)) + ;; (use-package orgnote + ;; :defer t) #+end_src +** Codeium +#+begin_src emacs-lisp + ;; (use-package codeium + ;; :init + ;; ;; use globally + ;; (add-to-list 'completion-at-point-functions #'codeium-completion-at-point) + ;; :config + ;; (setq use-dialog-box nil) ;; do not use popup boxes + + ;; ;; if you don't want to use customize to save the api-key + ;; ;; (setq codeium/metadata/api_key "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") + + ;; ;; get codeium status in the modeline + ;; (setq codeium-mode-line-enable + ;; (lambda (api) (not (memq api '(CancelRequest Heartbeat AcceptCompletion))))) + ;; (add-to-list 'mode-line-format '(:eval (car-safe codeium-mode-line)) t) + ;; ;; alternatively for a more extensive mode-line + ;; ;; (add-to-list 'mode-line-format '(-50 "" codeium-mode-line) t) + ;; ;; use M-x codeium-diagnose to see apis/fields that would be sent to the local language server + ;; (setq codeium-api-enabled + ;; (lambda (api) + ;; (memq api '(GetCompletions Heartbeat CancelRequest GetAuthToken RegisterUser auth-redirect AcceptCompletion)))) + ;; ;; you can also set a config for a single buffer like this: + ;; ;; (add-hook 'python-mode-hook + ;; ;; (lambda () + ;; ;; (setq-local codeium/editor_options/tab_size 4))) + + ;; ;; You can overwrite all the codeium configs! + ;; ;; for example, we recommend limiting the string sent to codeium for better performance + ;; (defun my-codeium/document/text () + ;; (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (min (+ (point) 1000) (point-max)))) + ;; ;; if you change the text, you should also change the cursor_offset + ;; ;; warning: this is measured by UTF-8 encoded bytes + ;; (defun my-codeium/document/cursor_offset () + ;; (codeium-utf8-byte-length + ;; (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (point)))) + ;; (setq codeium/document/text 'my-codeium/document/text) + ;; (setq codeium/document/cursor_offset 'my-codeium/document/cursor_offset)) +#+end_src +* Runtime Performance +#+begin_src emacs-lisp + (setq gc-cons-threshold (* 2 1000 1000)) + (setq read-process-output-max (* 1024 1024)) +#+end_src diff --git a/home-manager/programs/emacs/default.nix b/home-manager/programs/emacs/default.nix index f094a28..920a42c 100644 --- a/home-manager/programs/emacs/default.nix +++ b/home-manager/programs/emacs/default.nix @@ -27,7 +27,7 @@ let pkgsUsePackage = with pkgs; [ (pkgs.emacsWithPackagesFromUsePackage { - package = pkgs.emacs29; + package = pkgs.emacs29-pgtk; config = ./init.el; alwaysEnsure = true; extraEmacsPackages = epkgs: [ @@ -39,11 +39,11 @@ let src = fetchFromGitHub { owner = "Exafunction"; repo = "codeium.el"; - rev = "1.2.102"; - sha256 = "0slc13d9nxkn12fw640n1l721qvhnjp7yy3yc7av4c58nl9yv40z"; + rev = "1.4.4"; + sha256 = "1jjix7fn73ihjnhfivf72wris72f4kwf7xb6k5hxs41fm4kr9hdd"; }; - commit = "915837df0f41397028f4ad34f43722c61efd298d"; + commit = "ddc9927ea231ecc5a32f7c9905f92fdfb7912e75"; recipe = writeText "recipe" '' (codeium @@ -51,6 +51,25 @@ let :fetcher github) ''; }) + # (epkgs.melpaBuild rec { + # pname = "orgnote"; + # version = "0.7.17"; + + # src = fetchFromGitHub { + # owner = "Artawower"; + # repo = "orgnote.el"; + # rev = "v${version}"; + # sha256 = "1lrj47h244z4dqq2wyhpww7p3b4sy6bayk8lwlka517lhbcdgh33"; + # }; + + # commit = "ccc40cc346ebf5a6e6a55e3d4a147f0230337350"; + + # recipe = writeText "recipe" '' + # (orgnote + # :repo "${src.owner}/${src.repo}" + # :fetcher github) + # ''; + # }) ]; }) ]; diff --git a/home-manager/programs/emacs/early-init.el b/home-manager/programs/emacs/early-init.el index 91df91f..6e306a1 100644 --- a/home-manager/programs/emacs/early-init.el +++ b/home-manager/programs/emacs/early-init.el @@ -1,3 +1,4 @@ (menu-bar-mode -1) (tool-bar-mode -1) (scroll-bar-mode -1) +(setq-default pgtk-wait-for-event-timeout 0) diff --git a/home-manager/programs/emacs/init.el b/home-manager/programs/emacs/init.el index 0e376e2..6f5da1a 100644 --- a/home-manager/programs/emacs/init.el +++ b/home-manager/programs/emacs/init.el @@ -1,8 +1,12 @@ +(setq gc-cons-threshold (* 50 1000 1000)) + (require 'use-package) (eval-and-compile (setq use-package-always-ensure t use-package-expand-minimally t)) +(savehist-mode 1) + (use-package meow :config (defun meow-setup () @@ -129,10 +133,10 @@ "fc" '((lambda () (interactive) (find-file "~/.nixfiles/home-manager/programs/emacs/config.org")) :wk "Edit emacs config") "fu" '(sudo-edit-find-file :wk "Sudo find file") "fU" '(sudo-edit :wk "Sudo edit file") - "l" '(lsp-keymap-prefix :wk "LSP") ;; Opening.. things "o" '(:ignore t) - "ot" '(eat-toggle :wk "Eat terminal"))) + "ot" '(eat-toggle :wk "Eat terminal") + "om" '(magit-status :wk "Magit"))) (defun spl3g/disable-scroll-bars (frame) (modify-frame-parameters frame @@ -159,27 +163,40 @@ :weight 'bold) (add-hook 'prog-mode-hook 'display-line-numbers-mode) -(add-hook 'prog-mode-hook 'visual-line-mode) +(visual-line-mode 1) -(use-package autothemer) (use-package catppuccin-theme :ensure t :config (load-theme 'catppuccin t) - (setq catppuccin-flavor 'mocha) + (setq catppuccin-flavor 'macchiato) (catppuccin-reload)) (use-package all-the-icons :ensure t :if (display-graphic-p)) -(use-package doom-modeline - :init (doom-modeline-mode 1) +(use-package mood-line + + ;; Enable mood-line :config - (setq doom-modeline-height 35 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t)) ;; adds folder icon next to persp name + (mood-line-mode) + :custom + (mood-line-meow-state-alist + '((normal "N" . mood-line-meow-normal) + (insert "I" . mood-line-meow-insert) + (keypad "K" . mood-line-meow-keypad) + (beacon "B" . mood-line-meow-beacon) + (motion "M" . mood-line-meow-motion))) + (mood-line-glyph-alist mood-line-glyphs-fira-code) + :custom-face + (mood-line-meow-beacon ((t (:foreground "#f9e2af" :weight bold)))) + (mood-line-meow-insert ((t (:foreground "#a6e3a1" :weight bold)))) + (mood-line-meow-keypad ((t (:foreground "#cba6f7" :weight bold)))) + (mood-line-meow-motion ((t (:foreground "#fab387" :weight bold)))) + (mood-line-meow-normal ((t (:weight bold)))) + (mode-line-inactive ((t (:box (:line-width (2 . 6) :color "#11111b") :inverse-video nil :foreground "#6c7086" :background "#11111b")))) + (mode-line ((t (:box (:line-width (2 . 6) :color "#181825") :background "#181825"))))) (use-package good-scroll :init (good-scroll-mode)) @@ -210,16 +227,18 @@ (require 'org-tempo) (use-package toc-org - :init (add-hook 'org-mode-hook 'toc-org-enable)) + :hook (org-mode-hook . toc-org-mode)) (use-package org-bullets - :init (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) + :hook (org-mode-hook . (lambda () (org-bullets-mode 1)))) (use-package org-auto-tangle - :init (add-hook 'org-mode-hook 'org-auto-tangle-mode)) + :config + (add-hook 'org-mode-hook 'org-auto-tangle-mode)) -(use-package org-download - :hook (dired-mode-hook . org-download-enable)) +;; (use-package org-download +;; :hook +;; (dired-mode-hook . org-download-enable)) (use-package direnv :config @@ -230,34 +249,36 @@ (vertico-mode) :bind (:map vertico-map ("M-j" . vertico-next) - ("M-k" . vertico-previous)) - :config - (savehist-mode 1)) + ("M-k" . vertico-previous) + ("RET" . vertico-directory-enter) + ("DEL" . vertico-directory-delete-char) + ("M-DEL" . vertico-directory-delete-word))) + (use-package emacs -:init -;; Add prompt indicator to `completing-read-multiple'. -;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. -(defun crm-indicator (args) - (cons (format "[CRM%s] %s" - (replace-regexp-in-string - "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" - crm-separator) - (car args)) - (cdr args))) -(advice-add #'completing-read-multiple :filter-args #'crm-indicator) - -;; Do not allow the cursor in the minibuffer prompt -(setq minibuffer-prompt-properties - '(read-only t cursor-intangible t face minibuffer-prompt)) -(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) - -;; Emacs 28: Hide commands in M-x which do not work in the current mode. -;; Vertico commands are hidden in normal buffers. -;; (setq read-extended-command-predicate -;; #'command-completion-default-include-p) - -;; Enable recursive minibuffers -(setq enable-recursive-minibuffers t)) + :init + ;; Add prompt indicator to `completing-read-multiple'. + ;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. + (defun crm-indicator (args) + (cons (format "[CRM%s] %s" + (replace-regexp-in-string + "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" + crm-separator) + (car args)) + (cdr args))) + (advice-add #'completing-read-multiple :filter-args #'crm-indicator) + + ;; Do not allow the cursor in the minibuffer prompt + (setq minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt)) + (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) + + ;; Emacs 28: Hide commands in M-x which do not work in the current mode. + ;; Vertico commands are hidden in normal buffers. + ;; (setq read-extended-command-predicate + ;; #'command-completion-default-include-p) + + ;; Enable recursive minibuffers + (setq enable-recursive-minibuffers t)) (use-package orderless :init @@ -267,15 +288,13 @@ (use-package marginalia :bind (:map minibuffer-local-map - ("M-A" . marginalia-cycle)) + ("M-A" . marginalia-cycle)) :init (marginalia-mode)) (use-package consult ;; Replace bindings. Lazily loaded due by `use-package'. :bind (;; C-c bindings in `mode-specific-map' - ("C-c M-x" . consult-mode-command) - ("C-c h" . consult-history) ("C-c k" . consult-kmacro) ("C-c m" . consult-man) ("C-c i" . consult-info) @@ -285,7 +304,6 @@ ("C-x b" . consult-buffer) ;; orig. switch-to-buffer ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame - ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer ;; Custom M-# bindings for fast register access ("M-#" . consult-register-load) @@ -295,20 +313,14 @@ ("M-y" . consult-yank-pop) ;; orig. yank-pop ;; M-g bindings in `goto-map' ("M-g e" . consult-compile-error) - ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck + ("M-g f" . consult-flycheck) ;; Alternative: consult-flycheck ("M-g g" . consult-goto-line) ;; orig. goto-line ("M-g M-g" . consult-goto-line) ;; orig. goto-line ("M-g o" . consult-outline) ;; Alternative: consult-org-heading - ("M-g m" . consult-mark) - ("M-g k" . consult-global-mark) - ("M-g i" . consult-imenu) - ("M-g I" . consult-imenu-multi) ;; M-s bindings in `search-map' - ("M-s d" . consult-find) - ("M-s D" . consult-locate) + ("M-s d" . consult-fd) ("M-s g" . consult-grep) ("M-s G" . consult-git-grep) - ("M-s r" . consult-ripgrep) ("M-s l" . consult-line) ("M-s L" . consult-line-multi) ("M-s k" . consult-keep-lines) @@ -321,9 +333,8 @@ ("M-s l" . consult-line) ;; needed by consult-line to detect isearch ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch ;; Minibuffer history - :map minibuffer-local-map - ("M-s" . consult-history) ;; orig. next-matching-history-element - ("M-r" . consult-history)) ;; orig. previous-matching-history-element + :map eshell-mode-map + ("M-r" . consult-history)) ;; Enable automatic preview at point in the *Completions* buffer. This is ;; relevant when you use the default completion UI. @@ -342,10 +353,6 @@ ;; This adds thin lines, sorting and hides the mode line of the window. (advice-add #'register-preview :override #'consult-register-window) - ;; Use Consult to select xref locations with preview - (setq xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref) - ;; Configure other variables and modes in the :config section, ;; after lazily loading the package. :config @@ -362,7 +369,7 @@ consult-bookmark consult-recent-file consult-xref consult--source-bookmark consult--source-file-register consult--source-recent-file consult--source-project-recent-file) - ;; :preview-key "M-." + ;; :preview-key "M-." ;; Optionally configure the narrowing key. ;; Both < and C-+ work reasonably well. @@ -374,27 +381,19 @@ ;; By default `consult-project-function' uses `project-root' from project.el. ;; Optionally configure a different project root function. - ;;;; 1. project.el (the default) +;;;; 1. project.el (the default) ;; (setq consult-project-function #'consult--default-project--function) - ;;;; 2. vc.el (vc-root-dir) +;;;; 2. vc.el (vc-root-dir) ;; (setq consult-project-function (lambda (_) (vc-root-dir))) - ;;;; 3. locate-dominating-file +;;;; 3. locate-dominating-file ;; (setq consult-project-function (lambda (_) (locate-dominating-file "." ".git"))) - ;;;; 4. projectile.el (projectile-project-root) +;;;; 4. projectile.el (projectile-project-root) ;; (autoload 'projectile-project-root "projectile") ;; (setq consult-project-function (lambda (_) (projectile-project-root))) - ;;;; 5. No project support +;;;; 5. No project support ;; (setq consult-project-function nil) ) -(use-package treemacs - :config - (setq treemacs-no-png-images t)) - -(use-package treemacs-evil) - -(use-package treemacs-all-the-icons) - (use-package smartparens :init (smartparens-global-mode) :hook (prog-mode-hook . turn-on-smartparens-strict-mode) @@ -417,9 +416,6 @@ :pre-handlers '(:rem sp-ruby-pre-handler) :post-handlers '(:rem sp-ruby-post-handler)) - ;; Don't eagerly escape Swift style string interpolation - (sp-local-pair 'swift-mode "\\(" ")" :when '(sp-in-string-p)) - ;; Don't do square-bracket space-expansion where it doesn't make sense to (sp-local-pair '(emacs-lisp-mode org-mode markdown-mode gfm-mode) "[" nil :post-handlers '(:rem ("| " "SPC"))) @@ -442,26 +438,30 @@ :actions '(insert) :post-handlers '(("| " "SPC") (" | " "*") - ("|[i]\n[i]" "RET")))) -;; (use-package parinfer-rust-mode -;; :hook (lisp-mode-hook . parinfer-rust-mode)) -;; (electric-pair-mode 1) + ("|[i]\n[i]" "RET")))) -(use-package dap-mode - :config - (require 'dap-python) - (setq dap-python-debugger 'debugpy)) +;; (use-package dap-mode +;; :defer t +;; :config +;; (require 'dap-python) +;; (setq dap-python-debugger 'debugpy)) (use-package move-text :bind (("C-M-k" . move-text-up) ("C-M-j" . move-text-down))) -(set-default 'truncate-lines t) +(global-visual-line-mode t) + +(use-package no-littering) + +(use-package rainbow-delimiters + :hook (prog-mode . rainbow-delimiters-mode)) + +(use-package crux) (use-package eat :custom - (eat-semi-char-non-bound-keys - '(seq-difference eat-semi-char-non-bound-keys '([C-left] [C-right])))) + (eat-enable-auto-line-mode t)) (defun eat-toggle() "Open eat terminal as a popup." @@ -477,9 +477,24 @@ (unless (derived-mode-p 'eat-mode) (eat)))))) +;; (defun eat-modes() +;; (cond +;; ((and (eq major-mode 'eat-mode) (member 'meow-normal-mode local-minor-modes)) +;; (eat-emacs-mode)) +;; ((and (eq major-mode 'eat-mode) (member 'meow-insert-mode local-minor-modes)) +;; (eat-semi-char-mode)))) +;; (add-hook 'meow-normal-mode-hook #'eat-modes) +;; (add-hook 'meow-insert-mode-hook #'eat-modes) + +(use-package fish-completion + :config + (global-fish-completion-mode)) + + + (use-package lsp-mode :custom - (lsp-completion-provider :none) + (lsp-completion-provider :none) ;; we use Corfu! :init (defun my/orderless-dispatch-flex-first (_pattern index _total) @@ -489,10 +504,15 @@ (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) '(orderless))) + ;; Optionally configure the first word as flex filtered. (add-hook 'orderless-style-dispatchers #'my/orderless-dispatch-flex-first nil 'local) - (add-to-list 'completion-at-point-functions (cape-capf-buster #'lsp-completion-at-point)) + + ;; Optionally configure the cape-capf-buster. :hook + (rust-mode-hook . lsp) + (lsp-mode-hook . (lambda () + (setq-local completion-at-point-functions (list (cape-capf-buster #'lsp-completion-at-point))))) (lsp-completion-mode . my/lsp-mode-setup-completion)) (use-package lsp-pyright @@ -502,32 +522,15 @@ (use-package py-autopep8 :hook (python-mode . py-autopep8-mode)) -(use-package rustic - :ensure - :bind (:map rustic-mode-map - ("M-j" . lsp-ui-imenu) - ("M-?" . lsp-find-references) - ("C-c C-c l" . flycheck-list-errors) - ("C-c C-c a" . lsp-execute-code-action) - ("C-c C-c r" . lsp-rename) - ("C-c C-c q" . lsp-workspace-restart) - ("C-c C-c Q" . lsp-workspace-shutdown) - ("C-c C-c s" . lsp-rust-analyzer-status)) - :config - ;; uncomment for less flashiness - ;; (setq lsp-eldoc-hook nil) - ;; (setq lsp-enable-symbol-highlighting nil) - ;; (setq lsp-signature-auto-activate nil) - - ;; comment to disable rustfmt on save - (setq rustic-format-on-save t)) +(use-package rust-mode + :mode "\\.rs\\'") (use-package flycheck-rust :config (with-eval-after-load 'rust-mode - (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) (use-package fish-mode - :mode "(.fish)$") + :mode "\\.fish\\'") (use-package nix-mode :mode ("\\.nix\\'" "\\.nix.in\\'")) @@ -541,17 +544,15 @@ :ensure nix-mode :commands (nix-repl)) -(use-package yuck-mode) - (use-package web-mode - :config - (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))) + :mode + ("\\.phtml\\'" + "\\.tpl\\.php\\'" + "\\.[agj]sp\\'" + "\\.as[cp]x\\'" + "\\.erb\\'" + "\\.mustache\\'" + "\\.djhtml\\'")) (use-package js2-mode) @@ -560,6 +561,7 @@ (corfu-cycle t) (corfu-preselect 'prompt) (corfu-auto t) + (corfu-popupinfo-delay 0.0) :bind (:map corfu-map ("TAB" . corfu-next) @@ -568,7 +570,11 @@ ([backtab] . corfu-previous)) :init - (global-corfu-mode)) + (global-corfu-mode) + (corfu-history-mode) + (corfu-popupinfo-mode) + :config + (add-to-list 'savehist-additional-variables 'corfu-history)) (use-package emacs :init (setq completion-cycle-threshold 3) @@ -580,19 +586,19 @@ (use-package cape ;; Bind dedicated completion commands - :bind (("C-c p p" . completion-at-point) ;; capf - ("C-c p t" . complete-tag) ;; etags - ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion - ("C-c p h" . cape-history) - ("C-c p f" . cape-file) - ("C-c p k" . cape-keyword) - ("C-c p s" . cape-elisp-symbol) - ("C-c p e" . cape-elisp-block) - ("C-c p a" . cape-abbrev) - ("C-c p l" . cape-line) - ("C-c p w" . cape-dict) - ("C-c p :" . cape-emoji)) - :init + ;; :bind (("C-c p p" . completion-at-point) ;; capf + ;; ("C-c p t" . complete-tag) ;; etags + ;; ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion + ;; ("C-c p h" . cape-history) + ;; ("C-c p f" . cape-file) + ;; ("C-c p k" . cape-keyword) + ;; ("C-c p s" . cape-elisp-symbol) + ;; ("C-c p e" . cape-elisp-block) + ;; ("C-c p a" . cape-abbrev) + ;; ("C-c p l" . cape-line) + ;; ("C-c p w" . cape-dict) + ;; ("C-c p :" . cape-emoji)) + :config (add-to-list 'completion-at-point-functions #'cape-dabbrev) (add-to-list 'completion-at-point-functions #'cape-file) (add-to-list 'completion-at-point-functions #'cape-elisp-block) @@ -609,9 +615,19 @@ (use-package tree-sitter-langs) -(use-package yasnippet - :init (yas-global-mode)) -(use-package yasnippet-snippets) +;; (use-package yasnippet +;; :init (yas-global-mode)) +;; (use-package yasnippet-snippets) + +(use-package dirvish + :init + (dirvish-override-dired-mode) + :custom + (dired-listing-switches "-Al --group-directories-first") + :bind (:map dired-mode-map + ("h" . 'dired-up-directory) + ("l" . 'dired-find-file) + ("v" . 'meow-visit))) ;; (add-to-list 'load-path "~/telega.el") ;; (require 'telega) @@ -623,13 +639,51 @@ ;; (require 'exwm-config) ;; (exwm-config-example) -(use-package dired - :ensure nil - :custom ((dired-listing-switches "-agho --group-directories-first")) - :bind (:map dired-mode-map - ("h" . 'dired-up-directory) - ("l" . 'dired-find-file) - ("v" . 'meow-visit))) - -(use-package all-the-icons-dired - :init (add-hook 'dired-mode-hook 'all-the-icons-dired-mode)) +;; (use-package code-cells) + +;; (use-package orgnote +;; :defer t) + +;; (use-package codeium +;; :init +;; ;; use globally +;; (add-to-list 'completion-at-point-functions #'codeium-completion-at-point) +;; :config +;; (setq use-dialog-box nil) ;; do not use popup boxes + +;; ;; if you don't want to use customize to save the api-key +;; ;; (setq codeium/metadata/api_key "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") + +;; ;; get codeium status in the modeline +;; (setq codeium-mode-line-enable +;; (lambda (api) (not (memq api '(CancelRequest Heartbeat AcceptCompletion))))) +;; (add-to-list 'mode-line-format '(:eval (car-safe codeium-mode-line)) t) +;; ;; alternatively for a more extensive mode-line +;; ;; (add-to-list 'mode-line-format '(-50 "" codeium-mode-line) t) + +;; ;; use M-x codeium-diagnose to see apis/fields that would be sent to the local language server +;; (setq codeium-api-enabled +;; (lambda (api) +;; (memq api '(GetCompletions Heartbeat CancelRequest GetAuthToken RegisterUser auth-redirect AcceptCompletion)))) +;; ;; you can also set a config for a single buffer like this: +;; ;; (add-hook 'python-mode-hook +;; ;; (lambda () +;; ;; (setq-local codeium/editor_options/tab_size 4))) + +;; ;; You can overwrite all the codeium configs! +;; ;; for example, we recommend limiting the string sent to codeium for better performance +;; (defun my-codeium/document/text () +;; (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (min (+ (point) 1000) (point-max)))) +;; ;; if you change the text, you should also change the cursor_offset +;; ;; warning: this is measured by UTF-8 encoded bytes +;; (defun my-codeium/document/cursor_offset () +;; (codeium-utf8-byte-length +;; (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (point)))) +;; (setq codeium/document/text 'my-codeium/document/text) +;; (setq codeium/document/cursor_offset 'my-codeium/document/cursor_offset)) + +(use-package helm) +(use-package helm-fish-completion) + +(setq gc-cons-threshold (* 2 1000 1000)) +(setq read-process-output-max (* 1024 1024)) diff --git a/home-manager/programs/firefox/userChrome.css b/home-manager/programs/firefox/userChrome.css index 0229657..c4390dc 100644 --- a/home-manager/programs/firefox/userChrome.css +++ b/home-manager/programs/firefox/userChrome.css @@ -31,13 +31,6 @@ border-image: linear-gradient(to left, transparent, var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) 30px) 20 / 30px } -hbox.titlebar-buttonbox-container:nth-child(3) > hbox:nth-child(1) > toolbarbutton:nth-child(4) { - display: none; -} - -hbox.titlebar-buttonbox-container:nth-child(6) > hbox:nth-child(1) > toolbarbutton:nth-child(4) { - display: none; -} #toolbar-menubar:not([inactive]){ z-index: 2 } #toolbar-menubar[autohide="true"][inactive] > #menubar-items { @@ -46,6 +39,15 @@ hbox.titlebar-buttonbox-container:nth-child(6) > hbox:nth-child(1) > toolbarbutt margin-left: var(--uc-window-drag-space-pre,0px) } +.titlebar-close { + display: none !important; +} + +element { + --toolbar-bgcolor: var(--lwt-accent-color) !important; +} + + #appcontent > #tabbrowser-tabbox > #tabbrowser-tabpanels @@ -55,10 +57,11 @@ hbox.titlebar-buttonbox-container:nth-child(6) > hbox:nth-child(1) > toolbarbutt > browser { border-radius: 10px; margin: 10px; + border-color: transparent; } .browserStack { - background: var(-lwt-accent-color); + background: var(--lwt-accent-color); } .browserContainer { diff --git a/home-manager/programs/fish/default.nix b/home-manager/programs/fish/default.nix index 5a495e9..88bfe3b 100644 --- a/home-manager/programs/fish/default.nix +++ b/home-manager/programs/fish/default.nix @@ -13,9 +13,9 @@ let set fish_greeting pokemon-colorscripts -r --no-title ''; - loginShellInit = '' - Hyprland - ''; + # loginShellInit = '' + # Hyprland + # ''; functions = { ranger_func = '' ranger $argv @@ -29,6 +29,7 @@ let shellAliases = { rn = "ranger_func"; ls = "ls --hyperlink=auto --color=auto"; + iamatomic = "sudo nixos-rebuild switch --flake ~/.nixfiles#ltrr"; }; in @@ -39,6 +40,6 @@ in programs.fish = { enable = true; - inherit plugins interactiveShellInit loginShellInit functions shellAliases; + inherit plugins interactiveShellInit functions shellAliases; }; } diff --git a/home-manager/programs/foot/default.nix b/home-manager/programs/foot/default.nix new file mode 100644 index 0000000..f22aac8 --- /dev/null +++ b/home-manager/programs/foot/default.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + programs.foot = { + enable = true; + server.enable = true; + settings = { + }; + }; +} diff --git a/home-manager/programs/kitty/default.nix b/home-manager/programs/kitty/default.nix index 07bc2e8..a1cfbf3 100644 --- a/home-manager/programs/kitty/default.nix +++ b/home-manager/programs/kitty/default.nix @@ -6,6 +6,9 @@ font.size = 11.3; theme = "Catppuccin-Mocha"; shellIntegration.enableFishIntegration = true; - extraConfig = "cursor_shape underline"; + settings = { + cursor_shape = "underline"; + background_opacity = "0.7"; + }; }; } diff --git a/home-manager/programs/rofi/config.rasi b/home-manager/programs/rofi/config.rasi new file mode 100644 index 0000000..55e75a7 --- /dev/null +++ b/home-manager/programs/rofi/config.rasi @@ -0,0 +1,156 @@ +configuration { +/* modes: "window,drun,run,ssh";*/ +/* font: "mono 12";*/ + location: 0; + yoffset: 0; + xoffset: 0; +/* fixed-num-lines: true;*/ +/* show-icons: false;*/ +/* terminal: "rofi-sensible-terminal";*/ +/* ssh-client: "ssh";*/ +/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ +/* run-command: "{cmd}";*/ +/* run-list-command: "";*/ +/* run-shell-command: "{terminal} -e {cmd}";*/ +/* window-command: "wmctrl -i -R {window}";*/ +/* window-match-fields: "all";*/ +/* icon-theme: ;*/ +/* drun-match-fields: "name,generic,exec,categories,keywords";*/ +/* drun-categories: ;*/ +/* drun-show-actions: false;*/ +/* drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/ +/* drun-url-launcher: "xdg-open";*/ +/* disable-history: false;*/ +/* ignored-prefixes: "";*/ +/* sort: false;*/ +/* sorting-method: "normal";*/ +/* case-sensitive: false;*/ + cycle: true; +/* sidebar-mode: false;*/ +/* hover-select: false;*/ +/* eh: 1;*/ +/* auto-select: false;*/ +/* parse-hosts: false;*/ +/* parse-known-hosts: true;*/ +/* combi-modes: "window,run";*/ +/* matching: "normal";*/ +/* tokenize: true;*/ +/* m: "-5";*/ +/* filter: ;*/ +/* dpi: -1;*/ +/* threads: 0;*/ +/* scroll-method: 0;*/ +/* window-format: "{w} {c} {t}";*/ +/* click-to-exit: true;*/ +/* max-history-size: 25;*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ +/* matching-negate-char: '-' /* unsupported */;*/ +/* cache-dir: ;*/ +/* window-thumbnail: false;*/ +/* drun-use-desktop-cache: false;*/ +/* drun-reload-desktop-cache: false;*/ +/* normalize-match: false;*/ +/* steal-focus: false;*/ +/* application-fallback-icon: ;*/ +/* refilter-timeout-limit: 8192;*/ +/* xserver-i300-workaround: false;*/ +/* pid: "/run/user/1000/rofi.pid";*/ +/* display-window: ;*/ +/* display-windowcd: ;*/ +/* display-run: ;*/ +/* display-ssh: ;*/ +/* display-drun: ;*/ +/* display-combi: ;*/ +/* display-keys: ;*/ +/* display-filebrowser: ;*/ +/* display-emoji: ;*/ +/* display-calc: ;*/ +/* kb-primary-paste: "Control+V,Shift+Insert";*/ +/* kb-secondary-paste: "Control+v,Insert";*/ +/* kb-clear-line: "Control+w";*/ +/* kb-move-front: "Control+a";*/ +/* kb-move-end: "Control+e";*/ +/* kb-move-word-back: "Alt+b,Control+Left";*/ +/* kb-move-word-forward: "Alt+f,Control+Right";*/ +/* kb-move-char-back: "Left,Control+b";*/ +/* kb-move-char-forward: "Right,Control+f";*/ +/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ +/* kb-remove-word-forward: "Control+Alt+d";*/ +/* kb-remove-char-forward: "Delete,Control+d";*/ +/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ +/* kb-remove-to-eol: "Control+k";*/ +/* kb-remove-to-sol: "Control+u";*/ +/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ +/* kb-accept-custom: "Control+Return";*/ +/* kb-accept-custom-alt: "Control+Shift+Return";*/ +/* kb-accept-alt: "Shift+Return";*/ +/* kb-delete-entry: "Shift+Delete";*/ +/* kb-mode-next: "Shift+Right,Control+Tab";*/ +/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ +/* kb-mode-complete: "Control+l";*/ +/* kb-row-left: "Control+Page_Up";*/ +/* kb-row-right: "Control+Page_Down";*/ +/* kb-row-up: "Up,Control+p";*/ +/* kb-row-down: "Down,Control+n";*/ +/* kb-row-tab: "";*/ +/* kb-element-next: "Tab";*/ +/* kb-element-prev: "ISO_Left_Tab";*/ +/* kb-page-prev: "Page_Up";*/ +/* kb-page-next: "Page_Down";*/ +/* kb-row-first: "Home,KP_Home";*/ +/* kb-row-last: "End,KP_End";*/ +/* kb-row-select: "Control+space";*/ +/* kb-screenshot: "Alt+S";*/ +/* kb-ellipsize: "Alt+period";*/ +/* kb-toggle-case-sensitivity: "grave,dead_grave";*/ +/* kb-toggle-sort: "Alt+grave";*/ +/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ +/* kb-custom-1: "Alt+1";*/ +/* kb-custom-2: "Alt+2";*/ +/* kb-custom-3: "Alt+3";*/ +/* kb-custom-4: "Alt+4";*/ +/* kb-custom-5: "Alt+5";*/ +/* kb-custom-6: "Alt+6";*/ +/* kb-custom-7: "Alt+7";*/ +/* kb-custom-8: "Alt+8";*/ +/* kb-custom-9: "Alt+9";*/ +/* kb-custom-10: "Alt+0";*/ +/* kb-custom-11: "Alt+exclam";*/ +/* kb-custom-12: "Alt+at";*/ +/* kb-custom-13: "Alt+numbersign";*/ +/* kb-custom-14: "Alt+dollar";*/ +/* kb-custom-15: "Alt+percent";*/ +/* kb-custom-16: "Alt+dead_circumflex";*/ +/* kb-custom-17: "Alt+ampersand";*/ +/* kb-custom-18: "Alt+asterisk";*/ +/* kb-custom-19: "Alt+parenleft";*/ +/* kb-select-1: "Super+1";*/ +/* kb-select-2: "Super+2";*/ +/* kb-select-3: "Super+3";*/ +/* kb-select-4: "Super+4";*/ +/* kb-select-5: "Super+5";*/ +/* kb-select-6: "Super+6";*/ +/* kb-select-7: "Super+7";*/ +/* kb-select-8: "Super+8";*/ +/* kb-select-9: "Super+9";*/ +/* kb-select-10: "Super+0";*/ +/* ml-row-left: "ScrollLeft";*/ +/* ml-row-right: "ScrollRight";*/ +/* ml-row-up: "ScrollUp";*/ +/* ml-row-down: "ScrollDown";*/ +/* me-select-entry: "MousePrimary";*/ +/* me-accept-entry: "MouseDPrimary";*/ +/* me-accept-custom: "Control+MouseDPrimary";*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + filebrowser { + directories-first: true; + sorting-method: "name"; + } + plugin { + path: "/nix/store/dllm74vs7qfrcsnwwsjcs4w0x70d67ps-rofi-1.7.5/lib/rofi"; + } +} diff --git a/home-manager/programs/rofi/default.nix b/home-manager/programs/rofi/default.nix index 45e734d..3a78868 100644 --- a/home-manager/programs/rofi/default.nix +++ b/home-manager/programs/rofi/default.nix @@ -7,11 +7,16 @@ let rofi-emoji rofi-calc ]; + extraConfig = { + kb-row-up = "Up,Alt+k"; + kb-row-down = "Down,Alt+j"; + }; in { home.packages = with pkgs; [ rbw rofi-rbw pinentry ]; programs.rofi = { enable = true; - inherit theme cycle plugins; + package = pkgs.rofi-wayland; + inherit theme cycle plugins extraConfig; }; } diff --git a/home-manager/programs/waybar/style.css b/home-manager/programs/waybar/style.css index 02aba83..f06d557 100644 --- a/home-manager/programs/waybar/style.css +++ b/home-manager/programs/waybar/style.css @@ -7,6 +7,7 @@ window#waybar { border-radius: 10px; background: #1f1d2e; + opacity: 0.7; border: 3px solid #363a4f; } diff --git a/home-manager/themes/default.nix b/home-manager/themes/default.nix index 68c9344..bc90cb5 100644 --- a/home-manager/themes/default.nix +++ b/home-manager/themes/default.nix @@ -7,7 +7,6 @@ let tweaks = [ "rimless" ]; variant = "macchiato"; }; - cursorPackage = pkgs.bibata-cursors; in { gtk = { @@ -17,9 +16,13 @@ in name = "Catppuccin-Macchiato-Compact-Flamingo-Dark"; }; cursorTheme = { - package = cursorPackage; + package = pkgs.bibata-cursors; name = "Bibata-Modern-Ice"; }; + iconTheme = { + package = pkgs.rose-pine-icon-theme; + name = "oomox-rose-pine-moon"; + }; gtk4.extraCss = builtins.readFile ./Catppuccin/gtk.css; }; xdg.configFile = { diff --git a/home-manager/wm/hyprland/default.nix b/home-manager/wm/hyprland/default.nix index 3079faa..42e97a0 100644 --- a/home-manager/wm/hyprland/default.nix +++ b/home-manager/wm/hyprland/default.nix @@ -13,16 +13,10 @@ in { home.packages = with pkgs; [ swww - eww-wayland - socat - inotify-tools brightnessctl - alsa-utils slurp grim cliphist - material-design-icons - font-awesome wtype webcord xdg-desktop-portal-hyprland diff --git a/home-manager/wm/hyprland/hyprland.conf b/home-manager/wm/hyprland/hyprland.conf index 7e3af43..4d4fc41 100644 --- a/home-manager/wm/hyprland/hyprland.conf +++ b/home-manager/wm/hyprland/hyprland.conf @@ -1,13 +1,4 @@ -# This is an example Hyprland config file. -# Syntax is the same as in Hypr, but settings might differ. -# -# Refer to the wiki for more information. - -# -# Please note not all available settings / options are set here. -# For a full list, see the wiki (basic and advanced configuring) -# - +blurls = ags monitor = eDP-1,preferred,auto,1 monitor = ,highres,auto,1,mirror,eDP-1 @@ -115,9 +106,8 @@ bind = ,0x1008FF02,exec,brightnessctl s +5% bind = ,0x1008FF03,exec,brightnessctl s 5%- # App binds -bind = SUPER,Q,exec,kitty +bind = SUPER,Q,exec,alacritty bind = SUPER,B,exec,firefox -bind = SUPER,R,exec,kitty fish $HOME/.config/hypr/scripts/rnew.fish bind = SUPER_SHIFT,R,exec,nautilus bind = SUPER,T,exec,telegram-desktop bind = SUPER,E,exec,emacsclient -c -a "emacs" @@ -199,13 +189,10 @@ bind = SUPER,up,workspace,e+1 # Startup apps exec-once = mako -exec-once = hyprctl setcursor Simp1e-Gruvbox-Light 10 exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = /usr/lib/polkit-kde-authentication-agent-1 -exec-once = /home/jerpo/Games/battery-level.sh -exec-once = qv2ray exec-once = emacs --daemon exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = hyprctl setcursor Bibata-Modern-Ice 13
\ No newline at end of file +exec-once = hyprctl setcursor Bibata-Modern-Ice 13 +exec-once = swww init
\ No newline at end of file |
