Config sway: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= Sway = | = Debian Sway = | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
sudo apt install | # installa sudo | ||
apt install sudo | |||
# installa i pacchetti audio e rebootta | |||
sudo apt install pulseaudio pavucontrol && /usr/sbin/reboot | |||
# installa i pacchetti base | |||
sudo apt install curl fping keepassxc opensnitch gimp gajim | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
# installa le dipendenze | |||
sudo apt install alacritty light sway swaybg swayimg swaylock waybar wofi fonts-font-awesome wdisplays | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='bash'> | |||
# copia il file di config di sway nella cartella .config dell'utente | |||
mkdir -p ~/.config/sway | mkdir -p ~/.config/sway | ||
cp /etc/sway/config ~/.config/sway/config | cp /etc/sway/config ~/.config/sway/config | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
# avvialo al login dell'utente | |||
echo -e "\n# Esegui sway al login\nexec sway\n" >> ~/.profile | echo -e "\n# Esegui sway al login\nexec sway\n" >> ~/.profile | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
# setta il font e sizeFont del terminale foot | |||
mkdir -p ~/.config/foot | mkdir -p ~/.config/foot | ||
echo -e "\n# Setta il font e sizeFont\nfont=monospace:size=14\n" > ~/.config/foot/foot.ini | echo -e "\n# Setta il font e sizeFont\nfont=monospace:size=14\n" > ~/.config/foot/foot.ini | ||
</syntaxhighlight> | |||
<syntaxhighlight lang='bash'> | |||
# Setta il PS1 nel .bashrc | |||
case "$TERM" in | |||
xterm*|rxvt*) | |||
PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" | |||
;; | |||
*) | |||
;; | |||
esac | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='bash'> | |||
##### ALIAS BASE ##### | |||
alias ls='ls --color=auto' | |||
alias ll='ls -lah' | |||
alias la='ls -la' | |||
alias l='ls -la' | |||
alias grep='grep --color=auto' | |||
alias fgrep='fgrep --color=auto' | |||
alias egrep='egrep --color=auto' | |||
alias upgrader='sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && flatpak update' | |||
##### ALTRI ALIAS ##### | |||
alias luce='sudo nano /sys/class/backlight/intel_backlight/brightness' | |||
alias mioip='curl https://wtfismyip.com/' | |||
alias activate='source .venv/bin/activate' | |||
alias dd='dd status=progress' | |||
alias cercami='sudo apt search' | |||
alias vorbisconverter='ffmpeg -i input.mp4 -vcodec libx264 -crf 23 -acodec libvorbis output.mp4' | |||
alias meteobo="curl wttr.in/bologna" | |||
alias guardo='exiftool' | |||
##### ALIAS RETE ##### | |||
alias fpingerz='fping -g 192.168.1.0/24 > scanrete; cat scanrete | grep alive ; rm scanrete' | |||
alias chtunn='/usr/bin/chtunn.sh' | |||
alias torbrowser="cd /home/$USER/tor-browser/; ./start-tor-browser.desktop; cd -" | |||
##### ALIAS X11 ##### | |||
#alias 2schermi='xrandr --output eDP-1 --primary --auto --output HDMI-2 --auto --above eDP-1' | |||
#alias 1schermo='xrandr --output eDP-1 --primary --auto --output HDMI-2 --off' | |||
##### ALIAS DEVUAN ##### | |||
#alias senable='read -p "Servizio da abilitare al boot: " servizio; ln -s /etc/rc3.d/init.d/"$servizio" S95"$servizio" | |||
# PATH | |||
export PATH=$PATH:/sbin:/usr/sbin | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 15:15, 11 August 2025
Debian Sway
# installa sudo
apt install sudo
# installa i pacchetti audio e rebootta
sudo apt install pulseaudio pavucontrol && /usr/sbin/reboot
# installa i pacchetti base
sudo apt install curl fping keepassxc opensnitch gimp gajim
# installa le dipendenze
sudo apt install alacritty light sway swaybg swayimg swaylock waybar wofi fonts-font-awesome wdisplays
# copia il file di config di sway nella cartella .config dell'utente
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
# avvialo al login dell'utente
echo -e "\n# Esegui sway al login\nexec sway\n" >> ~/.profile
# setta il font e sizeFont del terminale foot
mkdir -p ~/.config/foot
echo -e "\n# Setta il font e sizeFont\nfont=monospace:size=14\n" > ~/.config/foot/foot.ini
# Setta il PS1 nel .bashrc
case "$TERM" in
xterm*|rxvt*)
PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]"
;;
*)
;;
esac
##### ALIAS BASE #####
alias ls='ls --color=auto'
alias ll='ls -lah'
alias la='ls -la'
alias l='ls -la'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias upgrader='sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && flatpak update'
##### ALTRI ALIAS #####
alias luce='sudo nano /sys/class/backlight/intel_backlight/brightness'
alias mioip='curl https://wtfismyip.com/'
alias activate='source .venv/bin/activate'
alias dd='dd status=progress'
alias cercami='sudo apt search'
alias vorbisconverter='ffmpeg -i input.mp4 -vcodec libx264 -crf 23 -acodec libvorbis output.mp4'
alias meteobo="curl wttr.in/bologna"
alias guardo='exiftool'
##### ALIAS RETE #####
alias fpingerz='fping -g 192.168.1.0/24 > scanrete; cat scanrete | grep alive ; rm scanrete'
alias chtunn='/usr/bin/chtunn.sh'
alias torbrowser="cd /home/$USER/tor-browser/; ./start-tor-browser.desktop; cd -"
##### ALIAS X11 #####
#alias 2schermi='xrandr --output eDP-1 --primary --auto --output HDMI-2 --auto --above eDP-1'
#alias 1schermo='xrandr --output eDP-1 --primary --auto --output HDMI-2 --off'
##### ALIAS DEVUAN #####
#alias senable='read -p "Servizio da abilitare al boot: " servizio; ln -s /etc/rc3.d/init.d/"$servizio" S95"$servizio"
# PATH
export PATH=$PATH:/sbin:/usr/sbin