Skip to content

Instantly share code, notes, and snippets.

@nullray64
Created October 4, 2025 19:26
Show Gist options
  • Select an option

  • Save nullray64/651e863d396001b8d278e6e505b396d1 to your computer and use it in GitHub Desktop.

Select an option

Save nullray64/651e863d396001b8d278e6e505b396d1 to your computer and use it in GitHub Desktop.
;; ---------------------------
;; setq for MacOS
;; ---------------------------
(setq mac-option-modifier 'meta) ;; Option как Meta
(setq mac-command-modifier 'super) ;; Command как Super
;; No effect at Meta but Option+3 = #
(when (eq system-type 'darwin)
(setq mac-pass-command-to-system nil)
(setq mac-pass-option-to-system nil)
;; Especially for # at British keymap
(define-key key-translation-map (kbd "M-3") (kbd "#")))
;; Use all screen space
(add-to-list 'default-frame-alist '(fullscreen . maximized))
;; ---------------------------
;; Package management
;; ---------------------------
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
;; ---------------------------
;; Themes
;; ---------------------------
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(load-file "~/.emacs.d/themes/tokyonight-themes.el")
(load-theme 'tokyonight-moon t)
;; ---------------------------
;; Dashboard
;; ---------------------------
(use-package dashboard
:ensure t
:config
(setq dashboard-startup-banner "~/Downloads/lucy.jpeg")
(setq dashboard-banner-logo-title "Have a good day, hun")
(setq dashboard-center-content t)
(setq dashboard-navigation-cycle t)
(setq dashboard-items '((projects . 5)
(recents . 5)))
;; Чтобы открывался только dashboard, а scratch не создавался
(setq inhibit-startup-screen t)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
(dashboard-setup-startup-hook))
;; ---------------------------
;; Projectile
;; ---------------------------
(use-package projectile
:ensure t
:init
(setq projectile-project-search-path '("~/.emacs.d" "~/Documents/code/dwm" "~/fallenull-kb"))
(setq projectile-switch-project-action #'projectile-dired)
:config
(projectile-mode +1)
(setq dashboard-projects-backend 'projectile))
;; ---------------------------
;; Dirtree / Sidebar
;; ---------------------------
(use-package dired-sidebar
:ensure t
:bind ("C-x C-d" . dired-sidebar-toggle-sidebar)
:config
(setq dired-sidebar-theme 'vscode))
;; ---------------------------
;; Lines, UI
;; ---------------------------
(tool-bar-mode -1)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
;; ---------------------------
;; Шрифт
;; ---------------------------
(set-face-attribute 'default nil
:family "IBM Plex Mono"
:height 140
:weight 'regular)
;; ---------------------------
;; Bind for replace
;; ---------------------------
(global-set-key (kbd "C-c r") 'replace-string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment