From a280dab811e6599359f0ae8f1b0f6a73e4988d03 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Sat, 17 Dec 2022 21:35:26 -0700 Subject: [PATCH] push things i missed --- common/.wezterm.lua | 66 +++++++++++++++++++++++++++++++-- linux/.config/awesome/rc.lua | 27 ++++++++------ linux/.local/bin/autostart.sh | 9 +++-- linux/.local/bin/cmus-status.sh | 3 ++ linux/.local/bin/prettier-nano | 3 ++ linux/.local/bin/screenie-min | 37 ++++++++++++++++++ 6 files changed, 128 insertions(+), 17 deletions(-) create mode 100755 linux/.local/bin/cmus-status.sh create mode 100755 linux/.local/bin/prettier-nano create mode 100755 linux/.local/bin/screenie-min diff --git a/common/.wezterm.lua b/common/.wezterm.lua index fdf83bd..a08894d 100644 --- a/common/.wezterm.lua +++ b/common/.wezterm.lua @@ -3,7 +3,8 @@ local config = { font_size = 9.0, freetype_load_target = "Mono", use_cap_height_to_scale_fallback_fonts = true, - color_scheme = "Tokyo Night", + bold_brightens_ansi_colors = true, + color_scheme = "Amora Focus", color_schemes = { everforest = { foreground = "#d3c6aa", @@ -123,8 +124,67 @@ local config = { italic = false, }, }, + }, + ["Amora Focus"] = { + background = "#1a1a1a", + foreground = "#dedbeb", - } + cursor_fg = "#2d2d2d", + cursor_bg = "#5c5c5c", + cursor_border = "#5c5c5c", + + selection_fg = "#dedbeb", + selection_bg = "#2d2d2d", + + ansi = { + "#2d2d2d", + "#e83f80", + "#a2baa8", + "#eacac0", + "#9985d1", + "#e68ac1", + "#aabae7", + "#dedbeb", + }, + + brights = { + "#383838", + "#f55d8f", + "#bfd1c3", + "#f0ddd8", + "#b4a4de", + "#edabd2", + "#c4d1f5", + "#edebf7", + }, + + tab_bar = { + background = "#141414", + active_tab = { + bg_color = "#1a1a1a", + fg_color = "#dedbeb", + }, + inactive_tab = { + bg_color = "#171717", + fg_color = "#edebf7", + }, + inactive_tab_hover = { + bg_color = "#171717", + fg_color = "#dedbeb", + italic = false, + }, + new_tab = { + bg_color = "#141414", + fg_color = "#edebf7", + italic = false, + }, + new_tab_hover = { + bg_color = "#171717", + fg_color = "#dedbeb", + italic = false, + }, + }, + }, }, window_padding = { left = 4, @@ -217,7 +277,7 @@ else config.font_rules = { { intensity = "Bold", - font = fallback({family = "tewi", weight = "Bold"}), + font = fallback({family = "tewi", style = "Normal"}), }, { italic = true, diff --git a/linux/.config/awesome/rc.lua b/linux/.config/awesome/rc.lua index ad01449..65b8da6 100644 --- a/linux/.config/awesome/rc.lua +++ b/linux/.config/awesome/rc.lua @@ -533,19 +533,23 @@ awful.widget.watch( local duration = tonumber(stdout:match("duration (.-)\n")) local position = tonumber(stdout:match("position (.-)\n")) - if duration == -1 and stdout:find("stream ") then - local stream = stdout:match("stream (.-)\n"):gsub("^%s*(.-)%s*$", "%1") - - nowplaying = stream .. " [" .. format_time(position) .. "]" + if status == "stopped" then + nowplaying = "[stopped]" else - local artist = stdout:match("tag artist (.-)\n"):gsub("^%s*(.-)%s*$", "%1") - local title = stdout:match("tag title (.-)\n"):gsub("^%s*(.-)%s*$", "%1") + if duration == -1 and stdout:find("stream ") then + local stream = stdout:match("stream (.-)\n"):gsub("^%s*(.-)%s*$", "%1") - nowplaying = artist .. " - " .. title .. " [" .. format_time(position) .. "/" .. format_time(duration) .. "]" - end + nowplaying = stream .. " [" .. format_time(position) .. "]" + else + local artist = stdout:match("tag artist (.-)\n"):gsub("^%s*(.-)%s*$", "%1") + local title = stdout:match("tag title (.-)\n"):gsub("^%s*(.-)%s*$", "%1") - if status == "stopped" or status == "paused" then - nowplaying = nowplaying .. " [" .. status .. "]" + nowplaying = artist .. " - " .. title .. " [" .. format_time(position) .. "/" .. format_time(duration) .. "]" + end + + if status == "paused" then + nowplaying = nowplaying .. " [" .. status .. "]" + end end widget:set_markup(markup(beautiful.widget_music, gears.string.xml_escape(nowplaying))) @@ -1319,7 +1323,8 @@ awful.rules.rules = { "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. "Wpa_gui", "veromix", - "xtightvncviewer" + "xtightvncviewer", + "scrcpy", }, -- Note that the name property shown in xprop might be set slightly after creation of the client diff --git a/linux/.local/bin/autostart.sh b/linux/.local/bin/autostart.sh index ef9e863..e136d4e 100755 --- a/linux/.local/bin/autostart.sh +++ b/linux/.local/bin/autostart.sh @@ -23,14 +23,17 @@ run pipewire run picom --config ~/.config/picom.conf run xscreensaver -no-splash -run xmousepasteblock +#run xmousepasteblock +run xbindkeys -p run flameshot +run gpick + +run radeon-profile -# manual pgrep because env vars if ! pgrep "nicotine" ; then notify-send "autostart: starting nicotine" - env GTK_CSD=0 LD_PRELOAD=/usr/lib/libgtk3-nocsd.so.0 nicotine & + gtk3-nocsd nicotine & else notify-send "autostart: nicotine already running" fi diff --git a/linux/.local/bin/cmus-status.sh b/linux/.local/bin/cmus-status.sh new file mode 100755 index 0000000..c3dc77f --- /dev/null +++ b/linux/.local/bin/cmus-status.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmusfm "$@" & +cmus-notify.sh "$@" & diff --git a/linux/.local/bin/prettier-nano b/linux/.local/bin/prettier-nano new file mode 100755 index 0000000..b1bff61 --- /dev/null +++ b/linux/.local/bin/prettier-nano @@ -0,0 +1,3 @@ +#!/bin/sh + +prettier --config ~/.prettierrc --write $1 diff --git a/linux/.local/bin/screenie-min b/linux/.local/bin/screenie-min new file mode 100755 index 0000000..86d35a5 --- /dev/null +++ b/linux/.local/bin/screenie-min @@ -0,0 +1,37 @@ +#!/bin/bash + +# screenie - capture a screenshot and use elixiremanager to send to +# elixi.re. uses flameshot as a drop-in replacement for kshare's "editing +# before sending" mechanic + +# based off lynnesbian's sshotr.sh, +# https://gist.github.com/Lynnesbian/203e2a90a312cd02880f8e5762c01797 + +# this: +# - uses ~/Screenshots as a folder to store them all +# - requires notify-send, elixiremanager.sh requires it as well, so. +# - uses flameshot, more @ https://github.com/lupoDharkael/flameshot +# - On latest versions of flameshot, the Return key has been changed. You +# want to set the return key to copy image, rather than upload to imgur. +# - NOTE: press enter after doing a screenshot, instead of saving, for all +# of this to work + +# change this if wanted +screenshot_folder="$HOME/Screenshots" + +# set this to the path for elixiremanager.sh +elixiremanager="$HOME/.local/bin/elixiremanager.sh" + +mkdir -p "$screenshot_folder" +date_str=$(date +'%Y-%m-%d-%H_%M_%S') +target="$screenshot_folder/screenie-$date_str.png" + +flameshot gui -r > "$target" + +if [ ! -s "$target" ]; then + notify-send "screenshot aborted, skipping sending" +else + aplay "$HOME/.local/bin/assets/capture.wav" 1>/dev/null 2>/dev/null & + notify-send -t 5000 "screenie: sending: $target" + echo "$target" +fi \ No newline at end of file