diff --git a/desktop/configs/alacritty/.config/alacritty/alacritty.toml b/desktop/configs/alacritty/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..aff7763 --- /dev/null +++ b/desktop/configs/alacritty/.config/alacritty/alacritty.toml @@ -0,0 +1,73 @@ +# There are the specification here: https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd +# It is not obvious how it translates to TOML. But it is extremely straightforward. + +# example: WINDOW, COLORS, etc. are tables, and should be represented as [window], [colors], respectively. +# specifics of variables go under them. e.g.- look under "dynamic_padding" under- +# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd#window +# write `dynamic_padding = true` (without backticks -`) under the table [window] +# for variables with multiple values, use "dotted keys". Like setting `padding.x = 5` under [window]. +# This is simple. If not clear, do several trials and errors. + +# Below is my initial set-up. The TOML homepage (https://toml.io/en/v1.0.0) was very helpful in figuring this out. +# I put the file alacritty.toml in $HOME/.config/alacritty. However it can be kept anywhere among the places mentioned in +# https://github.com/alacritty/alacritty/tree/master#configuration + +[window] + +# opacity = 0.9 + +padding.x = 10 +# padding.y = 10 + +decorations = "Full" +decorations_theme_variant = "Light" # "Dark" + +[font] +size = 11.5 +normal.family = "CartographCF Nerd Font" +normal.style = "Regular" +bold.family = "CartographCF Nerd Font" +bold.style = "DemiBold" +italic.family = "CartographCF Nerd Font" +italic.style = "Italic" +bold_italic.family = "CartographCF Nerd Font" +bold_italic.style = "ExtraBold Italic" + + +[colors.primary] +background = "#002b36" +foreground = "#839496" + +[colors.normal] +black = '#073642' # Black (Host) +red = '#dc322f' # red (syntax string) +green = '#859900' # green (command) +yellow = '#b58900' # yellow (command second) +blue = '#268bd2' # blue (path) +magenta = '#d33682' # magenta (syntax var) +cyan = '#2aa198' # cyan (prompt) +white= '#eee8d5' # white + +[colors.bright] +black= '#002b36' # Bright Black +red = '#cb4b16' # bright red (command error) +green = '#586e75' # bright green (exec) +yellow= '#657b83' # bright yellow +blue = '#839496' # bright blue (folder) +magenta= '#6c71c4' # bright magenta +cyan= '#93a1a1' # bright cyan +white= '#fdf6e3' # bright white + +[colors.cursor] +text = "#002b36" +cursor = "#839496" + +[[hints.enabled]] +binding = { key = "O", mods = "Control|Shift" } +command = "xdg-open" +hyperlinks = true +mouse.enabled = true +mouse.mods = "Control" +post_processing = true +persist = false +regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩‘]+" diff --git a/desktop/configs/fish/.config/fish/config.fish b/desktop/configs/fish/.config/fish/config.fish index 24f9586..ea753d8 100644 --- a/desktop/configs/fish/.config/fish/config.fish +++ b/desktop/configs/fish/.config/fish/config.fish @@ -3,6 +3,7 @@ if status --is-login set -gx BAT_THEME "Solarized (light)" set -gx EDITOR "nvim" + set -gx DOCKER_HOST unix://$XDG_RUNTIME_DIR/podman/podman.sock if test -z "$WAYLAND_DISPLAY" && test "$XDG_VTNR" -eq 1 set -gx XDG_CURRENT_DESKTOP "sway" @@ -12,14 +13,15 @@ end if status is-interactive alias ls="bash ~/scripts/elash.sh" alias v="nvim" - alias reboot="systemctl reboot" + alias reboot="loginctl reboot" alias hr="date +'%Hh:%M, %d-%m-%Y'" + alias hi="loginctl hibernate" alias ff="fastfetch" alias feh="imv" alias lg="lazygit" alias cpr="cd ~/repos/cports-docker && docker compose run --build --rm cports" alias cop="wl-copy" - alias poweroff="systemctl poweroff" + alias poweroff="loginctl poweroff" alias cat="bat" end diff --git a/desktop/configs/fish/.config/fish/functions/fish_command_not_found.fish b/desktop/configs/fish/.config/fish/functions/fish_command_not_found.fish new file mode 100644 index 0000000..275b786 --- /dev/null +++ b/desktop/configs/fish/.config/fish/functions/fish_command_not_found.fish @@ -0,0 +1,8 @@ +function fish_command_not_found + set -l pkgs (apk search --quiet cmd:$argv[1]) + set pkgs (string join '|' $pkgs) + echo "$argv[1]: not found" + if test -n "$pkgs" + echo " install with: apk add $pkgs" + end +end diff --git a/desktop/configs/sway/.config/sway/settings/binds b/desktop/configs/sway/.config/sway/settings/binds index 78e3c8a..8119e84 100644 --- a/desktop/configs/sway/.config/sway/settings/binds +++ b/desktop/configs/sway/.config/sway/settings/binds @@ -3,7 +3,7 @@ set $left h set $down j set $up k set $right l -set $term wezterm +set $term alacritty set $menu fuzzel mode "resize" { @@ -79,13 +79,13 @@ bindsym $mod+Control+Return move scratchpad # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+Control+s scratchpad show -bindsym $mod+Shift+s exec steam --noverifyfiles +bindsym $mod+Shift+s exec flatpak run com.valvesoftware.Steam --noverifyfiles bindsym $mod+e exec pcmanfm -bindsym Print exec ~/.local/bin/way-print.sh p -bindsym $mod+Print exec ~/.local/bin/print-tmp.sh +bindsym Print exec ~/.local/bin/way-print p bindsym Shift+Print exec ~/.local/bin/way-print.sh s -bindsym Control+Shift+Print exec ~/.local/bin/way-print.sh t -bindsym Control+Print exec ~/.local/bin/print-window.sh +bindsym $mod+Print exec ~/.local/bin/way-print.sh t +bindsym Control+Shift+Print exec ~/.local/bin/way-print.sh m +bindsym Control+Print exec ~/.local/bin/way-print.sh cw bindsym $mod+Alt+x exec XL_SECRET_PROVIDER=FILE flatpak run --parent-expose-pids --parent-share-pids --parent-pid=1 --branch=stable --arch=x86_64 --command=xivlauncher dev.goats.xivlauncher # audio diff --git a/desktop/configs/sway/.config/sway/settings/init b/desktop/configs/sway/.config/sway/settings/init index 2a80a3f..e44059a 100644 --- a/desktop/configs/sway/.config/sway/settings/init +++ b/desktop/configs/sway/.config/sway/settings/init @@ -9,15 +9,13 @@ exec_always { exec { xrandr --output HDMI-A-1 --primary waybar & - lxqt-policykit & - autotiling + autotiling & gammastep -t 4500:3500 -l -23.5475:-46.63611 -b 1.0:0.6 & - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway DISPLAY rm -rf ~/tmp/* ~/scripts/swww.sh - otd-daemon + # otd-daemon ~/scripts/weechat.sh - cp ~/main.kbdx ~/docs/next_cloud/ dunst & nextcloud --background } diff --git a/desktop/configs/sway/.config/sway/settings/rules b/desktop/configs/sway/.config/sway/settings/rules index d74b6ac..a842b69 100644 --- a/desktop/configs/sway/.config/sway/settings/rules +++ b/desktop/configs/sway/.config/sway/settings/rules @@ -3,6 +3,8 @@ for_window [class="vrising.exe"] move to workspace 9 for_window [shell=".*"] inhibit_idle fullscreen for_window [app_id=".*office.*"] move to workspace 5 for_window [app_id="WebCord"] move to workspace 6 +for_window [class="WebCord"] move to workspace 6 +for_window [class="Spotify"] move to workspace 4 for_window [class="Steam"] move to workspace 8 for_window [class="steam"] move to workspace 8 for_window [class=".*jetbrains.*"] move to workspace 5 diff --git a/desktop/configs/tmux/.config/tmux/tmux.conf b/desktop/configs/tmux/.config/tmux/tmux.conf index e1bb1b6..268722d 100644 --- a/desktop/configs/tmux/.config/tmux/tmux.conf +++ b/desktop/configs/tmux/.config/tmux/tmux.conf @@ -2,18 +2,16 @@ set -g prefix C-a unbind C-b bind-key C-a send-prefix -set -g default-terminal "tmux-256color" -set-option -sa terminal-overrides ",xterm-kitty:RGB" -set-option -ga terminal-overrides ",xterm-256color:Tc" +# set-option -ga terminal-overrides ",xterm-256color:Tc" unbind C-o -bind C-o display-popup -E "~/.cargo/bin/tms" +bind C-o display-popup -E "tms" unbind C-j -bind C-j display-popup -E "~/.cargo/bin/tms switch" +bind C-j display-popup -E "tms switch" unbind C-k -bind C-k display-popup -E "~/.cargo/bin/tms kill" +bind C-k display-popup -E "tms kill" unbind % bind | split-window -h @@ -79,4 +77,6 @@ set -g visual-bell off set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 set -g status-position top -run '~/.config/tmux/plugins/tpm/tpm' + +set -g default-terminal "tmux-256color" +set -sg terminal-overrides ",*:RGB" diff --git a/desktop/scripts/print-fullscreen.sh b/desktop/scripts/print-fullscreen.sh index d6ae6c9..bba867f 100755 --- a/desktop/scripts/print-fullscreen.sh +++ b/desktop/scripts/print-fullscreen.sh @@ -5,9 +5,8 @@ if [[ $XDG_SESSION_TYPE == "x11" ]]; then xclip -selection clipboard -t image/png $name fi - if [[ $XDG_SESSION_TYPE == "wayland" ]]; then grim $name - wl-copy < $name + $name fi diff --git a/desktop/scripts/print-tmp.sh b/desktop/scripts/print-tmp.sh index 7f33ced..2da7d44 100755 --- a/desktop/scripts/print-tmp.sh +++ b/desktop/scripts/print-tmp.sh @@ -7,5 +7,5 @@ fi if [[ $XDG_SESSION_TYPE == "wayland" ]]; then grim -g "$(slurp)" $tmp - curl -F'file=@'"${tmp}" -H 'X-Auth: '$(cat ~/.key) https://paste.jabuxas.xyz/upload | wl-copy + curl -F'file=@'"${tmp}" -H 'X-Auth: '$(cat ~/.key) https://paste.jabuxas.xyz | wl-copy fi diff --git a/desktop/scripts/way-print.sh b/desktop/scripts/way-print.sh index 415683d..9b260fd 100755 --- a/desktop/scripts/way-print.sh +++ b/desktop/scripts/way-print.sh @@ -11,32 +11,33 @@ echo -e "[Default]\nsave_dir=$save_dir\nsave_filename_format=$save_file" > $swpy upload () { - curl -F'file=@'"${save_dir}/${save_file}" -Fsecret= -Fexpires=24 https://0x0.st | wl-copy + curl -F'file=@'"${save_dir}/${save_file}" -H 'X-Auth: '$(cat ~/.key) https://paste.jabuxas.xyz | wl-copy } function print_error { cat << "EOF" - ./screenshot.sh + ./way-print.sh ...valid actions are... p : print all screens s : snip current screen - sf : snip current screen (frozen) m : print focused monitor + t : tmp print + cw: current window EOF } case $1 in p) # print all outputs - grimblast copysave screen $temp_screenshot && swappy -f $temp_screenshot ;; + grim $temp_screenshot && swappy -f $temp_screenshot ;; s) # drag to manually snip an area / click on a window to print it - grimblast copysave area $temp_screenshot && swappy -f $temp_screenshot ;; -sf) # frozen screen, drag to manually snip an area / click on a window to print it - grimblast --freeze copysave area $temp_screenshot && swappy -f $temp_screenshot ;; + grim -g "$(slurp)" $temp_screenshot && swappy -f $temp_screenshot ;; m) # print focused monitor - grimblast copysave output $temp_screenshot && swappy -f $temp_screenshot ;; -t) #upload to 0x0.st temporarily - grimblast copysave area $temp_screenshot && swappy -f $temp_screenshot && upload ;; + grim -o $(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true).output') $temp_screenshot && swappy -f $temp_screenshot ;; +t) #upload to paste temporarily + grim -g "$(slurp)" $temp_screenshot && swappy -f $temp_screenshot && upload ;; +cw) #current window + ~/.local/bin/print-window.sh ;; *) # invalid option print_error ;; esac