Popravki barv, emacs update, malo sway in foot posodobitev, shell

pbp
Jurij Podgoršek 2023-11-20 18:43:42 +01:00
parent 49218747c3
commit 02513c9285
9 changed files with 601 additions and 274 deletions

View File

@ -46,7 +46,7 @@ pad=6x5
[scrollback]
# lines=1000
# multiplier=3.0
multiplier=25.0
# indicator-position=relative
# indicator-format=
@ -66,10 +66,10 @@ pad=6x5
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
alternate-scroll-mode=yes
[colors]
alpha=0.9
alpha=0.975
# foreground=dcdccc
# background=111111
@ -114,9 +114,9 @@ alpha=0.9
# -*- conf -*-
# Gruvbox
background=282828
background=2d2b2a
foreground=ebdbb2
regular0=282828
regular0=2d2b2a
regular1=cc241d
regular2=98971a
regular3=d79921

View File

@ -37,9 +37,10 @@ output eDP-1 {
#output "*" background "~/Slike/☭/bigstock-Sutjeska-National-Park-Bosnia-63011269.jpg" fill
output "*" background "~/sredstva/dotfiles/ozadje.jpg" fill
# Zamik dobimo z SIRINA / SCALE
output HDMI-A-2 pos 1600 0 scale 1
output HDMI-A-1 pos 1600 0 scale 1
output DP-5 pos 1600 0 scale 1
output HDMI-A-2 pos 1601 0 scale 1
output HDMI-A-1 pos 1601 0 scale 1
output DP-5 pos 1601 0 scale 1
output DP-2 pos 1601 0 scale 1
# start a terminal
bindsym $mod+Return exec $term
@ -214,6 +215,9 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
set $ozadje #32302f
set $ozadjeTrans #32302fcc
#
# Status Bar:
#
@ -224,13 +228,16 @@ bar {
# status_command i3status-rs
status_command i3status
colors {
focused_background #272727E5
background #272727B8
#focused_background #272727E5
focused_background $ozadje
#background #272727B8
background $ozadjeTrans
#statusline #ebdbb2E5
statusline #DCDCDC
focused_workspace #555555E5 #555555E5 #ffffff
inactive_workspace #272727E5 #272727E5 #888888
focused_workspace #32302f #32302f #ffffff
active_workspace #32302fcc #32302fcc #888888
inactive_workspace #32302fcc #32302fcc #888888
}
font pango:FontAwesome Regular 12, Iosevka SS01 Medium 12
strip_workspace_numbers yes
@ -261,6 +268,9 @@ hide_edge_borders smart
# Mouse focus
focus_follows_mouse yes
# Premik kurzorja v aktivno okno
mouse_warping container
# KBD layouti
input "type:keyboard" {
xkb_layout us,si
@ -350,7 +360,7 @@ workspace 2:λ
exec emacs
workspace 3:
exec thunderbird
exec icedove
workspace 4:
#exec revolt

View File

@ -2,16 +2,11 @@
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("org-capture-last-stored"
(filename . "~/.notes")
(front-context-string . "** TODO Zaraščen")
(("FLUXUS navodilo"
(filename . "~/sredstva/fluxus/docs/fluxus-manual.[en].org")
(front-context-string . "#+TITLE: Fluxus:")
(rear-context-string)
(position . 9)
(last-modified 25598 13456 906334 599000))
(position . 1)
(last-modified 25693 29993 875550 300000))
("IRS"
(filename . "~/rs/megla-sync/org/irs.org")
(front-context-string . "- nov X, dizajn\n")
(rear-context-string . "fadeout teksta)\n")
(position . 359)
(last-modified 25583 44635 333675 223000))
)
(filename . "~/rs/megla-sync/org/irs.org")))

View File

@ -1,55 +1,78 @@
;;;;;;;;;;;
;; DEBUG ;;
;;;;;;;;;;;
;; Debagiraj napake?
;(setq debug-on-error t)
;; Make startup faster by reducing the frequency of garbage
;; collection.
(setq gc-cons-threshold (* 50 1024 1024))
;; Prikaz statistik nalozenih paketov (prikazi z M-x use-package-report)
;(setq use-package-compute-statistics t)
;;;;;;;;;;;;
;; PAKETI ;;
;;;;;;;;;;;;
;(setq use-package-compute-statistics t)
(setq debug-on-error t)
;; Loudamo melpa paketice
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Set up package.el to work with MELPA
;; Loudamo melpa paketice (in pa ORG)
(require 'package)
(setq use-package-always-ensure t) ;; always ensures that a package is installed
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t)
(package-initialize)
;; Stare funkcije za namescanje paketov. Od use-package z :ensure naprej vec ne
;; Sekvence n'shiat
;(require 'seq)
;; Kaj vse naj bo namesceno?
;(setq paketi '())
;(setq nema (seq-filter (lambda (p) (not (package-installed-p p))) paketi))
;(when nema
; (package-initialize)
; (package-refresh-contents)
; (dolist (p nema)
; (package-install p)))
;(use-package benchmark-init
; :ensure t
; :config
; :disabled t
; (benchmark-init/activate)
; (add-hook 'after-init-hook 'benchmark-init/deactivate))
;;;;;;;;;;
;; EVIL ;;
;;;;;;;;;;
(use-package evil
:ensure t
:init (setq evil-want-integration t
evil-want-keybinding nil)
evil-want-keybinding nil
;org-return-follows-link t
)
:config
;; Evil mode toggle <3
(evil-mode 1)
(defvar my-header-map (make-sparse-keymap)
"Mapiranje za evil bliznjice (leader trigger)")
(evil-mode 1))
;; Keybindings!
(defvar my-leader-map (make-sparse-keymap)
"Mapiranje za evil bliznjice (leader trigger)")
(use-package general
:after (evil evil-collection org projectile)
:config
(general-evil-setup)
(defun odpri-org-link ()
"Odpri link v ORG fajlu pod kurzorjem"
(interactive)
(if (org-in-regexp org-link-any-re nil t)
(org-open-at-point)
nil))
(general-evil-define-key
'normal
org-mode-map
"RET" 'odpri-org-link)
(general-create-definer start/leader-keys
:states '(normal insert visual emacs)
:keymaps 'override
:prefix "SPC" ;; set leader
:global-prefix "C-SPC") ;; access leader in insert mode
;; Osnovne bliznjice
(start/leader-keys
"[" 'previous-buffer
"]" 'next-buffer
"," 'ivy-switch-buffer
"RET" 'counsel-bookmark
"/" 'counsel-projectile-rg
"t" 'treemacs-add-and-display-current-project
"p" 'projectile-command-map
"g" 'magit-status)
;; WINDOW ukazi
(define-prefix-command 'evil-window-map)
@ -59,7 +82,8 @@
(define-key evil-window-map "l" 'windmove-right)
(define-key evil-window-map "s" 'split-window-below)
(define-key evil-window-map "v" 'split-window-right)
(define-key my-leader-map "w" 'evil-window-map)
(define-key evil-window-map "d" 'kill-buffer-and-window)
(start/leader-keys "w" 'evil-window-map)
;; BUFFER ukazi
(define-prefix-command 'evil-buffer-map)
@ -69,98 +93,76 @@
(define-key evil-buffer-map "e" 'eval-buffer)
(defun switch-to-scratch () (interactive) (switch-to-buffer "*scratch*"))
(define-key evil-buffer-map "s" 'switch-to-scratch)
(defun switch-to-home () (interactive) (switch-to-buffer "*GNU Emacs*"))
(define-key evil-buffer-map "h" 'switch-to-home)
(define-key evil-buffer-map "h" 'dashboard-open)
(defun open-config () (interactive) (find-file-literally "~/.emacs.d/init.el"))
(define-key evil-buffer-map "c" 'open-config)
(define-key my-leader-map "b" 'evil-buffer-map)
(define-key evil-buffer-map "d" 'kill-current-buffer)
(define-key evil-buffer-map "k" 'kill-buffer)
(start/leader-keys "b" 'evil-buffer-map)
;; EVAL ukazi
(define-prefix-command 'eval-eval-map)
(define-prefix-command 'evil-eval-map)
(define-key evil-eval-map "b" 'eval-buffer)
(define-key evil-eval-map "e" 'eval-expression)
(define-key evil-eval-map "r" 'eval-region)
(define-key my-leader-map "e" 'evil-eval-map)
(start/leader-keys "e" 'evil-eval-map)
;; Geiser ukazi
(define-prefix-command 'evil-geiser-map)
(define-key evil-geiser-map "b" 'geiser-eval-buffer)
(define-key evil-geiser-map "e" 'geiser-eval-expression)
(defun geiser-start-and-eval-buffer ()
(interactive)
(geiser-guile)
(previous-buffer)
(geiser-eval-buffer))
(define-key evil-geiser-map "s" 'geiser-start-and-eval-buffer)
(define-key evil-geiser-map "g" 'geiser)
(define-key evil-geiser-map "c" 'geiser-connect)
(define-key evil-geiser-map "k" 'geiser-exit-repl)
(defun geiser-restart ()
;(interactive)
(geiser-exit-repl)
(geiser-start-and-eval-buffer))
(define-key evil-geiser-map "r" 'geiser-restart)
(start/leader-keys "s" 'evil-geiser-map)
;; FILE ukazi
(define-prefix-command 'evil-file-map)
(define-key evil-file-map "f" 'counsel-find-file)
(defun load-config () (interactive) (find-file "~/.emacs.d/init.el"))
(define-key evil-file-map "c" 'load-config)
(define-key my-leader-map "f" 'evil-file-map)
(start/leader-keys "f" 'evil-file-map)
;; ORG ukazi
(define-prefix-command 'evil-org-map)
(define-key evil-org-map "c" 'org-capture)
(define-key evil-org-map "a" 'org-agenda)
(define-key my-leader-map "o" 'evil-org-map)
(start/leader-keys "o" 'evil-org-map)
;; Projectile map!
(define-key my-leader-map "p" 'projectile-command-map)
;; Odpri ORG linke kar s tipko enter
(defun odpri-org-link ()
(interactive)
(if (org-in-regexp org-link-any-re nil t)
(org-open-at-point)
nil))
(define-key evil-normal-state-map (kbd "RET") 'odpri-org-link)
;; Mapiranje ukazov
;(define-key evil-normal-state-map (kbd "SPC") my-leader-map)
;(evil-global-set-key 'motion (kbd "SPC") my-leader-map)
;(evil-local-set-key 'motion (kbd "SPC") my-leader-map)
;(define-key evil-normal-state-map (kbd "SPC") my-leader-map)
)
(use-package general
:ensure t
:after evil
:config
(general-evil-setup)
(general-nmap
:prefix "SPC"
:prefix-map 'my-leader-map
;; Hitri buffer shortcuti
"[" 'previous-buffer
"]" 'next-buffer
"," 'ivy-switch-buffer
"RET" 'counsel-bookmark
"/" 'counsel-rg
"t" 'treemacs-add-and-display-current-project)
(general-nmap
:prefix "SPC"
:states 'normal
:keymaps 'dired-mode-map
:prefix-map 'my-leader-map
;; Hitri buffer shortcuti
"[" 'previous-buffer
"]" 'next-buffer
"," 'ivy-switch-buffer
"RET" 'counsel-bookmark
"/" 'counsel-rg
"t" 'treemacs-add-and-display-current-project))
;; Dodatne evil bližnjice
(use-package evil-collection
:ensure t
:after evil
:config
(evil-collection-init))
;; Evil orgmode
(use-package evil-org
:ensure t
:after (evil org)
:hook ((org-mode . (lambda () evil-org-mode)))
:init
(setq org-src-fontify-natively t)
:hook (org-mode . (lambda ()
;; Odpri ORG linke kar s tipko enter
;(define-key org-mode-map (kbd "RET") 'odpri-org-link)
;(local-set-key (kbd "RET") 'odpri-org-link)
(evil-org-mode)))
:config
(require 'evil-org-agenda)
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
(evil-org-agenda-set-keys))
(use-package treemacs-evil :ensure t :after treemacs)
(use-package treemacs-evil
:defer t
:after treemacs)
@ -185,9 +187,9 @@
;; Barvna tema
(use-package gruvbox-theme
:ensure t
:config
(load-theme 'gruvbox-dark-medium t))
(load-theme 'gruvbox-dark-soft t)
(window-divider-mode 0))
;(load-theme 'hemisu-light t) ;; hemisu-theme paket
;(require 'doom-themes)
;(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
@ -197,22 +199,26 @@
;; Doom modeline - lepsi status bar spodaj
(use-package doom-modeline
:ensure t
; :disabled t
:config
(doom-modeline-mode))
;; Lepse ikone!
(use-package all-the-icons :ensure t)
(use-package nerd-icons)
;; !!! ;;
;; !!! Pognat je treba (1x) all-the-icons-install-fonts !!! ;;
;; !!! Pognat je treba (1x) nerd-icons-install-fonts !!! ;;
;; !!! ;;
(use-package all-the-icons)
;; y/n namesto yes / no
(fset 'yes-or-no-p 'y-or-n-p)
;; Oooo gladko skrolanje! (Emacs 29+)
(pixel-scroll-precision-mode)
;; Nisem cist ziher kaj to dela
(setq scroll-conservatively 10)
(setq scroll-margin 8)
@ -224,9 +230,13 @@
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
;; Turn on the weird indenting that Emacs does by default.
(electric-indent-mode 1)
;; Turns on automatic parens pairing
(electric-pair-mode 1)
;; Editorconfig formatiranje fajlov
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))
@ -238,15 +248,13 @@
;; Lepse file drevo
(use-package treemacs
:ensure t
:defer t
:hook ((treemacs-mode . (lambda () ;; Brez stevilk vrstic v file drevesu!
(display-line-numbers-mode -1)))))
(use-package treemacs-projectile :ensure t :after treemacs)
(use-package treemacs-projectile :after treemacs)
;; Uporabi drevesne razveljavitve, undo tree
(use-package undo-tree
:ensure t
:config
(global-undo-tree-mode)
(evil-set-undo-system 'undo-tree)
@ -254,13 +262,7 @@
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo"))))
;; Markdown podpora
(use-package markdown-mode :ensure t)
;; Zapiraj zaklepaje
(use-package smartparens
:ensure t
:config
(smartparens-global-mode 1))
(use-package markdown-mode :mode "\\.(md|markdown)\\'")
@ -268,9 +270,30 @@
;; PROGRAMIRANJE ;;
;;;;;;;;;;;;;;;;;;;
;; Projektni mgmt
(use-package projectile
:after ivy
:config
(setq projectile-globally-ignored-directories '("node_modules"))
(setq projectile-completion-system 'ivy)
;; Popravek za projectile prek ssh!
;(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
;(setq-default projectile-indexing-method 'alien)
(setq projectile-indexing-method 'native)
(setq projectile-enable-caching t)
(projectile-mode t))
(use-package counsel-projectile :after projectile)
;; Zapiraj zaklepaje
(use-package smartparens
:defer t
:config
(smartparens-global-mode 1))
;; Pametni tabi
(use-package smart-tabs-mode
:ensure t
:disabled t
:after js2-mode
:config
@ -279,122 +302,175 @@
(smart-tabs-advice js2-indent-line js2-basic-offset))
;; Twig nacin (in drug web)
(use-package web-mode :ensure t)
(use-package web-mode :mode "\\.(html|twig)\\'")
;; Lepšanje web kode
(use-package web-beautify :ensure t)
(use-package web-beautify :defer t :after web-mode)
;; Kompletiranje ukazov
(use-package company
:ensure t
:defer t
:config
(setq lsp-completion-provider :capf)
(company-mode))
;; LSP potrebuje dependency iz npm: "sudo npm install -g vue-language-server
(use-package lsp-mode
:ensure t
:after company)
(use-package lsp-mode :after company)
;; Vuejs moud
(use-package vue-mode
:ensure t
:mode "\\.vue\\'"
:config (add-hook 'vue-mode-hook #'lsp))
;; Popravek za grdo ozadje
(add-hook 'mmm-mode-hook
(lambda ()
(set-face-background 'mmm-default-submode-face nil)))
;; PHP ko je treba
(use-package php-mode
:ensure t
:mode "\\.(php|module)\\'")
(use-package php-mode :mode "\\.(php|module)\\'")
;; Guile scheme
(use-package geiser
:ensure t
:mode "\\.scm\\'")
(use-package geiser)
(use-package geiser-guile
:ensure t
:after geiser
:init (setq scheme-program-name "guile"))
;; Racket podpora
(use-package racket-mode
:ensure t
:mode "\\.rkt\\'")
(use-package racket-mode :mode "\\.rkt\\'")
;; Rainbowz
(use-package rainbow-delimiters
:ensure t
:hook ((prog-mode . rainbow-delimiters-mode)))
;; YAML konfiguracije
(use-package yaml-mode
:ensure t
:mode "\\.yaml\\'")
;; Config fajli
(use-package yaml-mode :mode "\\.yaml\\'")
(use-package toml-mode :mode "\\.toml\\'")
;; Extempore lajv kodiranje!
(use-package extempore-mode
:ensure t
:mode "\\.xtm\\'")
(use-package extempore-mode :mode "\\.xtm\\'")
;; Syntax checker
(use-package flycheck
:ensure t
:defer t)
(use-package flycheck :defer t)
;; Vmesnik za GIT
(use-package magit
:ensure t
:defer t)
(use-package magit :defer t)
;; Drupal pomocnik
(use-package drupal-mode
:ensure t
:after php-mode)
(use-package drupal-mode :after php-mode)
;; Oblikovanje kode za razne jezike
(use-package format-all :ensure t)
(use-package format-all :defer t)
;; Tidal cycles live coding
(use-package tidal
:ensure t
:defer t
:init
;; Tidal cycles lokacija
(setq tidal-boot-script-path "~/.cabal/store/ghc-9.0.2/tidal-1.9.2-8e9cf9a217d87a6950880512f51893a6434970cd0690e831c563fc64ebd5de8f/share/BootTidal.hs"))
;; Config fajli
(use-package toml-mode
:ensure t)
;; js2 za javascript
(use-package js2-mode
:ensure t
:mode "\\.js\\'"
:config
;(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(setq js2-strict-missing-semi-warning nil
;; JS indentacije
(setq js2-strict-missing-semi-warning nil
js2-missing-semi-one-line-override nil
js2-basic-offset 2
js-indent-level 2
indent-tabs-mode nil
tab-width 2))
tab-width 2)
;; js2 za javascript
(use-package js2-mode
:mode "\\.js\\'"
:config
;(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
)
;; Še en mode za JS, bolj react
(use-package rjsx-mode
:ensure t
:after js2-mode)
(use-package rjsx-mode :after js2-mode)
;; css indent
(setq css-indent-level 2)
(setq css-indent-offset 2)
;; Python indent
(setq python-indent-offset 2)
;; Arduino
(use-package arduino-mode :mode "\\.ino\\'")
;; Supercollider
(add-to-list 'load-path "/usr/share/emacs/site-lisp/SuperCollider/") ;; path will depend on your compilation settings
(use-package sclang
:ensure f
:defer t
:config
(global-set-key (kbd "S-RET") 'sclang-eval-region-or-line)
(global-set-key (kbd "C-.") 'sclang-server-free-all))
;; FLUXUS!
(use-package fluxus-mode :defer t)
;; Python virtualenv podpora
(use-package pyvenv
:config
(pyvenv-mode t)
;; Set correct Python interpreter
(setq pyvenv-post-activate-hooks
(list (lambda ()
(setq python-shell-interpreter (concat pyvenv-virtual-env "bin/python3")))))
(setq pyvenv-post-deactivate-hooks
(list (lambda ()
(setq python-shell-interpreter "python3")))))
;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;; SARDINE MODE
;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;; Customize the python-mode to run Sardine code using the terminal.
(setq
; python-shell-interpreter "fishery"
; python-shell-interpreter-args "")
python-shell-interpreter "python3"
python-shell-interpreter-args "")
(defun sardine/start-sardine ()
"Start a new interactive Sardine Session"
(interactive)
(run-python))
(defun sardine/eval-block ()
"Evaluate a sardine code block"
(interactive)
(mark-paragraph)
(if (and transient-mark-mode mark-active)
(python-shell-send-region (point) (mark))
(python-shell-send-region (point-at-bol) (point-at-eol)))
(forward-paragraph))
(defun sardine/stop-code ()
"Stop all the Sardine code currently running"
(interactive)
(python-shell-send-string "panic()"))
; Unmapping keys from the Python mode
;(add-hook 'python-mode-hook
; (lambda() (local-unset-key (kbd "C-c C-c"))))
;(add-hook 'python-mode-hook
; (lambda() (local-unset-key (kbd "C-c C-s"))))
; Remapping keys
(global-set-key (kbd "C-M-x") #'sardine/eval-block)
(global-set-key (kbd "C-M-.") #'sardine/stop-code)
;;;;;;;;;;;;;
;; ORGMODE ;;
;;;;;;;;;;;;;
;; Lepsi fonti
(setq org-src-fontify-natively t)
;; Stanja taskov
(setq org-todo-keywords
'((sequence "TODO" "V DELU" "TESTIRANJE" "DOKUMENTIRANJE" "KONČANO")))
@ -404,32 +480,33 @@
;; CalDav v orgmode!
(use-package org-caldav
:ensure t
:after org-mode
:defer t
:init
(setq org-caldav-calendar-id "org"
org-caldav-files '("~/Dokumenti/todo.org")
org-caldav-inbox "~/Dokumenti/koledar-in.org"
org-caldav-url "https://goba.rhiz0.me/remote.php/dav/calendars/g1smo"
org-icalendar-timezone "Europe/Ljubljana"))
(setq org-caldav-url "https://goba.rhiz0.me/remote.php/dav/calendars/g1smo"
org-caldav-files '("~/org/todo.org")
org-icalendar-timezone "Europe/Ljubljana"
org-caldav-calendars '((:calendar-id "org"
;:files '("~/org/todo.org")
:inbox "~/org/koledarji/org-in.org")
(:calendar-id "personal"
:inbox "~/org/koledarji/osebno-in.org")
(:calendar-id "megla"
:inbox "~/org/koledarji/megla-in.org"))))
;; Nacin za pisanje brez distrakcij
(use-package writeroom-mode
:ensure t
:config
:hook ((org-mode . (lambda ()
(display-line-numbers-mode -1)))))
;; HTMLize za barvanje kode v org izvozu v HTML
(use-package htmlize
:after org-mode
:ensure t)
(use-package htmlize :after org-mode :defer t)
;; Lokacije ORG agenda vnosov
(setq org-agenda-files (list "~/rs/org" "~/Dokumenti"))
(setq org-agenda-files (list "~/rs/org" "~/org"))
;; Zapiski
(setq org-default-notes-file "~/Dokumenti/zapiski.org")
(setq org-default-notes-file "~/org/zapiski.org")
;; Zacnimo na ponedeljek, kot se spodobi
(setq calendar-week-start-day 1)
@ -439,14 +516,13 @@
'org-babel-load-languages
'((dot . t)))
;; enable ditaa
;; enable ditaa (diagrami)
(org-babel-do-load-languages
'org-babel-load-languages
'((ditaa . t)))
;; Mermaid v orgmode (diagrami)
(use-package ob-mermaid
:ensure t
:defer t
:config
;; sudo npm install -g @mermaid-js/mermaid-cli
@ -456,15 +532,72 @@
'((mermaid . t)
(scheme . t))))
;;;;;;;;;;;;;
;; E-pošta ;;
;;;;;;;;;;;;;
(setq mu4e-get-mail-command "mbsync -a")
;; Ikonice
(use-package mu4e-marker-icons
:defer t
:config
(mu4e-marker-icons-mode 1))
;; Email paketi iz githuba
;(use-package quelpa-use-package)
(use-package mu4e-dashboard
:ensure f
:after mu4e
:vc "https://github.com/rougier/mu4e-dashboard")
;:quelpa (mu4e-dashboard
; :fetcher github
; :repo "rougier/mu4e-dashboard"))
;; @TODO konfiguracija!
;; - dashboard: https://github.com/rougier/mu4e-dashboard
;; - thread folding: https://github.com/rougier/mu4e-thread-folding
;; - svg tag mode: https://github.com/rougier/svg-tag-mode
;; - views: https://github.com/lordpretzel/mu4e-views
;;
;; Za zgled:
;; mu4e look & feel: https://www.reddit.com/r/emacs/comments/mzgsm0/mu4e_look_and_feel/
;; nano-mu4e: https://github.com/rougier/nano-emacs/blob/master/nano-mu4e.el
;; system crafters o emacs emailu: https://www.youtube.com/watch?v=yZRyEhi4y44&list=PLEoMzSkcN8oM-kA19xOQc8s0gr0PpFGJQ
;;;;;;;;;;;
;; Razno ;;
;;;;;;;;;;;
;; IVY autocomplete! <3
(use-package ivy
:config
(ivy-mode)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(local-set-key (kbd "C-j") 'ivy-next-line)
(local-set-key (kbd "C-k") 'ivy-prevous-line)
(local-set-key [remap scroll-up-command] 'ivy-scroll-up-command)
(local-set-key [remap scroll-down-command] 'ivy-scroll-down-command)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume))
;; Vedno sledi symlinkom v git
(setq vc-follow-symlinks t)
;; Swiper search
(use-package swiper
:ensure t
:defer t
:config
(global-set-key "\C-s" 'swiper))
;; Izboljsani default ukazi bolj prijazni
(use-package counsel
:ensure t
:defer t
:config
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
@ -478,50 +611,37 @@
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-c k") 'counsel-ag)
(global-set-key (kbd "C-x l") 'counsel-locate)
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history))
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
;; Ripgrep ignore
(defvar my-rg-excludes '("node_modules")
"List of directories to exclude from `counsel-rg' results.")
(define-advice counsel-rg
(:around (fn &optional in dir opts &rest args) my-glob)
"Exclude `my-rg-excludes' from `counsel-rg' results."
(let ((dir (or dir default-directory)))
(dolist (x my-rg-excludes)
(let ((glob (and (file-in-directory-p x dir)
(file-relative-name (expand-file-name "**" x) dir))))
(when glob (setq opts (concat "-g !" glob (and opts " ") opts))))))
(apply fn in dir opts args)))
;; Iskanje po fajlih (fulltext)
(use-package rg
:ensure t
:defer t
:config
(rg-enable-default-bindings))
;;;;;;;;;;;
;; Razno ;;
;;;;;;;;;;;
;; IVY
(use-package ivy
:ensure t
:config
(ivy-mode)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(local-set-key (kbd "C-j") 'ivy-next-line)
(local-set-key (kbd "C-k") 'ivy-prevous-line)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume))
;; Vedno sledi symlinkom v git
(setq vc-follow-symlinks t)
;; Projektni mgmt
(use-package projectile
:ensure t
:config (projectile-mode t))
;; Pomoc
;(use-package 'helpful :ensure t)
(use-package helpful :defer t)
;; Prikazi nedavne ukaze prej v M-x
(use-package smex :ensure t)
;; Prikazi nedavne ukaze pri vrhu v M-x
(use-package smex :defer t)
;; Pomoc za keybinde
(use-package which-key
:ensure t
:defer t
:config
;; Allow C-h to trigger which-key before it is done automatically
(setq which-key-show-early-on-C-h t)
@ -531,6 +651,8 @@
(setq which-key-idle-secondary-delay 0.05)
(which-key-mode))
(use-package zone-nyan :defer t)
;; Prikazi startup time
(add-to-list 'after-init-hook
(lambda ()
@ -553,14 +675,92 @@
;; File asociacije
(use-package openwith
:ensure t
:defer t
:config
(setq openwith-associations '(("\\.pdf\\'" "xdg-open" (file))))
(openwith-mode t))
;; Kolaborativno urejanje
(use-package crdt
:ensure t)
(use-package crdt :defer t)
;; ELISP test
(defun odpri-dnevnik ()
(interactive)
(find-file (format-time-string "/tmp/%Y-%m-%d_dnevnik.org"))
(insert (concat "\n=====================\n"
(shell-command-to-string "date") "\n"
(format-time-string "%Y-%m-%d") "\n"
"ŠE VEČ TEKSTA!" "\n")))
(global-set-key (kbd "C-M-d") 'odpri-dnevnik)
;; GNU guix
(use-package guix)
;; Dashboard - homescreen
(use-package dashboard
;:after nerd-icons
:init
(dashboard-setup-startup-hook)
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
(setq dashboard-banner-logo-title "EMA☭S")
(setq dashboard-startup-banner 3)
(setq dashboard-center-content t)
(setq dashboard-items '((agenda . 5)
(recents . 5)))
;(setq dashboard-display-icons-p t) ;; display icons on both GUI and terminal
;(setq dashboard-icon-type 'nerd-icons) ;; use `nerd-icons' package
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
(setq dashboard-set-navigator t)
(setq dashboard-set-init-info t))
;; Bolj fajni IELM REPL
(use-package ielm
:hook (ielm-mode-hook . (lambda ()
(eldoc-mode)
;(paredit-mode)
(defun g-ielm-init-history ()
(let ((path (expand-file-name "ielm/history" user-emacs-directory)))
(make-directory (file-name-directory path) t)
(setq-local comint-input-ring-file-name path))
(setq-local comint-input-ring-size 10000)
(setq-local comint-input-ignoredups t)
(comint-read-input-ring))
(g-ielm-init-history)
(defun g-ielm-write-history (&rest _args)
(with-file-modes #o600
(comint-write-input-ring)))
(advice-add 'ielm-send-input :after 'g-ielm-write-history)
(define-key inferior-emacs-lisp-mode-map (kbd "C-l")
'comint-clear-buffer)
(define-key inferior-emacs-lisp-mode-map (kbd "C-r")
'helm-comint-input-ring))))
;; Sinhronizacija podnapisov (uporablja mpv!)
(use-package subed
:defer t
:config
;; Remember cursor position between sessions
(add-hook 'subed-mode-hook 'save-place-local-mode)
;; Break lines automatically while typing
(add-hook 'subed-mode-hook 'turn-on-auto-fill)
;; Break lines at 40 characters
(add-hook 'subed-mode-hook (lambda () (setq-local fill-column 40)))
;; Some reasonable defaults
(add-hook 'subed-mode-hook 'subed-enable-pause-while-typing)
;; As the player moves, update the point to show the current subtitle
(add-hook 'subed-mode-hook 'subed-enable-sync-point-to-player)
;; As your point moves in Emacs, update the player to start at the current subtitle
(add-hook 'subed-mode-hook 'subed-enable-sync-player-to-point)
;; Replay subtitles as you adjust their start or stop time with M-[, M-], M-{, or M-}
(add-hook 'subed-mode-hook 'subed-enable-replay-adjusted-subtitle)
;; Loop over subtitles
(add-hook 'subed-mode-hook 'subed-enable-loop-over-current-subtitle)
;; Show characters per second
(add-hook 'subed-mode-hook 'subed-enable-show-cps))
@ -573,12 +773,42 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("db3e80842b48f9decb532a1d74e7575716821ee631f30267e4991f4ba2ddf56e" "d14f3df28603e9517eb8fb7518b662d653b25b26e83bd8e129acea042b774298" "7661b762556018a44a29477b84757994d8386d6edee909409fabe0631952dad9" default))
'("db3e80842b48f9decb532a1d74e7575716821ee631f30267e4991f4ba2ddf56e"
"d14f3df28603e9517eb8fb7518b662d653b25b26e83bd8e129acea042b774298"
"7661b762556018a44a29477b84757994d8386d6edee909409fabe0631952dad9"
default))
'(iswitchb-mode t)
'(org-agenda-files
'("~/Dokumenti/todo.org" "/home/g1smo/Dokumenti/plac.org" "/home/g1smo/rs/org/2021-05-25-spletna-stran.org" "/home/g1smo/rs/org/2021-07-02-spletna.org" "/home/g1smo/rs/org/README.org" "/home/g1smo/rs/org/git-delavnica.org" "/home/g1smo/rs/org/irs-plan-period.org" "/home/g1smo/rs/org/irs-plan.org" "/home/g1smo/rs/org/irs.org" "/home/g1smo/rs/org/irs_old.org" "/home/g1smo/rs/org/kaki.org" "/home/g1smo/rs/org/prepoznava-komadov.org" "/home/g1smo/Dokumenti/agenda.org" "/home/g1smo/Dokumenti/blurb.org" "/home/g1smo/Dokumenti/delo.org" "/home/g1smo/Dokumenti/emanat.org" "/home/g1smo/Dokumenti/kompot.org" "/home/g1smo/Dokumenti/ljudmila.org" "/home/g1smo/Dokumenti/mu4e-setup.org" "/home/g1smo/Dokumenti/muska.org" "/home/g1smo/Dokumenti/org.org" "/home/g1smo/Dokumenti/projekti.org" "/home/g1smo/Dokumenti/recepti.org" "/home/g1smo/Dokumenti/samozaposlitev-prijava.org" "/home/g1smo/Dokumenti/shta.org" "/home/g1smo/Dokumenti/wtf.org" "/home/g1smo/Dokumenti/zapisi.org"))
'("/home/g1smo/org/todo.org"
"/home/g1smo/rs/org/2021-05-25-spletna-stran.org"
"/home/g1smo/rs/org/2021-07-02-spletna.org"
"/home/g1smo/rs/org/README.org"
"/home/g1smo/rs/org/git-delavnica.org"
"/home/g1smo/rs/org/irs-plan-period.org"
"/home/g1smo/rs/org/irs-plan.org" "/home/g1smo/rs/org/irs.org"
"/home/g1smo/rs/org/irs_old.org" "/home/g1smo/rs/org/kaki.org"
"/home/g1smo/rs/org/prepoznava-komadov.org"))
'(package-selected-packages
'(toml-mode smartparens crdt.el openwith evil-org-agenda company-org-block org-block-capf writeroom-mode racket-mode htmlize company-lsp web-mode tidal org-caldav format-all company-phpactor phpactor extempore-mode ob-mermaid use-package lsp-mode yaml-mode drupal-mode magit markdown-mode flycheck arduino-mode rjsx-mode gdscript-mode rainbow-delimiters which-key paredit geiser-guile geiser web-beautify vue-mode treemacs-evil treemacs-projectile treemacs smart-tabs-mode smart-tabs js2-mode smex clojure-mode helpful doom-themes counsel swiper all-the-icons doom-modeline evil-collection fennel-mode rg ivy company projectile evil))
'(quelpa-use-package 2bit counsel-projectile mu4e-dashboard
sclang-extensions mu4e-marker-icons mu4e
pyvenv chuck-mode subed elisp-refs autothemer
posframe avy dashboard sclang php-mode
zone-nyan org-evil guix ess 2048-game
toml-mode smartparens crdt.el openwith
evil-org-agenda company-org-block
org-block-capf writeroom-mode htmlize
company-lsp tidal org-caldav format-all
company-phpactor phpactor extempore-mode
ob-mermaid use-package lsp-mode drupal-mode
magit markdown-mode flycheck arduino-mode
rjsx-mode gdscript-mode rainbow-delimiters
paredit geiser-guile geiser web-beautify
vue-mode treemacs-evil treemacs-projectile
smart-tabs-mode smart-tabs js2-mode smex
clojure-mode helpful doom-themes counsel
swiper all-the-icons doom-modeline
evil-collection fennel-mode rg ivy company
projectile evil))
'(tool-bar-mode nil)
'(warning-minimum-level :error)
'(which-key-mode t))
@ -587,4 +817,15 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Iosevka SS01" :foundry "BE5N" :slant normal :weight semi-bold :height 120 :width normal)))))
'(default ((t (:family "Iosevka SS01" :foundry "BE5N" :slant normal :weight semi-bold :height 120 :width normal))))
'(line-number ((t (:background "#32302f" :foreground "#7c6f64"))))
'(line-number-current-line ((t (:background "#32302f" :foreground "#fe8019")))))
;; Make gc pauses faster by decreasing the threshold.
(setq gc-cons-threshold (* 10 1000 1000))
;; Increase the amount of data which Emacs reads from the process
(setq read-process-output-max (* 1024 1024)) ;; 1mb
;; supercollider mode load
;(require 'sclang)

View File

@ -10,3 +10,10 @@ Host felis.kreten.si
Host a2z.si
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
Host 192.168.64.100
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Host 192.168.32.1
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa

22
.zshrc
View File

@ -124,11 +124,31 @@ alias deb-build="dpkg-buildpackage -b -rfakeroot -us -uc"
alias run-gamma="pkill -f gammastep; sleep 3; screen -dm -- gammastep -m wayland -l 46.05108:14.50513"
# Spanje / nespanje
alias insomnia="sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target"
alias pocivanje="sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target"
alias lowdelay="PIPEWIRE_LATENCY=128/48000 "
# zvok prek mreze!
alias pulse-listen="pactl load-module module-native-protocol-tcp port=4656 listen="
alias pulse-connect="pactl load-module module-tunnel-sink server=tcp:${PULSEIP}:4656"
alias pulse-virtual-sink="pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name=my-virtualmic channel_map=front-left,front-right"
alias sardon="source $HOME/mska/sardine/venv/bin/activate"
alias powersave="sudo cpupower frequency-set -g powersave"
alias powerfull="sudo cpupower frequency-set -g ondemand"
alias imgcrop1920="mogrify -resize 1920x1920 "
# Za LXD!
export PATH="${PATH}:$(go env GOPATH)/bin:/sbin:/usr/sbin"
export LD_LIBRARY_PATH="$(go env GOPATH)/deps/dqlite/.libs/:$(go env GOPATH)/deps/raft/.libs/:${LD_LIBRARY_PATH}"
#export LD_LIBRARY_PATH="$(go env GOPATH)/deps/dqlite/.libs/:$(go env GOPATH)/deps/raft/.libs/:${LD_LIBRARY_PATH}"
# ??? fix crashanja
#export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:/lib/i386-linux-gnu"
# JS fix (prevec nov za openssl)
#export NODE_OPTIONS="--openssl-legacy-provider"
# Terminal podpora
alias termfix="TERM=rxvt-256color "
#export TERM=rxvt-256color

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Arduino IDE 2
Comment=Open-source electronics prototyping platform
GenericName=Arduino IDE 2
Exec=env LD_LIBRARY_PATH=/lib/x86_64-linux-gnu /home/g1smo/apps/arduino-ide_2.2.0_Linux_64bit.AppImage %f
Icon=arduino
Type=Application
Terminal=false
Categories=Development;Engineering;Electronics;IDE;
MimeType=text/x-arduino
Keywords=embedded electronics;electronics;avr;microcontroller;
StartupWMClass=processing-app-Base

View File

@ -37,42 +37,42 @@
(type "vfat"))
%base-file-systems))
(swap-devices
(list (swap-space (target "/swapfile"))))
(users (cons* (user-account
(name "g1smo")
(name "yuri")
(comment "Yuri")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video" "dialout"))
"audio" "video"
"dialout" "users"))
(home-directory "/home/g1smo"))
(user-account
(name "bask")
(comment "Balkan Anarchist Bookfair")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video" "dialout"))
(home-directory "/home/bask"))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (cons* nss-certs ;for HTTPS access
zsh ;Z shell
openssh
git
emacs
vim
bspwm
libinput
xf86-input-libinput
freetype
(packages (append (list (specification->package "i3-wm")
(specification->package "i3status")
(specification->package "dmenu")
(specification->package "st")
(specification->package "nss-certs")
;; sistem
(specification->package "lvm2")
;; WM zadeve
(specification->package "sway")
(specification->package "swaybg")
(specification->package "rofi")
(specification->package "i3-autotiling")
(specification->package "waybar")
(specification->package "gammastep")
(specification->package "kitty")
(specification->package "eog")
(specification->package "nautilus")
;; Urejevalniki teksta
(specification->package "emacs")
(specification->package "vim")
;; Razno
(sepcification->package "zsh")
(specification->package "git")
(specification->package "file"))
%base-packages))
;; Add GNOME and/or Xfce---we can choose at the log-in
;; screen with F1. Use the "desktop" services, which
;; include the X11 log-in service, networking with Wicd,
;; and more.
(services (cons* (service xfce-desktop-service-type)
(service gnome-desktop-service-type)
@ -92,5 +92,45 @@
(eq? network-manager-service-type (service-kind service)))
%desktop-services)))
(swap-devices (list (swap-space
(target (uuid
"76019829-e8eb-477c-a08a-d2ccff3fcdd5")))))
;(mapped-devices (list (mapped-device
; (source (uuid
; "52c83c72-c391-4a71-8405-897603f61363"))
; (target "gpnx-root")
; (type luks-device-mapping))
; (mapped-device
; (source (uuid
; "3020ad8b-ee01-49e2-8a46-3f66c902ef67"))
; (target "dbn-home")
; (type luks-device-mapping))
; (mapped-device
; (source "dbn-vg")
; (targets (list "home"))
; (type lvm-device-mapping))
; ))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
(name-service-switch %mdns-host-lookup-nss)
(file-systems (cons* (file-system
(mount-point "/")
(device "/dev/mapper/gpnx-root")
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/boot")
(device (uuid "65689a28-4afb-4c40-9ff2-2a0df1168a86"))
(type "ext2"))
(file-system
(mount-point "/boot/efi")
(device (uuid "3F44-75AB"
'fat16))
(type "vfat"))
;(file-system
;(mount-point "/home/g1smo/dbn")
;(device "/dev/mapper/dbn-home")
;(type "ext4")
;(dependencies mapped-devices))
%base-file-systems)))

View File

@ -88,6 +88,8 @@ ln -s $DIR/.guile ~/.guile
# X11 popravki aplikacij
ln -s $DIR/applications/dbeaver.desktop ~/.local/share/applications/dbeaver.desktop
ln -s $DIR/applications/dbeaver.desktop ~/.local/share/applications/com.obsproject.Studio.desktop
ln -s $DIR/applications/arduino2.desktop ~/.local/share/applications/arduino2.desktop
# Emacs <3
mkdir ~/.emacs.d