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:-} 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}') if [ -z "${dir}" ]; then
[ -z "$dir" ] && return 1
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") name=$(basename "$dir")
if [[ $name == .* ]]; then if [[ $name == .* ]]; then
@ -31,8 +47,29 @@ goland-new() {
dir=${1:-} 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}') if [ -z "${dir}" ]; then
[ -z "$dir" ] && return 1
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 if [[ $dir == *'dotnet'* ]]; then
/home/user/.local/share/JetBrains/Toolbox/apps/rider/bin/rider $dir & /home/user/.local/share/JetBrains/Toolbox/apps/rider/bin/rider $dir &
@ -50,20 +87,21 @@ switch() {
sed '/^popup/d' | sed '/^popup/d' |
sed '/^scratch/d' | sed '/^scratch/d' |
sed '/^$/d' | sed '/^$/d' |
fzf --reverse --header 'Switch Session' --preview 'tmux capture-pane -pt {}' \ wofi -dmenu -i -p "Switch Sessions" --columns 1 |
--bind 'enter:execute(tmux switch-client -t {})+accept' xargs -r tmux switch-client -t
} }
delete() { delete() {
tmux list-sessions -F '#{session_name}' | tmux list-sessions -F '#{session_name}' |
sed '/^popup/d' | sed '/^popup/d' |
sed '/^scratch/d' | sed '/^scratch/d' |
sed '/^general/d' | sed '/^general/d' |
sed '/^$/d' | sed '/^$/d' |
fzf --reverse --header 'Delete Session' --preview 'tmux capture-pane -pt {}' \ wofi -dmenu -i -p "Delete Session" --columns 1 |
--bind 'enter:execute(tmux kill-session -t {})+accept' xargs -r tmux kill-session -t
} }
window() { 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 DEVPOD_DISABLE_TELEMETRY=true
export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_CLI_TELEMETRY_OPTOUT=1
export POWERSHELL_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 GEM_HOME="$HOME/gems"
export XCURSOR_SIZE=24 export XCURSOR_SIZE=24
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" 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:$HOME/gems/bin:/usr/local/go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:$PATH"
export PATH="$HOME/.local/bin/DSC:$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 $browser flatpak run io.gitlab.librewolf-community
set $bitwarden flatpak run com.bitwarden.desktop set $bitwarden flatpak run com.bitwarden.desktop
set $menu wofi 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 $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' 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 exec_always swaync
# Toggle control center # Toggle control center
bindsym $mod+Shift+n exec swaync-client -t -sw bindsym $mod+control+n exec swaync-client -t -sw
# Start IDE
bindsym $mod+Shift+i exec /opt/goland/bin/goland.sh
### Key bindings ### Key bindings
@ -92,6 +90,10 @@ bindsym $mod+Shift+i exec /opt/goland/bin/goland.sh
# Start your launcher # Start your launcher
bindsym $mod+space exec $menu 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. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows. # 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 % split-window -h -c "#{pane_current_path}"
bind c new-window -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 n run 'zsh -c ". $HOME/.config/scripts/sessions.sh new"'
bind s display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh switch" bind s run 'zsh -c ". $HOME/.config/scripts/sessions.sh switch"'
bind d display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh delete" 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 w display-popup -E -w 50% -h 50% ". $HOME/.config/scripts/sessions.sh window"
bind g display-popup -E -w 80% -h 75% "lazygit" bind g display-popup -E -w 80% -h 75% "lazygit"

View file

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

View file

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