Compare commits
15 Commits
7f7d3cc850
...
main
Author | SHA1 | Date | |
---|---|---|---|
d424fc0852 | |||
a27b458435 | |||
da689d2d0a | |||
507ba45188 | |||
3a8c43cfc5 | |||
23ac865092 | |||
e567351d7c | |||
c48f2b462b | |||
78bcc74ed9 | |||
31b787f60d | |||
ce3967e154 | |||
09770263fb | |||
a91a9f34bf | |||
079779a52a | |||
1254bf1e01 |
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
|
||||
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
|
||||
|
||||
# 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 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 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 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@ -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 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
|
||||
|
||||
increment() {
|
||||
brightnessctl set 5%+
|
||||
brightnessctl set 1%+
|
||||
}
|
||||
|
||||
decrement() {
|
||||
@@ -14,7 +14,7 @@ decrement() {
|
||||
if [[ "$current_value" == "6000" ]]; then
|
||||
brightnessctl set 4
|
||||
else
|
||||
brightnessctl set 5%-
|
||||
brightnessctl set 1%-
|
||||
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 $@
|
@@ -5,13 +5,8 @@
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"margin": "5 5 5 5",
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"sway/mode"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "mpris"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": [
|
||||
"custom/pacman",
|
||||
"custom/recorder",
|
||||
@@ -22,26 +17,15 @@
|
||||
],
|
||||
"group/system": {
|
||||
"orientation": "inherit",
|
||||
"modules": [
|
||||
"memory",
|
||||
"disk"
|
||||
]
|
||||
"modules": ["memory", "disk", "cpu"]
|
||||
},
|
||||
"group/misc": {
|
||||
"orientation": "inherit",
|
||||
"modules": [
|
||||
"pulseaudio",
|
||||
"pulseaudio#microphone",
|
||||
"backlight",
|
||||
"battery"
|
||||
]
|
||||
"modules": ["pulseaudio", "pulseaudio#microphone", "backlight", "battery"]
|
||||
},
|
||||
"group/connections": {
|
||||
"orientation": "inherit",
|
||||
"modules": [
|
||||
"bluetooth",
|
||||
"network"
|
||||
]
|
||||
"modules": ["bluetooth", "network"]
|
||||
},
|
||||
"sway/workspaces": {
|
||||
"format": "{name} {icon}",
|
||||
@@ -50,12 +34,19 @@
|
||||
"urgent": "",
|
||||
"focused": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"on-click": ":"
|
||||
},
|
||||
"sway/mode": {
|
||||
"tooltip": false,
|
||||
"format": "{}",
|
||||
"on-click": "sway mode default"
|
||||
},
|
||||
"mpris": {
|
||||
"interval": 1,
|
||||
"tooltip-format": "{title} - {artist} [{position}/{length}]",
|
||||
"format": "{title}"
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"format": "{name} {icon}",
|
||||
"disable-scroll": true,
|
||||
@@ -68,9 +59,7 @@
|
||||
"clock": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{calendar}",
|
||||
"timezones": [
|
||||
"Europe/Rome"
|
||||
],
|
||||
"timezones": ["Europe/Rome"],
|
||||
"format": "{:%a %d %H:%M}",
|
||||
"format-alt": "{%H:%M}",
|
||||
"calendar": {
|
||||
@@ -103,28 +92,25 @@
|
||||
"interval": 60,
|
||||
"tooltip": true,
|
||||
"format": "{} ",
|
||||
"return-type": "json",
|
||||
"exec": "$HOME/.config/waybar/scripts/check-updates.sh",
|
||||
"exec-if": "[[ `$HOME/.config/waybar/scripts/check-updates.sh` != 0 ]]",
|
||||
"exec-if": "[[ `checkupdates | wc -l` != 0 ]]",
|
||||
"signal": 1
|
||||
},
|
||||
"custom/recorder": {
|
||||
"interval": 1,
|
||||
"tooltip": true,
|
||||
"format": "Rec ",
|
||||
"format": "",
|
||||
"return-type": "json",
|
||||
"exec": "echo '{\"class\": \"recording\"}'",
|
||||
"exec-if": "pgrep wf-recorder",
|
||||
"on-click": "$HOME/.config/waybar/scripts/close-screen-recorder.sh"
|
||||
},
|
||||
"custom/power": {
|
||||
"tooltip": false,
|
||||
"format": "⏻",
|
||||
"on-click": "wlogout -b 5 -s -T 400 -B 400 -L 400 -R 400 -c 20"
|
||||
"on-click": "$HOME/.config/sway/scripts/screen-recorder.sh"
|
||||
},
|
||||
"privacy": {
|
||||
"icon-spacing": 4,
|
||||
"icon-size": 18,
|
||||
"transition-duration": 250,
|
||||
"transition-duration": 0,
|
||||
"expand": true,
|
||||
"modules": [
|
||||
{
|
||||
"tooltip": true,
|
||||
@@ -141,30 +127,31 @@
|
||||
"type": "audio-in",
|
||||
"tooltip-icon-size": 24
|
||||
}
|
||||
],
|
||||
"ignore": [
|
||||
{ "type": "audio-out", "name": "spotify" },
|
||||
{ "type": "audio-out", "name": "Firefox" },
|
||||
{ "type": "audio-in", "name": "Firefox" },
|
||||
{ "type": "audio-out", "name": "Telegram" },
|
||||
{ "type": "audio-in", "name": "Telegram" }
|
||||
]
|
||||
},
|
||||
"pulseaudio": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "Playing at {volume}%",
|
||||
"tooltip-format": "Playing at {volume}% on {desc}",
|
||||
"format": "{volume}% {icon}",
|
||||
"format-bluetooth": "{volume}% {icon}",
|
||||
"format-bluetooth-muted": "{volume}% ",
|
||||
"format-muted": "{volume}% ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol -t 3",
|
||||
"on-click-right": "pamixer -t"
|
||||
},
|
||||
"pulseaudio#microphone": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{format_source}",
|
||||
"format": "{format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "{volume}% ",
|
||||
@@ -177,15 +164,7 @@
|
||||
"tooltip": true,
|
||||
"device": "intel_backlight",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
"format-icons": ["", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"battery": {
|
||||
"interval": 1,
|
||||
@@ -199,30 +178,8 @@
|
||||
"format-charging": "{capacity}% {icon}",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-icons": {
|
||||
"charging": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
"charging": ["", "", "", "", "", "", "", "", "", ""],
|
||||
"default": ["", "", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"on-update": "$HOME/.config/waybar/scripts/check-battery.sh"
|
||||
},
|
||||
@@ -234,6 +191,11 @@
|
||||
"unit": "GiB",
|
||||
"path": "/"
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"format": "{}% ",
|
||||
"on-click": "alacritty -e btop"
|
||||
},
|
||||
"memory": {
|
||||
"interval": 3,
|
||||
"tooltip": true,
|
||||
@@ -253,18 +215,12 @@
|
||||
"network": {
|
||||
"interval": 3,
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"tooltip-format-wifi": "{ipaddr} ({ifname}) via {essid} ",
|
||||
"tooltip-format-ethernet": "{ipaddr} ({ifname}) via {essid} ",
|
||||
"tooltip-format": "{ifname} via {gwaddr}",
|
||||
"tooltip-format-wifi": "{ipaddr} ({ifname}) via {essid}\n\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||
"tooltip-format-ethernet": "{ipaddr} ({ifname}) via {essid}\n\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"format": "{ifname}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
"format-disconnected": "",
|
||||
"format-wifi": "{icon}",
|
||||
"format-ethernet": "",
|
||||
|
@@ -1,7 +1,18 @@
|
||||
#! /usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
checkupdates | wc -l
|
||||
data=""
|
||||
updates=$(checkupdates --nocolor 2>/dev/null)
|
||||
|
||||
if [[ $? -ne 0 || -z "$updates" ]]; then
|
||||
data='{"text": "", "tooltip": ""}'
|
||||
else
|
||||
numberOfUpdates=$(echo "$updates" | wc -l)
|
||||
tooltip=$(echo "$updates" | sed 's/\n/\r/g' | jq -sR .)
|
||||
data="{\"text\": \"$numberOfUpdates\", \"tooltip\": $tooltip}"
|
||||
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 $@
|
@@ -1,9 +1,8 @@
|
||||
* {
|
||||
all: initial;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 20px;
|
||||
font-family: "Symbols Nerd Font", monospace;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
@@ -20,7 +19,7 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
@@ -29,7 +28,7 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
@@ -38,30 +37,78 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
#custom-recorder,
|
||||
#mode,
|
||||
#clock,
|
||||
#workspaces,
|
||||
#custom-recorder,
|
||||
#custom-power,
|
||||
#mpris,
|
||||
#mpris.paused,
|
||||
#privacy {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#custom-recorder, #custom-pacman {
|
||||
background-color: #32e47c;
|
||||
color: #383c4a;
|
||||
}
|
||||
|
||||
#privacy {
|
||||
background-color: #e63946;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #8ecae6;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#mpris:not(.paused) {
|
||||
background: linear-gradient(90deg,
|
||||
#e66465,
|
||||
#f6b73c,
|
||||
#6dd5ed,
|
||||
#c084f1,
|
||||
#ff9a9e,
|
||||
#a1ffce,
|
||||
#fbc2eb,
|
||||
#fad0c4,
|
||||
#8fd3f4,
|
||||
#84fab0,
|
||||
#dcb0ed,
|
||||
#f5576c
|
||||
);
|
||||
background-size: 1000% 1000%;
|
||||
animation: gradientShift 30s ease-in-out infinite;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@keyframes gradientShift {
|
||||
0% { background-position: 0% 50%; }
|
||||
12.5% { background-position: 20% 50%; }
|
||||
25% { background-position: 45% 50%; }
|
||||
37.5% { background-position: 70% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
62.5% { background-position: 70% 50%; }
|
||||
75% { background-position: 45% 50%; }
|
||||
87.5% { background-position: 20% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
#custom-recorder,
|
||||
#mode,
|
||||
#mpris,
|
||||
#custom-power,
|
||||
#privacy {
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
@@ -69,6 +116,7 @@ tooltip label {
|
||||
#mode,
|
||||
#clock,
|
||||
#privacy,
|
||||
#mpris,
|
||||
#custom-power,
|
||||
#workspaces button {
|
||||
padding-top: 4px;
|
||||
@@ -80,6 +128,7 @@ tooltip label {
|
||||
#pulseaudio:not(.microphone),
|
||||
#pulseaudio.microphone,
|
||||
#memory,
|
||||
#disk,
|
||||
#backlight,
|
||||
#bluetooth {
|
||||
padding-right: 8px;
|
||||
|
59
.zshrc
59
.zshrc
@@ -1,6 +1,6 @@
|
||||
# ~/.zshrc file for zsh interactive shells.
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
eval "$(rbenv init - zsh)"
|
||||
|
||||
# set -o vi
|
||||
|
||||
@@ -33,8 +33,8 @@ bindkey '^[[F' end-of-line # end
|
||||
bindkey '^[[Z' undo # shift + tab undo last action
|
||||
|
||||
# enable completion features
|
||||
autoload -Uz compinit
|
||||
compinit -d ~/.cache/zcompdump
|
||||
# autoload -Uz compinit
|
||||
# compinit -d ~/.cache/zcompdump
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*' auto-description 'specify: %d'
|
||||
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
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
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_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'
|
||||
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.
|
||||
if [ -f ~/.zsh_aliases ]; then
|
||||
. ~/.zsh_aliases
|
||||
fi
|
||||
[ -f ~/.aliases ] && . ~/.aliases
|
||||
|
||||
if [ -f ~/.zsh_exports ]; then
|
||||
. ~/.zsh_exports
|
||||
fi
|
||||
[ -f ~/.exports ] && . ~/.exports
|
||||
|
||||
if [ -f ~/.zsh_include ]; then
|
||||
. ~/.zsh_include
|
||||
fi
|
||||
[ -f ~/.include ] && . ~/.include
|
||||
|
||||
if [ -f ~/.zsh_profile ]; then
|
||||
. ~/.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
|
||||
[ -f ~/.profile ] && . ~/.profile
|
||||
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# 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