Compare commits
13 Commits
855c2f7434
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| e4258d8ec1 | |||
| 13bade3a4d | |||
| e251e675f4 | |||
| f3522bf985 | |||
| 9d61d9f418 | |||
| 738a15a00d | |||
| 46a2b9fd61 | |||
| 90922ccd77 | |||
| eeb24c1233 | |||
| 34ad6a3aa1 | |||
| 9c9d0188bb | |||
| 44a7ecce2e | |||
| 26939a3be8 |
23
home/.config/dunst/dunstrc
Normal file
23
home/.config/dunst/dunstrc
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#
|
||||
# Catppuccin Latte
|
||||
# https://github.com/catppuccin/dunst/blob/main/themes/latte.conf
|
||||
#
|
||||
|
||||
[global]
|
||||
frame_color = "#1e66f5"
|
||||
separator_color= frame
|
||||
highlight = "#1e66f5"
|
||||
|
||||
[urgency_low]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
|
||||
[urgency_normal]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
|
||||
[urgency_critical]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
frame_color = "#fe640b"
|
||||
@@ -15,9 +15,8 @@ if status is-interactive
|
||||
# Override globals
|
||||
set -gx EDITOR nvim
|
||||
|
||||
# Enable direnv
|
||||
# https://github.com/direnv/direnv
|
||||
direnv hook fish | source
|
||||
# Enable autoenv
|
||||
source ~/.config/fish/functions/activate.fish
|
||||
|
||||
# Aliases
|
||||
alias vim="nvim"
|
||||
|
||||
133
home/.config/fish/functions/activate.fish
Normal file
133
home/.config/fish/functions/activate.fish
Normal file
@@ -0,0 +1,133 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
#
|
||||
# Autoenv for fish shell.
|
||||
# Based on, but heavily modified from:
|
||||
# https://github.com/loopbit/autoenv_fish
|
||||
#
|
||||
|
||||
set AUTOENV_AUTH_FILE ~/.autoenv_authorized
|
||||
if [ -z "$AUTOENV_ENV_FILENAME" ]
|
||||
set AUTOENV_ENV_FILENAME ".env"
|
||||
end
|
||||
|
||||
# probe to see if we have access to a shasum command, otherwise disable autoenv
|
||||
if which gsha1sum 2>/dev/null >&2
|
||||
# Okay
|
||||
else if which sha1sum 2>/dev/null >&2
|
||||
# Okay
|
||||
else if which shasum 2>/dev/null >&2
|
||||
# Okay
|
||||
else
|
||||
echo "Autoenv cannot locate a compatible shasum binary; not enabling"
|
||||
exit 1
|
||||
end
|
||||
|
||||
# This function will be automatically called on directory change
|
||||
# without needing to override the `cd` command.
|
||||
function autoenv_init --on-variable PWD
|
||||
set defIFS $IFS
|
||||
set IFS (echo -en "\n\b")
|
||||
|
||||
set target $argv[1]
|
||||
set home (dirname $HOME)
|
||||
set search_dir $PWD
|
||||
|
||||
while [ $search_dir != / -a $search_dir != "$home" ]
|
||||
set file "$search_dir/$AUTOENV_ENV_FILENAME"
|
||||
if [ -e $file ]
|
||||
set files $files $file
|
||||
end
|
||||
set search_dir (dirname $search_dir)
|
||||
end
|
||||
|
||||
set numerator (count $files)
|
||||
if [ $numerator -gt 0 ]
|
||||
for x in (seq $numerator)
|
||||
set envfile $files[$x]
|
||||
autoenv_check_authz_and_run "$envfile"
|
||||
end
|
||||
end
|
||||
|
||||
set IFS $defIFS
|
||||
end
|
||||
|
||||
function autoenv_run
|
||||
set file "(realpath "$argv[1]")"
|
||||
autoenv_check_authz_and_run "$file"
|
||||
end
|
||||
|
||||
function autoenv_env
|
||||
builtin echo "autoenv:" "$argv[1]"
|
||||
end
|
||||
|
||||
function autoenv_printf
|
||||
builtin printf "autoenv: "
|
||||
builtin printf "$argv[1]"
|
||||
end
|
||||
|
||||
function autoenv_indent
|
||||
cat -e $argv[1] | sed 's/.*/autoenv: &/'
|
||||
end
|
||||
|
||||
function autoenv_hashline
|
||||
# typeset envfile hash
|
||||
set envfile $argv[1]
|
||||
set hash (shasum "$envfile" | cut -d' ' -f 1)
|
||||
echo "$envfile:$hash"
|
||||
end
|
||||
|
||||
function autoenv_check_authz
|
||||
# typeset envfile hash
|
||||
set envfile $argv[1]
|
||||
set hash (autoenv_hashline "$envfile")
|
||||
touch $AUTOENV_AUTH_FILE
|
||||
grep -Gq "$hash" $AUTOENV_AUTH_FILE
|
||||
end
|
||||
|
||||
function autoenv_check_authz_and_run
|
||||
set envfile $argv[1]
|
||||
if autoenv_check_authz "$envfile"
|
||||
autoenv_source "$envfile"
|
||||
return 0
|
||||
end
|
||||
if [ -z $MC_SID ] #make sure mc is not running
|
||||
autoenv_env
|
||||
autoenv_env "WARNING:"
|
||||
autoenv_env "This is the first time you are about to source $envfile":
|
||||
autoenv_env
|
||||
autoenv_env " --- (begin contents) ---------------------------------------"
|
||||
autoenv_indent "$envfile"
|
||||
autoenv_env " --- (end contents) -----------------------------------------"
|
||||
autoenv_env
|
||||
autoenv_printf "Are you sure you want to allow this? (y/N) \n"
|
||||
read answer
|
||||
if [ $answer = y -o $answer = Y ]
|
||||
autoenv_authorize_env "$envfile"
|
||||
autoenv_source "$envfile"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function autoenv_deauthorize_env
|
||||
#typeset envfile
|
||||
set envfile $argv[1]
|
||||
cp "$AUTOENV_AUTH_FILE" "$AUTOENV_AUTH_FILE.tmp"
|
||||
grep -Gv "$envfile:" "$AUTOENV_AUTH_FILE.tmp" >$AUTOENV_AUTH_FILE
|
||||
end
|
||||
|
||||
function autoenv_authorize_env
|
||||
#typeset envfile
|
||||
set envfile $argv[1]
|
||||
autoenv_deauthorize_env "$envfile"
|
||||
autoenv_hashline "$envfile" >>$AUTOENV_AUTH_FILE
|
||||
end
|
||||
|
||||
function autoenv_source
|
||||
#TODO: Why are global vars not being passed to sourced script?
|
||||
set -g AUTOENV_CUR_FILE $argv[1]
|
||||
set -g AUTOENV_CUR_DIR (dirname $argv[1])
|
||||
source "$argv[1]"
|
||||
#set -e AUTOENV_CUR_FILE
|
||||
#set -e AUTOENV_CUR_DIR
|
||||
end
|
||||
46
home/.config/foot/foot.ini
Normal file
46
home/.config/foot/foot.ini
Normal file
@@ -0,0 +1,46 @@
|
||||
font=JetBrainsMonoNerdFontMono:size=12
|
||||
# Should automatically use these.
|
||||
#font-bold=JetBrainsMonoNerdFontMono:weight=bold
|
||||
#font-italic=JetBrainsMonoNerdFontMono:slant=italic
|
||||
#font-bold-italic=JetBrainsMonoNerdFontMono:weight=bold:slant=italic
|
||||
|
||||
|
||||
#
|
||||
# Catppuccine Latte
|
||||
# https://github.com/catppuccin/foot
|
||||
#
|
||||
|
||||
[colors]
|
||||
cursor=eff1f5 dc8a78
|
||||
foreground=4c4f69
|
||||
background=eff1f5
|
||||
|
||||
regular0=5c5f77
|
||||
regular1=d20f39
|
||||
regular2=40a02b
|
||||
regular3=df8e1d
|
||||
regular4=1e66f5
|
||||
regular5=ea76cb
|
||||
regular6=179299
|
||||
regular7=acb0be
|
||||
|
||||
bright0=6c6f85
|
||||
bright1=d20f39
|
||||
bright2=40a02b
|
||||
bright3=df8e1d
|
||||
bright4=1e66f5
|
||||
bright5=ea76cb
|
||||
bright6=179299
|
||||
bright7=bcc0cc
|
||||
|
||||
16=fe640b
|
||||
17=dc8a78
|
||||
|
||||
selection-foreground=4c4f69
|
||||
selection-background=ccced7
|
||||
|
||||
search-box-no-match=dce0e8 d20f39
|
||||
search-box-match=4c4f69 ccd0da
|
||||
|
||||
jump-labels=dce0e8 fe640b
|
||||
urls=1e66f5
|
||||
@@ -4,6 +4,7 @@ customCommands:
|
||||
description: "Force push with lease."
|
||||
key: "x"
|
||||
promptToReturnFromSubprocess: false # removes "press enter to return to lazygit" popup
|
||||
notARepository: 'skip'
|
||||
git:
|
||||
autoForwardBranches: "none"
|
||||
os:
|
||||
|
||||
37
home/.config/rofi/scripts/copyq.sh
Executable file
37
home/.config/rofi/scripts/copyq.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Read the most recent items from CopyQ and present them in a rofi menu.
|
||||
#
|
||||
# Converted to bash from
|
||||
# https://github.com/cjbassi/rofi-copyq/blob/master/rofi-copyq
|
||||
|
||||
# CopyQ script to get all clipboard items as JSON
|
||||
copyq_script_getAll='
|
||||
var result=[];
|
||||
for ( var i = 0; i < size(); ++i ) {
|
||||
var obj = {};
|
||||
obj.row = i;
|
||||
obj.mimetypes = str(read("?", i)).split("\n");
|
||||
obj.mimetypes.pop();
|
||||
obj.text = str(read(i));
|
||||
result.push(obj);
|
||||
}
|
||||
JSON.stringify(result);
|
||||
'
|
||||
|
||||
# Get clipboard items from CopyQ
|
||||
json_arr=$(printf '%s' "$copyq_script_getAll" | copyq -)
|
||||
|
||||
# Parse JSON and format items for rofi
|
||||
# Process each JSON object separately, replacing newlines within each item
|
||||
items=$(printf '%s' "$json_arr" | jq -r '.[] | .text | gsub("\n"; " ") | gsub(" +"; " ")')
|
||||
|
||||
# Show rofi menu and get selected index
|
||||
title='rofi-copyq'
|
||||
selected_index=$(printf '%s' "$items" | rofi -dmenu -i -p "$title" -format i)
|
||||
|
||||
# If user selected an item, select it in CopyQ
|
||||
if [ -n "$selected_index" ]; then
|
||||
echo "Selected item: $selected_index"
|
||||
copyq "select($selected_index);"
|
||||
fi
|
||||
71
home/.config/rofi/scripts/qalc.sh
Executable file
71
home/.config/rofi/scripts/qalc.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://github.com/onespaceman/menu-calc
|
||||
# https://github.com/BarbUk/menu-qalc
|
||||
# https://github.com/ClemaX/menu-qalc-wayland
|
||||
#
|
||||
# Calculator for use with rofi
|
||||
# Copying to the clipboard requires wl-copy
|
||||
|
||||
usage() {
|
||||
echo "$(tput bold)menu-calc$(tput sgr0)"
|
||||
echo "A calculator for Rofi"
|
||||
echo
|
||||
echo "$(tput bold)Usage:$(tput sgr0)"
|
||||
echo " = 4+2"
|
||||
echo " = (4+2)/(4+3)"
|
||||
echo " = 4^2"
|
||||
echo " = sqrt(4)"
|
||||
echo " = c(2)"
|
||||
echo
|
||||
echo "$(tput bold)Passing arguments to Rofi:$(tput sgr0)"
|
||||
echo "Any parameters after ' -- ' will be passed to Rofi."
|
||||
echo
|
||||
echo " = -- <Rofi args>"
|
||||
echo
|
||||
echo "The answer can be copied to the clipboard and used for further calculations inside (or outside) Rofi."
|
||||
echo
|
||||
echo "If launched outside of Rofi the expression may need quotation marks."
|
||||
exit
|
||||
}
|
||||
|
||||
process_query() { # query
|
||||
local query="$1"
|
||||
|
||||
qalc +u8 -color=never -terse <<<"$query" |
|
||||
awk '!/^>/ && !/^$/ {gsub(/^[ \t]+|[ \t]+$/, "", $0); print}'
|
||||
}
|
||||
|
||||
# Process CLI parameters
|
||||
for var in "$@"; do
|
||||
case $var in
|
||||
-h | --help) usage ;;
|
||||
--) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Path to menu application
|
||||
if [[ -n $(command -v rofi) ]]; then
|
||||
menu="$(command -v rofi)"
|
||||
menu="$menu -dmenu -lines 3"
|
||||
else
|
||||
>&2 echo "Rofi not found"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Determine args to pass to rofi
|
||||
while [[ $# -gt 0 && $1 != "--" ]]; do
|
||||
shift
|
||||
done
|
||||
[[ $1 == "--" ]] && shift
|
||||
|
||||
while true; do
|
||||
action=$(echo -e "Copy\nClear\nClose" | ${menu} "$@" -p "= $answer")
|
||||
|
||||
case "$action" in
|
||||
"Clear") answer= ;;
|
||||
"Copy") wl-copy -- "$answer" ;;
|
||||
"Close" | "") exit ;;
|
||||
*) answer=$(process_query "$answer $action") ;;
|
||||
esac
|
||||
done
|
||||
@@ -73,6 +73,20 @@ input "2362:628:PIXA3854:00_093A:0274_Touchpad" {
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Window switching
|
||||
bindsym $mod+Tab exec rofi -show window -modes window
|
||||
|
||||
# Clipboard history
|
||||
bindsym $mod+Shift+v exec /home/tgrosinger/.config/rofi/scripts/copyq.sh
|
||||
|
||||
# Calculator
|
||||
bindsym $mod+Equal exec /home/tgrosinger/.config/rofi/scripts/qalc.sh
|
||||
|
||||
# Lazygit
|
||||
bindsym $mod+g exec alacritty --title Floating-Lazygit --command /home/linuxbrew/.linuxbrew/bin/lazygit; grab_focus; floating enable
|
||||
for_window [title="Floating-Lazygit"] floating enable
|
||||
for_window [title="Floating-Lazygit"] resize set 1800 1200
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
@@ -213,8 +227,9 @@ client.placeholder $overlay0 $base $text $overlay0 $overlay0
|
||||
client.background $base
|
||||
|
||||
#
|
||||
# Launch defualt apps
|
||||
# Launch default apps
|
||||
#
|
||||
|
||||
exec copyq
|
||||
exec workrave
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ sudo dnf install \
|
||||
distrobox \
|
||||
fuse-libs \ # For running appimages
|
||||
gstreamer1-plugin-openh264 mozilla-openh264 \ # For twitch videos
|
||||
podman
|
||||
podman \
|
||||
qalculate qalculate-gtk # Homebrew version installs x11 and waylany in brew.
|
||||
|
||||
# Install tailscale
|
||||
# https://tailscale.com/kb/1511/install-fedora-2
|
||||
@@ -65,6 +66,8 @@ flatpak install io.dbeaver.DBeaverCommunity
|
||||
flatpak install flathub org.gimp.GIMP
|
||||
flatpak install flathub org.gnucash.GnuCash
|
||||
flatpak install flathub org.kde.digikam
|
||||
flatpak install flathub org.libreoffice.LibreOffice
|
||||
flatpak install flathub org.kde.okular
|
||||
|
||||
# Install devbox
|
||||
# https://www.jetify.com/docs/devbox/installing-devbox
|
||||
|
||||
Reference in New Issue
Block a user