diff --git a/README.org b/README.org index 510578e..5be6a62 100644 --- a/README.org +++ b/README.org @@ -6,13 +6,10 @@ Files can be =stow='ed and un'=stow='ed with =stow.sh=. It will link all dotfiles to their correct place. * fonts -Should be installed manually or via system package manager. Fallsback are provided in =fallback-fonts/= -+ JuliaMono (Medium, Italic) -+ Noto Sans CJK JP -+ Noto Color Emoji * notable deps +- =fzf= - =ripgrep= - =ripgrep-all= - =wlogout= diff --git a/fallback-fonts/Roboto-Regular.ttf b/fallback-fonts/Roboto-Regular.ttf deleted file mode 100644 index 3d6861b..0000000 Binary files a/fallback-fonts/Roboto-Regular.ttf and /dev/null differ diff --git a/fallback-fonts/SFMono Medium Italic Nerd Font Complete.otf b/fallback-fonts/SFMono Medium Italic Nerd Font Complete.otf new file mode 100644 index 0000000..5b089e2 Binary files /dev/null and b/fallback-fonts/SFMono Medium Italic Nerd Font Complete.otf differ diff --git a/fallback-fonts/SFMono Medium Nerd Font Complete.otf b/fallback-fonts/SFMono Medium Nerd Font Complete.otf new file mode 100644 index 0000000..e3676a8 Binary files /dev/null and b/fallback-fonts/SFMono Medium Nerd Font Complete.otf differ diff --git a/files/emacs/init.org b/files/emacs/init.org index c9efb3a..cef2fcb 100644 --- a/files/emacs/init.org +++ b/files/emacs/init.org @@ -226,11 +226,13 @@ Forgive me, but I'm =evil=. ** Appearance *** Fonts I mainly use these fonts: -+ JuliaMono Medium as main mono-spaced -+ Noto Emoji to show emojis in emacs -+ Noto JP for japanese characters ++ =JuliaMono Medium= and =SFMono Nerd Font Mono= as main mono-spaced ++ =Noto Emoji= to show emojis in emacs ++ =Noto JP= for japanese characters #+begin_src emacs-lisp -(set-face-attribute 'default nil :font "JuliaMono" :height 100 :weight 'medium) +(set-face-attribute 'default nil :font "SFMono Nerd Font" :height 110 :weight 'medium) +;; (set-face-attribute 'default nil :font "JuliaMono" :height 110 :weight 'medium) +(set-fontset-font t 'unicode "JuliaMono" nil 'append) (set-fontset-font t 'unicode "Noto Color Emoji" nil 'prepend) (set-fontset-font t 'unicode "Noto Sans Mono CJK JP" nil 'append) #+end_src @@ -329,7 +331,7 @@ Show me color codes as colors! (c-mode . (lambda() (rainbow-mode -1)))) #+end_src -*** Whitespaces +*** Whitespaces and indentation Show me those pesky trailing whitespaces... I hate them. Kill them. #+begin_src emacs-lisp (global-whitespace-mode t) @@ -337,6 +339,17 @@ Show me those pesky trailing whitespaces... I hate them. Kill them. (add-hook 'before-save-hook 'whitespace-cleanup) #+end_src +Show me indentation markers. +#+begin_src emacs-lisp :tangle no +(use-package highlight-indent-guides + :straight t + :config + (setq highlight-indent-guides-method 'character + highlight-indent-guides-responsive 'top) + :hook + (prog-mode . highlight-indent-guides-mode)) +#+end_src + *** 80 column indicator Show me a nice column indicator line. #+begin_src emacs-lisp :tangle no @@ -354,18 +367,6 @@ Show me a nice column indicator line. (markdown-mode . fci-mode)) #+end_src -*** Highlight indentation -Show me indentation markers. -#+begin_src emacs-lisp -(use-package highlight-indent-guides - :straight t - :config - (setq highlight-indent-guides-method 'character - highlight-indent-guides-responsive 'top) - :hook - (prog-mode . highlight-indent-guides-mode)) -#+end_src - *** File bar Sometimes I want to see all of my files. #+begin_src emacs-lisp @@ -724,10 +725,21 @@ Sometimes, a big red TODO is more intimidating than one with normal text color. ("UNUSED" . hl-todo-UNUSED)))) #+end_src -*** Code style -I want =bsd= style C. +*** iedit +Easily rename occurrences, even without =lsp-rename= #+begin_src emacs-lisp -(setq c-default-style "bsd") +(use-package iedit + :straight t + :general + (vim-leader-def 'normal 'global + "r" 'iedit-mode)) +#+end_src + +*** Code style +#+begin_src emacs-lisp +(setq ; c-default-style "bsd" + c-basic-offset 4) +(setq-default indent-tabs-mode nil) #+end_src @@ -743,7 +755,8 @@ First of all, we need a backend for our completion and analysis. (LaTeX-mode . company-mode) (org-mode . company-mode) :custom - (company-minimum-prefix-length 2) + (company-minimum-prefix-length 3) + (conpany-idle-delay 0.5) :bind (:map company-active-map ("C-j" . company-select-next-or-abort) ("C-k" . company-select-previous-or-abort) diff --git a/files/environment/.config/environment.d/envvars.conf b/files/environment/.config/environment.d/envvars.conf index a50af2c..f88f373 100644 --- a/files/environment/.config/environment.d/envvars.conf +++ b/files/environment/.config/environment.d/envvars.conf @@ -2,4 +2,4 @@ PATH=$PATH:$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bi EDITOR=vim VISUAL=vim _JAVA_AWT_WM_NONREPARENTING=1 -SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket \ No newline at end of file +SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket" diff --git a/files/sway/.config/sway/bar.sh b/files/sway/.config/sway/bar.sh index 249a494..982eb74 100755 --- a/files/sway/.config/sway/bar.sh +++ b/files/sway/.config/sway/bar.sh @@ -1,8 +1,13 @@ #!/bin/bash -date=$(date +'%A, %d.%m %R') +date=$(date +'%A, %d. %b %R') battery=$(cat /sys/class/power_supply/BAT1/capacity) +if [ $(cat /sys/class/power_supply/BAT1/status) = 'Discharging' ]; then + bat_rem=" ▼ "$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep "time to empty" | cut -f14- -d ' ') +else + bat_rem=" ⯅ "$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep "time to full" | cut -f15- -d ' ') +fi if [ $(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode) = '1' ]; then conservation='on' @@ -18,4 +23,4 @@ fi powermode=$(cat /sys/firmware/acpi/platform_profile) sep='-' -echo $battery"% "$conservation $sep $powermode $sep $wifi $sep $date +echo $battery"%"$bat_rem $sep $conservation $sep $powermode $sep $wifi $sep $date diff --git a/files/sway/.config/sway/config b/files/sway/.config/sway/config index 6d7c0d3..5fdfc20 100644 --- a/files/sway/.config/sway/config +++ b/files/sway/.config/sway/config @@ -61,13 +61,12 @@ input type:pointer { input type:keyboard { xkb_layout eu xkb_options caps:escape + repeat_delay 300 + repeat_rate 50 } # Key bindings # Basics: - # Floating - floating_modifier $mod normal - # Terminal bindsym $mod+Return exec gnome-terminal @@ -75,14 +74,14 @@ input type:keyboard { bindsym $mod+Shift+Backspace kill # Application launcher - bindsym $mod+d exec dmenu_path | bemenu -l 5 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "JuliaMono 13" | xargs swaymsg exec -- + set $bemenu bemenu -l 7 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "JuliaMono 13" -i + set $files find $HOME -name '*.pdf' -not -path "$HOME/\.*" 2> /dev/null | cut -f 4- -d "/" + bindsym $mod+d exec dmenu_path | $bemenu | xargs swaymsg exec -- + bindsym $mod+p exec $files | $bemenu -l 20 -p 'pdfs' | xargs -d '\n' -r xdg-open # Screenshot - # bindsym $mod+Shift+s exec wayshot -s "$(slurp -f '%x %y %w %h')" --stdout | wl-copy - bindsym $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f - - - # Reload the configuration file - bindsym $mod+Shift+r reload + bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy + bindsym $mod+Ctrl+Shift+s exec grim -g "$(slurp)" - | swappy -f - # Logout etc bindsym $mod+Ctrl+Backspace exec wlogout @@ -91,8 +90,8 @@ input type:keyboard { bindsym $mod+v exec swaync-client -t -sw # Brightness - bindsym XF86MonBrightnessUp exec light -A 10 - bindsym XF86MonBrightnessDown exec light -U 10 + bindsym XF86MonBrightnessUp exec light -A 5 + bindsym XF86MonBrightnessDown exec light -U 5 # Audio bindsym XF86AudioPlay exec playerctl play-pause @@ -109,22 +108,12 @@ input type:keyboard { bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right - # Or use $mod+[up|down|left|right] - bindsym $mod+Left focus left - bindsym $mod+Down focus down - bindsym $mod+Up focus up - bindsym $mod+Right focus right # Move the focused window with the same, but add Shift bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right - # Ditto, with arrow keys - bindsym $mod+Shift+Left move left - bindsym $mod+Shift+Down move down - bindsym $mod+Shift+Up move up - bindsym $mod+Shift+Right move right # Workspaces: # Declare workspaces @@ -138,6 +127,7 @@ input type:keyboard { set $ws8 '8' set $ws9 '9' set $ws10 '10' + # Switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -149,6 +139,7 @@ input type:keyboard { bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 + # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 @@ -160,8 +151,6 @@ input type:keyboard { bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 - # Note: workspaces can have any name you want, not just numbers. - # We just use 1-10 as the default. # Layout stuff: workspace_layout stacking @@ -169,6 +158,9 @@ input type:keyboard { # Make the current focus fullscreen bindsym $mod+f fullscreen + # Resize windows with $mod + mouse + floating_modifier $mod normal + # Toggle the current focus between tiling and floating mode bindsym $mod+Shift+space floating toggle @@ -176,7 +168,9 @@ input type:keyboard { bindsym $mod+space focus mode_toggle # Window rules + default_border none for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill + assign [app_id="org.keepassxc.KeePassXC"] $ws9 # Status Bar # man 5 sway-bar diff --git a/files/zsh/.zshrc b/files/zsh/.zshrc index fe13e63..bda7781 100644 --- a/files/zsh/.zshrc +++ b/files/zsh/.zshrc @@ -9,7 +9,7 @@ precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst -ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ" +ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ>" DIR="%{$fg[blue]%}%~" GIT="%{$fg[red]%}\$vcs_info_msg_0_" HOSTN="%{$fg[yellow]%}%m " @@ -73,7 +73,7 @@ powermode() { echo 'Invalid option' fi } -alias o='xdg-open' +alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` alias con='nmcli con' alias conup='nmcli con up id' alias condown='nmcli con down id'