diff --git a/aerc/aerc.conf b/aerc/aerc.conf index 7707c70..232393a 100644 --- a/aerc/aerc.conf +++ b/aerc/aerc.conf @@ -57,7 +57,7 @@ dirlist-right = {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{h # Example: "from -r date" # # Default: "" -sort=from -r date +sort="-r date from" # Moves to next message when the current message is deleted # diff --git a/aerc/binds.conf b/aerc/binds.conf index 6468332..2c20b25 100644 --- a/aerc/binds.conf +++ b/aerc/binds.conf @@ -52,7 +52,7 @@ N = :prev-result [view] q = :close | = :pipe -D = :move Trash +D = :delete S = :save A = :archive flat diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..650c7ec --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,53 @@ +set -x EDITOR 'nvim' +set -x VISUAL 'nvim' +set -x LPASS_CLIPBOARD_COMMAND wl-copy +set -x MOZ_ENABLE_WAYLAND 1 +set -x LS_OPTIONS "--color=auto" +set -x LESS '-F -g -i -M -R -S -w -X -z-4' +{%@@ if profile == 'touma' @@%} +set -lx DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 +{%@@ endif @@%} + +#alias artiq "conda activate artiq" +if type -q "multipass" + alias mp "multipass" +end +abbr gp "git pull --rebase" +abbr gu "git push" +abbr gc "git commit" +abbr gs "git status" +abbr gb "git branch" +abbr gd "git diff" +abbr ga "git add" +abbr glog "git log –graph –decorate –oneline –all" +if type -q "emanote" + abbr n "cd ~/repos/notes" + abbr ne "cd ~/repos/notes; nvim" +end + +if test -d "~/repos" + alias r "cd ~/repos" +end + +# PATH stuff + +# Run ssh-agent +if test -z "(pgrep ssh-agent)" + eval (ssh-agent -c) > /dev/null # no output + set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK + set -Ux SSH_AGENT_PID $SSH_AGENT_PID + set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK +end + +if type -q "direnv" + direnv hook fish | source + set -g direnv_fish_mode eval_on_arrow +end + +if type -q "kitty" + alias icat="kitty +kitten icat" + alias d="kitty +kitten diff" +end + +# Keybindings +fish_default_key_bindings diff --git a/fish/functions/fish_user_key_bindings.fish b/fish/functions/fish_user_key_bindings.fish new file mode 100644 index 0000000..066d532 --- /dev/null +++ b/fish/functions/fish_user_key_bindings.fish @@ -0,0 +1,4 @@ +function fish_user_key_bindings + fzf_key_bindings + bind \co 'lfcd; commandline -f repaint' +end diff --git a/fish/functions/lfcd.fish b/fish/functions/lfcd.fish new file mode 100644 index 0000000..ea2b0cb --- /dev/null +++ b/fish/functions/lfcd.fish @@ -0,0 +1,27 @@ +# Change working dir in fish to last dir in lf on exit (adapted from ranger). +# +# You may put this file to a directory in $fish_function_path variable: +# +# mkdir -p ~/.config/fish/functions +# ln -s "/path/to/lfcd.fish" ~/.config/fish/functions +# +# You may also like to assign a key to this command: +# +# bind \co 'lfcd; commandline -f repaint' +# +# You need to put this in a function called fish_user_key_bindings. + +function lfcd + set tmp (mktemp) + lf -last-dir-path=$tmp $argv + if test -f "$tmp" + set dir (cat $tmp) + rm -f $tmp + if test -d "$dir" + if test "$dir" != (pwd) + cd $dir + ls + end + end + end +end diff --git a/fish/functions/paths.fish b/fish/functions/paths.fish new file mode 100644 index 0000000..6cde53f --- /dev/null +++ b/fish/functions/paths.fish @@ -0,0 +1,6 @@ +function paths + set -l new_path $argv[1] + echo "Adding $new_path to PATH" + set -U fish_user_paths $new_path $fish_user_paths +end + diff --git a/fish/functions/t.fish b/fish/functions/t.fish new file mode 100644 index 0000000..6397ab5 --- /dev/null +++ b/fish/functions/t.fish @@ -0,0 +1,4 @@ +function t + cd (mktemp -d /tmp/$1.XXXX) +end + diff --git a/i3status/config b/i3status/config new file mode 100644 index 0000000..07556ab --- /dev/null +++ b/i3status/config @@ -0,0 +1,52 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = false + interval = 5 +} + +order += "disk /" +order += "wireless _first_" +order += "ethernet _first_" +order += "load" +order += "volume master" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +#ethernet _first_ { +# # if you use %speed, i3status requires root privileges +# format_up = "E: %ip (%speed)" +# format_down = "E: down" +#} + +battery all { + format = "%status %percentage %remaining" +} + +tztime local { + format = "%Y-%m-%d %H:%M:%S" +} + +load { + format = "CPU: %1min" +} + +disk "/" { + format = "%avail" +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + device = "pulse" +} diff --git a/noah-home.nix b/noah-home.nix index 19b150a..6b04388 100644 --- a/noah-home.nix +++ b/noah-home.nix @@ -55,7 +55,7 @@ programs.neovim = { enable = true; defaultEditor = true; - extraPackages = [ + extraPackages = with pkgs; [ fzf ripgrep luarocks @@ -174,6 +174,11 @@ recursive = true; }; + xdg.configFile.fish = { + source = ./fish; + recursive = true; + }; + xdg.configFile.aerc = { source = ./aerc; recursive = true; @@ -184,5 +189,10 @@ recursive = true; }; + xdg.configFile.i3status = { + source = ./i3status; + recursive = true; + }; + home.stateVersion = "23.11"; -}; +} diff --git a/sway/config b/sway/config index 1f3e01c..3ff5f81 100644 --- a/sway/config +++ b/sway/config @@ -90,7 +90,7 @@ bindsym $mod+Shift+q kill bindsym $mod+d exec $menu # Screenshots -bindsym $mod+p exec grim -g "$(slurp -d)" - | wl-copy +bindsym $mod+p exec slurp | grim -g - - | wl-copy # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -106,7 +106,7 @@ bindsym $mod+Shift+c reload bindsym $mod+Alt+l exec $lock # Shut down -bindsym $mod+Alt+p exec swaynag --message "Shut down laptop?" \ +bindsym $mod+Alt+p exec swaynag --message "Shut down system?" \ --button-dismiss-no-terminal "Shutdown" "systemctl poweroff" -e bottom \ --font 'Berkeley Mono' @@ -165,6 +165,10 @@ bindsym --release Print exec grim -g \"$(slurp)" - | wl-copy bindsym $mod+Shift+0 move container to workspace 10 # Note: workspaces can have any name you want, not just numbers. # We just use 1-10 as the default. + + bindsym $mod+Tab workspace next + bindsym $mod+Shift+Tab workspace prev + # # Layout stuff: # @@ -234,23 +238,23 @@ bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym XF86MonBrightnessDown exec brightnessctl set 5%- bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ -bindsym XF86AudioPlay playerctl play-pause -bindsym XF86AudioPause playerctl play-pause -bindsym XF86AudioNext playerctl next -bindsym XF86AudioPrev playerctl prev +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioPause exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl prev # # padding mode # -#mode "padding" { -# bindsym plus gap set outer current plus 10 -# bindsym minus gap set outer current minus 10 -# # return to default mode -# bindsym Return mode "default" -# bindsym Escape mode "default" -#} +# mode "padding" { +# bindsym plus gap set outer current plus 10 +# bindsym minus gap set outer current minus 10 +# # return to default mode +# bindsym Return mode "default" +# bindsym Escape mode "default" +# } # -#bindsym $mod+m mode "padding" +# bindsym $mod+m mode "padding" include powell diff --git a/sway/othinus b/sway/othinus index ed04576..45e9fdd 100644 --- a/sway/othinus +++ b/sway/othinus @@ -4,6 +4,9 @@ # HDMI is the main output output HDMI-A-1 pos 0 0 +output HDMI-A-1 adaptive_sync off output DP-5 pos -430 1440 +output DP-5 adaptive_sync on # Sometimes the DP identifier changes for some reason output DP-6 pos -430 1440 +output DP-6 adaptive_sync on