diff --git a/README.org b/README.org index 5be6a62..51f8710 100644 --- a/README.org +++ b/README.org @@ -7,11 +7,14 @@ It will link all dotfiles to their correct place. * fonts Fallsback are provided in =fallback-fonts/= +SFMono also provides icons. * notable deps - =fzf= - =ripgrep= - =ripgrep-all= +- =fd= +- =fu= (find icons) - =wlogout= - =bemenu= - =slurp=, =grim=, =swappy= diff --git a/files/emacs/init.org b/files/emacs/init.org index 00a5b4a..c58b243 100644 --- a/files/emacs/init.org +++ b/files/emacs/init.org @@ -226,7 +226,7 @@ Forgive me, but I'm =evil=. ** Appearance *** Fonts I mainly use these fonts: -+ =SFMono Nerd Font Mono= as main mono-spaced ++ =SFMono Nerd Font Mono= as main mono-spaced (+ Icons) + =JuliaMono= for all other characters + =Noto Emoji= to show emojis in emacs + =Noto JP= for japanese characters @@ -566,7 +566,7 @@ I need my =hjkl= :( #+begin_src emacs-lisp :tangle no (use-package org-attach-screenshot :straight t - :config (setq org-attach-screenshot-command-line "gnome-screenshot -a -f %f" + :config (setq ;org-attach-screenshot-command-line "gnome-screenshot -a -f %f" org-attach-screenshot-auto-refresh "never" org-attach-screenshot-insertfunction (lambda (linkfilename) @@ -580,6 +580,15 @@ I need my =hjkl= :( "\n[[file:" linkfilename "]]\n\n"))))) #+end_src +*** org-alert +#+begin_src emacs-lisp +(use-package org-alert + :straight t + :config + (setq alert-default-style 'libnotify) + (org-alert-enable)) +#+end_src + *** LaTeX Export Enable LaTeX export with =pdflatex= and use =minted= for code highlighting. Also fix math =utf8= chars. diff --git a/files/environment/.config/environment.d/envvars.conf b/files/environment/.config/environment.d/envvars.conf index f88f373..bd7cd38 100644 --- a/files/environment/.config/environment.d/envvars.conf +++ b/files/environment/.config/environment.d/envvars.conf @@ -3,3 +3,4 @@ EDITOR=vim VISUAL=vim _JAVA_AWT_WM_NONREPARENTING=1 SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket" +DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock diff --git a/files/sway/.config/sway/bar.sh b/files/sway/.config/sway/bar.sh index 982eb74..a6e59f4 100755 --- a/files/sway/.config/sway/bar.sh +++ b/files/sway/.config/sway/bar.sh @@ -4,15 +4,15 @@ 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 ' ') + bat_rem="▼" else - bat_rem=" ⯅ "$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep "time to full" | cut -f15- -d ' ') + bat_rem="⯅" fi if [ $(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode) = '1' ]; then - conservation='on' + conservation='capped' else - conservation='off' + conservation='uncapped' fi wifi=$(iwgetid -r) @@ -22,5 +22,16 @@ fi powermode=$(cat /sys/firmware/acpi/platform_profile) -sep='-' -echo $battery"%"$bat_rem $sep $conservation $sep $powermode $sep $wifi $sep $date +cpu_util=$(ps -A -o pcpu | tail -n+2 | paste -sd+ | bc) + +if [ $(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') = 'no' ]; then + audio=" $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}')" +else + audio="婢 muted" +fi + +light=$(light -G | awk '{print int($1+0.5)'})"%" + +sep=" " +echo "${sep}  ${light} ${sep} ${audio} ${sep}  ${wifi} ${sep}  ${powermode}: ${cpu_util} ${sep}  ${conservation} ${sep}  ${battery}% ${bat_rem} ${sep}  ${date}" + diff --git a/files/sway/.config/sway/config b/files/sway/.config/sway/config index 873f832..63d3458 100644 --- a/files/sway/.config/sway/config +++ b/files/sway/.config/sway/config @@ -75,7 +75,7 @@ input type:keyboard { # Application launcher set $bemenu bemenu -l 7 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "SFMono Nerd Font 13" -i - set $files find $HOME -name '*.pdf' -not -path "$HOME/\.*" 2> /dev/null | cut -f 4- -d "/" + set $files fd -I "pdf$" $HOME | 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 @@ -129,28 +129,28 @@ input type:keyboard { set $ws10 '10' # Switch to workspace - bindsym $mod+1 workspace $ws1 - bindsym $mod+2 workspace $ws2 - bindsym $mod+3 workspace $ws3 - bindsym $mod+4 workspace $ws4 - bindsym $mod+5 workspace $ws5 - bindsym $mod+6 workspace $ws6 - bindsym $mod+7 workspace $ws7 - bindsym $mod+8 workspace $ws8 - bindsym $mod+9 workspace $ws9 - bindsym $mod+0 workspace $ws10 + bindsym $mod+1 workspace number $ws1 + bindsym $mod+2 workspace number $ws2 + bindsym $mod+3 workspace number $ws3 + bindsym $mod+4 workspace number $ws4 + bindsym $mod+5 workspace number $ws5 + bindsym $mod+6 workspace number $ws6 + bindsym $mod+7 workspace number $ws7 + bindsym $mod+8 workspace number $ws8 + bindsym $mod+9 workspace number $ws9 + bindsym $mod+0 workspace number $ws10 # Move focused container to workspace - bindsym $mod+Shift+1 move container to workspace $ws1 - bindsym $mod+Shift+2 move container to workspace $ws2 - bindsym $mod+Shift+3 move container to workspace $ws3 - bindsym $mod+Shift+4 move container to workspace $ws4 - bindsym $mod+Shift+5 move container to workspace $ws5 - bindsym $mod+Shift+6 move container to workspace $ws6 - bindsym $mod+Shift+7 move container to workspace $ws7 - 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 + bindsym $mod+Shift+1 move container to workspace number $ws1 + bindsym $mod+Shift+2 move container to workspace number $ws2 + bindsym $mod+Shift+3 move container to workspace number $ws3 + bindsym $mod+Shift+4 move container to workspace number $ws4 + bindsym $mod+Shift+5 move container to workspace number $ws5 + bindsym $mod+Shift+6 move container to workspace number $ws6 + bindsym $mod+Shift+7 move container to workspace number $ws7 + bindsym $mod+Shift+8 move container to workspace number $ws8 + bindsym $mod+Shift+9 move container to workspace number $ws9 + bindsym $mod+Shift+0 move container to workspace number $ws10 # Layout stuff: workspace_layout stacking @@ -168,6 +168,7 @@ input type:keyboard { bindsym $mod+space focus mode_toggle # Window rules + title_align center default_border none for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill assign [app_id="org.keepassxc.KeePassXC"] $ws9 @@ -177,7 +178,7 @@ input type:keyboard { bar { position top tray_output none - status_command while ~/.config/sway/bar.sh; do sleep 5; done + status_command while ~/.config/sway/bar.sh; do sleep 1; done colors { separator $blue diff --git a/files/tmux/.tmux.conf b/files/tmux/.tmux.conf index 3e11faf..1d3dfc4 100644 --- a/files/tmux/.tmux.conf +++ b/files/tmux/.tmux.conf @@ -34,6 +34,11 @@ bind-key -n M-7 select-window -t 7 bind-key -n M-8 select-window -t 8 bind-key -n M-9 select-window -t 9 +# swap panes +bind-key -n 'M-{' swap-pane -D +bind-key -n 'M-}' swap-pane -U + + # make escape bindings of programs work in tmux set -s escape-time 5 diff --git a/files/zsh/.zshrc b/files/zsh/.zshrc index bda7781..8d126c7 100644 --- a/files/zsh/.zshrc +++ b/files/zsh/.zshrc @@ -73,6 +73,13 @@ powermode() { echo 'Invalid option' fi } + +replace() { + from=$1 + to=$2 + find -type f -exec sed -i -e "s/${from}/${to}/g" {} \; +} + alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` alias con='nmcli con' alias conup='nmcli con up id'