This commit is contained in:
DeveloperDurp 2025-05-28 05:37:15 -05:00
parent c409b9995e
commit 586f56b99d
6 changed files with 60 additions and 19 deletions

View file

@ -5,8 +5,24 @@ new() {
dir=${1:-}
[ -z "${dir}" ] && dir=$(find $HOME/Documents/gitlab -mindepth 2 -maxdepth 2 -type d | awk -F/ '{print $(NF-1)"/"$NF " " $0}' | fzf --reverse --header "New Session" --with-nth=1 | awk '{print $2}')
[ -z "$dir" ] && return 1
if [ -z "${dir}" ]; then
name=$(find "$HOME/Documents/gitlab" -mindepth 2 -maxdepth 2 -type d \
| awk -F/ '{print $(NF-1)"/"$NF}' \
| sort \
| wofi -dmenu -i -p "New Session" --columns 1)
if [ -z "$name" ]; then
return
fi
dir=$(find "$HOME/Documents/gitlab" -mindepth 2 -maxdepth 2 -type d | grep "$name$" | head -n 1)
fi
if [ -z "$dir" ]; then
return
fi
name=$(basename "$dir")
if [[ $name == .* ]]; then
@ -31,8 +47,29 @@ goland-new() {
dir=${1:-}
[ -z "${dir}" ] && dir=$(find $HOME/Documents/gitlab -mindepth 2 -maxdepth 2 -type d | awk -F/ '{print $(NF-1)"/"$NF " " $0}' | fzf --reverse --header "New Session" --with-nth=1 | awk '{print $2}')
[ -z "$dir" ] && return 1
if [ -z "${dir}" ]; then
name=$(find "$HOME/Documents/gitlab" -mindepth 2 -maxdepth 2 -type d \
| awk -F/ '{print $(NF-1)"/"$NF}' \
| sort \
| wofi -dmenu -i -p "New JetBrains Session" --columns 1)
if [ -z "$name" ]; then
return
fi
dir=$(find "$HOME/Documents/gitlab" -mindepth 2 -maxdepth 2 -type d | grep "$name$" | head -n 1)
fi
if [ -z "$dir" ]; then
return
fi
name=$(basename "$dir")
if [[ $name == .* ]]; then
name=${name#.}
fi
if [[ $dir == *'dotnet'* ]]; then
/home/user/.local/share/JetBrains/Toolbox/apps/rider/bin/rider $dir &
@ -50,20 +87,21 @@ switch() {
sed '/^popup/d' |
sed '/^scratch/d' |
sed '/^$/d' |
fzf --reverse --header 'Switch Session' --preview 'tmux capture-pane -pt {}' \
--bind 'enter:execute(tmux switch-client -t {})+accept'
wofi -dmenu -i -p "Switch Sessions" --columns 1 |
xargs -r tmux switch-client -t
}
delete() {
tmux list-sessions -F '#{session_name}' |
sed '/^popup/d' |
sed '/^scratch/d' |
sed '/^general/d' |
sed '/^$/d' |
fzf --reverse --header 'Delete Session' --preview 'tmux capture-pane -pt {}' \
--bind 'enter:execute(tmux kill-session -t {})+accept'
wofi -dmenu -i -p "Delete Session" --columns 1 |
xargs -r tmux kill-session -t
}
window() {

View file

@ -1,4 +1,4 @@
export ZSH="$HOME/.oh-my-zsh"
#export ZSH="$HOME/.oh-my-zsh"
export DEVPOD_DISABLE_TELEMETRY=true
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export POWERSHELL_TELEMETRY_OPTOUT=1
@ -15,7 +15,7 @@ export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=none,fg=white,bold"
export GEM_HOME="$HOME/gems"
export XCURSOR_SIZE=24
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
eval "$(ssh-agent -s)"
eval "$(ssh-agent -s)" >> /dev/null
export PATH="$HOME/.local/bin:$HOME/gems/bin:/usr/local/go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:$PATH"
export PATH="$HOME/.local/bin/DSC:$PATH"

View file

@ -19,6 +19,7 @@ set $files nautilus
set $browser flatpak run io.gitlab.librewolf-community
set $bitwarden flatpak run com.bitwarden.desktop
set $menu wofi
set $newScript "$HOME/.config/scripts/sessions.sh"
set $next_or_new swaymsg -r -t get_workspaces | jq -r --arg OUTPUT $(swaymsg -t get_outputs -r | jq -r '.[] | select(.focused == true) | .name') '(. | (max_by(.num) | .num)) as $max | [.[] | select(.output == $OUTPUT)] | (max_by(.num) | .num) as $maxOutput | (.[] | select(.focused == true) | .num) as $current | if $maxOutput > $current then "next_on_output" else $max + 1 end'
set $previous_or_first swaymsg -r -t get_workspaces | jq -r --arg OUTPUT $(swaymsg -t get_outputs -r | jq -r '.[] | select(.focused == true) | .name') '(. | (max_by(.num) | .num)) as $max | [.[] | select(.output == $OUTPUT)] | (min_by(.num) | .num) as $minOutput | (.[] | select(.focused == true) | .num) as $current | if $minOutput < $current then "prev_on_output" else $current end'
@ -66,10 +67,7 @@ bindgesture swipe:left workspace prev
exec_always swaync
# Toggle control center
bindsym $mod+Shift+n exec swaync-client -t -sw
# Start IDE
bindsym $mod+Shift+i exec /opt/goland/bin/goland.sh
bindsym $mod+control+n exec swaync-client -t -sw
### Key bindings
@ -92,6 +90,10 @@ bindsym $mod+Shift+i exec /opt/goland/bin/goland.sh
# Start your launcher
bindsym $mod+space exec $menu
# Start your goland
bindsym $mod+n exec 'zsh -c ". $newScript new"'
bindsym $mod+Shift+n exec 'zsh -c ". $newScript goland-new"'
# 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.

View file

@ -94,9 +94,9 @@ unbind %
#bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind n display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh new"
bind s display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh switch"
bind d display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh delete"
bind n run 'zsh -c ". $HOME/.config/scripts/sessions.sh new"'
bind s run 'zsh -c ". $HOME/.config/scripts/sessions.sh switch"'
bind d run 'zsh -c ". $HOME/.config/scripts/sessions.sh delete"'
bind w display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh window"
bind g display-popup -E -w 80% -h 75% "lazygit"

View file

@ -5,7 +5,7 @@
"spacing": 15,
"modules-left": ["sway/workspaces","sway/mode"],
"modules-center": ["clock"],
"modules-right": ["tray","idle_inhibitor","network", "bluetooth", "battery","pulseaudio"],
"modules-right": ["tray","idle_inhibitor","bluetooth","network","battery","pulseaudio"],
"sway/mode": {
"format": "{}"

View file

@ -42,7 +42,7 @@ required_packages_pacman:
- curl
- nmap
- kubectl
- terraform
#- terraform
- podman
- grim
- slurp
@ -119,6 +119,7 @@ required_packages_flatpak:
- com.vscodium.codium
- com.protonvpn.www
- me.proton.Mail
- me.proton.Pass
- org.chromium.Chromium
- org.libreoffice.LibreOffice
- com.brave.Browser