This commit is contained in:
Marco Thomas
2022-05-16 07:49:58 +02:00
parent 27d0dae22c
commit d76b99cfff
7 changed files with 67 additions and 30 deletions

View File

@@ -7,11 +7,14 @@ It will link all dotfiles to their correct place.
* fonts * fonts
Fallsback are provided in =fallback-fonts/= Fallsback are provided in =fallback-fonts/=
SFMono also provides icons.
* notable deps * notable deps
- =fzf= - =fzf=
- =ripgrep= - =ripgrep=
- =ripgrep-all= - =ripgrep-all=
- =fd=
- =fu= (find icons)
- =wlogout= - =wlogout=
- =bemenu= - =bemenu=
- =slurp=, =grim=, =swappy= - =slurp=, =grim=, =swappy=

View File

@@ -226,7 +226,7 @@ Forgive me, but I'm =evil=.
** Appearance ** Appearance
*** Fonts *** Fonts
I mainly use these 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 + =JuliaMono= for all other characters
+ =Noto Emoji= to show emojis in emacs + =Noto Emoji= to show emojis in emacs
+ =Noto JP= for japanese characters + =Noto JP= for japanese characters
@@ -566,7 +566,7 @@ I need my =hjkl= :(
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(use-package org-attach-screenshot (use-package org-attach-screenshot
:straight t :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-auto-refresh "never"
org-attach-screenshot-insertfunction org-attach-screenshot-insertfunction
(lambda (linkfilename) (lambda (linkfilename)
@@ -580,6 +580,15 @@ I need my =hjkl= :(
"\n[[file:" linkfilename "]]\n\n"))))) "\n[[file:" linkfilename "]]\n\n")))))
#+end_src #+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 *** LaTeX Export
Enable LaTeX export with =pdflatex= and use =minted= for code highlighting. Enable LaTeX export with =pdflatex= and use =minted= for code highlighting.
Also fix math =utf8= chars. Also fix math =utf8= chars.

View File

@@ -3,3 +3,4 @@ EDITOR=vim
VISUAL=vim VISUAL=vim
_JAVA_AWT_WM_NONREPARENTING=1 _JAVA_AWT_WM_NONREPARENTING=1
SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket" SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock

View File

@@ -4,15 +4,15 @@ date=$(date +'%A, %d. %b %R')
battery=$(cat /sys/class/power_supply/BAT1/capacity) battery=$(cat /sys/class/power_supply/BAT1/capacity)
if [ $(cat /sys/class/power_supply/BAT1/status) = 'Discharging' ]; then 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 else
bat_rem=" ⯅ "$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep "time to full" | cut -f15- -d ' ') bat_rem="⯅"
fi fi
if [ $(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode) = '1' ]; then if [ $(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode) = '1' ]; then
conservation='on' conservation='capped'
else else
conservation='off' conservation='uncapped'
fi fi
wifi=$(iwgetid -r) wifi=$(iwgetid -r)
@@ -22,5 +22,16 @@ fi
powermode=$(cat /sys/firmware/acpi/platform_profile) powermode=$(cat /sys/firmware/acpi/platform_profile)
sep='-' cpu_util=$(ps -A -o pcpu | tail -n+2 | paste -sd+ | bc)
echo $battery"%"$bat_rem $sep $conservation $sep $powermode $sep $wifi $sep $date
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}"

View File

@@ -75,7 +75,7 @@ input type:keyboard {
# Application launcher # 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 $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+d exec dmenu_path | $bemenu | xargs swaymsg exec --
bindsym $mod+p exec $files | $bemenu -l 20 -p 'pdfs' | xargs -d '\n' -r xdg-open 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' set $ws10 '10'
# Switch to workspace # Switch to workspace
bindsym $mod+1 workspace $ws1 bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace $ws2 bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace $ws3 bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace $ws4 bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace $ws5 bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace $ws6 bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace $ws7 bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace $ws8 bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace $ws9 bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace $ws10 bindsym $mod+0 workspace number $ws10
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace $ws2 bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace $ws3 bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace $ws4 bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace $ws5 bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace $ws6 bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace $ws7 bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace $ws10 bindsym $mod+Shift+0 move container to workspace number $ws10
# Layout stuff: # Layout stuff:
workspace_layout stacking workspace_layout stacking
@@ -168,6 +168,7 @@ input type:keyboard {
bindsym $mod+space focus mode_toggle bindsym $mod+space focus mode_toggle
# Window rules # Window rules
title_align center
default_border none default_border none
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill
assign [app_id="org.keepassxc.KeePassXC"] $ws9 assign [app_id="org.keepassxc.KeePassXC"] $ws9
@@ -177,7 +178,7 @@ input type:keyboard {
bar { bar {
position top position top
tray_output none 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 { colors {
separator $blue separator $blue

View File

@@ -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-8 select-window -t 8
bind-key -n M-9 select-window -t 9 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 # make escape bindings of programs work in tmux
set -s escape-time 5 set -s escape-time 5

View File

@@ -73,6 +73,13 @@ powermode() {
echo 'Invalid option' echo 'Invalid option'
fi 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 o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE`
alias con='nmcli con' alias con='nmcli con'
alias conup='nmcli con up id' alias conup='nmcli con up id'