Compare commits
8 Commits
78bcc74ed9
...
main
Author | SHA1 | Date | |
---|---|---|---|
d424fc0852 | |||
a27b458435 | |||
da689d2d0a | |||
507ba45188 | |||
3a8c43cfc5 | |||
23ac865092 | |||
e567351d7c | |||
c48f2b462b |
7
.aliases
Normal file
7
.aliases
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
alias ll="ls -l"
|
||||||
|
alias la="ls -A"
|
||||||
|
alias l="ls -CF"
|
||||||
|
alias vsc="vscodium ."
|
||||||
|
alias r="./bin/rails"
|
||||||
|
alias todo="todo.sh"
|
||||||
|
alias cat="bat"
|
@@ -8,7 +8,7 @@ set $right l
|
|||||||
|
|
||||||
|
|
||||||
# wf-recorder
|
# wf-recorder
|
||||||
set $screenrecorder `bash $HOME/.config/sway/scripts/open-screen-recorder.sh`
|
set $screenrecorder `bash $HOME/.config/sway/scripts/screen-recorder.sh`
|
||||||
bindsym --to-code $mod+Shift+R exec $screenrecorder
|
bindsym --to-code $mod+Shift+R exec $screenrecorder
|
||||||
|
|
||||||
# background
|
# background
|
||||||
@@ -191,8 +191,8 @@ bindsym $mod+a focus parent
|
|||||||
bindsym --locked XF86MonBrightnessDown exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --decrement"
|
bindsym --locked XF86MonBrightnessDown exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --decrement"
|
||||||
bindsym --locked XF86MonBrightnessUp exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --increment"
|
bindsym --locked XF86MonBrightnessUp exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --increment"
|
||||||
|
|
||||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +1% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
||||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -1% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
||||||
|
|
||||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
main() {
|
|
||||||
pid="$(pgrep "wf-recorder" || pgrep "slurp")"
|
|
||||||
status=$?
|
|
||||||
|
|
||||||
if [[ $status != 0 ]]; then
|
|
||||||
GEO="$(slurp)" && wf-recorder -g "$GEO" -f "$HOME/Videos/$(date +'recording_%Y-%m-%d-%H%M%S.mp4')"
|
|
||||||
else
|
|
||||||
pkill --signal SIGINT wf-recorder
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main $@
|
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
increment() {
|
increment() {
|
||||||
brightnessctl set 5%+
|
brightnessctl set 1%+
|
||||||
}
|
}
|
||||||
|
|
||||||
decrement() {
|
decrement() {
|
||||||
@@ -14,7 +14,7 @@ decrement() {
|
|||||||
if [[ "$current_value" == "6000" ]]; then
|
if [[ "$current_value" == "6000" ]]; then
|
||||||
brightnessctl set 4
|
brightnessctl set 4
|
||||||
else
|
else
|
||||||
brightnessctl set 5%-
|
brightnessctl set 1%-
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
27
.config/sway/scripts/screen-recorder.sh
Executable file
27
.config/sway/scripts/screen-recorder.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
main() {
|
||||||
|
pid="$(pgrep "wf-recorder" || pgrep "slurp")"
|
||||||
|
status=$?
|
||||||
|
|
||||||
|
if [[ $status != 0 ]]; then
|
||||||
|
if [[ -f ~/.config/user-dirs.dirs ]]; then
|
||||||
|
source ~/.config/user-dirs.dirs
|
||||||
|
fi
|
||||||
|
|
||||||
|
output_dir="${XDG_VIDEOS_DIR:-$HOME/Videos}"
|
||||||
|
|
||||||
|
if [[ ! -d "$output_dir" ]]; then
|
||||||
|
notify-send "Screen recording output directory does not exist: $output_dir" -u critical -t 3000
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
filename="$output_dir/$(date +'recording_%Y-%m-%d-%H%M%S.mp4')"
|
||||||
|
|
||||||
|
region="$(slurp)" && wf-recorder -g "$region" -f "$filename"
|
||||||
|
else
|
||||||
|
pkill --signal SIGINT wf-recorder
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
@@ -34,7 +34,8 @@
|
|||||||
"urgent": "",
|
"urgent": "",
|
||||||
"focused": "",
|
"focused": "",
|
||||||
"default": ""
|
"default": ""
|
||||||
}
|
},
|
||||||
|
"on-click": ":"
|
||||||
},
|
},
|
||||||
"sway/mode": {
|
"sway/mode": {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "echo '{\"class\": \"recording\"}'",
|
"exec": "echo '{\"class\": \"recording\"}'",
|
||||||
"exec-if": "pgrep wf-recorder",
|
"exec-if": "pgrep wf-recorder",
|
||||||
"on-click": "$HOME/.config/waybar/scripts/close-screen-recorder.sh"
|
"on-click": "$HOME/.config/sway/scripts/screen-recorder.sh"
|
||||||
},
|
},
|
||||||
"privacy": {
|
"privacy": {
|
||||||
"icon-spacing": 4,
|
"icon-spacing": 4,
|
||||||
@@ -130,7 +131,9 @@
|
|||||||
"ignore": [
|
"ignore": [
|
||||||
{ "type": "audio-out", "name": "spotify" },
|
{ "type": "audio-out", "name": "spotify" },
|
||||||
{ "type": "audio-out", "name": "Firefox" },
|
{ "type": "audio-out", "name": "Firefox" },
|
||||||
{ "type": "audio-in", "name": "Firefox" }
|
{ "type": "audio-in", "name": "Firefox" },
|
||||||
|
{ "type": "audio-out", "name": "Telegram" },
|
||||||
|
{ "type": "audio-in", "name": "Telegram" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
@@ -190,7 +193,8 @@
|
|||||||
},
|
},
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"format": "{}% "
|
"format": "{}% ",
|
||||||
|
"on-click": "alacritty -e btop"
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"interval": 3,
|
"interval": 3,
|
||||||
@@ -211,9 +215,9 @@
|
|||||||
"network": {
|
"network": {
|
||||||
"interval": 3,
|
"interval": 3,
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
"tooltip-format": "{ifname} via {gwaddr}",
|
||||||
"tooltip-format-wifi": "{ipaddr} ({ifname}) via {essid} ",
|
"tooltip-format-wifi": "{ipaddr} ({ifname}) via {essid}\n\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
"tooltip-format-ethernet": "{ipaddr} ({ifname}) via {essid} ",
|
"tooltip-format-ethernet": "{ipaddr} ({ifname}) via {essid}\n\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
"tooltip-format-disconnected": "Disconnected",
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
"format": "{ifname}",
|
"format": "{ifname}",
|
||||||
"format-icons": ["", "", "", "", ""],
|
"format-icons": ["", "", "", "", ""],
|
||||||
|
@@ -1,14 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
data=""
|
||||||
updates=$(checkupdates --nocolor 2>/dev/null)
|
updates=$(checkupdates --nocolor 2>/dev/null)
|
||||||
|
|
||||||
if [[ $? -ne 0 || -z "$updates" ]]; then
|
if [[ $? -ne 0 || -z "$updates" ]]; then
|
||||||
echo '{"text": "", "tooltip": ""}' | jq --unbuffered --compact-output
|
data='{"text": "", "tooltip": ""}'
|
||||||
else
|
else
|
||||||
numberOfUpdates=$(echo "$updates" | wc -l)
|
numberOfUpdates=$(echo "$updates" | wc -l)
|
||||||
tooltip=$(echo "$updates" | sed 's/\n/\r/g' | jq -sR .)
|
tooltip=$(echo "$updates" | sed 's/\n/\r/g' | jq -sR .)
|
||||||
echo "{\"text\": \"$numberOfUpdates\", \"tooltip\": $tooltip}" | jq --unbuffered --compact-output
|
data="{\"text\": \"$numberOfUpdates\", \"tooltip\": $tooltip}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo $data | jq --unbuffered --compact-output
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
@@ -1,12 +0,0 @@
|
|||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
main() {
|
|
||||||
pid="$(pgrep "wf-recorder" || pgrep "slurp")"
|
|
||||||
status=$?
|
|
||||||
|
|
||||||
if [[ $status == 0 ]]; then
|
|
||||||
pkill --signal SIGINT wf-recorder
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main $@
|
|
59
.zshrc
59
.zshrc
@@ -1,6 +1,6 @@
|
|||||||
# ~/.zshrc file for zsh interactive shells.
|
# ~/.zshrc file for zsh interactive shells.
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(rbenv init - zsh)"
|
||||||
|
|
||||||
# set -o vi
|
# set -o vi
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ bindkey '^[[F' end-of-line # end
|
|||||||
bindkey '^[[Z' undo # shift + tab undo last action
|
bindkey '^[[Z' undo # shift + tab undo last action
|
||||||
|
|
||||||
# enable completion features
|
# enable completion features
|
||||||
autoload -Uz compinit
|
# autoload -Uz compinit
|
||||||
compinit -d ~/.cache/zcompdump
|
# compinit -d ~/.cache/zcompdump
|
||||||
zstyle ':completion:*:*:*:*:*' menu select
|
zstyle ':completion:*:*:*:*:*' menu select
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
zstyle ':completion:*' auto-description 'specify: %d'
|
||||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||||
@@ -51,8 +51,8 @@ zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|||||||
|
|
||||||
# History configurations
|
# History configurations
|
||||||
HISTFILE=~/.zsh_history
|
HISTFILE=~/.zsh_history
|
||||||
HISTSIZE=1000
|
HISTSIZE=10000
|
||||||
SAVEHIST=1000
|
SAVEHIST=10000
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
||||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
setopt hist_ignore_dups # ignore duplicated commands history list
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
setopt hist_ignore_space # ignore commands that start with space
|
||||||
@@ -91,46 +91,29 @@ if [ -x /usr/bin/dircolors ]; then
|
|||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# enable auto-suggestions based on the history
|
|
||||||
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
|
|
||||||
. /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
# change suggestion color
|
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# enable command-not-found if installed
|
|
||||||
if [ -f /etc/zsh_command_not_found ]; then
|
|
||||||
. /etc/zsh_command_not_found
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Alias definitions.
|
# Alias definitions.
|
||||||
if [ -f ~/.zsh_aliases ]; then
|
[ -f ~/.aliases ] && . ~/.aliases
|
||||||
. ~/.zsh_aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ~/.zsh_exports ]; then
|
[ -f ~/.exports ] && . ~/.exports
|
||||||
. ~/.zsh_exports
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ~/.zsh_include ]; then
|
[ -f ~/.include ] && . ~/.include
|
||||||
. ~/.zsh_include
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ~/.zsh_profile ]; then
|
[ -f ~/.profile ] && . ~/.profile
|
||||||
. ~/.zsh_profile
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The following lines were added by compinstall
|
|
||||||
zstyle :compinstall filename '/home/andrea/.zshrc'
|
|
||||||
|
|
||||||
autoload -Uz compinit
|
|
||||||
compinit
|
|
||||||
# End of lines added by compinstall
|
|
||||||
|
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
|
||||||
# plugins
|
# plugins
|
||||||
plugins=(vi-mode)
|
# plugins=(vi-mode)
|
||||||
|
|
||||||
eval "$(rbenv init - zsh)"
|
# Bun and bun completitions
|
||||||
|
[ -s "$HOME/.bun/_bun" ] && . "$HOME/.bun/_bun"
|
||||||
|
|
||||||
|
# Fnm
|
||||||
|
FNM_PATH="/home/andrea/.local/share/fnm"
|
||||||
|
if [ -d "$FNM_PATH" ]; then
|
||||||
|
export PATH="/home/andrea/.local/share/fnm:$PATH"
|
||||||
|
eval "`fnm env`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
Reference in New Issue
Block a user