From 440b008d52732f1c59d6fc56ca432896842c95f2 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 19 Apr 2026 19:37:33 -0400 Subject: [PATCH] Use eza, wofi icons, better screenshots --- bashrc | 1 + config/fish/config.fish | 5 +++++ config/miracle-wm/matts-config/src/lib.rs | 4 ++-- config/waybar/config | 10 +++++++++- config/waybar/scripts/media.sh | 19 +++++++++++++++++++ config/waybar/style.css | 6 ++++++ config/wofi/config | 2 ++ install.sh | 2 +- local/bin/screenshot.sh | 6 ++++++ 9 files changed, 51 insertions(+), 4 deletions(-) create mode 100755 config/waybar/scripts/media.sh create mode 100644 config/wofi/config create mode 100755 local/bin/screenshot.sh diff --git a/bashrc b/bashrc index a45b42c..13d884b 100644 --- a/bashrc +++ b/bashrc @@ -40,6 +40,7 @@ alias cp="cp -i" # confirm before overwriting something alias df='df -h' # human-readable sizes alias clangd="clangd-19" # I always use clangd-19 alias gti="git" # I misspell git a lot! +alias ls="eza --icons --group-directories-first" xhost +local:root > /dev/null 2>&1 diff --git a/config/fish/config.fish b/config/fish/config.fish index 26e4d9e..e49300a 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -2,10 +2,15 @@ set -g theme_powerline_fonts no set -g theme_nerd_fonts yes set -g theme_color_scheme dracula +if status is-interactive + fastfetch +end + if test -f ~/.config/fish/user.fish source ~/.config/fish/user.fish end alias fd="fdfind" alias cat="batcat" +alias ls="eza --icons --group-directories-first" fish_add_path "$HOME/.local/bin" diff --git a/config/miracle-wm/matts-config/src/lib.rs b/config/miracle-wm/matts-config/src/lib.rs index dbf893c..ab98fcb 100644 --- a/config/miracle-wm/matts-config/src/lib.rs +++ b/config/miracle-wm/matts-config/src/lib.rs @@ -25,13 +25,13 @@ impl Plugin for MyPlugin { action: miracle_plugin::BindingAction::Down, key: Key("d".to_string()), modifiers: vec![Modifier::Primary], - command: "wofi --show=drun".to_string(), + command: "wofi --show=drun --allow-images".to_string(), }); custom_actions.push(CustomKeyAction { action: miracle_plugin::BindingAction::Down, key: Key("S".to_string()), modifiers: vec![Modifier::Primary], - command: "grimshot copy area".to_string(), + command: "~/.local/bin/screenshot.sh".to_string(), }); custom_actions.push(CustomKeyAction { action: miracle_plugin::BindingAction::Down, diff --git a/config/waybar/config b/config/waybar/config index 99aabeb..f0a7023 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -7,7 +7,8 @@ "modules-left": [ "sway/mode", "sway/workspaces", - "sway/window" + "sway/window", + "custom/media" ], "modules-right": [ @@ -25,6 +26,13 @@ // Modules + "custom/media": { + "format": "{}", + "exec": "~/.config/waybar/scripts/media.sh", + "interval": 3, + "on-click": "playerctl play-pause", + }, + "custom/weather": { "format": "{} ", "exec": "~/.config/waybar/scripts/weather.sh", diff --git a/config/waybar/scripts/media.sh b/config/waybar/scripts/media.sh new file mode 100755 index 0000000..e7c319f --- /dev/null +++ b/config/waybar/scripts/media.sh @@ -0,0 +1,19 @@ +#!/bin/bash +status=$(playerctl status 2>/dev/null) +if [[ "$status" == "Playing" || "$status" == "Paused" ]]; then + artist=$(playerctl metadata artist 2>/dev/null) + title=$(playerctl metadata title 2>/dev/null) + if [[ -n "$artist" && -n "$title" ]]; then + text="$artist - $title" + else + text="$title" + fi + if (( ${#text} > 40 )); then + text="${text:0:37}..." + fi + if [[ "$status" == "Paused" ]]; then + echo "⏸ $text" + else + echo "▶ $text" + fi +fi diff --git a/config/waybar/style.css b/config/waybar/style.css index 61d118f..efdc9cc 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -192,6 +192,12 @@ border-radius: 0pt 2pt 2pt 0pt; } +#custom-media { + color: @purple; + padding-left: 8pt; + padding-right: 8pt; +} + #clock.date { background: rgba(0, 0, 0, 0); color: @white; diff --git a/config/wofi/config b/config/wofi/config new file mode 100644 index 0000000..7585685 --- /dev/null +++ b/config/wofi/config @@ -0,0 +1,2 @@ +allow_images=true +image_size=24 diff --git a/install.sh b/install.sh index 535d9e3..188e049 100755 --- a/install.sh +++ b/install.sh @@ -67,7 +67,7 @@ info "Installing miracle-wm..." sudo apt install miracle-wm -y info "Installing applications dependencies from archive..." -sudo apt -y install atfs wofi swaylock bat fd-find kitty network-manager-gnome fish wlogout papirus-icon-theme pamixer brightnessctl sway-notification-center grimshot waybar wl-clipboard bibata-cursor-theme slurp pavucontrol nautilus +sudo apt -y install atfs wofi swaylock bat fd-find kitty network-manager-gnome fish wlogout papirus-icon-theme pamixer brightnessctl sway-notification-center grimshot waybar wl-clipboard bibata-cursor-theme slurp pavucontrol nautilus eza playerctl fastfetch command -v snap &>/dev/null && sudo snap install bibata-all-cursor . $PWD/scripts/fish.sh diff --git a/local/bin/screenshot.sh b/local/bin/screenshot.sh new file mode 100755 index 0000000..46c825f --- /dev/null +++ b/local/bin/screenshot.sh @@ -0,0 +1,6 @@ +#!/bin/bash +mkdir -p ~/Pictures/Screenshots +FILE=~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png +grimshot save area "$FILE" +wl-copy < "$FILE" +notify-send "Screenshot saved" "$FILE" --icon=camera