Izboljsav'ce

t460s-fhd
Jurij Podgoršek 2022-06-16 16:26:11 +02:00
parent b4e1714ac7
commit fbb5b56b5f
6 changed files with 118 additions and 29 deletions

View File

@ -24,13 +24,15 @@ output eDP-1 {
pos 0 0
resolution 1920x1080
scale 1.25
scale_filter linear
scale_filter smart
}
#output eDP-1 resolution 2560x1440 scale 2
#output eDP-1 resolution 1920x1080 scale 1
output "*" background ~/Slike/Wallpapers/1596344206877.jpg fill
#output "*" background ~/Slike/Wallpapers/1596344206877.jpg fill
output "*" background "~/riz0m/Photos/sri lanka/IMG_20220220_120730.jpg" fill
# Zamik dobimo z SIRINA / SCALE
output HDMI-A-2 pos 1536 0 scale 1
output HDMI-A-1 pos 1536 0 scale 1
output DP-5 pos 1536 0 scale 1
# start a terminal
@ -261,6 +263,7 @@ input "type:keyboard" {
# Touchpad fensi
input "type:touchpad" {
tap enabled
click_method clickfinger
natural_scroll enabled
dwt enabled
scroll_factor 0.25
@ -307,6 +310,8 @@ bindsym 0xff61 exec ~/bin/screenshot
# Scaling toggle
bindsym $mod+i exec "swaymsg output eDP-1 scale 1"
bindsym $mod+o exec "swaymsg output eDP-1 scale 1.25"
bindsym $mod+y exec "swaymsg output HDMI-A-1 pos 0 0 && swaymsg output eDP-1 pos 1920 0"
bindsym $mod+u exec "swaymsg output HDMI-A-1 pos 1536 0 && swaymsg output eDP-1 pos 0 0"
bindsym $mod+space exec "/home/g1smo/bin/get-layout.sh"
@ -350,3 +355,6 @@ exec keepassxc
# prazna baterija tezenje
exec ~/bin/swaynag-battery
# Lebdeca okna (najdes preko "swaymsg -t get_tree")
for_window [app_id="org.keepassxc.KeePassXC"] floating enable

View File

@ -12,7 +12,11 @@
'("melpa" . "https://melpa.org/packages/"))
;; Kaj vse naj bo namesceno?
(setq paketi '(;; Evil mode
(setq paketi '(;; Use package - konfiguracijski macro
use-package
;; Lazji keybindi
general
;; Evil mode
evil
evil-collection
evil-org
@ -40,16 +44,23 @@
rg
;; Modeline - status bar spodaj (+ ikonice)
doom-modeline
;; Lepe ikone :)
all-the-icons
;; Pomoch
helpful
;; Prikazi nedavne ukaze visje
smex
;; Programiranje
;; Programiranje javascripta
js2-mode
rjsx-mode
;; Vue
vue-mode
vue-html-mode
;; Vue / js
lsp-mode
;; Clojure language support
clojure-mode
;; Guile language support
geiser
geiser-guile
paredit
@ -60,6 +71,7 @@
arduino-mode
markdown-mode
yaml-mode
extempore-mode
;; Checker za syntax?
flycheck
;; Lepšanje fajlov na webu
@ -76,6 +88,8 @@
magit
;; dr00pal moud
drupal-mode
;; Mermaid v orgmode
ob-mermaid
))
(setq nema (seq-filter (lambda (p) (not (package-installed-p p))) paketi))
@ -122,6 +136,16 @@
(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)
(defun open-config () (interactive) (find-file-literally "~/.emacs.d/init.el"))
(define-key evil-buffer-map "c" 'open-config)
;; EVAL ukazi
(define-prefix-command 'eval-buffer-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)
;; FILE ukazi
(define-prefix-command 'evil-file-map)
@ -130,19 +154,45 @@
(define-key evil-file-map "c" 'load-config)
;; Mapiranje ukazov
(evil-global-set-key 'motion (kbd "SPC") my-leader-map)
;(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)
(define-key my-leader-map "w" 'evil-window-map)
(define-key my-leader-map "b" 'evil-buffer-map)
(define-key my-leader-map "f" 'evil-file-map)
(define-key my-leader-map "[" 'previous-buffer)
(define-key my-leader-map "]" 'next-buffer)
(define-key my-leader-map "r" 'counsel-bookmark)
(define-key my-leader-map "e" 'evil-eval-map)
;; Projectile map!
(define-key my-leader-map "p" 'projectile-command-map)
(define-key my-leader-map "/" 'counsel-rg)
;; Odpri drevo fajlov
(define-key my-leader-map "t" 'treemacs)
(require 'general)
(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)
;; y/n namesto yes / no
(fset 'yes-or-no-p 'y-or-n-p)
;;;;;;;;;;;;;;;;;;;
;; Custom (tema) ;;
@ -156,7 +206,7 @@
'("db3e80842b48f9decb532a1d74e7575716821ee631f30267e4991f4ba2ddf56e" "d14f3df28603e9517eb8fb7518b662d653b25b26e83bd8e129acea042b774298" "7661b762556018a44a29477b84757994d8386d6edee909409fabe0631952dad9" default))
'(iswitchb-mode t)
'(package-selected-packages
'(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))
'(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))
'(tool-bar-mode nil)
'(which-key-mode t))
(custom-set-faces
@ -184,6 +234,7 @@
;; Undo tree
(global-undo-tree-mode)
(evil-set-undo-system 'undo-tree)
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
;; Theme
; Skrij scrollbar
@ -225,7 +276,15 @@
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; Vue nacin
(add-to-list 'auto-mode-alist '("\\.vue$" . vue-mode))
;; LSP potrebuje dependency iz npm: "sudo npm install -g vue-language-server
(use-package lsp-mode)
;; autocomplete
; (use-package company-lsp
; :after lsp-mode
; :config (push 'company-lsp company-backends))
(use-package vue-mode
:mode "\\.vue\\'"
:config (add-hook 'vue-mode-hook #'lsp))
;; Guile scheme
(setq scheme-program-name "guile")
@ -256,6 +315,14 @@
'org-babel-load-languages
'((ditaa . t)))
;; Mermaid v orgmode
;; sudo npm install -g @mermaid-js/mermaid-cli
(setq ob-mermaid-cli-path "/usr/local/bin/mmdc")
(org-babel-do-load-languages
'org-babel-load-languages
'((mermaid . t)
(scheme . t)))
;; js2 za javascript
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(setq js2-strict-missing-semi-warning nil)
@ -276,6 +343,8 @@
(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)
;; Swiper search, counsel bliznjice
(global-set-key "\C-s" 'swiper)
@ -336,8 +405,13 @@
(setq
backup-by-copying t ; don't clobber symlinks
backup-directory-alist
`((".*" . "~/.saves/")) ; don't litter my fs tree
`(("." . ,(concat user-emacs-directory "backups")))
backup-directory-alist
`(("." . ,(concat user-emacs-directory "saves")))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
;; Ne delaj lock fajlov (smetijo namrec)
(setq create-lockfiles nil)

View File

@ -3,3 +3,6 @@ Host *
Host pi
Port 2312
Host felis.kreten.si
Port 2312

1
.vimrc
View File

@ -20,6 +20,7 @@ Plug 'mhinz/vim-startify'
Plug 'dyng/ctrlsf.vim'
Plug 'evidens/vim-twig'
Plug 'jceb/vim-orgmode'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-rails'
Plug 'marlun/vim-starwars'
Plug 'morhetz/gruvbox'

29
.zshrc
View File

@ -20,18 +20,16 @@ export GREP_COLOR='1;32'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
function _colorman() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
LESS_TERMCAP_md=$(printf "\e[1;34m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[7;40m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;33m") \
"$@"
function man() {
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
LESS_TERMCAP_md=$(printf "\e[1;34m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[7;40m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;33m") \
command man "$@"
}
function man() { _colorman man "$@"; }
function perldoc() { command perldoc -n less "$@" |man -l -; }
# Prompt za git
@ -113,8 +111,13 @@ alias tisina='pactl unload-module module-loopback'
# PI ssh
alias spi='ssh pi@192.168.64.88'
# Na prostem sajt(i)
alias nps='cd ~/ljudmila/naprostem/sajt'
alias np='f(){ ssh root@$1.na-prostem.si };f'
# Kill element
alias kill-element='kill $(ps aux | grep element | awk '\''{print $2;}'\'')'
alias kill-zoom='pkill zoom'
alias nmc='nmcli con up '
@ -128,6 +131,8 @@ alias wine32="WINEPREFIX=~/.wine32 WINEARCH=win32 wine "
#alias deb-build="dpkg-buildpackage -us -uc"
alias deb-build="dpkg-buildpackage -b -rfakeroot -us -uc"
alias run-gamma="pkill -f gammastep-indicator && screen -dm -- gammastep-indicator -m wayland -l 46.05108:14.50513"
# Guile
export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/3.0/ccache:/usr/local/lib/guile/3.0/site-ccache"
@ -138,5 +143,3 @@ export XDG_CURRENT_DESKTOP=sway
#GUIX_PROFILE="/home/g1smo/.config/guix/current"
#. "$GUIX_PROFILE/etc/profile"
# Less kot pager
export PAGER=less

View File

@ -9,13 +9,13 @@ for window in ipc.get_tree():
if window.focused:
prev_focused = window
else:
window.command('opacity 0.8')
window.command('opacity 0.9')
def on_window_focus(ipc, focused):
global prev_focused
if focused.container.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859
focused.container.command('opacity 1')
prev_focused.command('opacity 0.8')
prev_focused.command('opacity 0.9')
prev_focused = focused.container
ipc.on("window::focus", on_window_focus)