Compare commits
2 commits
dbea22bf1e
...
77a15abcf4
| Author | SHA1 | Date | |
|---|---|---|---|
| 77a15abcf4 | |||
| e7b1106123 |
11 changed files with 97 additions and 19 deletions
Binary file not shown.
10
env/.config/environment.d/10-base.conf
vendored
10
env/.config/environment.d/10-base.conf
vendored
|
|
@ -1,9 +1,9 @@
|
||||||
EDITOR=nvim
|
EDITOR=nvim
|
||||||
TERMINAL=kitty
|
TERMINAL=kitty
|
||||||
LANG=en_US.UTF-8
|
LANG=en_US.UTF-8
|
||||||
XDG_CONFIG_HOME=%h/.config
|
XDG_CONFIG_HOME=/home/mzunino/.config
|
||||||
XDG_CACHE_HOME=%h/.cache
|
XDG_CACHE_HOME=/home/mzunino/.cache
|
||||||
XDG_DATA_HOME=%h/.local/share
|
XDG_DATA_HOME=/home/mzunino/.local/share
|
||||||
XDG_STATE_HOME=%h/.local/state
|
XDG_STATE_HOME=/home/mzunino/.local/state
|
||||||
ZDOTDIR=%h/.config/zsh
|
ZDOTDIR=/home/mzunino/.config/zsh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,13 @@ return {
|
||||||
selector_cmd = function()
|
selector_cmd = function()
|
||||||
return {
|
return {
|
||||||
command = "rofi",
|
command = "rofi",
|
||||||
args = { "-dmenu", "-p", "Project: " },
|
args = { "-dmenu", "-i", "-p", "Project: " }, -- Added -i flag for case-insensitive matching
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
editor_cmd = function(path, class)
|
editor_cmd = function(path, class)
|
||||||
local dirName = path:match("([^/]+)$")
|
local dirName = path:match("([^/]+)$")
|
||||||
-- Sanitize dirName for tmux session name (remove special chars)
|
-- Sanitize dirName for tmux session name (remove special chars)
|
||||||
local tmuxSession = dirName:gsub("[^a-zA-Z0-9_]", "_")
|
local tmuxSession = dirName:gsub("[^a-zA-Z0-9_]", "_")
|
||||||
|
|
||||||
local tmuxCmd = string.format(
|
local tmuxCmd = string.format(
|
||||||
[[ tmux has-session -t %s 2>/dev/null && tmux attach -t %s || tmux new -c %s -s %s 'nvim %s' \; split-window -h -c %s ]],
|
[[ tmux has-session -t %s 2>/dev/null && tmux attach -t %s || tmux new -c %s -s %s 'nvim %s' \; split-window -h -c %s ]],
|
||||||
tmuxSession,
|
tmuxSession,
|
||||||
|
|
@ -39,12 +38,10 @@ return {
|
||||||
-- local projectName = path:match("([^/]+)$") or path
|
-- local projectName = path:match("([^/]+)$") or path
|
||||||
return "📘 " .. path
|
return "📘 " .. path
|
||||||
end,
|
end,
|
||||||
|
|
||||||
extract_path_from_title = function(title)
|
extract_path_from_title = function(title)
|
||||||
-- Return back the path: 📘 work/project_1 -> work/project_1
|
-- Return back the path: 📘 work/project_1 -> work/project_1
|
||||||
return title:gsub("^📘%s*", ""):gsub("\n$", "")
|
return title:gsub("^📘%s*", ""):gsub("\n$", "")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Add error handling function
|
-- Add error handling function
|
||||||
handle_error = function(err)
|
handle_error = function(err)
|
||||||
io.stderr:write("Error: " .. tostring(err) .. "\n")
|
io.stderr:write("Error: " .. tostring(err) .. "\n")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ BINARY_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||||
|
|
||||||
if [ ! -x "$BINARY_PATH" ]; then
|
if [ ! -x "$BINARY_PATH" ]; then
|
||||||
notify-send "📦 Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
notify-send "📦 Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@master" || {
|
||||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ set_wallpaper_sway() {
|
||||||
if [ "$(hostname)" == "main" ]; then
|
if [ "$(hostname)" == "main" ]; then
|
||||||
swaymsg -t get_outputs -r | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
swaymsg -t get_outputs -r | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
||||||
elif [ "$(hostname)" == "fw" ]; then
|
elif [ "$(hostname)" == "fw" ]; then
|
||||||
swaybg -m fill -i "/home/forbi/Pictures/hwtioswoamne1.jpeg"
|
swaybg -m fill -i "/home/mzunino/Pictures/hwtioswoamne1.jpeg"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
ssh/.ssh/config
BIN
ssh/.ssh/config
Binary file not shown.
|
|
@ -20,6 +20,8 @@ for_window [title="Bitwarden - Vivaldi"] floating enable
|
||||||
for_window [title="win0"] floating enable border none
|
for_window [title="win0"] floating enable border none
|
||||||
for_window [app_id="org.pulseaudio.pavucontrol"] floating enable, resize set 700 800
|
for_window [app_id="org.pulseaudio.pavucontrol"] floating enable, resize set 700 800
|
||||||
for_window [app_id="pdf_float"] floating enable, resize set width 1366 px height 900 px
|
for_window [app_id="pdf_float"] floating enable, resize set width 1366 px height 900 px
|
||||||
|
# for_window [class="XTerm"] floating enable, move position center
|
||||||
|
for_window [class="XTerm"] floating enable, resize set width 80ppt height 70ppt, move position center
|
||||||
|
|
||||||
# Floating with Specific Sizing
|
# Floating with Specific Sizing
|
||||||
for_window [app_id="com.github.hluk.copyq"] resize set 1366 768
|
for_window [app_id="com.github.hluk.copyq"] resize set 1366 768
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
# NAVIGATION AND FILE SYSTEM
|
|
||||||
z() {
|
|
||||||
unfunction "$0"
|
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
$0 "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
zi() { z "$@" }
|
zi() { z "$@" }
|
||||||
za() { z "$@" }
|
za() { z "$@" }
|
||||||
|
|
@ -267,6 +262,90 @@ function cat {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggle_resolution() {
|
||||||
|
local projector_mode=false
|
||||||
|
|
||||||
|
# Verificar si se pasó el flag -p o --projector
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
-p|--projector)
|
||||||
|
projector_mode=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
current_state=$(swaymsg -t get_outputs | jq -r '.[] | select(.name == "eDP-1") | "\(.current_mode.width)x\(.current_mode.height):\(.scale)"')
|
||||||
|
|
||||||
|
if [[ "$projector_mode" == true ]]; then
|
||||||
|
echo "Switching to projector mode (1024x768)..."
|
||||||
|
swaymsg output eDP-1 resolution 1024x768@120Hz scale 1.0
|
||||||
|
|
||||||
|
# Si hay proyector conectado, configurarlo también
|
||||||
|
if swaymsg -t get_outputs | jq -r '.[].name' | grep -q "HDMI-A-1"; then
|
||||||
|
swaymsg output HDMI-A-1 resolution 1024x768 position 0,0
|
||||||
|
swaymsg output eDP-1 position 0,0
|
||||||
|
echo "Projector mirror mode enabled"
|
||||||
|
fi
|
||||||
|
elif [[ "$current_state" == "2880x1920:2.0" ]]; then
|
||||||
|
echo "Switching to 1920x1080 (16:9)..."
|
||||||
|
swaymsg output eDP-1 resolution 1920x1080@120Hz scale 1.0
|
||||||
|
else
|
||||||
|
echo "Switching to 2880x1920 (3:2)..."
|
||||||
|
swaymsg output eDP-1 resolution 2880x1920@120Hz scale 2.0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function cb {
|
||||||
|
export GTK_THEME=HighContrast
|
||||||
|
export GDK_THEME=HighContrast
|
||||||
|
export QT_STYLE_OVERRIDE=HighContrast
|
||||||
|
export XDG_CURRENT_DESKTOP=GNOME
|
||||||
|
|
||||||
|
# Reiniciar configuración GTK
|
||||||
|
unset GTK2_RC_FILES
|
||||||
|
unset GTK_RC_FILES
|
||||||
|
|
||||||
|
exec /usr/bin/codeblocks "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function zrepo() {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: zrepo <repo>"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local REPO="$1"
|
||||||
|
local SERVER="git@zvps"
|
||||||
|
local PATH_ON_SERVER="/var/git/$REPO.git"
|
||||||
|
|
||||||
|
ssh $SERVER "
|
||||||
|
if [ -d $PATH_ON_SERVER ]; then
|
||||||
|
echo 'Error: repo already exists'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mkdir -p $PATH_ON_SERVER &&
|
||||||
|
git init --bare $PATH_ON_SERVER &&
|
||||||
|
chown -R git:git $PATH_ON_SERVER &&
|
||||||
|
chmod -R 755 $PATH_ON_SERVER
|
||||||
|
" || return 1
|
||||||
|
|
||||||
|
echo "Repo created on $SERVER:$PATH_ON_SERVER"
|
||||||
|
|
||||||
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
|
git remote add origin "$SERVER:$PATH_ON_SERVER"
|
||||||
|
echo "Remote 'origin' added to your local repo."
|
||||||
|
else
|
||||||
|
echo "Run 'git clone $SERVER:$PATH_ON_SERVER' to clone the repo."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function _has {
|
function _has {
|
||||||
return $( whence $1 >/dev/null )
|
return $( whence $1 >/dev/null )
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Source it
|
# Source it
|
||||||
eval "$(/home/forbi/.local/bin/mise activate zsh)"
|
eval "$(/home/mzunino/.local/bin/mise activate zsh)"
|
||||||
|
|
||||||
# Install mise if not present
|
# Install mise if not present
|
||||||
if ! command -v mise &> /dev/null
|
if ! command -v mise &> /dev/null
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,4 @@ export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||||
export COREPACK_ENABLE_NETWORK_RESOLUTION=1
|
export COREPACK_ENABLE_NETWORK_RESOLUTION=1
|
||||||
export COREPACK_ENABLE_STRICT_VERIFICATION=0
|
export COREPACK_ENABLE_STRICT_VERIFICATION=0
|
||||||
export MANPAGER="nvim +Man!"
|
export MANPAGER="nvim +Man!"
|
||||||
|
export _ZO_ECHO=1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue