Dev
17
.bashrc
@ -36,6 +36,8 @@ alias dot="cd ~/dotfiles"
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
alias Qtile='startx'
|
alias Qtile='startx'
|
||||||
|
alias QtileWayland='qtile start -b wayland'
|
||||||
|
# Hyprland with Hyprland
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# GIT
|
# GIT
|
||||||
@ -54,7 +56,6 @@ alias gcheck="git checkout"
|
|||||||
# SCRIPTS
|
# SCRIPTS
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
alias wallp='~/dotfiles/scripts/updatewal.sh'
|
|
||||||
alias gr='python ~/dotfiles/scripts/growthrate.py'
|
alias gr='python ~/dotfiles/scripts/growthrate.py'
|
||||||
alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
|
alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
|
||||||
alias chat='python ~/mychatgpt/mychatgpt.py'
|
alias chat='python ~/mychatgpt/mychatgpt.py'
|
||||||
@ -111,7 +112,17 @@ eval "$(starship init bash)"
|
|||||||
cat ~/.cache/wal/sequences
|
cat ~/.cache/wal/sequences
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# PFETCH
|
# PFETCH if on wm
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
echo ""
|
echo ""
|
||||||
pfetch
|
if [[ $(tty) == *"pts"* ]]; then
|
||||||
|
pfetch
|
||||||
|
else
|
||||||
|
if [ -f /bin/qtile ]; then
|
||||||
|
echo "Start Qtile X11 with command Qtile"
|
||||||
|
echo "Start Qtile Wayland with command QtileWayland"
|
||||||
|
fi
|
||||||
|
if [ -f /bin/hyprctl ]; then
|
||||||
|
echo "Start Hyprland with command Hyprland"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
46
.install/backup.sh
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Backup existing dotfiles
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
datets=$(date '+%Y%m%d%H%M%S')
|
||||||
|
if [ -d ~/dotfiles ]; then
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _
|
||||||
|
| __ ) __ _ ___| | ___ _ _ __
|
||||||
|
| _ \ / _` |/ __| |/ / | | | '_ \
|
||||||
|
| |_) | (_| | (__| <| |_| | |_) |
|
||||||
|
|____/ \__,_|\___|_|\_\\__,_| .__/
|
||||||
|
|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder ~/dotfiles-versions/backups/$datets"
|
||||||
|
echo ""
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to proceed? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
echo "-> Preparing dotfiles"
|
||||||
|
if [ ! -d ~/dotfiles-versions ]; then
|
||||||
|
mkdir ~/dotfiles-versions
|
||||||
|
fi
|
||||||
|
if [ ! -d ~/dotfiles-versions/backups ]; then
|
||||||
|
mkdir ~/dotfiles-versions/backups
|
||||||
|
fi
|
||||||
|
if [ -d ~/dotfiles ]; then
|
||||||
|
cp -r ~/dotfiles ~/dotfiles-versions/backups/$datets
|
||||||
|
echo "Backup of your current dotfiles in ~/dotfiles-versions/backups/$datets created."
|
||||||
|
fi
|
||||||
|
if [ -f ~/.bashrc ]; then
|
||||||
|
cp ~/.bashrc ~/dotfiles-versions/backups/$datets/.bashrc-old
|
||||||
|
echo "Existing .bashrc file found in homefolder. .bashrc-old created"
|
||||||
|
fi
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
fi
|
19
.install/bashrc.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install .bashrc
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
echo "-> Install .bashrc"
|
||||||
|
echo "PLEASE BACKUP YOUR .bashrc file in case you want to keep your local configuration and aliases."
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to install the .bashrc file? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
echo "Installation skipped."
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
11
.install/config-folder.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Create .config folder
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -d ~/.config ]; then
|
||||||
|
echo ".config folder already exists."
|
||||||
|
else
|
||||||
|
mkdir ~/.config
|
||||||
|
echo ".config folder created."
|
||||||
|
fi
|
||||||
|
echo ""
|
34
.install/confirm-start.sh
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Confirm Start
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
echo "IMPORTANT: Please make sure that your system and your packages are up to date."
|
||||||
|
echo "You can cancel the installation at any time with CMD + C"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
SCRIPT=$(realpath "$0")
|
||||||
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||||
|
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
|
||||||
|
echo "IMPORTANT: You're running the installation script from the installation target directory."
|
||||||
|
echo "Please move the installation folder dotfiles e.g. to ~/Downloads/ and start the script again."
|
||||||
|
echo "Proceeding is not recommended!"
|
||||||
|
echo ""
|
||||||
|
if [ ! $mode == "dev" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
echo "Installation started."
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
echo "Installation canceled."
|
||||||
|
exit;
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
40
.install/copy.sh
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Copy dotfiles
|
||||||
|
# ------------------------------------------------------
|
||||||
|
cat <<"EOF"
|
||||||
|
___ _ _ _ _ _ __ _ _
|
||||||
|
|_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___
|
||||||
|
| || '_ \/ __| __/ _` | | | / _` |/ _ \| __| |_| | |/ _ \/ __|
|
||||||
|
| || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \
|
||||||
|
|___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
echo "The script will now remove existing directories and files from ~/.config/"
|
||||||
|
echo "and copy your prepared configuration from ~/dotfiles-versions/$version to ~/dotfiles"
|
||||||
|
echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory."
|
||||||
|
echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS IF NEEDED in .config"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to install the dotfiles now? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
if [ ! $mode == "dev" ]; then
|
||||||
|
echo "Copy started"
|
||||||
|
if [ ! -d ~/dotfiles ]; then
|
||||||
|
mkdir ~/dotfiles
|
||||||
|
fi
|
||||||
|
cp -rf ~/dotfiles-versions/$version/. ~/dotfiles/
|
||||||
|
else
|
||||||
|
echo "Skipped: DEV MODE!"
|
||||||
|
fi
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
exit
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
|
54
.install/disabledm.sh
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Disable display manager
|
||||||
|
# ------------------------------------------------------
|
||||||
|
disman=0
|
||||||
|
if [ -f /etc/systemd/system/display-manager.service ]; then
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
___ _ _
|
||||||
|
|_ _|_ __ ___ _ __ ___ _ __| |_ __ _ _ __ | |_
|
||||||
|
| || '_ ` _ \| '_ \ / _ \| '__| __/ _` | '_ \| __|
|
||||||
|
| || | | | | | |_) | (_) | | | || (_| | | | | |_
|
||||||
|
|___|_| |_| |_| .__/ \___/|_| \__\__,_|_| |_|\__|
|
||||||
|
|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "An active display manager has been dedected."
|
||||||
|
echo ""
|
||||||
|
if [ $profile == "Hyprland" ]; then
|
||||||
|
echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyperland is recommended."
|
||||||
|
echo "Login with display managers could fail and could have negative side effects on some devices."
|
||||||
|
fi
|
||||||
|
if [ $profile == "Qtile" ]; then
|
||||||
|
echo "PLEASE NOTE: Qtile works with Display Managers."
|
||||||
|
echo "But if you want to use the tty based (terminal) login instead, you can disable the display manager now."
|
||||||
|
fi
|
||||||
|
if [ $profile == "All" ]; then
|
||||||
|
echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyperland is recommended."
|
||||||
|
echo "Login with display managers could fail and could have negative side effects on some devices."
|
||||||
|
echo "PLEASE NOTE: Qtile works with Display Managers."
|
||||||
|
echo "But if you want to use the tty based (terminal) login instead, you can disable the display manager now."
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to deactive the current display manager (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
if [ -f /etc/systemd/system/display-manager.service ]; then
|
||||||
|
sudo rm /etc/systemd/system/display-manager.service
|
||||||
|
echo "Current display manager removed."
|
||||||
|
fi
|
||||||
|
disman=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
echo "Disable display manager skipped."
|
||||||
|
echo "You can run ~/dotfiles/hypr/script/disablewm.sh at a later point of time if needed."
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
disman=1
|
||||||
|
fi
|
7
.install/done.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# DONE
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
echo "DONE!"
|
||||||
|
echo "IMPORTANT: Please logout and reboot your system!"
|
||||||
|
echo ""
|
23
.install/hyprland-dotfiles.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install dotfiles
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if [ ! $mode == "dev" ]; then
|
||||||
|
_installSymLink alacritty ~/.config/alacritty ~/dotfiles/alacritty/ ~/.config
|
||||||
|
_installSymLink vim ~/.config/vim ~/dotfiles/vim/ ~/.config
|
||||||
|
_installSymLink nvim ~/.config/nvim ~/dotfiles/nvim/ ~/.config
|
||||||
|
_installSymLink starship ~/.config/starship.toml ~/dotfiles/starship/starship.toml ~/.config/starship.toml
|
||||||
|
_installSymLink rofi ~/.config/rofi ~/dotfiles/rofi/ ~/.config
|
||||||
|
_installSymLink dunst ~/.config/dunst ~/dotfiles/dunst/ ~/.config
|
||||||
|
_installSymLink hypr ~/.config/hypr ~/dotfiles/hypr/ ~/.config
|
||||||
|
_installSymLink waybar ~/.config/waybar ~/dotfiles/waybar/ ~/.config
|
||||||
|
_installSymLink swaylock ~/.config/swaylock ~/dotfiles/swaylock/ ~/.config
|
||||||
|
_installSymLink wlogout ~/.config/wlogout ~/dotfiles/wlogout/ ~/.config
|
||||||
|
_installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config
|
||||||
|
_installSymLink .gtkrc-2.0 ~/.gtkrc-2.0 ~/dotfiles/gtk/.gtkrc-2.0 ~/.gtkrc-2.0
|
||||||
|
_installSymLink .Xresources ~/.Xresources ~/dotfiles/gtk/.Xresources ~/.Xresources
|
||||||
|
_installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/
|
||||||
|
_installSymLink gtk-4.0 ~/.config/gtk-4.0 ~/dotfiles/gtk/gtk-4.0/ ~/.config/
|
||||||
|
else
|
||||||
|
echo "Skipped: DEV MODE!"
|
||||||
|
fi
|
55
.install/hyprland-packages.sh
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
packagesPacman=(
|
||||||
|
"pacman-contrib"
|
||||||
|
"wget"
|
||||||
|
"unzip"
|
||||||
|
"alacritty"
|
||||||
|
"rofi"
|
||||||
|
"chromium"
|
||||||
|
"dunst"
|
||||||
|
"starship"
|
||||||
|
"neovim"
|
||||||
|
"mpv"
|
||||||
|
"freerdp"
|
||||||
|
"xfce4-power-manager"
|
||||||
|
"thunar"
|
||||||
|
"mousepad"
|
||||||
|
"ttf-font-awesome"
|
||||||
|
"ttf-fira-sans"
|
||||||
|
"ttf-fira-code"
|
||||||
|
"ttf-firacode-nerd"
|
||||||
|
"figlet"
|
||||||
|
"vlc"
|
||||||
|
"exa"
|
||||||
|
"python-pip"
|
||||||
|
"python-psutil"
|
||||||
|
"python-rich"
|
||||||
|
"python-click"
|
||||||
|
"pavucontrol"
|
||||||
|
"tumbler"
|
||||||
|
"xautolock"
|
||||||
|
"blueman"
|
||||||
|
"papirus-icon-theme"
|
||||||
|
"polkit-gnome"
|
||||||
|
"hyprland"
|
||||||
|
"xdg-desktop-portal"
|
||||||
|
"xdg-desktop-portal-wlr"
|
||||||
|
"waybar"
|
||||||
|
"grim"
|
||||||
|
"slurp"
|
||||||
|
"swayidle"
|
||||||
|
"swappy"
|
||||||
|
"cliphist"
|
||||||
|
"qalculate-gtk"
|
||||||
|
"brightnessctl"
|
||||||
|
);
|
||||||
|
|
||||||
|
packagesYay=(
|
||||||
|
"brave-bin"
|
||||||
|
"pfetch"
|
||||||
|
"bibata-cursor-theme"
|
||||||
|
"trizen"
|
||||||
|
"swww"
|
||||||
|
"swaylock-effects"
|
||||||
|
"wlogout"
|
||||||
|
"wlr-randr"
|
||||||
|
);
|
9
.install/hyprland.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
cat <<"EOF"
|
||||||
|
_ _ _ _
|
||||||
|
| | | |_ _ _ __ _ __| | __ _ _ __ __| |
|
||||||
|
| |_| | | | | '_ \| '__| |/ _` | '_ \ / _` |
|
||||||
|
| _ | |_| | |_) | | | | (_| | | | | (_| |
|
||||||
|
|_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
|
||||||
|
|___/|_|
|
||||||
|
|
||||||
|
EOF
|
8
.install/init-pywal.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# init pywal with default wallpaper
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
_installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config
|
||||||
|
wal -i ~/dotfiles/wallpapers/default.jpg
|
||||||
|
echo "Pywal and templates initiated!"
|
||||||
|
echo ""
|
17
.install/install-packages.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install required packages
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
___ _ _ _ _
|
||||||
|
|_ _|_ __ ___| |_ __ _| | | _ __ __ _ ___| | ____ _ __ _ ___ ___
|
||||||
|
| || '_ \/ __| __/ _` | | | | '_ \ / _` |/ __| |/ / _` |/ _` |/ _ \/ __|
|
||||||
|
| || | | \__ \ || (_| | | | | |_) | (_| | (__| < (_| | (_| | __/\__ \
|
||||||
|
|___|_| |_|___/\__\__,_|_|_| | .__/ \__,_|\___|_|\_\__,_|\__, |\___||___/
|
||||||
|
|_| |___/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
_installPackagesPacman "${packagesPacman[@]}";
|
||||||
|
_installPackagesYay "${packagesYay[@]}";
|
||||||
|
echo ""
|
28
.install/issue.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install tty login and issue
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if [ $disman == 1 ]; then
|
||||||
|
cat <<"EOF"
|
||||||
|
_____ _______ __ _ _
|
||||||
|
|_ _|_ _\ \ / / | | ___ __ _(_)_ __
|
||||||
|
| | | | \ V / | |/ _ \ / _` | | '_ \
|
||||||
|
| | | | | | | | (_) | (_| | | | | |
|
||||||
|
|_| |_| |_| |_|\___/ \__, |_|_| |_|
|
||||||
|
|___/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to install the custom tty login issue (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
sudo cp login/issue /etc/issue
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
echo "Setup tty login skipped."
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
fi
|
@ -54,7 +54,7 @@ _installPackagesPacman() {
|
|||||||
return;
|
return;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
printf "Packages not installed:\n%s\n" "${toInstall[@]}";
|
printf "Package not installed:\n%s\n" "${toInstall[@]}";
|
||||||
sudo pacman --noconfirm -S "${toInstall[@]}";
|
sudo pacman --noconfirm -S "${toInstall[@]}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ _installPackagesYay() {
|
|||||||
return;
|
return;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
printf "AUR ackages not installed:\n%s\n" "${toInstall[@]}";
|
printf "AUR packags not installed:\n%s\n" "${toInstall[@]}";
|
||||||
yay --noconfirm -S "${toInstall[@]}";
|
yay --noconfirm -S "${toInstall[@]}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,40 +89,24 @@ _installSymLink() {
|
|||||||
linksource="$3";
|
linksource="$3";
|
||||||
linktarget="$4";
|
linktarget="$4";
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "DO YOU WANT TO INSTALL ${name}? (Existing dotfiles will be removed!) (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
if [ -L "${symlink}" ]; then
|
if [ -L "${symlink}" ]; then
|
||||||
rm ${symlink}
|
rm ${symlink}
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink ${linksource} -> ${linktarget} created."
|
echo "Symlink ${linksource} -> ${linktarget} created."
|
||||||
echo ""
|
|
||||||
else
|
else
|
||||||
if [ -d ${symlink} ]; then
|
if [ -d ${symlink} ]; then
|
||||||
rm -rf ${symlink}/
|
rm -rf ${symlink}/
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink for directory ${linksource} -> ${linktarget} created."
|
echo "Symlink for directory ${linksource} -> ${linktarget} created."
|
||||||
echo ""
|
|
||||||
else
|
else
|
||||||
if [ -f ${symlink} ]; then
|
if [ -f ${symlink} ]; then
|
||||||
rm ${symlink}
|
rm ${symlink}
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink to file ${linksource} -> ${linktarget} created."
|
echo "Symlink to file ${linksource} -> ${linktarget} created."
|
||||||
echo ""
|
|
||||||
else
|
else
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "New symlink ${linksource} -> ${linktarget} created."
|
echo "New symlink ${linksource} -> ${linktarget} created."
|
||||||
echo ""
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
echo ""
|
|
||||||
# exit;
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
}
|
68
.install/preparation.sh
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Prepare dotfiles
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _ _
|
||||||
|
| _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __
|
||||||
|
| |_) | '__/ _ \ '_ \ / _` | '__/ _` | __| |/ _ \| '_ \
|
||||||
|
| __/| | | __/ |_) | (_| | | | (_| | |_| | (_) | | | |
|
||||||
|
|_| |_| \___| .__/ \__,_|_| \__,_|\__|_|\___/|_| |_|
|
||||||
|
|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Preparing temporary folders for the installation."
|
||||||
|
echo ""
|
||||||
|
if [ ! -d ~/dotfiles-versions ]; then
|
||||||
|
mkdir ~/dotfiles-versions
|
||||||
|
echo "~/dotfiles-versions folder created."
|
||||||
|
fi
|
||||||
|
if [ ! -d ~/dotfiles-versions/$version ]; then
|
||||||
|
mkdir ~/dotfiles-versions/$version
|
||||||
|
echo "~/dotfiles-versions/$version folder created."
|
||||||
|
else
|
||||||
|
echo "The folder ~/dotfiles-versions/$version already exists."
|
||||||
|
echo "Do you want to create a clean build of version $version and "
|
||||||
|
while true; do
|
||||||
|
read -p "and replace all files? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
rm -fr ~/dotfiles-versions/$version
|
||||||
|
mkdir ~/dotfiles-versions/$version
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
cp -rf . ~/dotfiles-versions/$version/
|
||||||
|
|
||||||
|
if [ -d ~/dotfiles-versions/$version/.git ]; then
|
||||||
|
rm -rf ~/dotfiles-versions/$version/.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/dotfiles-versions/$version/.gitignore ]; then
|
||||||
|
rm ~/dotfiles-versions/$version/.gitignore
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/dotfiles-versions/$version/CHANGELOG ]; then
|
||||||
|
rm ~/dotfiles-versions/$version/CHANGELOG
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/dotfiles-versions/$version/README.md ]; then
|
||||||
|
rm ~/dotfiles-versions/$version/README.md
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/dotfiles-versions/$version/install.sh ]; then
|
||||||
|
rm ~/dotfiles-versions/$version/install.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ~/dotfiles-versions/$version/.install ]; then
|
||||||
|
rm -rf ~/dotfiles-versions/$version/.install
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/"
|
||||||
|
echo ""
|
42
.install/profile.sh
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Select installation profile
|
||||||
|
# ------------------------------------------------------
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _ _ ____ __ _ _
|
||||||
|
| _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___
|
||||||
|
| | | |/ _ \/ __| |/ / __/ _ \| '_ \ | |_) | '__/ _ \| |_| | |/ _ \
|
||||||
|
| |_| | __/\__ \ <| || (_) | |_) | | __/| | | (_) | _| | | __/
|
||||||
|
|____/ \___||___/_|\_\\__\___/| .__/ |_| |_| \___/|_| |_|_|\___|
|
||||||
|
|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Please select the Desktop Profile for your installation:"
|
||||||
|
echo "1 - Hyprland"
|
||||||
|
echo "2 - Qtile"
|
||||||
|
echo "3 - All"
|
||||||
|
echo "Nn - Cancel"
|
||||||
|
echo ""
|
||||||
|
while true; do
|
||||||
|
read -p "PLEASE SELECT: " yn
|
||||||
|
case $yn in
|
||||||
|
[1]* )
|
||||||
|
profile="Hyprland"
|
||||||
|
break;;
|
||||||
|
[2]* )
|
||||||
|
profile="Qtile"
|
||||||
|
break;;
|
||||||
|
[3]* )
|
||||||
|
profile="All"
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
echo "Installation canceled."
|
||||||
|
exit;
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
echo "Installing profile $profile ..."
|
||||||
|
sleep 2
|
||||||
|
echo ""
|
21
.install/pywal.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install pywal
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
___ _ _ _ _
|
||||||
|
|_ _|_ __ ___| |_ __ _| | | _ __ _ ___ ____ _| |
|
||||||
|
| || '_ \/ __| __/ _` | | | | '_ \| | | \ \ /\ / / _` | |
|
||||||
|
| || | | \__ \ || (_| | | | | |_) | |_| |\ V V / (_| | |
|
||||||
|
|___|_| |_|___/\__\__,_|_|_| | .__/ \__, | \_/\_/ \__,_|_|
|
||||||
|
|_| |___/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -f /usr/bin/wal ]; then
|
||||||
|
echo "pywal already installed."
|
||||||
|
else
|
||||||
|
yay --noconfirm -S pywal
|
||||||
|
echo "Pywal installed."
|
||||||
|
fi
|
||||||
|
echo ""
|
23
.install/qtile-dotfiles.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install dotfiles
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if [ ! $mode == "dev" ]; then
|
||||||
|
_installSymLink alacritty ~/.config/alacritty ~/dotfiles/alacritty/ ~/.config
|
||||||
|
_installSymLink vim ~/.config/vim ~/dotfiles/vim/ ~/.config
|
||||||
|
_installSymLink nvim ~/.config/nvim ~/dotfiles/nvim/ ~/.config
|
||||||
|
_installSymLink starship ~/.config/starship.toml ~/dotfiles/starship/starship.toml ~/.config/starship.toml
|
||||||
|
_installSymLink rofi ~/.config/rofi ~/dotfiles/rofi/ ~/.config
|
||||||
|
_installSymLink dunst ~/.config/dunst ~/dotfiles/dunst/ ~/.config
|
||||||
|
_installSymLink qtile ~/.config/qtile ~/dotfiles/qtile/ ~/.config
|
||||||
|
_installSymLink polybar ~/.config/polybar ~/dotfiles/polybar/ ~/.config
|
||||||
|
_installSymLink picom ~/.config/picom ~/dotfiles/picom/ ~/.config
|
||||||
|
_installSymLink .xinitrc ~/.xinitrc ~/dotfiles/qtile/.xinitrc ~/.xinitrc
|
||||||
|
_installSymLink swaylock ~/.config/swaylock ~/dotfiles/swaylock/ ~/.config
|
||||||
|
_installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config
|
||||||
|
_installSymLink .gtkrc-2.0 ~/.gtkrc-2.0 ~/dotfiles/gtk/.gtkrc-2.0 ~/.gtkrc-2.0
|
||||||
|
_installSymLink .Xresources ~/.Xresources ~/dotfiles/gtk/.Xresources ~/.Xresources
|
||||||
|
_installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/
|
||||||
|
else
|
||||||
|
echo "Skipped: DEV MODE!"
|
||||||
|
fi
|
57
.install/qtile-packages.sh
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
packagesPacman=(
|
||||||
|
"pacman-contrib"
|
||||||
|
"wget"
|
||||||
|
"unzip"
|
||||||
|
"alacritty"
|
||||||
|
"rofi"
|
||||||
|
"chromium"
|
||||||
|
"nitrogen"
|
||||||
|
"dunst"
|
||||||
|
"starship"
|
||||||
|
"neovim"
|
||||||
|
"mpv"
|
||||||
|
"freerdp"
|
||||||
|
"xfce4-power-manager"
|
||||||
|
"thunar"
|
||||||
|
"mousepad"
|
||||||
|
"ttf-font-awesome"
|
||||||
|
"ttf-fira-sans"
|
||||||
|
"ttf-fira-code"
|
||||||
|
"ttf-firacode-nerd"
|
||||||
|
"figlet"
|
||||||
|
"vlc"
|
||||||
|
"exa"
|
||||||
|
"python-pip"
|
||||||
|
"python-psutil"
|
||||||
|
"python-rich"
|
||||||
|
"python-click"
|
||||||
|
"xdg-desktop-portal"
|
||||||
|
"xdg-desktop-portal-gtk"
|
||||||
|
"pavucontrol"
|
||||||
|
"tumbler"
|
||||||
|
"xautolock"
|
||||||
|
"blueman"
|
||||||
|
"papirus-icon-theme"
|
||||||
|
"polkit-gnome"
|
||||||
|
"qtile"
|
||||||
|
"polybar"
|
||||||
|
"picom"
|
||||||
|
"scrot"
|
||||||
|
"slock"
|
||||||
|
"grim"
|
||||||
|
"slurp"
|
||||||
|
"swappy"
|
||||||
|
"cliphist"
|
||||||
|
"qalculate-gtk"
|
||||||
|
"brightnessctl"
|
||||||
|
);
|
||||||
|
|
||||||
|
packagesYay=(
|
||||||
|
"brave-bin"
|
||||||
|
"pfetch"
|
||||||
|
"bibata-cursor-theme"
|
||||||
|
"trizen"
|
||||||
|
"swww"
|
||||||
|
"qtile-extras"
|
||||||
|
"wlr-randr"
|
||||||
|
);
|
8
.install/qtile.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
cat <<"EOF"
|
||||||
|
___ _ _ _
|
||||||
|
/ _ \| |_(_) | ___
|
||||||
|
| | | | __| | |/ _ \
|
||||||
|
| |_| | |_| | | __/
|
||||||
|
\__\_\\__|_|_|\___|
|
||||||
|
|
||||||
|
EOF
|
112
.install/restore.sh
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Restore
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -d ~/dotfiles ]; then
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _
|
||||||
|
| _ \ ___ ___| |_ ___ _ __ ___
|
||||||
|
| |_) / _ \/ __| __/ _ \| '__/ _ \
|
||||||
|
| _ < __/\__ \ || (_) | | | __/
|
||||||
|
|_| \_\___||___/\__\___/|_| \___|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "The script will try to restore existing configurations."
|
||||||
|
echo "PLEASE NOTE: Restoring is not possible with version < 2.5 of the dotfiles."
|
||||||
|
echo "Keyboard layout can be defined manually in the next step."
|
||||||
|
echo ""
|
||||||
|
restored=0
|
||||||
|
|
||||||
|
if [ -f ~/dotfiles/.bashrc ]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Found existing ~/dotfiles/.bashrc Restore? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
cp ~/dotfiles/.bashrc ~/dotfiles-versions/$version/
|
||||||
|
echo "Restored!"
|
||||||
|
restored=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then
|
||||||
|
if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Found existing ~/dotfiles/hypr/conf/keyboard.conf Restore? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
cp ~/dotfiles/hypr/conf/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||||
|
echo "Restored!"
|
||||||
|
restored=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $profile = "Hyprland" ] || [ $profile == "All" ]; then
|
||||||
|
if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Found existing ~/dotfiles/hypr/conf/monitor.conf Restore? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
cp ~/dotfiles/hypr/conf/monitor.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||||
|
echo "Restored!"
|
||||||
|
restored=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then
|
||||||
|
if [ -f ~/dotfiles/hypr/conf/keybindings.conf ]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Found existing ~/dotfiles/hypr/conf/keybindings.conf Restore? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
cp ~/dotfiles/hypr/conf/keybindings.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||||
|
echo "Restored!"
|
||||||
|
restored=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $profile == "Qtile" ] || [ $profile == "All" ]; then
|
||||||
|
if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then
|
||||||
|
while true; do
|
||||||
|
read -p "Found existing ~/dotfiles/qtile/conf/keyboard.py Restore? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
cp ~/dotfiles/qtile/conf/keyboard.py ~/dotfiles-versions/$version/qtile/conf/
|
||||||
|
echo "Restored!"
|
||||||
|
restored=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $restored == 0 ]; then
|
||||||
|
echo "Restore not possible."
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
fi
|
35
.install/setup.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Setup
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _
|
||||||
|
/ ___| ___| |_ _ _ _ __
|
||||||
|
\___ \ / _ \ __| | | | '_ \
|
||||||
|
___) | __/ |_| |_| | |_) |
|
||||||
|
|____/ \___|\__|\__,_| .__/
|
||||||
|
|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
echo "If you could restore your keyboard layout in the step before you can select Nn and skip."
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to start the setup (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
read -p "Enter your preferred keyboard layout (us,de,...) (default:us): " keyboard
|
||||||
|
if [ -z "$keyboard" ]; then
|
||||||
|
keyboard="us"
|
||||||
|
fi
|
||||||
|
SEARCH="kb_layout = de"
|
||||||
|
REPLACE="kb_layout = $keyboard"
|
||||||
|
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||||
|
|
||||||
|
SEARCH="keyboard_layout = \"de\""
|
||||||
|
REPLACE="keyboard_layout = \"$keyboard\""
|
||||||
|
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/conf/keyboard.py
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
46
.install/wallpaper.sh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Install wallpapers
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
__ __ _ _
|
||||||
|
\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___
|
||||||
|
\ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__/ __|
|
||||||
|
\ V V / (_| | | | |_) | (_| | |_) | __/ | \__ \
|
||||||
|
\_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| |___/
|
||||||
|
|_| |_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?"
|
||||||
|
while true; do
|
||||||
|
read -p "If not, the script will install 3 default wallpapers to ~/wallpaper/ (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/wallpaper/-/archive/main/wallpaper-main.zip
|
||||||
|
unzip -o ~/Downloads/wallpaper-main.zip -d ~/Downloads/
|
||||||
|
if [ ! -d ~/wallpaper/ ]; then
|
||||||
|
mkdir ~/wallpaper
|
||||||
|
fi
|
||||||
|
cp ~/Downloads/wallpaper-main/* ~/wallpaper/
|
||||||
|
echo "Wallpapers installed successfully."
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
if [ -d ~/wallpaper/ ]; then
|
||||||
|
echo "wallpaper folder already exists."
|
||||||
|
else
|
||||||
|
mkdir ~/wallpaper
|
||||||
|
fi
|
||||||
|
cp wallpapers/* ~/wallpaper
|
||||||
|
echo "Default wallpapers installed."
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# ------------------------------------------------------
|
||||||
|
# Copy default wallpaper to .cache
|
||||||
|
# ------------------------------------------------------
|
||||||
|
cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg
|
||||||
|
echo ""
|
19
.install/yay.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# ------------------------------------------------------
|
||||||
|
# Check if yay is installed
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
if sudo pacman -Qs yay > /dev/null ; then
|
||||||
|
echo "yay is already installed!"
|
||||||
|
else
|
||||||
|
echo "yay is not installed. Will be installed now!"
|
||||||
|
_installPackagesPacman "base-devel"
|
||||||
|
SCRIPT=$(realpath "$0")
|
||||||
|
temp_path=$(dirname "$SCRIPT")
|
||||||
|
echo $temp_path
|
||||||
|
git clone https://aur.archlinux.org/yay-git.git ~/yay-git
|
||||||
|
cd ~/yay-git
|
||||||
|
makepkg -si
|
||||||
|
cd $temp_path
|
||||||
|
echo "yay has been installed successfully."
|
||||||
|
fi
|
||||||
|
echo ""
|
213
1-install.sh
@ -1,213 +0,0 @@
|
|||||||
#/bin/bash
|
|
||||||
# ___ _ _ _
|
|
||||||
# |_ _|_ __ ___| |_ __ _| | |
|
|
||||||
# | || '_ \/ __| __/ _` | | |
|
|
||||||
# | || | | \__ \ || (_| | | |
|
|
||||||
# |___|_| |_|___/\__\__,_|_|_|
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
# Install Script for required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Load Library
|
|
||||||
# ------------------------------------------------------
|
|
||||||
source $(dirname "$0")/scripts/library.sh
|
|
||||||
clear
|
|
||||||
echo " ___ _ _ _ "
|
|
||||||
echo " |_ _|_ __ ___| |_ __ _| | | "
|
|
||||||
echo " | || _ \/ __| __/ _ | | | "
|
|
||||||
echo " | || | | \__ \ || (_| | | | "
|
|
||||||
echo " |___|_| |_|___/\__\__,_|_|_| "
|
|
||||||
echo " "
|
|
||||||
echo "by Stephan Raabe (2023)"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Check if yay is installed
|
|
||||||
# ------------------------------------------------------
|
|
||||||
if sudo pacman -Qs yay > /dev/null ; then
|
|
||||||
echo "yay is installed. You can proceed with the installation"
|
|
||||||
else
|
|
||||||
echo "yay is not installed. Will be installed now!"
|
|
||||||
_installPackagesPacman "base-devel"
|
|
||||||
git clone https://aur.archlinux.org/yay-git.git ~/yay-git
|
|
||||||
cd ~/yay-git
|
|
||||||
makepkg -si
|
|
||||||
cd ~/dotfiles/
|
|
||||||
clear
|
|
||||||
echo "yay has been installed successfully."
|
|
||||||
echo ""
|
|
||||||
echo " ___ _ _ _ "
|
|
||||||
echo " |_ _|_ __ ___| |_ __ _| | | "
|
|
||||||
echo " | || _ \/ __| __/ _ | | | "
|
|
||||||
echo " | || | | \__ \ || (_| | | | "
|
|
||||||
echo " |___|_| |_|___/\__\__,_|_|_| "
|
|
||||||
echo " "
|
|
||||||
echo "by Stephan Raabe (2023)"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Confirm Start
|
|
||||||
# ------------------------------------------------------
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
echo "Installation started."
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
exit;
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install main packages"
|
|
||||||
|
|
||||||
packagesPacman=(
|
|
||||||
"pacman-contrib"
|
|
||||||
"alacritty"
|
|
||||||
"rofi"
|
|
||||||
"chromium"
|
|
||||||
"nitrogen"
|
|
||||||
"dunst"
|
|
||||||
"starship"
|
|
||||||
"neovim"
|
|
||||||
"mpv"
|
|
||||||
"freerdp"
|
|
||||||
"xfce4-power-manager"
|
|
||||||
"thunar"
|
|
||||||
"mousepad"
|
|
||||||
"ttf-font-awesome"
|
|
||||||
"ttf-fira-sans"
|
|
||||||
"ttf-fira-code"
|
|
||||||
"ttf-firacode-nerd"
|
|
||||||
"figlet"
|
|
||||||
"vlc"
|
|
||||||
"exa"
|
|
||||||
"python-pip"
|
|
||||||
"python-psutil"
|
|
||||||
"python-rich"
|
|
||||||
"python-click"
|
|
||||||
"xdg-desktop-portal-gtk"
|
|
||||||
"pavucontrol"
|
|
||||||
"tumbler"
|
|
||||||
"xautolock"
|
|
||||||
"blueman"
|
|
||||||
"sddm"
|
|
||||||
"papirus-icon-theme"
|
|
||||||
);
|
|
||||||
|
|
||||||
packagesYay=(
|
|
||||||
"brave-bin"
|
|
||||||
"pfetch"
|
|
||||||
"bibata-cursor-theme"
|
|
||||||
"trizen"
|
|
||||||
"sddm-sugar-dark"
|
|
||||||
);
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
_installPackagesPacman "${packagesPacman[@]}";
|
|
||||||
_installPackagesYay "${packagesYay[@]}";
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install pywal
|
|
||||||
# ------------------------------------------------------
|
|
||||||
if [ -f /usr/bin/wal ]; then
|
|
||||||
echo "pywal already installed."
|
|
||||||
else
|
|
||||||
yay --noconfirm -S pywal
|
|
||||||
fi
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install .bashrc
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install .bashrc"
|
|
||||||
|
|
||||||
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install sddm display manager
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install sddm display manager"
|
|
||||||
while true; do
|
|
||||||
read -p "Do you want to install the custom login promt? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
sudo systemctl enable sddm.service
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
echo "sddm installation skipped."
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install wallpapers
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install wallapers"
|
|
||||||
while true; do
|
|
||||||
read -p "Do you want to clone the wallpapers? If not, the script will install 3 default wallpapers to ~/wallpaper/ (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
if [ -d ~/wallpaper/ ]; then
|
|
||||||
echo "wallpaper folder already exists."
|
|
||||||
else
|
|
||||||
git clone https://gitlab.com/stephan-raabe/wallpaper.git ~/wallpaper
|
|
||||||
echo "wallpaper installed."
|
|
||||||
fi
|
|
||||||
echo "Wallpaper installed."
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
if [ -d ~/wallpaper/ ]; then
|
|
||||||
echo "wallpaper folder already exists."
|
|
||||||
else
|
|
||||||
mkdir ~/wallpaper
|
|
||||||
fi
|
|
||||||
cp ~/dotfiles/wallpapers/* ~/wallpaper
|
|
||||||
echo "Default wallpapers installed."
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Init pywal
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Init pywal"
|
|
||||||
wal -i ~/dotfiles/wallpapers/default.jpg
|
|
||||||
echo "pywal initiated."
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Copy default wallpaper to .cache
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Copy default wallpaper to .cache"
|
|
||||||
cp ~/dotfiles/wallpapers/default.jpg ~/.cache/current_wallpaper.jpg
|
|
||||||
echo "default wallpaper copied."
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# DONE
|
|
||||||
# ------------------------------------------------------
|
|
||||||
clear
|
|
||||||
echo "DONE!"
|
|
||||||
echo "NEXT: Please continue with 2-install-hyprland.sh and/or 2-install-qtile.sh"
|
|
@ -1,76 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _ _ _ _
|
|
||||||
# | | | |_ _ _ __ _ __| | __ _ _ __ __| |
|
|
||||||
# | |_| | | | | '_ \| '__| |/ _` | '_ \ / _` |
|
|
||||||
# | _ | |_| | |_) | | | | (_| | | | | (_| |
|
|
||||||
# |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
|
|
||||||
# |___/|_|
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
# Install Script for Hyprland
|
|
||||||
# ------------------------------------------------------
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Confirm Start
|
|
||||||
# ------------------------------------------------------
|
|
||||||
source $(dirname "$0")/scripts/library.sh
|
|
||||||
clear
|
|
||||||
echo " _ _ _ _ "
|
|
||||||
echo " | | | |_ _ _ __ _ __| | __ _ _ __ __| | "
|
|
||||||
echo " | |_| | | | | ,_ \| ,__| |/ _\ | ,_ \ / _, | "
|
|
||||||
echo " | _ | |_| | |_) | | | | (_| | | | | (_| | "
|
|
||||||
echo " |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_| "
|
|
||||||
echo " |___/|_| "
|
|
||||||
echo " "
|
|
||||||
echo "by Stephan Raabe (2023)"
|
|
||||||
echo "------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
echo "Installation started."
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
exit;
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install main packages"
|
|
||||||
packagesPacman=(
|
|
||||||
"hyprland"
|
|
||||||
"xdg-desktop-portal-wlr"
|
|
||||||
"waybar"
|
|
||||||
"grim"
|
|
||||||
"slurp"
|
|
||||||
"swayidle"
|
|
||||||
"swappy"
|
|
||||||
"cliphist"
|
|
||||||
);
|
|
||||||
|
|
||||||
packagesYay=(
|
|
||||||
"swww"
|
|
||||||
"swaylock-effects"
|
|
||||||
"wlogout"
|
|
||||||
);
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
_installPackagesPacman "${packagesPacman[@]}";
|
|
||||||
_installPackagesYay "${packagesYay[@]}";
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "DONE!"
|
|
||||||
echo "NEXT: Update the keyboard layout and screen resolution in ~/dotfiles/hypr/hyprland.conf"
|
|
||||||
echo "Then proceed with with 3-dotfiles.sh"
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ___ _____ ___ _ _____
|
|
||||||
# / _ \_ _|_ _| | | ____|
|
|
||||||
# | | | || | | || | | _|
|
|
||||||
# | |_| || | | || |___| |___
|
|
||||||
# \__\_\|_| |___|_____|_____|
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install Script for Qtile
|
|
||||||
# ------------------------------------------------------
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Confirm Start
|
|
||||||
# ------------------------------------------------------
|
|
||||||
source $(dirname "$0")/scripts/library.sh
|
|
||||||
clear
|
|
||||||
echo " ___ _____ ___ _ _____ "
|
|
||||||
echo " / _ \_ _|_ _| | | ____| "
|
|
||||||
echo "| | | || | | || | | _| "
|
|
||||||
echo "| |_| || | | || |___| |___ "
|
|
||||||
echo " \__\_\|_| |___|_____|_____| "
|
|
||||||
echo " "
|
|
||||||
echo "by Stephan Raabe (2023)"
|
|
||||||
echo "------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
echo "Installation started."
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
exit;
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Install main packages"
|
|
||||||
|
|
||||||
packagesPacman=(
|
|
||||||
"qtile"
|
|
||||||
"polybar"
|
|
||||||
"picom"
|
|
||||||
"scrot"
|
|
||||||
"slock"
|
|
||||||
);
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install required packages
|
|
||||||
# ------------------------------------------------------
|
|
||||||
_installPackagesPacman "${packagesPacman[@]}";
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "DONE!"
|
|
||||||
echo "NEXT: Update the keyboard layout and screen resolution in ~/dotfiles/qtile/autostart.sh"
|
|
||||||
echo "Then proceed with 3-dotfiles.sh"
|
|
120
3-dotfiles.sh
@ -1,120 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _ _ __ _ _
|
|
||||||
# __| | ___ | |_ / _(_) | ___ ___
|
|
||||||
# / _` |/ _ \| __| |_| | |/ _ \/ __|
|
|
||||||
# | (_| | (_) | |_| _| | | __/\__ \
|
|
||||||
# \__,_|\___/ \__|_| |_|_|\___||___/
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Install Script for dotfiles and configuration
|
|
||||||
# yay must be installed
|
|
||||||
# ------------------------------------------------------
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Load Library
|
|
||||||
# ------------------------------------------------------
|
|
||||||
source $(dirname "$0")/scripts/library.sh
|
|
||||||
clear
|
|
||||||
echo " _ _ __ _ _ "
|
|
||||||
echo " __| | ___ | |_ / _(_) | ___ ___ "
|
|
||||||
echo " / _' |/ _ \| __| |_| | |/ _ \/ __| "
|
|
||||||
echo "| (_| | (_) | |_| _| | | __/\__ \ "
|
|
||||||
echo " \__,_|\___/ \__|_| |_|_|\___||___/ "
|
|
||||||
echo " "
|
|
||||||
echo "by Stephan Raabe (2023)"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
echo "The script will ask for permission to remove existing directories and files from ~/.config/"
|
|
||||||
echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory."
|
|
||||||
echo "But you can decide to keep your personal versions by answering with No (Nn)."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Confirm Start
|
|
||||||
# ------------------------------------------------------
|
|
||||||
while true; do
|
|
||||||
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
echo "Installation started."
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
exit;
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Create .config folder
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo ""
|
|
||||||
echo "-> Check if .config folder exists"
|
|
||||||
|
|
||||||
if [ -d ~/.config ]; then
|
|
||||||
echo ".config folder already exists."
|
|
||||||
else
|
|
||||||
mkdir ~/.config
|
|
||||||
echo ".config folder created."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# Create symbolic links
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# name symlink source target
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo "-> Install general dotfiles"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
_installSymLink alacritty ~/.config/alacritty ~/dotfiles/alacritty/ ~/.config
|
|
||||||
_installSymLink ranger ~/.config/ranger ~/dotfiles/ranger/ ~/.config
|
|
||||||
_installSymLink vim ~/.config/vim ~/dotfiles/vim/ ~/.config
|
|
||||||
_installSymLink nvim ~/.config/nvim ~/dotfiles/nvim/ ~/.config
|
|
||||||
_installSymLink starship ~/.config/starship.toml ~/dotfiles/starship/starship.toml ~/.config/starship.toml
|
|
||||||
_installSymLink rofi ~/.config/rofi ~/dotfiles/rofi/ ~/.config
|
|
||||||
_installSymLink dunst ~/.config/dunst ~/dotfiles/dunst/ ~/.config
|
|
||||||
_installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config
|
|
||||||
|
|
||||||
wal -i wallpapers/
|
|
||||||
echo "Pywal templates initiated!"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo "-> Install GTK dotfiles"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
_installSymLink .gtkrc-2.0 ~/.gtkrc-2.0 ~/dotfiles/gtk/.gtkrc-2.0 ~/.gtkrc-2.0
|
|
||||||
_installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/
|
|
||||||
_installSymLink gtk-4.0 ~/.config/gtk-4.0 ~/dotfiles/gtk/gtk-4.0/ ~/.config/
|
|
||||||
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo "-> Install Qtile dotfiles"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
_installSymLink qtile ~/.config/qtile ~/dotfiles/qtile/ ~/.config
|
|
||||||
_installSymLink polybar ~/.config/polybar ~/dotfiles/polybar/ ~/.config
|
|
||||||
_installSymLink picom ~/.config/picom ~/dotfiles/picom/ ~/.config
|
|
||||||
_installSymLink .xinitrc ~/.xinitrc ~/dotfiles/qtile/.xinitrc ~/.xinitrc
|
|
||||||
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo "-> Install Hyprland dotfiles"
|
|
||||||
echo "-------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
_installSymLink hypr ~/.config/hypr ~/dotfiles/hypr/ ~/.config
|
|
||||||
_installSymLink waybar ~/.config/waybar ~/dotfiles/waybar/ ~/.config
|
|
||||||
_installSymLink swaylock ~/.config/swaylock ~/dotfiles/swaylock/ ~/.config
|
|
||||||
_installSymLink wlogout ~/.config/wlogout ~/dotfiles/wlogout/ ~/.config
|
|
||||||
_installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
|
||||||
# DONE
|
|
||||||
# ------------------------------------------------------
|
|
||||||
echo "DONE!"
|
|
||||||
echo "NEXT: Please logout and reboot your system!"
|
|
30
CHANGELOG
@ -1,3 +1,33 @@
|
|||||||
|
Version 2.5
|
||||||
|
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5
|
||||||
|
--------------------------------------------------------
|
||||||
|
Installation:
|
||||||
|
- Completely reworked script
|
||||||
|
- Can install Hyprland and/or Qtile
|
||||||
|
- Backup of existing dotfiles possible
|
||||||
|
- New optimized download of wallpapers from the repository
|
||||||
|
|
||||||
|
General:
|
||||||
|
- Script folder cleaned up and window manager scripts moved to related wm scripts folder
|
||||||
|
|
||||||
|
Hyprland:
|
||||||
|
- Show key bindings defined in ~/dotfiles/hypr/conf/keybindings.conf rofi menu. Opens with SUPER+CTRL+H or right click on Apps
|
||||||
|
- Added keybinding to toggle all windows to float and back to tiling (Doesn't work with web apps)
|
||||||
|
- Add brightness control for FN Brightness keys
|
||||||
|
- swww loading wallpaper from last session
|
||||||
|
- New Waybar Theme with blurred background
|
||||||
|
- Latest Waybar supports now persistent workspaces (set to 5 by default)
|
||||||
|
|
||||||
|
Qtile:
|
||||||
|
- Add wayland support
|
||||||
|
- New Qtile status bar theme (Qtile status bar is default theme)
|
||||||
|
- Status bar can be switch on X11 with SUPER + SHIFT + S between Qtile bar and Polybar
|
||||||
|
- swww/wal loading wallpaper from last session
|
||||||
|
- Add brightness control for FN Brightness keys
|
||||||
|
|
||||||
|
Known issues:
|
||||||
|
- GTK dark theme is not always working (e.g. on Qtile Wayland)
|
||||||
|
|
||||||
Version 2.4
|
Version 2.4
|
||||||
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.4
|
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.4
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------
|
||||||
|
74
README.md
@ -1,36 +1,38 @@
|
|||||||
# ML4W dotfiles
|
# ML4W dotfiles Version 2.5
|
||||||
|
|
||||||
This is my configuration of Hyprland (Wayland) and Qtile (Xorg).
|
This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland).
|
||||||
This package includes installation scripts to install and setup the required components.
|
This package includes an installation script to install and setup the required components.
|
||||||
|
|
||||||
The dotfiles are tested with Arch Linux, Manjaro Linux, EndeavourOS and Arco Linux.
|
The dotfiles are tested with Arch Linux, Manjaro Linux, EndeavourOS and Arco Linux.
|
||||||
|
|
||||||
## Common Packages
|
## General Packages
|
||||||
|
|
||||||
- Terminal: alacritty
|
- Terminal: alacritty
|
||||||
- Editor: nvim
|
- Editor: nvim
|
||||||
- Prompt: starship
|
- Prompt: starship
|
||||||
- Icons: Font Awesome
|
- Icons: Font Awesome
|
||||||
- Menus: Rofi
|
- Launch Menus: Rofi
|
||||||
- Colorscheme: pywal (dynamic)
|
- Colorscheme: pywal
|
||||||
- Browsers: chromium (brave optional)
|
- Browsers: chromium (brave optional)
|
||||||
- Filemanager: Thunar
|
- Filemanager: Thunar
|
||||||
- Cursor: Bibata Modern Ice
|
- Cursor: Bibata Modern Ice
|
||||||
- Icons: Papirus-Icon-Theme
|
- Icons: Papirus-Icon-Theme
|
||||||
- Virtual Machine: qemu (Windows 11 with looking glass and xrdp)
|
- Virtual Machine: qemu (Windows 11 with looking glass and xrdp)
|
||||||
|
|
||||||
## Hyprland
|
## Hyprland & Qtile Wayland
|
||||||
|
|
||||||
- Status Bar: waybar
|
- Status Bar: waybar
|
||||||
- Screenshots: grim & slurp
|
- Screenshots: grim & slurp
|
||||||
- Clipboard Manager: cliphist
|
- Clipboard Manager: cliphist
|
||||||
- Logout: wlogout
|
- Logout Hyprland: wlogout
|
||||||
|
- Logout Qtile: rofi power menu
|
||||||
- Screenlock: swaylock-effects
|
- Screenlock: swaylock-effects
|
||||||
|
- Qtile Bar: Qtile status bar
|
||||||
|
|
||||||
## Qtile
|
## Qtile X11
|
||||||
|
|
||||||
- Compositor: picom
|
- Compositor: picom
|
||||||
- Status Bar: polybar
|
- Status Bar: Qtile status bar + Polybar (optional)
|
||||||
- Screenshots: scrot
|
- Screenshots: scrot
|
||||||
|
|
||||||
## Templating
|
## Templating
|
||||||
@ -39,51 +41,55 @@ Hyprland & Qtile: Included is a pywal configuration that changes the color schem
|
|||||||
|
|
||||||
Hyprland: In addition, you can switch the Waybar Template with SUPER + CTRL + T or by pressing the "..." icon in Waybar. The templates are available in ~/dotfiles/waybar/themes. You can add your own personal themes into this folder. The script will read in the folder structure.
|
Hyprland: In addition, you can switch the Waybar Template with SUPER + CTRL + T or by pressing the "..." icon in Waybar. The templates are available in ~/dotfiles/waybar/themes. You can add your own personal themes into this folder. The script will read in the folder structure.
|
||||||
|
|
||||||
## Screenshots & Video
|
Qtile X11: In addition, you can switch between the Qtile status bar and Polybar with SUPER + SHIFT + S
|
||||||
|
|
||||||
|
## Screenshots Hyprland
|
||||||
|
|
||||||
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-5.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-6.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank">Watch on YouTube</a>
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank">Watch on YouTube</a>
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/screenshot-24-2.png" alt="Click to watch on YouTube" /></a>
|
## Screenshots Qtile X11
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/screenshot-24-3.png" alt="Click to watch on YouTube" /></a>
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-3.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/screenshot-24-4.png" alt="Click to watch on YouTube" /></a>
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-4.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/screenshot-24-1.png" alt="Click to watch on YouTube" /></a>
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank">Watch on YouTube</a>
|
||||||
|
|
||||||
|
## Screenshots Qtile Wayland
|
||||||
|
|
||||||
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-1.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank"><img src="screenshots/v25/screenshot-25-2.png" alt="Click to watch on YouTube" /></a>
|
||||||
|
|
||||||
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank">Watch on YouTube</a>
|
<a href="https://youtu.be/mJ9m18-7pQk" target="_blank">Watch on YouTube</a>
|
||||||
|
|
||||||
<b><a href="https://gitlab.com/stephan-raabe/dotfiles/-/tree/main/screenshots?ref_type=heads">You can find more screenshots here.</a></b>
|
<b><a href="https://gitlab.com/stephan-raabe/dotfiles/-/tree/main/screenshots?ref_type=heads">You can find more screenshots here.</a></b>
|
||||||
|
|
||||||
## Getting started
|
## Installation
|
||||||
|
|
||||||
To make it easy for you to get started with my dotfiles, here's a list of recommended next steps.
|
To make it easy for you to get started with my dotfiles, here's a list of recommended next steps.
|
||||||
|
|
||||||
PLEASE BACKUP YOUR EXISTING .config WITH YOUR DOTFILES BEFORE STARTING THE SCRIPTS.
|
PLEASE BACKUP YOUR EXISTING .config FOLDER WITH YOUR DOTFILES BEFORE STARTING THE SCRIPTS FOR INITIONAL INSTALLTION.
|
||||||
|
|
||||||
|
The script will try to create a backup from an older dotfiles folder.
|
||||||
|
|
||||||
```
|
```
|
||||||
# Make sure that you're in your home directory
|
# 1.) Change into your Downloads folder
|
||||||
cd
|
cd ~/Downloads
|
||||||
|
|
||||||
# Clone the repository from your home directory
|
# 2.) Clone the dotfiles repository into the Downloads folder
|
||||||
git clone https://gitlab.com/stephan-raabe/dotfiles.git
|
git clone https://gitlab.com/stephan-raabe/dotfiles.git
|
||||||
|
|
||||||
# Or download the lastest version and unzip into ~/dotfiles folder
|
# 3.) Change into the dotfiles folder
|
||||||
|
|
||||||
# Change into the new dotfiles folder
|
|
||||||
cd dotfiles
|
cd dotfiles
|
||||||
|
|
||||||
# Install all required packages
|
# 4.) Start the installation
|
||||||
./1-install.sh
|
./install.sh
|
||||||
|
|
||||||
# Install hyprland window manager
|
|
||||||
./2-install-hyprland.sh
|
|
||||||
# OR/AND Install qtile window manager
|
|
||||||
./2-install-qtile.sh
|
|
||||||
|
|
||||||
# Install dotfiles
|
|
||||||
./3-install-dotfiles.sh
|
|
||||||
|
|
||||||
```
|
```
|
||||||
Please note that every Arch Linux system is different and I cannot guarantee that everything works fine on your system.
|
|
||||||
|
|
||||||
|
Please note that every Arch Linux system is different and I cannot guarantee that everything works fine on your system.
|
||||||
|
BIN
default.jpg
Before Width: | Height: | Size: 242 KiB |
1
gtk/.Xresources
Normal file
@ -0,0 +1 @@
|
|||||||
|
Xcursor.theme: Bibata-Modern-Ice
|
28
hypr/conf/.hyprland.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _ _
|
||||||
|
# | |__ _ _ _ __ _ __| | __ _ _ __ __| |
|
||||||
|
# | '_ \| | | | '_ \| '__| |/ _` | '_ \ / _` |
|
||||||
|
# _| | | | |_| | |_) | | | | (_| | | | | (_| |
|
||||||
|
# (_)_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
|
||||||
|
# |___/|_|
|
||||||
|
#
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Overwrite hyprland configuration with hyprctl
|
||||||
|
# Individual scripts and settings possible
|
||||||
|
# Copy this file into your home directory
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Keyboard Layout
|
||||||
|
# -----------------------------------------------------
|
||||||
|
hyprctl keyword input:kb_layout de # to de
|
||||||
|
# hyprctl keyword input:kb_layout us # to us
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Monitor Setup
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
|
# -----------------------------------------------------
|
||||||
|
hyprctl keyword monitor ,2560x1440@120,auto,1
|
||||||
|
# hyprctl keyword monitor ,preferred,auto,1
|
||||||
|
|
||||||
|
notify-send ".hyprland.sh exists" "hyprctl commands executed"
|
@ -2,13 +2,23 @@
|
|||||||
# Autostart
|
# Autostart
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
exec-once = swww init
|
# Load Dunst Notification Manager
|
||||||
# exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
exec-once = dunst
|
exec-once = dunst
|
||||||
exec-once = ~/dotfiles/scripts/lockscreentime.sh
|
|
||||||
exec-once = ~/dotfiles/scripts/updatewal-swww.sh
|
# Set Cursor Theme
|
||||||
exec-once = ~/dotfiles/gtk/gtk.sh
|
|
||||||
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
|
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
|
||||||
exec-once = ~/dotfiles/waybar/launch.sh
|
|
||||||
|
# Load GTK settings
|
||||||
|
exec-once = ~/dotfiles/gtk/gtk.sh
|
||||||
|
|
||||||
|
# Load swayidle and define the lock screen time
|
||||||
|
exec-once = ~/dotfiles/hypr/scripts/lockscreentime.sh
|
||||||
|
|
||||||
|
# Load cliphist history
|
||||||
exec-once = wl-paste --watch cliphist store
|
exec-once = wl-paste --watch cliphist store
|
||||||
|
|
||||||
|
# Initialize swww
|
||||||
|
exec-once = swww query || swww init
|
||||||
|
|
||||||
|
# Load last wallpaper and waybar with pywal colors
|
||||||
|
exec-once = ~/dotfiles/hypr/scripts/wallpaper.sh init
|
||||||
|
@ -9,6 +9,7 @@ bind = $mainMod, Q, killactive
|
|||||||
bind = $mainMod, F, fullscreen
|
bind = $mainMod, F, fullscreen
|
||||||
bind = $mainMod, E, exec, dolphin
|
bind = $mainMod, E, exec, dolphin
|
||||||
bind = $mainMod, T, togglefloating
|
bind = $mainMod, T, togglefloating
|
||||||
|
bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh
|
||||||
bind = $mainMod, B, exec, chromium
|
bind = $mainMod, B, exec, chromium
|
||||||
bind = $mainMod CTRL, B, exec, brave
|
bind = $mainMod CTRL, B, exec, brave
|
||||||
bind = $mainMod, J, togglesplit
|
bind = $mainMod, J, togglesplit
|
||||||
@ -17,12 +18,14 @@ bind = $mainMod, right, movefocus, r
|
|||||||
bind = $mainMod, up, movefocus, u
|
bind = $mainMod, up, movefocus, u
|
||||||
bind = $mainMod, down, movefocus, d
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
bind = $mainMod, PRINT, exec, ~/dotfiles/scripts/grim.sh
|
bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh
|
||||||
bind = $mainMod CTRL, Q, exec, wlogout
|
bind = $mainMod CTRL, Q, exec, wlogout
|
||||||
bind = $mainMod SHIFT, W, exec, ~/dotfiles/scripts/updatewal-swww.sh
|
bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh
|
||||||
bind = $mainMod CTRL, W, exec, ~/dotfiles/scripts/wallpaper-swww.sh
|
bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select
|
||||||
bind = $mainMod CTRL, RETURN, exec, ~/dotfiles/scripts/applauncher.sh
|
bind = $mainMod CTRL, RETURN, exec, rofi -show drun
|
||||||
|
bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh
|
||||||
bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh
|
bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh
|
||||||
|
bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh
|
||||||
bind = $mainMod CTRL, F, exec, ~/dotfiles/scripts/filemanager.sh
|
bind = $mainMod CTRL, F, exec, ~/dotfiles/scripts/filemanager.sh
|
||||||
bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh
|
bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh
|
||||||
bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh
|
bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh
|
||||||
@ -60,8 +63,8 @@ bind = $mainMod SHIFT, left, resizeactive, -100 0
|
|||||||
bind = $mainMod SHIFT, up, resizeactive, 0 -100
|
bind = $mainMod SHIFT, up, resizeactive, 0 -100
|
||||||
bind = $mainMod SHIFT, down, resizeactive, 0 100
|
bind = $mainMod SHIFT, down, resizeactive, 0 100
|
||||||
|
|
||||||
binde = , XF86MonBrightnessUp, exec, brightnessctl set 100%
|
binde = , XF86MonBrightnessUp, exec, brightnessctl -q s +20%
|
||||||
binde = , XF86MonBrightnessDown, exec, brightnessctl set 70%
|
binde = , XF86MonBrightnessDown, exec, brightnessctl -q s 20%-
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Passthrough SUPER KEY to Virtual Machine
|
# Passthrough SUPER KEY to Virtual Machine
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Keyboard layout and mouse
|
# Keyboard Layout
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = $keyboardlayout
|
kb_layout = de
|
||||||
kb_variant =
|
# kb_layout = us
|
||||||
kb_model =
|
|
||||||
kb_options =
|
|
||||||
kb_rules =
|
|
||||||
follow_mouse = 1
|
follow_mouse = 1
|
||||||
touchpad {
|
touchpad {
|
||||||
natural_scroll = false
|
natural_scroll = false
|
||||||
|
8
hypr/conf/monitor.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# -----------------------------------------------------
|
||||||
|
# Monitor Setup
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
monitor=,preferred,auto,1
|
||||||
|
# monitor=,1920x1080,auto,1
|
||||||
|
# monitor=,2560x1440@120,auto,1
|
@ -9,18 +9,10 @@
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Keyboard Layout
|
# Keyboard & Monitor
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# $keyboardlayout=de
|
source = ~/dotfiles/hypr/conf/keyboard.conf
|
||||||
$keyboardlayout=us
|
source = ~/dotfiles/hypr/conf/monitor.conf
|
||||||
|
|
||||||
# -----------------------------------------------------
|
|
||||||
# Monitor Setup
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
|
||||||
# -----------------------------------------------------
|
|
||||||
monitor=,preferred,auto,1
|
|
||||||
# monitor=,2560x1440@120,auto,1
|
|
||||||
# monitor=,1920x1080,auto,1
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Autostart & Environment
|
# Autostart & Environment
|
||||||
@ -36,7 +28,6 @@ source = ~/.cache/wal/colors-hyprland.conf
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Load configuration files
|
# Load configuration files
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
source = ~/dotfiles/hypr/conf/keyboard.conf
|
|
||||||
source = ~/dotfiles/hypr/conf/window.conf
|
source = ~/dotfiles/hypr/conf/window.conf
|
||||||
source = ~/dotfiles/hypr/conf/decoration.conf
|
source = ~/dotfiles/hypr/conf/decoration.conf
|
||||||
source = ~/dotfiles/hypr/conf/layouts.conf
|
source = ~/dotfiles/hypr/conf/layouts.conf
|
||||||
|
23
hypr/scripts/disabledm.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
clear
|
||||||
|
echo "Hyprland recommends the start with the tty login."
|
||||||
|
echo "You can deactivate the current display manager (if exists)."
|
||||||
|
echo ""
|
||||||
|
echo "-> Do you really want to deactivate the display manager?"
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to enable the sddm display manager and setup theme? (Yy/Nn): " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
if [ -f /etc/systemd/system/display-manager.service ]; then
|
||||||
|
sudo rm /etc/systemd/system/display-manager.service
|
||||||
|
echo "Current display manager removed."
|
||||||
|
else
|
||||||
|
echo "No active display manager found."
|
||||||
|
fi
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
exit
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
25
hypr/scripts/keybindings.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _ _ _ _
|
||||||
|
# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
|
||||||
|
# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
|
||||||
|
# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
|
||||||
|
# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
|
||||||
|
# |___/ |___/
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Define keybindings.conf location
|
||||||
|
# -----------------------------------------------------
|
||||||
|
config_file=~/dotfiles/hypr/conf/keybindings.conf
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Parse keybindings
|
||||||
|
# -----------------------------------------------------
|
||||||
|
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
|
||||||
|
keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Show keybindings in rofi
|
||||||
|
# -----------------------------------------------------
|
||||||
|
rofi -dmenu -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds"
|
5
hypr/scripts/loadconfig.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ -f ~/.hyprland.sh ]; then
|
||||||
|
sleep 1
|
||||||
|
~/.hyprland.sh
|
||||||
|
fi
|
0
scripts/lockscreentime.sh → hypr/scripts/lockscreentime.sh
Executable file → Normal file
@ -17,18 +17,16 @@ option3="Fullscreen (delay 3 sec)"
|
|||||||
|
|
||||||
options="$option2\n$option3"
|
options="$option2\n$option3"
|
||||||
|
|
||||||
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 4 -width 30 -p "Take Screenshot")
|
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot")
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
$option2)
|
$option2)
|
||||||
grim -g "$(slurp)" - | swappy -f -
|
grim -g "$(slurp)" - | swappy -f -
|
||||||
# grim -g "$(slurp)" $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
|
|
||||||
notify-send "Screenshot created" "Mode: Selected area"
|
notify-send "Screenshot created" "Mode: Selected area"
|
||||||
;;
|
;;
|
||||||
$option3)
|
$option3)
|
||||||
sleep 3
|
sleep 3
|
||||||
grim - | swappy -f -
|
grim - | swappy -f -
|
||||||
# grim $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
|
|
||||||
notify-send "Screenshot created" "Mode: Fullscreen"
|
notify-send "Screenshot created" "Mode: Fullscreen"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
11
hypr/scripts/toggleallfloat.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _ _ __ _ _
|
||||||
|
# / \ | | |/ _| | ___ __ _| |_
|
||||||
|
# / _ \ | | | |_| |/ _ \ / _` | __|
|
||||||
|
# / ___ \| | | _| | (_) | (_| | |_
|
||||||
|
# /_/ \_\_|_|_| |_|\___/ \__,_|\__|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
hyprctl dispatch workspaceopt allfloat
|
@ -1,23 +1,47 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# _____ _ ______ ____ ____ __
|
# _ _
|
||||||
# |_ _| |__ ___ _ __ ___ ___ / ___\ \ / /\ \ / /\ \ / /
|
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
|
||||||
# | | | '_ \ / _ \ '_ ` _ \ / _ \ \___ \\ \ /\ / / \ \ /\ / / \ \ /\ / /
|
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
|
||||||
# | | | | | | __/ | | | | | __/ ___) |\ V V / \ V V / \ V V /
|
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
|
||||||
# |_| |_| |_|\___|_| |_| |_|\___| |____/ \_/\_/ \_/\_/ \_/\_/
|
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
|
||||||
#
|
# |_| |_|
|
||||||
#
|
#
|
||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
# -----------------------------------------------------
|
case $1 in
|
||||||
# Select random wallpaper and create color scheme
|
|
||||||
# -----------------------------------------------------
|
# Load wallpaper from .cache of last session
|
||||||
wal -q -i ~/wallpaper/
|
"init")
|
||||||
|
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
||||||
|
wal -q -i ~/.cache/current_wallpaper.jpg
|
||||||
|
else
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Select wallpaper with rofi
|
||||||
|
"select")
|
||||||
|
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||||
|
if [ ! "$selected" ]; then
|
||||||
|
echo "No wallpaper selected"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
wal -q -i ~/wallpaper/$selected
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Randomly select wallpaper
|
||||||
|
*)
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Load current pywal color scheme
|
# Load current pywal color scheme
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
source "$HOME/.cache/wal/colors.sh"
|
source "$HOME/.cache/wal/colors.sh"
|
||||||
|
echo "Wallpaper: $wallpaper"
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Copy selected wallpaper into .cache folder
|
# Copy selected wallpaper into .cache folder
|
||||||
@ -29,22 +53,29 @@ cp $wallpaper ~/.cache/current_wallpaper.jpg
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Reload waybar with new colors
|
||||||
|
# -----------------------------------------------------
|
||||||
|
~/dotfiles/waybar/launch.sh
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Set the new wallpaper
|
# Set the new wallpaper
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
transition_type="wipe"
|
||||||
|
# transition_type="outer"
|
||||||
|
# transition_type="random"
|
||||||
|
|
||||||
swww img $wallpaper \
|
swww img $wallpaper \
|
||||||
--transition-bezier .43,1.19,1,.4 \
|
--transition-bezier .43,1.19,1,.4 \
|
||||||
--transition-fps=60 \
|
--transition-fps=60 \
|
||||||
--transition-type="random" \
|
--transition-type=$transition_type \
|
||||||
--transition-duration=0.7 \
|
--transition-duration=0.7 \
|
||||||
--transition-pos "$( hyprctl cursorpos )"
|
--transition-pos "$( hyprctl cursorpos )"
|
||||||
|
|
||||||
~/dotfiles/waybar/launch.sh
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Send notification
|
# Send notification
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
sleep 1
|
||||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||||
|
|
||||||
echo "DONE!"
|
echo "DONE!"
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
export WLR_NO_HARDWARE_CURSORS=1
|
|
||||||
export WLR_RENDERER_ALLOW_SOFTWARE=1
|
|
||||||
exec Hyprland
|
|
76
install.sh
Executable file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Set installation mode
|
||||||
|
mode="live"
|
||||||
|
if [ ! -z $1 ]; then
|
||||||
|
mode="dev"
|
||||||
|
echo "IMPORTANT: DEV MODE ACTIVATED. "
|
||||||
|
echo "Existing dotfiles folder will not be modified."
|
||||||
|
echo "Symbolic links will not be created."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<"EOF"
|
||||||
|
_ _ __ _ _
|
||||||
|
__| | ___ | |_ / _(_) | ___ ___
|
||||||
|
/ _` |/ _ \| __| |_| | |/ _ \/ __|
|
||||||
|
| (_| | (_) | |_| _| | | __/\__ \
|
||||||
|
\__,_|\___/ \__|_| |_|_|\___||___/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
version="2.5"
|
||||||
|
echo "Version: $version"
|
||||||
|
echo "by Stephan Raabe 2023"
|
||||||
|
echo ""
|
||||||
|
echo "This script will guide you through the installation process of my dotfiles."
|
||||||
|
echo ""
|
||||||
|
source .install/library.sh
|
||||||
|
source .install/confirm-start.sh
|
||||||
|
source .install/backup.sh
|
||||||
|
source .install/preparation.sh
|
||||||
|
source .install/profile.sh
|
||||||
|
if [ $profile == "Hyprland" ]; then
|
||||||
|
source .install/hyprland.sh
|
||||||
|
fi
|
||||||
|
if [ $profile == "Qtile" ]; then
|
||||||
|
source .install/qtile.sh
|
||||||
|
fi
|
||||||
|
source .install/yay.sh
|
||||||
|
if [ $profile == "Hyprland" ]; then
|
||||||
|
source .install/hyprland-packages.sh
|
||||||
|
source .install/install-packages.sh
|
||||||
|
fi
|
||||||
|
if [ $profile == "Qtile" ]; then
|
||||||
|
source .install/qtile-packages.sh
|
||||||
|
source .install/install-packages.sh
|
||||||
|
fi
|
||||||
|
if [ $profile == "All" ]; then
|
||||||
|
source .install/hyprland-packages.sh
|
||||||
|
source .install/install-packages.sh
|
||||||
|
source .install/qtile-packages.sh
|
||||||
|
source .install/install-packages.sh
|
||||||
|
fi
|
||||||
|
source .install/pywal.sh
|
||||||
|
source .install/wallpaper.sh
|
||||||
|
source .install/disabledm.sh
|
||||||
|
source .install/issue.sh
|
||||||
|
source .install/restore.sh
|
||||||
|
source .install/setup.sh
|
||||||
|
source .install/copy.sh
|
||||||
|
source .install/config-folder.sh
|
||||||
|
source .install/init-pywal.sh
|
||||||
|
if [ $profile == "Hyprland" ]; then
|
||||||
|
source .install/hyprland-dotfiles.sh
|
||||||
|
fi
|
||||||
|
if [ $profile == "Qtile" ]; then
|
||||||
|
source .install/qtile-dotfiles.sh
|
||||||
|
fi
|
||||||
|
if [ $profile == "All" ]; then
|
||||||
|
source .install/hyprland-dotfiles.sh
|
||||||
|
source .install/qtile-dotfiles.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "IMPORTANT: Please check the keyboard layout and screen resolution after the rebbot of your system."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
source .install/done.sh
|
@ -1,124 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
|
||||||
# Pick only one of the below networking options.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "de";
|
|
||||||
useXkbConfig = true; # use xkbOptions in tty.
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
users.users.raabe = {
|
|
||||||
isNormalUser = true;
|
|
||||||
home = "/home/raabe";
|
|
||||||
description = "Stephan Raabe";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.layout = "de";
|
|
||||||
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver.windowManager.qtile.enable = true;
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# sound.enable = true;
|
|
||||||
# hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.alice = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
# packages = with pkgs; [
|
|
||||||
# firefox
|
|
||||||
# tree
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
qtile
|
|
||||||
alacritty
|
|
||||||
chromium
|
|
||||||
git
|
|
||||||
picom
|
|
||||||
rofi
|
|
||||||
nitrogen
|
|
||||||
xfce.mousepad
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -41,30 +41,6 @@ enable-ipc = true
|
|||||||
tray-position = right
|
tray-position = right
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
|
|
||||||
[bar/mypolybar]
|
|
||||||
width = 100%
|
|
||||||
height = 20pt
|
|
||||||
radius = 0
|
|
||||||
background = ${colors.background}
|
|
||||||
foreground = ${colors.foreground}
|
|
||||||
border-size = 0pt
|
|
||||||
border-color = #00000000
|
|
||||||
padding-left = 2
|
|
||||||
padding-right = 1
|
|
||||||
module-margin = 2
|
|
||||||
separator = ""
|
|
||||||
separator-foreground = ${colors.disabled}
|
|
||||||
font-0 = "Fira Sans SemiBold:size=11;2"
|
|
||||||
font-1 = "Font Awesome 6 Free Solid:pixelsize=11;2"
|
|
||||||
modules-left = appmenu browser chatgpt xwindow
|
|
||||||
modules-center = xworkspaces
|
|
||||||
modules-right = battery xkeyboard mysystem filesystem pulseaudio memory cpu date exit
|
|
||||||
cursor-click = pointer
|
|
||||||
cursor-scroll = ns-resize
|
|
||||||
enable-ipc = true
|
|
||||||
tray-position = right
|
|
||||||
tray-detached = false
|
|
||||||
|
|
||||||
[module/youtubesubs]
|
[module/youtubesubs]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = "python ~/private/youtube.py"
|
exec = "python ~/private/youtube.py"
|
||||||
@ -96,7 +72,7 @@ click-left = "chromium"
|
|||||||
type = custom/text
|
type = custom/text
|
||||||
content-foreground = ${colors.primary}
|
content-foreground = ${colors.primary}
|
||||||
content = ""
|
content = ""
|
||||||
click-left = "~/dotfiles/scripts/applauncher.sh"
|
click-left = "rofi -show drun"
|
||||||
|
|
||||||
[module/scrcpy]
|
[module/scrcpy]
|
||||||
type = custom/text
|
type = custom/text
|
||||||
@ -126,7 +102,7 @@ click-left = "xfreerdp -grab-keyboard /v:192.168.122.42 /size:100% /cert-ignore
|
|||||||
type = custom/text
|
type = custom/text
|
||||||
content-foreground = ${colors.primary}
|
content-foreground = ${colors.primary}
|
||||||
content = " "
|
content = " "
|
||||||
click-left = "~/dotfiles/scripts/powermenu.sh"
|
click-left = "~/dotfiles/qtile/scripts/powermenu.sh"
|
||||||
|
|
||||||
[module/xworkspaces]
|
[module/xworkspaces]
|
||||||
type = internal/xworkspaces
|
type = internal/xworkspaces
|
||||||
|
@ -12,14 +12,12 @@
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Quit running polybar instances
|
# Quit running polybar instances
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
polybar-msg cmd quit
|
killall polybar
|
||||||
|
|
||||||
|
# polybar-msg cmd quit
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Loading the configuration based on the username
|
# Loading the configuration based on the username
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
if [[ $USER = "raabe" ]]
|
polybar -r mybar
|
||||||
then
|
|
||||||
polybar -r mypolybar
|
|
||||||
else
|
|
||||||
polybar -r mybar
|
|
||||||
fi
|
|
||||||
|
35
qtile/autostart_wayland.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ___ _____ ___ _ _____ ____ _ _
|
||||||
|
# / _ \_ _|_ _| | | ____| / ___|| |_ __ _ _ __| |_
|
||||||
|
# | | | || | | || | | _| \___ \| __/ _` | '__| __|
|
||||||
|
# | |_| || | | || |___| |___ ___) | || (_| | | | |_
|
||||||
|
# \__\_\|_| |___|_____|_____| |____/ \__\__,_|_| \__|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# My screen resolution
|
||||||
|
# xrandr --rate 120
|
||||||
|
|
||||||
|
# For Virtual Machine
|
||||||
|
# xrandr --output Virtual-1 --mode 1920x1080
|
||||||
|
|
||||||
|
# Set keyboard mapping in config.py
|
||||||
|
|
||||||
|
# Load power manager
|
||||||
|
xfce4-power-manager &
|
||||||
|
|
||||||
|
# Load notification service
|
||||||
|
dunst &
|
||||||
|
|
||||||
|
# Load cliphist history
|
||||||
|
wl-paste --watch cliphist store &
|
||||||
|
|
||||||
|
# Launch GTK
|
||||||
|
~/dotfiles/gtk/gtk.sh
|
||||||
|
|
||||||
|
swww init
|
||||||
|
|
||||||
|
# Setup Wallpaper and update colors
|
||||||
|
~/dotfiles/qtile/scripts/wayland/wallpaper.sh init &
|
@ -15,9 +15,7 @@
|
|||||||
# For Virtual Machine
|
# For Virtual Machine
|
||||||
# xrandr --output Virtual-1 --mode 1920x1080
|
# xrandr --output Virtual-1 --mode 1920x1080
|
||||||
|
|
||||||
# Set keyboard mapping
|
# Set keyboard layout in config.py
|
||||||
# setxkbmap de
|
|
||||||
setxkbmap en
|
|
||||||
|
|
||||||
# Load picom
|
# Load picom
|
||||||
picom &
|
picom &
|
||||||
@ -29,7 +27,9 @@ xfce4-power-manager &
|
|||||||
dunst &
|
dunst &
|
||||||
|
|
||||||
# Launch polybar
|
# Launch polybar
|
||||||
~/dotfiles/polybar/launch.sh &
|
~/dotfiles/qtile/scripts/x11/loadbar.sh
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
# Setup Wallpaper and update colors
|
# Setup Wallpaper and update colors
|
||||||
~/dotfiles/scripts/updatewal.sh &
|
~/dotfiles/qtile/scripts/x11/wallpaper.sh init
|
3
qtile/conf/keyboard.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Setup global keyboard layout here
|
||||||
|
|
||||||
|
keyboard_layout = "de"
|
347
qtile/config.py
@ -24,25 +24,63 @@ from libqtile.widget import Spacer, Backlight
|
|||||||
from libqtile.widget.image import Image
|
from libqtile.widget.image import Image
|
||||||
from libqtile.dgroups import simple_key_binder
|
from libqtile.dgroups import simple_key_binder
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from libqtile.log_utils import logger
|
||||||
|
from libqtile.backend.wayland import InputConfig
|
||||||
|
|
||||||
|
from qtile_extras import widget
|
||||||
|
from qtile_extras.widget.decorations import RectDecoration
|
||||||
|
from qtile_extras.widget.decorations import PowerLineDecoration
|
||||||
|
from conf.keyboard import *
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Your configuration
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
# Keyboard layout in conf/keyboard.py
|
||||||
|
|
||||||
|
# Show wlan status bar widget (set to False if wired network)
|
||||||
|
# show_wlan = True
|
||||||
|
show_wlan = False
|
||||||
|
|
||||||
|
# Show bluetooth status bar widget
|
||||||
|
# show_bluetooth = True
|
||||||
|
show_bluetooth = False
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# General Variables
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
# Get home path
|
# Get home path
|
||||||
home = str(Path.home())
|
home = str(Path.home())
|
||||||
|
|
||||||
|
# Get Core name: x11 or wayland
|
||||||
|
core_name = qtile.core.name
|
||||||
|
logger.warning("Using config.py with " + core_name)
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Define Status Bar
|
# Define Status Bar
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
wm_bar = "polybar"
|
if core_name == "x11":
|
||||||
# wm_bar = "qtile"
|
try:
|
||||||
|
wm_bar = Path(home + "/.cache/.qtile_bar_x11.sh").read_text().replace("\n", "")
|
||||||
|
except:
|
||||||
|
wm_bar = "qtile"
|
||||||
|
elif qtile.core.name == "wayland":
|
||||||
|
wm_bar = "qtile"
|
||||||
|
|
||||||
|
logger.warning("Status bar: " + wm_bar)
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Check for Desktop/Laptop
|
# Check for Desktop/Laptop
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
# 3 = Desktop
|
# 3 = Desktop
|
||||||
platform = int(os.popen("cat /sys/class/dmi/id/chassis_type").read())
|
platform = int(os.popen("cat /sys/class/dmi/id/chassis_type").read())
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Set default apps
|
# Set default apps
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
terminal = "alacritty"
|
terminal = "alacritty"
|
||||||
browser = "chromium"
|
browser = "chromium"
|
||||||
# browser = "brave"
|
# browser = "brave"
|
||||||
@ -50,9 +88,12 @@ browser = "chromium"
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Keybindings
|
# Keybindings
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
mod = "mod4" # SUPER KEY
|
mod = "mod4" # SUPER KEY
|
||||||
|
|
||||||
keys = [
|
if core_name == "x11":
|
||||||
|
logger.warning("Using keys with x11")
|
||||||
|
keys = [
|
||||||
|
|
||||||
# Focus
|
# Focus
|
||||||
Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"),
|
Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"),
|
||||||
@ -71,15 +112,11 @@ keys = [
|
|||||||
Key([mod, "shift"], "h", lazy.layout.swap_left()),
|
Key([mod, "shift"], "h", lazy.layout.swap_left()),
|
||||||
Key([mod, "shift"], "l", lazy.layout.swap_right()),
|
Key([mod, "shift"], "l", lazy.layout.swap_right()),
|
||||||
|
|
||||||
Key([mod], "Print", lazy.spawn(home + "/dotfiles/scripts/scrot.sh")),
|
Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/screenshot.sh")),
|
||||||
|
|
||||||
# Size
|
# Size
|
||||||
# Key([mod], "h", lazy.layout.shrink(), lazy.layout.decrease_nmaster(), desc='Shrink window (MonadTall)'),
|
|
||||||
# Key([mod], "l", lazy.layout.grow(), lazy.layout.increase_nmaster(), desc='Expand window (MonadTall)'),
|
|
||||||
Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"),
|
Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"),
|
||||||
Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"),
|
Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"),
|
||||||
# Key([mod, "control"], "Down", lazy.layout.grow_down(), desc="Grow window down"),
|
|
||||||
# Key([mod, "control"], "Up", lazy.layout.grow_up(), desc="Grow window up"),
|
|
||||||
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
||||||
|
|
||||||
# Floating
|
# Floating
|
||||||
@ -96,20 +133,77 @@ keys = [
|
|||||||
|
|
||||||
#System
|
#System
|
||||||
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
||||||
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
|
Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"),
|
||||||
Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/scripts/powermenu.sh"), desc="Open Powermenu"),
|
Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"),
|
||||||
|
Key([mod, "shift"], "s", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/barswitcher.sh"), desc="Switch Status Bar"),
|
||||||
|
|
||||||
# Apps
|
# Apps
|
||||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
Key([mod, "control"], "Return", lazy.spawn(home + "/dotfiles/scripts/applauncher.sh"), desc="Launch Rofi"),
|
Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"),
|
||||||
Key([mod], "b", lazy.spawn(browser), desc="Launch Browser"),
|
Key([mod], "b", lazy.spawn(browser), desc="Launch Browser"),
|
||||||
Key([mod, "control"], "b", lazy.spawn(home + "/dotfiles/scripts/bravebookmarks.sh"), desc="Rofi Brave Bookmarks"),
|
Key([mod, "control"], "b", lazy.spawn(home + "/dotfiles/scripts/bravebookmarks.sh"), desc="Rofi Brave Bookmarks"),
|
||||||
Key([mod], "v", lazy.spawn(home + "/dotfiles/scripts/looking-glass.sh"), desc="Start Looking Glass Client"),
|
Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/wallpaper.sh"), desc="Update Theme and Wallpaper"),
|
||||||
Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/scripts/updatewal.sh"), desc="Update Theme and Wallpaper"),
|
Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/wallpaper.sh select"), desc="Select Theme and Wallpaper"),
|
||||||
Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/scripts/wallpaper.sh"), desc="Select Theme and Wallpaper"),
|
|
||||||
Key([mod, "control"], "t", lazy.spawn(home + "/dotfiles/scripts/templates.sh"), desc="Select Tempate and copy to clipboard"),
|
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")),
|
||||||
# Key([], 'F10', lazy.spawn("brave --app=https://chat.openai.com"), desc="Open ChatGPT")
|
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-"))
|
||||||
]
|
]
|
||||||
|
elif qtile.core.name == "wayland":
|
||||||
|
logger.warning("Using keys with wayland")
|
||||||
|
|
||||||
|
keys = [
|
||||||
|
|
||||||
|
# Focus
|
||||||
|
Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"),
|
||||||
|
Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"),
|
||||||
|
Key([mod], "Down", lazy.layout.down(), desc="Move focus down"),
|
||||||
|
Key([mod], "Up", lazy.layout.up(), desc="Move focus up"),
|
||||||
|
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window around"),
|
||||||
|
|
||||||
|
# Move
|
||||||
|
Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window to the left"),
|
||||||
|
Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window to the right"),
|
||||||
|
Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down"),
|
||||||
|
Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up"),
|
||||||
|
|
||||||
|
# Swap
|
||||||
|
Key([mod, "shift"], "h", lazy.layout.swap_left()),
|
||||||
|
Key([mod, "shift"], "l", lazy.layout.swap_right()),
|
||||||
|
|
||||||
|
Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/screenshot.sh")),
|
||||||
|
|
||||||
|
# Size
|
||||||
|
Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"),
|
||||||
|
Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"),
|
||||||
|
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
||||||
|
|
||||||
|
# Floating
|
||||||
|
Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'),
|
||||||
|
|
||||||
|
# Split
|
||||||
|
Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"),
|
||||||
|
|
||||||
|
# Toggle Layouts
|
||||||
|
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
|
||||||
|
|
||||||
|
# Fullscreen
|
||||||
|
Key([mod], "f", lazy.window.toggle_fullscreen()),
|
||||||
|
|
||||||
|
#System
|
||||||
|
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
||||||
|
Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"),
|
||||||
|
Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"),
|
||||||
|
|
||||||
|
# Apps
|
||||||
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
|
Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"),
|
||||||
|
Key([mod], "b", lazy.spawn(browser), desc="Launch Browser"),
|
||||||
|
Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/wallpaper.sh"), desc="Update Theme and Wallpaper"),
|
||||||
|
Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/wallpaper.sh select"), desc="Select Theme and Wallpaper"),
|
||||||
|
|
||||||
|
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")),
|
||||||
|
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-"))
|
||||||
|
]
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Groups
|
# Groups
|
||||||
@ -149,16 +243,22 @@ keys.extend([
|
|||||||
|
|
||||||
colors = os.path.expanduser('~/.cache/wal/colors.json')
|
colors = os.path.expanduser('~/.cache/wal/colors.json')
|
||||||
colordict = json.load(open(colors))
|
colordict = json.load(open(colors))
|
||||||
ColorZ=(colordict['colors']['color0'])
|
Color0=(colordict['colors']['color0'])
|
||||||
ColorA=(colordict['colors']['color1'])
|
Color1=(colordict['colors']['color1'])
|
||||||
ColorB=(colordict['colors']['color2'])
|
Color2=(colordict['colors']['color2'])
|
||||||
ColorC=(colordict['colors']['color3'])
|
Color3=(colordict['colors']['color3'])
|
||||||
ColorD=(colordict['colors']['color4'])
|
Color4=(colordict['colors']['color4'])
|
||||||
ColorE=(colordict['colors']['color5'])
|
Color5=(colordict['colors']['color5'])
|
||||||
ColorF=(colordict['colors']['color6'])
|
Color6=(colordict['colors']['color6'])
|
||||||
ColorG=(colordict['colors']['color7'])
|
Color7=(colordict['colors']['color7'])
|
||||||
ColorH=(colordict['colors']['color8'])
|
Color8=(colordict['colors']['color8'])
|
||||||
ColorI=(colordict['colors']['color9'])
|
Color9=(colordict['colors']['color9'])
|
||||||
|
Color10=(colordict['colors']['color10'])
|
||||||
|
Color11=(colordict['colors']['color11'])
|
||||||
|
Color12=(colordict['colors']['color12'])
|
||||||
|
Color13=(colordict['colors']['color13'])
|
||||||
|
Color14=(colordict['colors']['color14'])
|
||||||
|
Color15=(colordict['colors']['color15'])
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Setup Layout Theme
|
# Setup Layout Theme
|
||||||
@ -167,7 +267,7 @@ ColorI=(colordict['colors']['color9'])
|
|||||||
layout_theme = {
|
layout_theme = {
|
||||||
"border_width": 3,
|
"border_width": 3,
|
||||||
"margin": 15,
|
"margin": 15,
|
||||||
"border_focus": ColorC,
|
"border_focus": Color2,
|
||||||
"border_normal": "FFFFFF",
|
"border_normal": "FFFFFF",
|
||||||
"single_border_width": 3
|
"single_border_width": 3
|
||||||
}
|
}
|
||||||
@ -177,19 +277,10 @@ layout_theme = {
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
layouts = [
|
layouts = [
|
||||||
# layout.Columns(),
|
|
||||||
layout.Max(**layout_theme),
|
layout.Max(**layout_theme),
|
||||||
# Try more layouts by unleashing below layouts.
|
|
||||||
# layout.Stack(num_stacks=2),
|
|
||||||
# layout.Bsp(),
|
|
||||||
# layout.Matrix(),
|
|
||||||
layout.MonadTall(**layout_theme),
|
layout.MonadTall(**layout_theme),
|
||||||
layout.MonadWide(**layout_theme),
|
layout.MonadWide(**layout_theme),
|
||||||
layout.RatioTile(**layout_theme),
|
layout.RatioTile(**layout_theme),
|
||||||
# layout.Tile(),
|
|
||||||
# layout.TreeTab(),
|
|
||||||
# layout.VerticalTile(),
|
|
||||||
# layout.Zoomy(),
|
|
||||||
layout.Floating()
|
layout.Floating()
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -204,12 +295,50 @@ widget_defaults = dict(
|
|||||||
)
|
)
|
||||||
extension_defaults = widget_defaults.copy()
|
extension_defaults = widget_defaults.copy()
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Decorations
|
||||||
|
# https://qtile-extras.readthedocs.io/en/stable/manual/how_to/decorations.html
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
decor_left = {
|
||||||
|
"decorations": [
|
||||||
|
PowerLineDecoration(
|
||||||
|
path="arrow_left"
|
||||||
|
# path="rounded_left"
|
||||||
|
# path="forward_slash"
|
||||||
|
# path="back_slash"
|
||||||
|
)
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
decor_right = {
|
||||||
|
"decorations": [
|
||||||
|
PowerLineDecoration(
|
||||||
|
path="arrow_right"
|
||||||
|
# path="rounded_right"
|
||||||
|
# path="forward_slash"
|
||||||
|
# path="back_slash"
|
||||||
|
)
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Widgets
|
# Widgets
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
widget_list = [
|
widget_list = [
|
||||||
|
widget.TextBox(
|
||||||
|
**decor_left,
|
||||||
|
background=Color1+".4",
|
||||||
|
text='Apps',
|
||||||
|
foreground='ffffff',
|
||||||
|
desc='',
|
||||||
|
padding=10,
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("rofi -show drun")},
|
||||||
|
),
|
||||||
widget.GroupBox(
|
widget.GroupBox(
|
||||||
|
**decor_left,
|
||||||
|
background="#ffffff.7",
|
||||||
highlight_method='block',
|
highlight_method='block',
|
||||||
highlight='ffffff',
|
highlight='ffffff',
|
||||||
block_border='ffffff',
|
block_border='ffffff',
|
||||||
@ -221,82 +350,129 @@ widget_list = [
|
|||||||
active='ffffff'
|
active='ffffff'
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text=' ',
|
**decor_left,
|
||||||
foreground=ColorC,
|
background="#ffffff.4",
|
||||||
),
|
text=" ",
|
||||||
widget.WindowName(),
|
foreground="000000.6",
|
||||||
widget.Systray(),
|
|
||||||
widget.TextBox(
|
|
||||||
text='',
|
|
||||||
fontsize=18,
|
fontsize=18,
|
||||||
foreground='ffffff',
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("chromium")},
|
||||||
desc='Notes',
|
|
||||||
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e vim ' + home + '/notes.txt')},
|
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
**decor_left,
|
||||||
foreground=ColorC,
|
background="#ffffff.4",
|
||||||
|
text=" ",
|
||||||
|
foreground="000000.6",
|
||||||
|
fontsize=18,
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("thunar")}
|
||||||
),
|
),
|
||||||
widget.Volume(
|
|
||||||
fmt='Vol: {}',
|
widget.WindowName(
|
||||||
|
**decor_left,
|
||||||
|
max_chars=50,
|
||||||
|
background=Color2+".4",
|
||||||
|
width=400,
|
||||||
|
padding=10
|
||||||
|
),
|
||||||
|
widget.Spacer(),
|
||||||
|
widget.Spacer(
|
||||||
|
length=30
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
**decor_right,
|
||||||
foreground=ColorC,
|
background="#000000.3"
|
||||||
),
|
),
|
||||||
widget.Memory(
|
widget.Memory(
|
||||||
|
**decor_right,
|
||||||
|
background=Color10+".4",
|
||||||
|
padding=10,
|
||||||
measure_mem='G',
|
measure_mem='G',
|
||||||
format="{MemUsed:.0f}{mm} ({MemTotal:.0f}{mm})"
|
format="{MemUsed:.0f}{mm} ({MemTotal:.0f}{mm})"
|
||||||
),
|
),
|
||||||
|
widget.Volume(
|
||||||
|
**decor_right,
|
||||||
|
background=Color12+".4",
|
||||||
|
padding=10,
|
||||||
|
fmt='Vol: {}',
|
||||||
|
),
|
||||||
widget.DF(
|
widget.DF(
|
||||||
|
**decor_right,
|
||||||
|
padding=10,
|
||||||
|
background=Color8+".4",
|
||||||
visible_on_warn=False,
|
visible_on_warn=False,
|
||||||
format="{p} {uf}{m} ({r:.0f}%)"
|
format="{p} {uf}{m} ({r:.0f}%)"
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Bluetooth(
|
||||||
text='|',
|
**decor_right,
|
||||||
foreground=ColorC,
|
background=Color2+".4",
|
||||||
|
padding=10,
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("blueman-manager")},
|
||||||
),
|
),
|
||||||
widget.Battery(),
|
widget.Wlan(
|
||||||
widget.TextBox(
|
**decor_right,
|
||||||
text='|',
|
background=Color2+".4",
|
||||||
foreground=ColorC,
|
padding=10,
|
||||||
|
format='{essid} {percent:2.0%}',
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("alacritty -e nmtui")},
|
||||||
),
|
),
|
||||||
widget.Clock(
|
widget.Clock(
|
||||||
format="%Y-%m-%d %a %I:%M %p",
|
**decor_right,
|
||||||
|
background=Color4+".4",
|
||||||
|
padding=10,
|
||||||
|
format="%Y-%m-%d / %I:%M %p",
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
**decor_right,
|
||||||
foreground=ColorC,
|
background=Color2+".4",
|
||||||
),
|
padding=5,
|
||||||
widget.QuickExit(
|
text="",
|
||||||
default_text=" ",
|
|
||||||
fontsize=20,
|
fontsize=20,
|
||||||
countdown_start=3,
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(home + "/dotfiles/scripts/cliphist.sh")},
|
||||||
countdown_format="{}"
|
),
|
||||||
|
widget.TextBox(
|
||||||
|
**decor_right,
|
||||||
|
background=Color2+".4",
|
||||||
|
padding=5,
|
||||||
|
text=" ",
|
||||||
|
fontsize=20,
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(home + "/dotfiles/qtile/scripts/powermenu.sh")},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
if (platform == 3):
|
# Hide Modules if not on laptop
|
||||||
del widget_list[10:12]
|
if (show_wlan == False):
|
||||||
|
del widget_list[12:13]
|
||||||
|
|
||||||
|
if (show_bluetooth == False):
|
||||||
|
del widget_list[11:12]
|
||||||
|
|
||||||
|
if (core_name == "x11"):
|
||||||
|
del widget_list[12:13]
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Screens
|
# Screens
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
if (wm_bar == "polybar"):
|
if (wm_bar == "qtile"):
|
||||||
screens = [Screen(top=bar.Gap(size=28))]
|
logger.warning("Loading qtile bar")
|
||||||
else:
|
|
||||||
screens = [
|
screens = [
|
||||||
Screen(
|
Screen(
|
||||||
top=bar.Bar(
|
top=bar.Bar(
|
||||||
widget_list,
|
widget_list,
|
||||||
24,
|
30,
|
||||||
|
padding=20,
|
||||||
opacity=0.7,
|
opacity=0.7,
|
||||||
border_width=[3, 0, 3, 0],
|
border_width=[0, 0, 0, 0],
|
||||||
margin=[0,0,0,0]
|
margin=[0,0,0,0],
|
||||||
|
background="#000000.3"
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
else:
|
||||||
|
screens = [Screen(top=bar.Gap(size=28))]
|
||||||
|
if (core_name == "x11"):
|
||||||
|
screens = [Screen(top=bar.Gap(size=28))]
|
||||||
|
else:
|
||||||
|
screens = [Screen(top=bar.Gap(size=0))]
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Drag floating layouts
|
# Drag floating layouts
|
||||||
@ -314,7 +490,7 @@ mouse = [
|
|||||||
|
|
||||||
floating_layout = layout.Floating(
|
floating_layout = layout.Floating(
|
||||||
border_width=3,
|
border_width=3,
|
||||||
border_focus=ColorC,
|
border_focus=Color2,
|
||||||
border_normal="FFFFFF",
|
border_normal="FFFFFF",
|
||||||
float_rules=[
|
float_rules=[
|
||||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||||
@ -362,6 +538,15 @@ wl_input_rules = None
|
|||||||
|
|
||||||
wmname = "QTILE"
|
wmname = "QTILE"
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Set wayland properties
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
# Keyboard layout
|
||||||
|
wl_input_rules = {
|
||||||
|
"type:keyboard": InputConfig(kb_layout=keyboard_layout),
|
||||||
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Hooks
|
# Hooks
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
@ -369,6 +554,12 @@ wmname = "QTILE"
|
|||||||
# HOOK startup
|
# HOOK startup
|
||||||
@hook.subscribe.startup_once
|
@hook.subscribe.startup_once
|
||||||
def autostart():
|
def autostart():
|
||||||
home = os.path.expanduser('~/.config/qtile/autostart.sh')
|
if qtile.core.name == "x11":
|
||||||
|
autostartscript = "~/.config/qtile/autostart_x11.sh"
|
||||||
|
subprocess.Popen(['setxkbmap',keyboard_layout])
|
||||||
|
elif qtile.core.name == "wayland":
|
||||||
|
autostartscript = "~/.config/qtile/autostart_wayland.sh"
|
||||||
|
|
||||||
|
home = os.path.expanduser(autostartscript)
|
||||||
subprocess.Popen([home])
|
subprocess.Popen([home])
|
||||||
|
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
#
|
#
|
||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
echo $XDG_SESSION_TYPE
|
||||||
|
if [ $XDG_SESSION_TYPE == "wayland" ]; then
|
||||||
|
lockapp=swaylock
|
||||||
|
else
|
||||||
|
lockapp=slock
|
||||||
|
fi
|
||||||
|
echo "Using $lockapp to lock the screen."
|
||||||
|
|
||||||
option1=" lock"
|
option1=" lock"
|
||||||
option2=" logout"
|
option2=" logout"
|
||||||
@ -22,7 +29,7 @@ choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-power.r
|
|||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
$option1)
|
$option1)
|
||||||
slock ;;
|
$lockapp ;;
|
||||||
$option2)
|
$option2)
|
||||||
qtile cmd-obj -o cmd -f shutdown ;;
|
qtile cmd-obj -o cmd -f shutdown ;;
|
||||||
$option3)
|
$option3)
|
32
qtile/scripts/wayland/screenshot.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ____ _ _
|
||||||
|
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
|
||||||
|
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
|
||||||
|
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
|
||||||
|
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
DIR="$HOME/Pictures/screenshots/"
|
||||||
|
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
|
||||||
|
|
||||||
|
option2="Selected area"
|
||||||
|
option3="Fullscreen (delay 3 sec)"
|
||||||
|
|
||||||
|
options="$option2\n$option3"
|
||||||
|
|
||||||
|
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot")
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
$option2)
|
||||||
|
grim -g "$(slurp)" - | swappy -f -
|
||||||
|
notify-send "Screenshot created" "Mode: Selected area"
|
||||||
|
;;
|
||||||
|
$option3)
|
||||||
|
sleep 3
|
||||||
|
grim - | swappy -f -
|
||||||
|
notify-send "Screenshot created" "Mode: Fullscreen"
|
||||||
|
;;
|
||||||
|
esac
|
78
qtile/scripts/wayland/wallpaper.sh
Executable file
@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _
|
||||||
|
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
|
||||||
|
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
|
||||||
|
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
|
||||||
|
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
|
||||||
|
# |_| |_|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
|
||||||
|
# Load wallpaper from .cache of last session
|
||||||
|
"init")
|
||||||
|
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
||||||
|
wal -q -i ~/.cache/current_wallpaper.jpg
|
||||||
|
else
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Select wallpaper with rofi
|
||||||
|
"select")
|
||||||
|
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||||
|
if [ ! "$selected" ]; then
|
||||||
|
echo "No wallpaper selected"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
wal -q -i ~/wallpaper/$selected
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Randomly select wallpaper
|
||||||
|
*)
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Load current pywal color scheme
|
||||||
|
# -----------------------------------------------------
|
||||||
|
source "$HOME/.cache/wal/colors.sh"
|
||||||
|
echo "Wallpaper: $wallpaper"
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Copy selected wallpaper into .cache folder
|
||||||
|
# -----------------------------------------------------
|
||||||
|
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# get wallpaper iamge name
|
||||||
|
# -----------------------------------------------------
|
||||||
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Set the new wallpaper
|
||||||
|
# -----------------------------------------------------
|
||||||
|
swww init
|
||||||
|
|
||||||
|
transition_type="wipe"
|
||||||
|
# transition_type="outer"
|
||||||
|
# transition_type="random"
|
||||||
|
|
||||||
|
swww img $wallpaper \
|
||||||
|
--transition-bezier .43,1.19,1,.4 \
|
||||||
|
--transition-fps=60 \
|
||||||
|
--transition-type=$transition_type \
|
||||||
|
--transition-duration=0.7 \
|
||||||
|
|
||||||
|
qtile cmd-obj -o cmd -f reload_config
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Send notification
|
||||||
|
# -----------------------------------------------------
|
||||||
|
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||||
|
|
||||||
|
echo "DONE!"
|
32
qtile/scripts/x11/barswitcher.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _ _ _
|
||||||
|
# | |__ __ _ _ __ _____ _(_) |_ ___| |__ ___ _ __
|
||||||
|
# | '_ \ / _` | '__/ __\ \ /\ / / | __/ __| '_ \ / _ \ '__|
|
||||||
|
# | |_) | (_| | | \__ \\ V V /| | || (__| | | | __/ |
|
||||||
|
# |_.__/ \__,_|_| |___/ \_/\_/ |_|\__\___|_| |_|\___|_|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Load status bar information
|
||||||
|
# -----------------------------------------------------
|
||||||
|
bar=$(cat ~/.cache/.qtile_bar_x11.sh)
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Switch status bar information
|
||||||
|
# -----------------------------------------------------
|
||||||
|
if [ $bar == "qtile" ]; then
|
||||||
|
echo "Change to Polybar"
|
||||||
|
echo "polybar" > ~/.cache/.qtile_bar_x11.sh
|
||||||
|
notify-send "Status Bar is changing..." "to Polybar"
|
||||||
|
else
|
||||||
|
echo "Change to Qtile Bar"
|
||||||
|
echo "qtile" > ~/.cache/.qtile_bar_x11.sh
|
||||||
|
notify-send "Status Bar is changing..." "to Qtile Status Bar"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Load status bar
|
||||||
|
# -----------------------------------------------------
|
||||||
|
~/dotfiles/qtile/scripts/x11/loadbar.sh
|
43
qtile/scripts/x11/loadbar.sh
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _ _ _
|
||||||
|
# | | ___ __ _ __| | |__ __ _ _ __
|
||||||
|
# | |/ _ \ / _` |/ _` | '_ \ / _` | '__|
|
||||||
|
# | | (_) | (_| | (_| | |_) | (_| | |
|
||||||
|
# |_|\___/ \__,_|\__,_|_.__/ \__,_|_|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Check if information about the bar exists in .cache
|
||||||
|
# If not create it
|
||||||
|
# -----------------------------------------------------
|
||||||
|
if [ ! -f ~/.cache/.qtile_bar_x11.sh ]; then
|
||||||
|
touch ~/.cache/.qtile_bar_x11.sh
|
||||||
|
echo "qtile" > ~/.cache/.qtile_bar_x11.sh
|
||||||
|
echo ".qtile_bar_x11.sh created"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Load status bar information
|
||||||
|
# -----------------------------------------------------
|
||||||
|
bar=$(cat ~/.cache/.qtile_bar_x11.sh)
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Load status bar based on loaded information
|
||||||
|
# -----------------------------------------------------
|
||||||
|
if [ $bar == "qtile" ]; then
|
||||||
|
killall polybar
|
||||||
|
sleep 0.2
|
||||||
|
qtile cmd-obj -o cmd -f reload_config
|
||||||
|
else
|
||||||
|
killall polybar
|
||||||
|
sleep 0.2
|
||||||
|
qtile cmd-obj -o cmd -f reload_config
|
||||||
|
sleep 0.2
|
||||||
|
source "$HOME/.cache/wal/colors.sh"
|
||||||
|
~/dotfiles/polybar/launch.sh &
|
||||||
|
sleep 0.2
|
||||||
|
qtile cmd-obj -o cmd -f reload_config
|
||||||
|
fi
|
||||||
|
|
@ -18,7 +18,7 @@ option3="Fullscreen (delay 3 sec)"
|
|||||||
|
|
||||||
options="$option2\n$option3\n$option1"
|
options="$option2\n$option3\n$option1"
|
||||||
|
|
||||||
choice=$(echo -e "$options" | rofi -i -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -p "Take Screenshot")
|
choice=$(echo -e "$options" | rofi -i -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -l 3 -p "Take Screenshot")
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
$option1)
|
$option1)
|
@ -9,17 +9,33 @@
|
|||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
echo "Changing theme..."
|
case $1 in
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# Load wallpaper from .cache of last session
|
||||||
# Update Wallpaper with pywal
|
"init")
|
||||||
# -----------------------------------------------------
|
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
||||||
wal -q -i ~/wallpaper/
|
wal -q -i ~/.cache/current_wallpaper.jpg
|
||||||
|
else
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# Select wallpaper with rofi
|
||||||
# Wait for 1 sec
|
"select")
|
||||||
# -----------------------------------------------------
|
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||||
sleep 1
|
if [ ! "$selected" ]; then
|
||||||
|
echo "No wallpaper selected"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
wal -q -i ~/wallpaper/$selected
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Randomly select wallpaper
|
||||||
|
*)
|
||||||
|
wal -q -i ~/wallpaper/
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Reload qtile to color bar
|
# Reload qtile to color bar
|
||||||
@ -30,6 +46,7 @@ qtile cmd-obj -o cmd -f reload_config
|
|||||||
# Get new theme
|
# Get new theme
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
source "$HOME/.cache/wal/colors.sh"
|
source "$HOME/.cache/wal/colors.sh"
|
||||||
|
echo "Wallpaper: $wallpaper"
|
||||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
@ -43,5 +60,4 @@ sleep 1
|
|||||||
# Send notification
|
# Send notification
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
@ -1,62 +0,0 @@
|
|||||||
# This is a sample commands.py. You can add your own commands here.
|
|
||||||
#
|
|
||||||
# Please refer to commands_full.py for all the default commands and a complete
|
|
||||||
# documentation. Do NOT add them all here, or you may end up with defunct
|
|
||||||
# commands when upgrading ranger.
|
|
||||||
|
|
||||||
# A simple command for demonstration purposes follows.
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
|
||||||
|
|
||||||
# You can import any python module as needed.
|
|
||||||
import os
|
|
||||||
|
|
||||||
# You always need to import ranger.api.commands here to get the Command class:
|
|
||||||
from ranger.api.commands import Command
|
|
||||||
|
|
||||||
|
|
||||||
# Any class that is a subclass of "Command" will be integrated into ranger as a
|
|
||||||
# command. Try typing ":my_edit<ENTER>" in ranger!
|
|
||||||
class my_edit(Command):
|
|
||||||
# The so-called doc-string of the class will be visible in the built-in
|
|
||||||
# help that is accessible by typing "?c" inside ranger.
|
|
||||||
""":my_edit <filename>
|
|
||||||
|
|
||||||
A sample command for demonstration purposes that opens a file in an editor.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# The execute method is called when you run this command in ranger.
|
|
||||||
def execute(self):
|
|
||||||
# self.arg(1) is the first (space-separated) argument to the function.
|
|
||||||
# This way you can write ":my_edit somefilename<ENTER>".
|
|
||||||
if self.arg(1):
|
|
||||||
# self.rest(1) contains self.arg(1) and everything that follows
|
|
||||||
target_filename = self.rest(1)
|
|
||||||
else:
|
|
||||||
# self.fm is a ranger.core.filemanager.FileManager object and gives
|
|
||||||
# you access to internals of ranger.
|
|
||||||
# self.fm.thisfile is a ranger.container.file.File object and is a
|
|
||||||
# reference to the currently selected file.
|
|
||||||
target_filename = self.fm.thisfile.path
|
|
||||||
|
|
||||||
# This is a generic function to print text in ranger.
|
|
||||||
self.fm.notify("Let's edit the file " + target_filename + "!")
|
|
||||||
|
|
||||||
# Using bad=True in fm.notify allows you to print error messages:
|
|
||||||
if not os.path.exists(target_filename):
|
|
||||||
self.fm.notify("The given file does not exist!", bad=True)
|
|
||||||
return
|
|
||||||
|
|
||||||
# This executes a function from ranger.core.acitons, a module with a
|
|
||||||
# variety of subroutines that can help you construct commands.
|
|
||||||
# Check out the source, or run "pydoc ranger.core.actions" for a list.
|
|
||||||
self.fm.edit_file(target_filename)
|
|
||||||
|
|
||||||
# The tab method is called when you press tab, and should return a list of
|
|
||||||
# suggestions that the user will tab through.
|
|
||||||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
|
|
||||||
def tab(self, tabnum):
|
|
||||||
# This is a generic tab-completion function that iterates through the
|
|
||||||
# content of the current directory.
|
|
||||||
return self._tab_directory_content()
|
|
769
ranger/rc.conf
@ -1,769 +0,0 @@
|
|||||||
# ____
|
|
||||||
# | _ \ __ _ _ __ __ _ ___ _ __
|
|
||||||
# | |_) / _` | '_ \ / _` |/ _ \ '__|
|
|
||||||
# | _ < (_| | | | | (_| | __/ |
|
|
||||||
# |_| \_\__,_|_| |_|\__, |\___|_|
|
|
||||||
# |___/
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
#
|
|
||||||
# ===================================================================
|
|
||||||
# This file contains the default startup commands for ranger.
|
|
||||||
# To change them, it is recommended to create either /etc/ranger/rc.conf
|
|
||||||
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
|
|
||||||
# commands there.
|
|
||||||
#
|
|
||||||
# If you copy this whole file there, you may want to set the environment
|
|
||||||
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
|
|
||||||
#
|
|
||||||
# The purpose of this file is mainly to define keybindings and settings.
|
|
||||||
# For running more complex python code, please create a plugin in "plugins/" or
|
|
||||||
# a command in "commands.py".
|
|
||||||
#
|
|
||||||
# Each line is a command that will be run before the user interface
|
|
||||||
# is initialized. As a result, you can not use commands which rely
|
|
||||||
# on the UI such as :delete or :mark.
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Options
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
# Which viewmode should be used? Possible values are:
|
|
||||||
# miller: Use miller columns which show multiple levels of the hierarchy
|
|
||||||
# multipane: Midnight-commander like multipane view showing all tabs next
|
|
||||||
# to each other
|
|
||||||
set viewmode miller
|
|
||||||
#set viewmode multipane
|
|
||||||
|
|
||||||
# How many columns are there, and what are their relative widths?
|
|
||||||
set column_ratios 1,3,4
|
|
||||||
|
|
||||||
# Which files should be hidden? (regular expression)
|
|
||||||
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
|
||||||
|
|
||||||
# Show hidden files? You can toggle this by typing 'zh'
|
|
||||||
set show_hidden false
|
|
||||||
|
|
||||||
# Ask for a confirmation when running the "delete" command?
|
|
||||||
# Valid values are "always", "never", "multiple" (default)
|
|
||||||
# With "multiple", ranger will ask only if you delete multiple files at once.
|
|
||||||
set confirm_on_delete multiple
|
|
||||||
|
|
||||||
# Use non-default path for file preview script?
|
|
||||||
# ranger ships with scope.sh, a script that calls external programs (see
|
|
||||||
# README.md for dependencies) to preview images, archives, etc.
|
|
||||||
#set preview_script ~/.config/ranger/scope.sh
|
|
||||||
|
|
||||||
# Use the external preview script or display simple plain text or image previews?
|
|
||||||
set use_preview_script true
|
|
||||||
|
|
||||||
# Automatically count files in the directory, even before entering them?
|
|
||||||
set automatically_count_files true
|
|
||||||
|
|
||||||
# Open all images in this directory when running certain image viewers
|
|
||||||
# like feh or sxiv? You can still open selected files by marking them.
|
|
||||||
set open_all_images true
|
|
||||||
|
|
||||||
# Be aware of version control systems and display information.
|
|
||||||
set vcs_aware false
|
|
||||||
|
|
||||||
# State of the four backends git, hg, bzr, svn. The possible states are
|
|
||||||
# disabled, local (only show local info), enabled (show local and remote
|
|
||||||
# information).
|
|
||||||
set vcs_backend_git enabled
|
|
||||||
set vcs_backend_hg disabled
|
|
||||||
set vcs_backend_bzr disabled
|
|
||||||
set vcs_backend_svn disabled
|
|
||||||
|
|
||||||
# Truncate the long commit messages to this length when shown in the statusbar.
|
|
||||||
set vcs_msg_length 50
|
|
||||||
|
|
||||||
# Use one of the supported image preview protocols
|
|
||||||
set preview_images true
|
|
||||||
|
|
||||||
# Set the preview image method. Supported methods:
|
|
||||||
#
|
|
||||||
# * w3m (default):
|
|
||||||
# Preview images in full color with the external command "w3mimgpreview"?
|
|
||||||
# This requires the console web browser "w3m" and a supported terminal.
|
|
||||||
# It has been successfully tested with "xterm" and "urxvt" without tmux.
|
|
||||||
#
|
|
||||||
# * iterm2:
|
|
||||||
# Preview images in full color using iTerm2 image previews
|
|
||||||
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
|
||||||
# with image preview support.
|
|
||||||
#
|
|
||||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
|
||||||
# width of 8 and height of 11 are used. To use other values, set the options
|
|
||||||
# iterm2_font_width and iterm2_font_height to the desired values.
|
|
||||||
#
|
|
||||||
# * terminology:
|
|
||||||
# Previews images in full color in the terminology terminal emulator.
|
|
||||||
# Supports a wide variety of formats, even vector graphics like svg.
|
|
||||||
#
|
|
||||||
# * urxvt:
|
|
||||||
# Preview images in full color using urxvt image backgrounds. This
|
|
||||||
# requires using urxvt compiled with pixbuf support.
|
|
||||||
#
|
|
||||||
# * urxvt-full:
|
|
||||||
# The same as urxvt but utilizing not only the preview pane but the
|
|
||||||
# whole terminal window.
|
|
||||||
#
|
|
||||||
# * kitty:
|
|
||||||
# Preview images in full color using kitty image protocol.
|
|
||||||
# Requires python PIL or pillow library.
|
|
||||||
# If ranger does not share the local filesystem with kitty
|
|
||||||
# the transfer method is changed to encode the whole image;
|
|
||||||
# while slower, this allows remote previews,
|
|
||||||
# for example during an ssh session.
|
|
||||||
# Tmux is unsupported.
|
|
||||||
#
|
|
||||||
# * ueberzug:
|
|
||||||
# Preview images in full color with the external command "ueberzug".
|
|
||||||
# Images are shown by using a child window.
|
|
||||||
# Only for users who run X11 in GNU/Linux.
|
|
||||||
set preview_images_method ueberzug
|
|
||||||
|
|
||||||
# Delay in seconds before displaying an image with the w3m method.
|
|
||||||
# Increase it in case of experiencing display corruption.
|
|
||||||
set w3m_delay 0.02
|
|
||||||
|
|
||||||
# Manually adjust the w3mimg offset when using a terminal which needs this
|
|
||||||
set w3m_offset 0
|
|
||||||
|
|
||||||
# Default iTerm2 font size (see: preview_images_method: iterm2)
|
|
||||||
set iterm2_font_width 8
|
|
||||||
set iterm2_font_height 11
|
|
||||||
|
|
||||||
# Use a unicode "..." character to mark cut-off filenames?
|
|
||||||
set unicode_ellipsis false
|
|
||||||
|
|
||||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
|
|
||||||
# Requires the python-bidi pip package
|
|
||||||
set bidi_support false
|
|
||||||
|
|
||||||
# Show dotfiles in the bookmark preview box?
|
|
||||||
set show_hidden_bookmarks true
|
|
||||||
|
|
||||||
# Which colorscheme to use? These colorschemes are available by default:
|
|
||||||
# default, jungle, snow, solarized
|
|
||||||
set colorscheme default
|
|
||||||
|
|
||||||
# Preview files on the rightmost column?
|
|
||||||
# And collapse (shrink) the last column if there is nothing to preview?
|
|
||||||
set preview_files true
|
|
||||||
set preview_directories true
|
|
||||||
set collapse_preview true
|
|
||||||
|
|
||||||
# Wrap long lines in plain text previews?
|
|
||||||
set wrap_plaintext_previews false
|
|
||||||
|
|
||||||
# Save the console history on exit?
|
|
||||||
set save_console_history true
|
|
||||||
|
|
||||||
# Draw the status bar on top of the browser window (default: bottom)
|
|
||||||
set status_bar_on_top false
|
|
||||||
|
|
||||||
# Draw a progress bar in the status bar which displays the average state of all
|
|
||||||
# currently running tasks which support progress bars?
|
|
||||||
set draw_progress_bar_in_status_bar true
|
|
||||||
|
|
||||||
# Draw borders around columns? (separators, outline, both, or none)
|
|
||||||
# Separators are vertical lines between columns.
|
|
||||||
# Outline draws a box around all the columns.
|
|
||||||
# Both combines the two.
|
|
||||||
set draw_borders none
|
|
||||||
|
|
||||||
# Display the directory name in tabs?
|
|
||||||
set dirname_in_tabs false
|
|
||||||
|
|
||||||
# Enable the mouse support?
|
|
||||||
set mouse_enabled true
|
|
||||||
|
|
||||||
# Display the file size in the main column or status bar?
|
|
||||||
set display_size_in_main_column true
|
|
||||||
set display_size_in_status_bar true
|
|
||||||
|
|
||||||
# Display the free disk space in the status bar?
|
|
||||||
set display_free_space_in_status_bar true
|
|
||||||
|
|
||||||
# Display files tags in all columns or only in main column?
|
|
||||||
set display_tags_in_all_columns true
|
|
||||||
|
|
||||||
# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
|
|
||||||
set update_title false
|
|
||||||
|
|
||||||
# Set the tmux/screen window-name to "ranger"?
|
|
||||||
set update_tmux_title true
|
|
||||||
|
|
||||||
# Shorten the title if it gets long? The number defines how many
|
|
||||||
# directories are displayed at once, 0 turns off this feature.
|
|
||||||
set shorten_title 3
|
|
||||||
|
|
||||||
# Show hostname in titlebar?
|
|
||||||
set hostname_in_titlebar true
|
|
||||||
|
|
||||||
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
|
|
||||||
set tilde_in_titlebar false
|
|
||||||
|
|
||||||
# How many directory-changes or console-commands should be kept in history?
|
|
||||||
set max_history_size 20
|
|
||||||
set max_console_history_size 50
|
|
||||||
|
|
||||||
# Try to keep so much space between the top/bottom border when scrolling:
|
|
||||||
set scroll_offset 8
|
|
||||||
|
|
||||||
# Flush the input after each key hit? (Noticeable when ranger lags)
|
|
||||||
set flushinput true
|
|
||||||
|
|
||||||
# Padding on the right when there's no preview?
|
|
||||||
# This allows you to click into the space to run the file.
|
|
||||||
set padding_right true
|
|
||||||
|
|
||||||
# Save bookmarks (used with mX and `X) instantly?
|
|
||||||
# This helps to synchronize bookmarks between multiple ranger
|
|
||||||
# instances but leads to *slight* performance loss.
|
|
||||||
# When false, bookmarks are saved when ranger is exited.
|
|
||||||
set autosave_bookmarks true
|
|
||||||
|
|
||||||
# Save the "`" bookmark to disk. This can be used to switch to the last
|
|
||||||
# directory by typing "``".
|
|
||||||
set save_backtick_bookmark true
|
|
||||||
|
|
||||||
# You can display the "real" cumulative size of directories by using the
|
|
||||||
# command :get_cumulative_size or typing "dc". The size is expensive to
|
|
||||||
# calculate and will not be updated automatically. You can choose
|
|
||||||
# to update it automatically though by turning on this option:
|
|
||||||
set autoupdate_cumulative_size false
|
|
||||||
|
|
||||||
# Turning this on makes sense for screen readers:
|
|
||||||
set show_cursor false
|
|
||||||
|
|
||||||
# One of: size, natural, basename, atime, ctime, mtime, type, random
|
|
||||||
set sort natural
|
|
||||||
|
|
||||||
# Additional sorting options
|
|
||||||
set sort_reverse false
|
|
||||||
set sort_case_insensitive true
|
|
||||||
set sort_directories_first true
|
|
||||||
set sort_unicode false
|
|
||||||
|
|
||||||
# Enable this if key combinations with the Alt Key don't work for you.
|
|
||||||
# (Especially on xterm)
|
|
||||||
set xterm_alt_key false
|
|
||||||
|
|
||||||
# Whether to include bookmarks in cd command
|
|
||||||
set cd_bookmarks true
|
|
||||||
|
|
||||||
# Changes case sensitivity for the cd command tab completion
|
|
||||||
set cd_tab_case sensitive
|
|
||||||
|
|
||||||
# Use fuzzy tab completion with the "cd" command. For example,
|
|
||||||
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
|
|
||||||
set cd_tab_fuzzy false
|
|
||||||
|
|
||||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
|
||||||
# disable this feature.
|
|
||||||
set preview_max_size 0
|
|
||||||
|
|
||||||
# The key hint lists up to this size have their sublists expanded.
|
|
||||||
# Otherwise the submaps are replaced with "...".
|
|
||||||
set hint_collapse_threshold 10
|
|
||||||
|
|
||||||
# Add the highlighted file to the path in the titlebar
|
|
||||||
set show_selection_in_titlebar true
|
|
||||||
|
|
||||||
# The delay that ranger idly waits for user input, in milliseconds, with a
|
|
||||||
# resolution of 100ms. Lower delay reduces lag between directory updates but
|
|
||||||
# increases CPU load.
|
|
||||||
set idle_delay 2000
|
|
||||||
|
|
||||||
# When the metadata manager module looks for metadata, should it only look for
|
|
||||||
# a ".metadata.json" file in the current directory, or do a deep search and
|
|
||||||
# check all directories above the current one as well?
|
|
||||||
set metadata_deep_search false
|
|
||||||
|
|
||||||
# Clear all existing filters when leaving a directory
|
|
||||||
set clear_filters_on_dir_change false
|
|
||||||
|
|
||||||
# Disable displaying line numbers in main column.
|
|
||||||
# Possible values: false, absolute, relative.
|
|
||||||
set line_numbers false
|
|
||||||
|
|
||||||
# When line_numbers=relative show the absolute line number in the
|
|
||||||
# current line.
|
|
||||||
set relative_current_zero false
|
|
||||||
|
|
||||||
# Start line numbers from 1 instead of 0
|
|
||||||
set one_indexed false
|
|
||||||
|
|
||||||
# Save tabs on exit
|
|
||||||
set save_tabs_on_exit false
|
|
||||||
|
|
||||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
|
||||||
# the top and vice versa.
|
|
||||||
set wrap_scroll false
|
|
||||||
|
|
||||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
|
||||||
# directories, files and symlinks respectively.
|
|
||||||
set global_inode_type_filter
|
|
||||||
|
|
||||||
# This setting allows to freeze the list of files to save I/O bandwidth. It
|
|
||||||
# should be 'false' during start-up, but you can toggle it by pressing F.
|
|
||||||
set freeze_files false
|
|
||||||
|
|
||||||
# Print file sizes in bytes instead of the default human-readable format.
|
|
||||||
set size_in_bytes false
|
|
||||||
|
|
||||||
# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
|
|
||||||
# give a warning when you nest ranger in a subshell started by ranger.
|
|
||||||
# Special value "error" makes the warning more visible.
|
|
||||||
set nested_ranger_warning true
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Local Options
|
|
||||||
# ===================================================================
|
|
||||||
# You can set local options that only affect a single directory.
|
|
||||||
|
|
||||||
# Examples:
|
|
||||||
# setlocal path=~/downloads sort mtime
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Command Aliases in the Console
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
alias e edit
|
|
||||||
alias q quit
|
|
||||||
alias q! quit!
|
|
||||||
alias qa quitall
|
|
||||||
alias qa! quitall!
|
|
||||||
alias qall quitall
|
|
||||||
alias qall! quitall!
|
|
||||||
alias setl setlocal
|
|
||||||
|
|
||||||
alias filter scout -prts
|
|
||||||
alias find scout -aets
|
|
||||||
alias mark scout -mr
|
|
||||||
alias unmark scout -Mr
|
|
||||||
alias search scout -rs
|
|
||||||
alias search_inc scout -rts
|
|
||||||
alias travel scout -aefklst
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Define keys for the browser
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
# Basic
|
|
||||||
map Q quitall
|
|
||||||
map q quit
|
|
||||||
copymap q ZZ ZQ
|
|
||||||
|
|
||||||
map R reload_cwd
|
|
||||||
map F set freeze_files!
|
|
||||||
map <C-r> reset
|
|
||||||
map <C-l> redraw_window
|
|
||||||
map <C-c> abort
|
|
||||||
map <esc> change_mode normal
|
|
||||||
map ~ set viewmode!
|
|
||||||
|
|
||||||
map i display_file
|
|
||||||
map <A-j> scroll_preview 1
|
|
||||||
map <A-k> scroll_preview -1
|
|
||||||
map ? help
|
|
||||||
map W display_log
|
|
||||||
map w taskview_open
|
|
||||||
map S shell $SHELL
|
|
||||||
|
|
||||||
map : console
|
|
||||||
map ; console
|
|
||||||
map ! console shell%space
|
|
||||||
map @ console -p6 shell %%s
|
|
||||||
map # console shell -p%space
|
|
||||||
map s console shell%space
|
|
||||||
map r chain draw_possible_programs; console open_with%space
|
|
||||||
map f console find%space
|
|
||||||
map cd console cd%space
|
|
||||||
|
|
||||||
map <C-p> chain console; eval fm.ui.console.history_move(-1)
|
|
||||||
|
|
||||||
# Change the line mode
|
|
||||||
map Mf linemode filename
|
|
||||||
map Mi linemode fileinfo
|
|
||||||
map Mm linemode mtime
|
|
||||||
map Mh linemode humanreadablemtime
|
|
||||||
map Mp linemode permissions
|
|
||||||
map Ms linemode sizemtime
|
|
||||||
map MH linemode sizehumanreadablemtime
|
|
||||||
map Mt linemode metatitle
|
|
||||||
|
|
||||||
# Tagging / Marking
|
|
||||||
map t tag_toggle
|
|
||||||
map ut tag_remove
|
|
||||||
map "<any> tag_toggle tag=%any
|
|
||||||
map <Space> mark_files toggle=True
|
|
||||||
map v mark_files all=True toggle=True
|
|
||||||
map uv mark_files all=True val=False
|
|
||||||
map V toggle_visual_mode
|
|
||||||
map uV toggle_visual_mode reverse=True
|
|
||||||
|
|
||||||
# For the nostalgics: Midnight Commander bindings
|
|
||||||
map <F1> help
|
|
||||||
map <F2> rename_append
|
|
||||||
map <F3> display_file
|
|
||||||
map <F4> edit
|
|
||||||
map <F5> copy
|
|
||||||
map <F6> cut
|
|
||||||
map <F7> console mkdir%space
|
|
||||||
map <F8> console delete
|
|
||||||
#map <F8> console trash
|
|
||||||
map <F10> exit
|
|
||||||
|
|
||||||
# In case you work on a keyboard with dvorak layout
|
|
||||||
map <UP> move up=1
|
|
||||||
map <DOWN> move down=1
|
|
||||||
map <LEFT> move left=1
|
|
||||||
map <RIGHT> move right=1
|
|
||||||
map <HOME> move to=0
|
|
||||||
map <END> move to=-1
|
|
||||||
map <PAGEDOWN> move down=1 pages=True
|
|
||||||
map <PAGEUP> move up=1 pages=True
|
|
||||||
map <CR> move right=1
|
|
||||||
#map <DELETE> console delete
|
|
||||||
map <INSERT> console touch%space
|
|
||||||
|
|
||||||
# VIM-like
|
|
||||||
copymap <UP> k
|
|
||||||
copymap <DOWN> j
|
|
||||||
copymap <LEFT> h
|
|
||||||
copymap <RIGHT> l
|
|
||||||
copymap <HOME> gg
|
|
||||||
copymap <END> G
|
|
||||||
copymap <PAGEDOWN> <C-F>
|
|
||||||
copymap <PAGEUP> <C-B>
|
|
||||||
|
|
||||||
map J move down=0.5 pages=True
|
|
||||||
map K move up=0.5 pages=True
|
|
||||||
copymap J <C-D>
|
|
||||||
copymap K <C-U>
|
|
||||||
|
|
||||||
# Jumping around
|
|
||||||
map H history_go -1
|
|
||||||
map L history_go 1
|
|
||||||
map ] move_parent 1
|
|
||||||
map [ move_parent -1
|
|
||||||
map } traverse
|
|
||||||
map { traverse_backwards
|
|
||||||
map ) jump_non
|
|
||||||
|
|
||||||
map gh cd ~
|
|
||||||
map ge cd /etc
|
|
||||||
map gu cd /usr
|
|
||||||
map gd cd /dev
|
|
||||||
map gl cd -r .
|
|
||||||
map gL cd -r %f
|
|
||||||
map go cd /opt
|
|
||||||
map gv cd /var
|
|
||||||
map gm cd /media
|
|
||||||
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
|
||||||
map gM cd /mnt
|
|
||||||
map gs cd /srv
|
|
||||||
map gp cd /tmp
|
|
||||||
map gr cd /
|
|
||||||
map gR eval fm.cd(ranger.RANGERDIR)
|
|
||||||
map g/ cd /
|
|
||||||
map g? cd /usr/share/doc/ranger
|
|
||||||
|
|
||||||
# External Programs
|
|
||||||
map E edit
|
|
||||||
map du shell -p du --max-depth=1 -h --apparent-size
|
|
||||||
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
|
||||||
map yp yank path
|
|
||||||
map yd yank dir
|
|
||||||
map yn yank name
|
|
||||||
map y. yank name_without_extension
|
|
||||||
|
|
||||||
# Filesystem Operations
|
|
||||||
map = chmod
|
|
||||||
|
|
||||||
map cw console rename%space
|
|
||||||
map a rename_append
|
|
||||||
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
|
||||||
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
|
||||||
|
|
||||||
map pp paste
|
|
||||||
map po paste overwrite=True
|
|
||||||
map pP paste append=True
|
|
||||||
map pO paste overwrite=True append=True
|
|
||||||
map pl paste_symlink relative=False
|
|
||||||
map pL paste_symlink relative=True
|
|
||||||
map phl paste_hardlink
|
|
||||||
map pht paste_hardlinked_subtree
|
|
||||||
map pd console paste dest=
|
|
||||||
map p`<any> paste dest=%any_path
|
|
||||||
map p'<any> paste dest=%any_path
|
|
||||||
|
|
||||||
map dD console delete
|
|
||||||
map dT console trash
|
|
||||||
|
|
||||||
map dd cut
|
|
||||||
map ud uncut
|
|
||||||
map da cut mode=add
|
|
||||||
map dr cut mode=remove
|
|
||||||
map dt cut mode=toggle
|
|
||||||
|
|
||||||
map yy copy
|
|
||||||
map uy uncut
|
|
||||||
map ya copy mode=add
|
|
||||||
map yr copy mode=remove
|
|
||||||
map yt copy mode=toggle
|
|
||||||
|
|
||||||
# Temporary workarounds
|
|
||||||
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
|
|
||||||
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
|
|
||||||
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
|
|
||||||
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
|
|
||||||
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
|
|
||||||
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
|
|
||||||
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
|
|
||||||
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
|
||||||
|
|
||||||
# Searching
|
|
||||||
map / console search%space
|
|
||||||
map n search_next
|
|
||||||
map N search_next forward=False
|
|
||||||
map ct search_next order=tag
|
|
||||||
map cs search_next order=size
|
|
||||||
map ci search_next order=mimetype
|
|
||||||
map cc search_next order=ctime
|
|
||||||
map cm search_next order=mtime
|
|
||||||
map ca search_next order=atime
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
map <C-n> tab_new
|
|
||||||
map <C-w> tab_close
|
|
||||||
map <TAB> tab_move 1
|
|
||||||
map <S-TAB> tab_move -1
|
|
||||||
map <A-Right> tab_move 1
|
|
||||||
map <A-Left> tab_move -1
|
|
||||||
map gt tab_move 1
|
|
||||||
map gT tab_move -1
|
|
||||||
map gn tab_new
|
|
||||||
map gc tab_close
|
|
||||||
map uq tab_restore
|
|
||||||
map <a-1> tab_open 1
|
|
||||||
map <a-2> tab_open 2
|
|
||||||
map <a-3> tab_open 3
|
|
||||||
map <a-4> tab_open 4
|
|
||||||
map <a-5> tab_open 5
|
|
||||||
map <a-6> tab_open 6
|
|
||||||
map <a-7> tab_open 7
|
|
||||||
map <a-8> tab_open 8
|
|
||||||
map <a-9> tab_open 9
|
|
||||||
map <a-r> tab_shift 1
|
|
||||||
map <a-l> tab_shift -1
|
|
||||||
|
|
||||||
# Sorting
|
|
||||||
map or set sort_reverse!
|
|
||||||
map oz set sort=random
|
|
||||||
map os chain set sort=size; set sort_reverse=False
|
|
||||||
map ob chain set sort=basename; set sort_reverse=False
|
|
||||||
map on chain set sort=natural; set sort_reverse=False
|
|
||||||
map om chain set sort=mtime; set sort_reverse=False
|
|
||||||
map oc chain set sort=ctime; set sort_reverse=False
|
|
||||||
map oa chain set sort=atime; set sort_reverse=False
|
|
||||||
map ot chain set sort=type; set sort_reverse=False
|
|
||||||
map oe chain set sort=extension; set sort_reverse=False
|
|
||||||
|
|
||||||
map oS chain set sort=size; set sort_reverse=True
|
|
||||||
map oB chain set sort=basename; set sort_reverse=True
|
|
||||||
map oN chain set sort=natural; set sort_reverse=True
|
|
||||||
map oM chain set sort=mtime; set sort_reverse=True
|
|
||||||
map oC chain set sort=ctime; set sort_reverse=True
|
|
||||||
map oA chain set sort=atime; set sort_reverse=True
|
|
||||||
map oT chain set sort=type; set sort_reverse=True
|
|
||||||
map oE chain set sort=extension; set sort_reverse=True
|
|
||||||
|
|
||||||
map dc get_cumulative_size
|
|
||||||
|
|
||||||
# Settings
|
|
||||||
map zc set collapse_preview!
|
|
||||||
map zd set sort_directories_first!
|
|
||||||
map zh set show_hidden!
|
|
||||||
map <C-h> set show_hidden!
|
|
||||||
copymap <C-h> <backspace>
|
|
||||||
copymap <backspace> <backspace2>
|
|
||||||
map zI set flushinput!
|
|
||||||
map zi set preview_images!
|
|
||||||
map zm set mouse_enabled!
|
|
||||||
map zp set preview_files!
|
|
||||||
map zP set preview_directories!
|
|
||||||
map zs set sort_case_insensitive!
|
|
||||||
map zu set autoupdate_cumulative_size!
|
|
||||||
map zv set use_preview_script!
|
|
||||||
map zf console filter%space
|
|
||||||
copymap zf zz
|
|
||||||
|
|
||||||
# Filter stack
|
|
||||||
map .d filter_stack add type d
|
|
||||||
map .f filter_stack add type f
|
|
||||||
map .l filter_stack add type l
|
|
||||||
map .m console filter_stack add mime%space
|
|
||||||
map .n console filter_stack add name%space
|
|
||||||
map .# console filter_stack add hash%space
|
|
||||||
map ." filter_stack add duplicate
|
|
||||||
map .' filter_stack add unique
|
|
||||||
map .| filter_stack add or
|
|
||||||
map .& filter_stack add and
|
|
||||||
map .! filter_stack add not
|
|
||||||
map .r filter_stack rotate
|
|
||||||
map .c filter_stack clear
|
|
||||||
map .* filter_stack decompose
|
|
||||||
map .p filter_stack pop
|
|
||||||
map .. filter_stack show
|
|
||||||
|
|
||||||
# Bookmarks
|
|
||||||
map `<any> enter_bookmark %any
|
|
||||||
map '<any> enter_bookmark %any
|
|
||||||
map m<any> set_bookmark %any
|
|
||||||
map um<any> unset_bookmark %any
|
|
||||||
|
|
||||||
map m<bg> draw_bookmarks
|
|
||||||
copymap m<bg> um<bg> `<bg> '<bg>
|
|
||||||
|
|
||||||
# Generate all the chmod bindings with some python help:
|
|
||||||
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
|
|
||||||
|
|
||||||
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
|
|
||||||
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Define keys for the console
|
|
||||||
# ===================================================================
|
|
||||||
# Note: Unmapped keys are passed directly to the console.
|
|
||||||
|
|
||||||
# Basic
|
|
||||||
cmap <tab> eval fm.ui.console.tab()
|
|
||||||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
|
||||||
cmap <ESC> eval fm.ui.console.close()
|
|
||||||
cmap <CR> eval fm.ui.console.execute()
|
|
||||||
cmap <C-l> redraw_window
|
|
||||||
|
|
||||||
copycmap <ESC> <C-c>
|
|
||||||
copycmap <CR> <C-j>
|
|
||||||
|
|
||||||
# Move around
|
|
||||||
cmap <up> eval fm.ui.console.history_move(-1)
|
|
||||||
cmap <down> eval fm.ui.console.history_move(1)
|
|
||||||
cmap <left> eval fm.ui.console.move(left=1)
|
|
||||||
cmap <right> eval fm.ui.console.move(right=1)
|
|
||||||
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
|
|
||||||
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
|
|
||||||
cmap <a-b> eval fm.ui.console.move_word(left=1)
|
|
||||||
cmap <a-f> eval fm.ui.console.move_word(right=1)
|
|
||||||
|
|
||||||
copycmap <a-b> <a-left>
|
|
||||||
copycmap <a-f> <a-right>
|
|
||||||
|
|
||||||
# Line Editing
|
|
||||||
cmap <backspace> eval fm.ui.console.delete(-1)
|
|
||||||
cmap <delete> eval fm.ui.console.delete(0)
|
|
||||||
cmap <C-w> eval fm.ui.console.delete_word()
|
|
||||||
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
|
|
||||||
cmap <C-k> eval fm.ui.console.delete_rest(1)
|
|
||||||
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
|
||||||
cmap <C-y> eval fm.ui.console.paste()
|
|
||||||
|
|
||||||
# And of course the emacs way
|
|
||||||
copycmap <ESC> <C-g>
|
|
||||||
copycmap <up> <C-p>
|
|
||||||
copycmap <down> <C-n>
|
|
||||||
copycmap <left> <C-b>
|
|
||||||
copycmap <right> <C-f>
|
|
||||||
copycmap <home> <C-a>
|
|
||||||
copycmap <end> <C-e>
|
|
||||||
copycmap <delete> <C-d>
|
|
||||||
copycmap <backspace> <C-h>
|
|
||||||
|
|
||||||
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
|
|
||||||
# and <backspace2> (code 127). To be sure, use both.
|
|
||||||
copycmap <backspace> <backspace2>
|
|
||||||
|
|
||||||
# This special expression allows typing in numerals:
|
|
||||||
cmap <allow_quantifiers> false
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Pager Keybindings
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
# Movement
|
|
||||||
pmap <down> pager_move down=1
|
|
||||||
pmap <up> pager_move up=1
|
|
||||||
pmap <left> pager_move left=4
|
|
||||||
pmap <right> pager_move right=4
|
|
||||||
pmap <home> pager_move to=0
|
|
||||||
pmap <end> pager_move to=-1
|
|
||||||
pmap <pagedown> pager_move down=1.0 pages=True
|
|
||||||
pmap <pageup> pager_move up=1.0 pages=True
|
|
||||||
pmap <C-d> pager_move down=0.5 pages=True
|
|
||||||
pmap <C-u> pager_move up=0.5 pages=True
|
|
||||||
|
|
||||||
copypmap <UP> k <C-p>
|
|
||||||
copypmap <DOWN> j <C-n> <CR>
|
|
||||||
copypmap <LEFT> h
|
|
||||||
copypmap <RIGHT> l
|
|
||||||
copypmap <HOME> g
|
|
||||||
copypmap <END> G
|
|
||||||
copypmap <C-d> d
|
|
||||||
copypmap <C-u> u
|
|
||||||
copypmap <PAGEDOWN> n f <C-F> <Space>
|
|
||||||
copypmap <PAGEUP> p b <C-B>
|
|
||||||
|
|
||||||
# Basic
|
|
||||||
pmap <C-l> redraw_window
|
|
||||||
pmap <ESC> pager_close
|
|
||||||
copypmap <ESC> q Q i <F3>
|
|
||||||
pmap E edit_file
|
|
||||||
|
|
||||||
# ===================================================================
|
|
||||||
# == Taskview Keybindings
|
|
||||||
# ===================================================================
|
|
||||||
|
|
||||||
# Movement
|
|
||||||
tmap <up> taskview_move up=1
|
|
||||||
tmap <down> taskview_move down=1
|
|
||||||
tmap <home> taskview_move to=0
|
|
||||||
tmap <end> taskview_move to=-1
|
|
||||||
tmap <pagedown> taskview_move down=1.0 pages=True
|
|
||||||
tmap <pageup> taskview_move up=1.0 pages=True
|
|
||||||
tmap <C-d> taskview_move down=0.5 pages=True
|
|
||||||
tmap <C-u> taskview_move up=0.5 pages=True
|
|
||||||
|
|
||||||
copytmap <UP> k <C-p>
|
|
||||||
copytmap <DOWN> j <C-n> <CR>
|
|
||||||
copytmap <HOME> g
|
|
||||||
copytmap <END> G
|
|
||||||
copytmap <C-u> u
|
|
||||||
copytmap <PAGEDOWN> n f <C-F> <Space>
|
|
||||||
copytmap <PAGEUP> p b <C-B>
|
|
||||||
|
|
||||||
# Changing priority and deleting tasks
|
|
||||||
tmap J eval -q fm.ui.taskview.task_move(-1)
|
|
||||||
tmap K eval -q fm.ui.taskview.task_move(0)
|
|
||||||
tmap dd eval -q fm.ui.taskview.task_remove()
|
|
||||||
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
|
||||||
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
|
||||||
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
|
||||||
|
|
||||||
# Basic
|
|
||||||
tmap <C-l> redraw_window
|
|
||||||
tmap <ESC> taskview_close
|
|
||||||
copytmap <ESC> q Q w <C-c>
|
|
@ -1,284 +0,0 @@
|
|||||||
# vim: ft=cfg
|
|
||||||
#
|
|
||||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
|
||||||
# Each line consists of conditions and a command. For each line the conditions
|
|
||||||
# are checked and if they are met, the respective command is run.
|
|
||||||
#
|
|
||||||
# Syntax:
|
|
||||||
# <condition1> , <condition2> , ... = command
|
|
||||||
#
|
|
||||||
# The command can contain these environment variables:
|
|
||||||
# $1-$9 | The n-th selected file
|
|
||||||
# $@ | All selected files
|
|
||||||
#
|
|
||||||
# If you use the special command "ask", rifle will ask you what program to run.
|
|
||||||
#
|
|
||||||
# Prefixing a condition with "!" will negate its result.
|
|
||||||
# These conditions are currently supported:
|
|
||||||
# match <regexp> | The regexp matches $1
|
|
||||||
# ext <regexp> | The regexp matches the extension of $1
|
|
||||||
# mime <regexp> | The regexp matches the mime type of $1
|
|
||||||
# name <regexp> | The regexp matches the basename of $1
|
|
||||||
# path <regexp> | The regexp matches the absolute path of $1
|
|
||||||
# has <program> | The program is installed (i.e. located in $PATH)
|
|
||||||
# env <variable> | The environment variable "variable" is non-empty
|
|
||||||
# file | $1 is a file
|
|
||||||
# directory | $1 is a directory
|
|
||||||
# number <n> | change the number of this command to n
|
|
||||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
|
||||||
# X | A graphical environment is available (darwin, Xorg, or Wayland)
|
|
||||||
#
|
|
||||||
# There are also pseudo-conditions which have a "side effect":
|
|
||||||
# flag <flags> | Change how the program is run. See below.
|
|
||||||
# label <label> | Assign a label or name to the command so it can
|
|
||||||
# | be started with :open_with <label> in ranger
|
|
||||||
# | or `rifle -p <label>` in the standalone executable.
|
|
||||||
# else | Always true.
|
|
||||||
#
|
|
||||||
# Flags are single characters which slightly transform the command:
|
|
||||||
# f | Fork the program, make it run in the background.
|
|
||||||
# | New command = setsid $command >& /dev/null &
|
|
||||||
# r | Execute the command with root permissions
|
|
||||||
# | New command = sudo $command
|
|
||||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
|
||||||
# | rifle will attempt to extract it from $TERM.
|
|
||||||
# | New command = $TERMCMD -e $command
|
|
||||||
# Note: The "New command" serves only as an illustration, the exact
|
|
||||||
# implementation may differ.
|
|
||||||
# Note: When using rifle in ranger, there is an additional flag "c" for
|
|
||||||
# only running the current file even if you have marked multiple files.
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Websites
|
|
||||||
#-------------------------------------------
|
|
||||||
# Rarely installed browsers get higher priority; It is assumed that if you
|
|
||||||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
|
||||||
# other hand are often only installed as fallback browsers.
|
|
||||||
ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
|
||||||
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
|
||||||
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
|
||||||
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
|
||||||
ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
|
||||||
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
|
||||||
ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
|
||||||
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
|
||||||
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
|
||||||
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
|
||||||
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
|
||||||
ext x?html?, has midori, X, flag f = midori -- "$@"
|
|
||||||
ext x?html?, has opera, X, flag f = opera -- "$@"
|
|
||||||
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
|
||||||
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
|
||||||
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
|
||||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
|
||||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
|
||||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
|
||||||
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
|
||||||
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
|
||||||
ext x?html?, has elinks, terminal = elinks "$@"
|
|
||||||
ext x?html?, has links2, terminal = links2 "$@"
|
|
||||||
ext x?html?, has links, terminal = links "$@"
|
|
||||||
ext x?html?, has lynx, terminal = lynx -- "$@"
|
|
||||||
ext x?html?, has w3m, terminal = w3m "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Misc
|
|
||||||
#-------------------------------------------
|
|
||||||
# Define the "editor" for text files as first action
|
|
||||||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
|
||||||
mime ^text, label pager = "$PAGER" -- "$@"
|
|
||||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
|
||||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
|
||||||
|
|
||||||
ext 1 = man "$1"
|
|
||||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
|
||||||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
|
||||||
ext nes, has fceux, X = fceux "$1"
|
|
||||||
ext exe = wine "$1"
|
|
||||||
name ^[mM]akefile$ = make
|
|
||||||
|
|
||||||
#--------------------------------------------
|
|
||||||
# Scripts
|
|
||||||
#-------------------------------------------
|
|
||||||
ext py = python -- "$1"
|
|
||||||
ext pl = perl -- "$1"
|
|
||||||
ext rb = ruby -- "$1"
|
|
||||||
ext js = node -- "$1"
|
|
||||||
ext sh = sh -- "$1"
|
|
||||||
ext php = php -- "$1"
|
|
||||||
|
|
||||||
#--------------------------------------------
|
|
||||||
# Audio without X
|
|
||||||
#-------------------------------------------
|
|
||||||
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
|
|
||||||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
|
||||||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
|
||||||
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
|
||||||
|
|
||||||
#--------------------------------------------
|
|
||||||
# Video/Audio with a GUI
|
|
||||||
#-------------------------------------------
|
|
||||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
|
||||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
|
||||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
|
||||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
|
||||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
|
||||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
|
||||||
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
|
||||||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
|
||||||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
|
||||||
mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
|
||||||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
|
||||||
|
|
||||||
#--------------------------------------------
|
|
||||||
# Video without X
|
|
||||||
#-------------------------------------------
|
|
||||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
|
||||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
|
||||||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Documents
|
|
||||||
#-------------------------------------------
|
|
||||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
|
||||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
|
||||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
|
||||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
|
||||||
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
|
||||||
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
|
||||||
ext pdf, has evince, X, flag f = evince -- "$@"
|
|
||||||
ext pdf, has atril, X, flag f = atril -- "$@"
|
|
||||||
ext pdf, has okular, X, flag f = okular -- "$@"
|
|
||||||
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
|
||||||
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
|
||||||
ext pdf, has open, X, flag f = open "$@"
|
|
||||||
|
|
||||||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
|
|
||||||
|
|
||||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
|
||||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
|
||||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
|
||||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
|
||||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
|
||||||
|
|
||||||
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
|
||||||
ext djvu, has evince, X, flag f = evince -- "$@"
|
|
||||||
ext djvu, has atril, X, flag f = atril -- "$@"
|
|
||||||
ext djvu, has djview, X, flag f = djview -- "$@"
|
|
||||||
|
|
||||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
|
||||||
ext epub, has zathura, X, flag f = zathura -- "$@"
|
|
||||||
ext epub, has mupdf, X, flag f = mupdf -- "$@"
|
|
||||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
|
||||||
|
|
||||||
ext cbr, has zathura, X, flag f = zathura -- "$@"
|
|
||||||
ext cbz, has zathura, X, flag f = zathura -- "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Images
|
|
||||||
#-------------------------------------------
|
|
||||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
|
||||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
|
||||||
|
|
||||||
mime ^image, has imv, X, flag f = imv -- "$@"
|
|
||||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
|
||||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
|
||||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
|
||||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
|
||||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
|
||||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
|
||||||
mime ^image, has eom, X, flag f = eom -- "$@"
|
|
||||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
|
||||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
|
||||||
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
|
|
||||||
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
|
||||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
|
||||||
ext xcf, X, flag f = gimp -- "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Archives
|
|
||||||
#-------------------------------------------
|
|
||||||
|
|
||||||
# avoid password prompt by providing empty password
|
|
||||||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
|
||||||
# This requires atool
|
|
||||||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
|
||||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
|
||||||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
|
||||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
|
||||||
|
|
||||||
# Listing and extracting archives without atool:
|
|
||||||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
|
||||||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
|
||||||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
|
||||||
ext zip, has unzip = unzip -l "$1" | less
|
|
||||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
|
||||||
ext ace, has unace = unace l "$1" | less
|
|
||||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
|
||||||
ext rar, has unrar = unrar l "$1" | less
|
|
||||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Fonts
|
|
||||||
#-------------------------------------------
|
|
||||||
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Flag t fallback terminals
|
|
||||||
#-------------------------------------------
|
|
||||||
# Rarely installed terminal emulators get higher priority; It is assumed that
|
|
||||||
# if you install a rare terminal emulator, you probably use it.
|
|
||||||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
|
|
||||||
# a desktop environment or as fallback terminal emulators.
|
|
||||||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
|
|
||||||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
|
|
||||||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
|
|
||||||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Misc
|
|
||||||
#-------------------------------------------
|
|
||||||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
|
||||||
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
|
||||||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
|
||||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
|
||||||
|
|
||||||
#-------------------------------------------
|
|
||||||
# Generic file openers
|
|
||||||
#-------------------------------------------
|
|
||||||
label open, has xdg-open = xdg-open -- "$@"
|
|
||||||
label open, has open = open -- "$@"
|
|
||||||
|
|
||||||
# Define the editor for non-text files + pager as last action
|
|
||||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
|
||||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
|
||||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# The actions below are left so low down in this file on purpose, so #
|
|
||||||
# they are never triggered accidentally. #
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
# Execute a file as program/script.
|
|
||||||
mime application/x-executable = "$1"
|
|
||||||
|
|
||||||
# Move the file to trash using trash-cli.
|
|
||||||
label trash, has trash-put = trash-put -- "$@"
|
|
||||||
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash
|
|
350
ranger/scope.sh
@ -1,350 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o noclobber -o noglob -o nounset -o pipefail
|
|
||||||
IFS=$'\n'
|
|
||||||
|
|
||||||
## If the option `use_preview_script` is set to `true`,
|
|
||||||
## then this script will be called and its output will be displayed in ranger.
|
|
||||||
## ANSI color codes are supported.
|
|
||||||
## STDIN is disabled, so interactive scripts won't work properly
|
|
||||||
|
|
||||||
## This script is considered a configuration file and must be updated manually.
|
|
||||||
## It will be left untouched if you upgrade ranger.
|
|
||||||
|
|
||||||
## Because of some automated testing we do on the script #'s for comments need
|
|
||||||
## to be doubled up. Code that is commented out, because it's an alternative for
|
|
||||||
## example, gets only one #.
|
|
||||||
|
|
||||||
## Meanings of exit codes:
|
|
||||||
## code | meaning | action of ranger
|
|
||||||
## -----+------------+-------------------------------------------
|
|
||||||
## 0 | success | Display stdout as preview
|
|
||||||
## 1 | no preview | Display no preview at all
|
|
||||||
## 2 | plain text | Display the plain content of the file
|
|
||||||
## 3 | fix width | Don't reload when width changes
|
|
||||||
## 4 | fix height | Don't reload when height changes
|
|
||||||
## 5 | fix both | Don't ever reload
|
|
||||||
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
|
||||||
## 7 | image | Display the file directly as an image
|
|
||||||
|
|
||||||
## Script arguments
|
|
||||||
FILE_PATH="${1}" # Full path of the highlighted file
|
|
||||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
|
||||||
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
|
|
||||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
|
||||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
|
||||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
|
||||||
|
|
||||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
|
||||||
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
## Settings
|
|
||||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
|
||||||
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
|
|
||||||
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
|
|
||||||
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
|
|
||||||
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
|
|
||||||
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
|
|
||||||
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
|
|
||||||
|
|
||||||
handle_extension() {
|
|
||||||
case "${FILE_EXTENSION_LOWER}" in
|
|
||||||
## Archive
|
|
||||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
|
||||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
|
||||||
atool --list -- "${FILE_PATH}" && exit 5
|
|
||||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
rar)
|
|
||||||
## Avoid password prompt by providing empty password
|
|
||||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
7z)
|
|
||||||
## Avoid password prompt by providing empty password
|
|
||||||
7z l -p -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## PDF
|
|
||||||
pdf)
|
|
||||||
## Preview as text conversion
|
|
||||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
|
|
||||||
fmt -w "${PV_WIDTH}" && exit 5
|
|
||||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
|
|
||||||
fmt -w "${PV_WIDTH}" && exit 5
|
|
||||||
exiftool "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## BitTorrent
|
|
||||||
torrent)
|
|
||||||
transmission-show -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## OpenDocument
|
|
||||||
odt|ods|odp|sxw)
|
|
||||||
## Preview as text conversion
|
|
||||||
odt2txt "${FILE_PATH}" && exit 5
|
|
||||||
## Preview as markdown conversion
|
|
||||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## XLSX
|
|
||||||
xlsx)
|
|
||||||
## Preview as csv conversion
|
|
||||||
## Uses: https://github.com/dilshod/xlsx2csv
|
|
||||||
xlsx2csv -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## HTML
|
|
||||||
htm|html|xhtml)
|
|
||||||
## Preview as text conversion
|
|
||||||
w3m -dump "${FILE_PATH}" && exit 5
|
|
||||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
|
||||||
elinks -dump "${FILE_PATH}" && exit 5
|
|
||||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
|
||||||
;;
|
|
||||||
|
|
||||||
## JSON
|
|
||||||
json)
|
|
||||||
jq --color-output . "${FILE_PATH}" && exit 5
|
|
||||||
python -m json.tool -- "${FILE_PATH}" && exit 5
|
|
||||||
;;
|
|
||||||
|
|
||||||
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
|
|
||||||
## by file(1).
|
|
||||||
dff|dsf|wv|wvc)
|
|
||||||
mediainfo "${FILE_PATH}" && exit 5
|
|
||||||
exiftool "${FILE_PATH}" && exit 5
|
|
||||||
;; # Continue with next handler on failure
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
handle_image() {
|
|
||||||
## Size of the preview if there are multiple options or it has to be
|
|
||||||
## rendered from vector graphics. If the conversion program allows
|
|
||||||
## specifying only one dimension while keeping the aspect ratio, the width
|
|
||||||
## will be used.
|
|
||||||
local DEFAULT_SIZE="1920x1080"
|
|
||||||
|
|
||||||
local mimetype="${1}"
|
|
||||||
case "${mimetype}" in
|
|
||||||
## SVG
|
|
||||||
# image/svg+xml|image/svg)
|
|
||||||
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
# exit 1;;
|
|
||||||
|
|
||||||
## DjVu
|
|
||||||
# image/vnd.djvu)
|
|
||||||
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
|
|
||||||
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
|
|
||||||
# && exit 6 || exit 1;;
|
|
||||||
|
|
||||||
## Image
|
|
||||||
image/*)
|
|
||||||
local orientation
|
|
||||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
|
||||||
## If orientation data is present and the image actually
|
|
||||||
## needs rotating ("1" means no rotation)...
|
|
||||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
|
||||||
## ...auto-rotate the image according to the EXIF data.
|
|
||||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
fi
|
|
||||||
|
|
||||||
## `w3mimgdisplay` will be called for all images (unless overriden
|
|
||||||
## as above), but might fail for unsupported types.
|
|
||||||
exit 7;;
|
|
||||||
|
|
||||||
## Video
|
|
||||||
# video/*)
|
|
||||||
# # Thumbnail
|
|
||||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
|
||||||
# exit 1;;
|
|
||||||
|
|
||||||
## PDF
|
|
||||||
# application/pdf)
|
|
||||||
# pdftoppm -f 1 -l 1 \
|
|
||||||
# -scale-to-x "${DEFAULT_SIZE%x*}" \
|
|
||||||
# -scale-to-y -1 \
|
|
||||||
# -singlefile \
|
|
||||||
# -jpeg -tiffcompression jpeg \
|
|
||||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
|
||||||
# && exit 6 || exit 1;;
|
|
||||||
|
|
||||||
|
|
||||||
## ePub, MOBI, FB2 (using Calibre)
|
|
||||||
# application/epub+zip|application/x-mobipocket-ebook|\
|
|
||||||
# application/x-fictionbook+xml)
|
|
||||||
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
|
|
||||||
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
|
|
||||||
# "${DEFAULT_SIZE%x*}" && exit 6
|
|
||||||
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
|
|
||||||
# >/dev/null && exit 6
|
|
||||||
# exit 1;;
|
|
||||||
|
|
||||||
## Font
|
|
||||||
application/font*|application/*opentype)
|
|
||||||
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
|
|
||||||
if fontimage -o "${preview_png}" \
|
|
||||||
--pixelsize "120" \
|
|
||||||
--fontname \
|
|
||||||
--pixelsize "80" \
|
|
||||||
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
|
|
||||||
--text " abcdefghijklmnopqrstuvwxyz " \
|
|
||||||
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
|
|
||||||
--text " The quick brown fox jumps over the lazy dog. " \
|
|
||||||
"${FILE_PATH}";
|
|
||||||
then
|
|
||||||
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
|
|
||||||
&& rm "${preview_png}" \
|
|
||||||
&& exit 6
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
## Preview archives using the first image inside.
|
|
||||||
## (Very useful for comic book collections for example.)
|
|
||||||
# application/zip|application/x-rar|application/x-7z-compressed|\
|
|
||||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
|
|
||||||
# local fn=""; local fe=""
|
|
||||||
# local zip=""; local rar=""; local tar=""; local bsd=""
|
|
||||||
# case "${mimetype}" in
|
|
||||||
# application/zip) zip=1 ;;
|
|
||||||
# application/x-rar) rar=1 ;;
|
|
||||||
# application/x-7z-compressed) ;;
|
|
||||||
# *) tar=1 ;;
|
|
||||||
# esac
|
|
||||||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
|
|
||||||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
|
|
||||||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
|
|
||||||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
|
|
||||||
#
|
|
||||||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
|
|
||||||
# [ print(l, end='') for l in sys.stdin if \
|
|
||||||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
|
|
||||||
# sort -V | head -n 1)
|
|
||||||
# [ "$fn" = "" ] && return
|
|
||||||
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
|
|
||||||
#
|
|
||||||
# [ "$tar" ] && tar --extract --to-stdout \
|
|
||||||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
|
|
||||||
# [ "$bsd" ] && bsdtar --extract --to-stdout \
|
|
||||||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
|
|
||||||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
|
|
||||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
|
|
||||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
|
||||||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
|
|
||||||
# ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# openscad_image() {
|
|
||||||
# TMPPNG="$(mktemp -t XXXXXX.png)"
|
|
||||||
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
|
||||||
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
|
||||||
# -o "${TMPPNG}" "${1}"
|
|
||||||
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
|
||||||
# }
|
|
||||||
|
|
||||||
# case "${FILE_EXTENSION_LOWER}" in
|
|
||||||
# ## 3D models
|
|
||||||
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
|
||||||
# ## is hardcoded as jpeg. So we make a tempfile.png and just
|
|
||||||
# ## move/rename it to jpg. This works because image libraries are
|
|
||||||
# ## smart enough to handle it.
|
|
||||||
# csg|scad)
|
|
||||||
# openscad_image "${FILE_PATH}" && exit 6
|
|
||||||
# ;;
|
|
||||||
# 3mf|amf|dxf|off|stl)
|
|
||||||
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
|
|
||||||
# ;;
|
|
||||||
# esac
|
|
||||||
}
|
|
||||||
|
|
||||||
handle_mime() {
|
|
||||||
local mimetype="${1}"
|
|
||||||
case "${mimetype}" in
|
|
||||||
## RTF and DOC
|
|
||||||
text/rtf|*msword)
|
|
||||||
## Preview as text conversion
|
|
||||||
## note: catdoc does not always work for .doc files
|
|
||||||
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
|
|
||||||
catdoc -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## DOCX, ePub, FB2 (using markdown)
|
|
||||||
## You might want to remove "|epub" and/or "|fb2" below if you have
|
|
||||||
## uncommented other methods to preview those formats
|
|
||||||
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
|
|
||||||
## Preview as markdown conversion
|
|
||||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## XLS
|
|
||||||
*ms-excel)
|
|
||||||
## Preview as csv conversion
|
|
||||||
## xls2csv comes with catdoc:
|
|
||||||
## http://www.wagner.pp.ru/~vitus/software/catdoc/
|
|
||||||
xls2csv -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## Text
|
|
||||||
text/* | */xml)
|
|
||||||
## Syntax highlight
|
|
||||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
if [[ "$( tput colors )" -ge 256 ]]; then
|
|
||||||
local pygmentize_format='terminal256'
|
|
||||||
local highlight_format='xterm256'
|
|
||||||
else
|
|
||||||
local pygmentize_format='terminal'
|
|
||||||
local highlight_format='ansi'
|
|
||||||
fi
|
|
||||||
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
|
|
||||||
--out-format="${highlight_format}" \
|
|
||||||
--force -- "${FILE_PATH}" && exit 5
|
|
||||||
env COLORTERM=8bit bat --color=always --style="plain" \
|
|
||||||
-- "${FILE_PATH}" && exit 5
|
|
||||||
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
|
|
||||||
-- "${FILE_PATH}" && exit 5
|
|
||||||
exit 2;;
|
|
||||||
|
|
||||||
## DjVu
|
|
||||||
image/vnd.djvu)
|
|
||||||
## Preview as text conversion (requires djvulibre)
|
|
||||||
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
|
|
||||||
exiftool "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## Image
|
|
||||||
image/*)
|
|
||||||
## Preview as text conversion
|
|
||||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
|
||||||
exiftool "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
## Video and audio
|
|
||||||
video/* | audio/*)
|
|
||||||
mediainfo "${FILE_PATH}" && exit 5
|
|
||||||
exiftool "${FILE_PATH}" && exit 5
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
handle_fallback() {
|
|
||||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
|
||||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
|
||||||
handle_image "${MIMETYPE}"
|
|
||||||
fi
|
|
||||||
handle_extension
|
|
||||||
handle_mime "${MIMETYPE}"
|
|
||||||
handle_fallback
|
|
||||||
|
|
||||||
exit 1
|
|
252
rofi/config-compact.rasi
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
/*
|
||||||
|
# ____ __ _
|
||||||
|
# | _ \ ___ / _(_)
|
||||||
|
# | |_) / _ \| |_| |
|
||||||
|
# | _ < (_) | _| |
|
||||||
|
# |_| \_\___/|_| |_|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ---- Configuration ---- */
|
||||||
|
configuration {
|
||||||
|
modi: "drun,run";
|
||||||
|
font: "Fira Sans Bold 10";
|
||||||
|
show-icons: false;
|
||||||
|
icon-theme: "kora";
|
||||||
|
display-drun: "APPS";
|
||||||
|
display-run: "RUN";
|
||||||
|
display-filebrowser: "FILES";
|
||||||
|
display-window: "WINDOW";
|
||||||
|
hover-select: true;
|
||||||
|
me-select-entry: "";
|
||||||
|
me-accept-entry: "MousePrimary";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
window-format: "{w} · {c} · {t}";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
|
||||||
|
/* ---- Window ---- */
|
||||||
|
window {
|
||||||
|
width: 600px;
|
||||||
|
x-offset: 0px;
|
||||||
|
y-offset: 65px;
|
||||||
|
spacing: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border: 3px;
|
||||||
|
border-color: #FFFFFF;
|
||||||
|
cursor: "default";
|
||||||
|
transparency: "real";
|
||||||
|
location: north;
|
||||||
|
anchor: north;
|
||||||
|
fullscreen: false;
|
||||||
|
enabled: true;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Mainbox ---- */
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
orientation: horizontal;
|
||||||
|
spacing: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
background-color: @background;
|
||||||
|
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
||||||
|
children: ["listbox"];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Imagebox ---- */
|
||||||
|
imagebox {
|
||||||
|
padding: 18px;
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listbox ---- */
|
||||||
|
listbox {
|
||||||
|
spacing: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "inputbar", "message", "listview" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Dummy ---- */
|
||||||
|
dummy {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Inputbar ---- */
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
text-color: @foreground;
|
||||||
|
spacing: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @foreground;
|
||||||
|
background-color: @background;
|
||||||
|
children: [ "textbox-prompt-colon", "entry" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt-colon {
|
||||||
|
enabled: true;
|
||||||
|
expand: false;
|
||||||
|
str: "";
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: text;
|
||||||
|
placeholder: "Search";
|
||||||
|
placeholder-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Mode Switcher ---- */
|
||||||
|
mode-switcher{
|
||||||
|
enabled: true;
|
||||||
|
spacing: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button selected {
|
||||||
|
background-color: @color11;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
spacing: 0px;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0px;
|
||||||
|
background-color: @background;
|
||||||
|
border:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Element ---- */
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: @background;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal.normal {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal.urgent {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal.active {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.normal {
|
||||||
|
background-color: @color11;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.urgent {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.active {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element alternate.normal {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element alternate.urgent {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element alternate.active {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
size: 32px;
|
||||||
|
cursor: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Message -----*****/
|
||||||
|
message {
|
||||||
|
background-color: transparent;
|
||||||
|
border:0px;
|
||||||
|
margin:20px 0px 0px 0px;
|
||||||
|
padding:0px;
|
||||||
|
spacing:0px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox {
|
||||||
|
padding: 15px;
|
||||||
|
margin: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
error-message {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
@ -43,8 +43,8 @@ window {
|
|||||||
border-color: #FFFFFF;
|
border-color: #FFFFFF;
|
||||||
cursor: "default";
|
cursor: "default";
|
||||||
transparency: "real";
|
transparency: "real";
|
||||||
location: northeast;
|
location: center;
|
||||||
anchor: northeast;
|
anchor: center;
|
||||||
fullscreen: false;
|
fullscreen: false;
|
||||||
enabled: true;
|
enabled: true;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
@ -33,7 +33,6 @@ configuration {
|
|||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 130px;
|
|
||||||
x-offset: 0px;
|
x-offset: 0px;
|
||||||
y-offset: 0px;
|
y-offset: 0px;
|
||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
|
Before Width: | Height: | Size: 653 KiB After Width: | Height: | Size: 653 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 4.7 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 722 KiB After Width: | Height: | Size: 722 KiB |
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 618 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
BIN
screenshots/v25/screenshot-25-1.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
screenshots/v25/screenshot-25-2.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
screenshots/v25/screenshot-25-3.png
Normal file
After Width: | Height: | Size: 659 KiB |
BIN
screenshots/v25/screenshot-25-4.png
Normal file
After Width: | Height: | Size: 406 KiB |
BIN
screenshots/v25/screenshot-25-5.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
screenshots/v25/screenshot-25-6.png
Normal file
After Width: | Height: | Size: 3.8 MiB |
@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _ _ _
|
|
||||||
# / \ _ __ _ __ | | __ _ _ _ _ __ ___| |__ ___ _ __
|
|
||||||
# / _ \ | '_ \| '_ \ | | / _` | | | | '_ \ / __| '_ \ / _ \ '__|
|
|
||||||
# / ___ \| |_) | |_) | | |__| (_| | |_| | | | | (__| | | | __/ |
|
|
||||||
# /_/ \_\ .__/| .__/ |_____\__,_|\__,_|_| |_|\___|_| |_|\___|_|
|
|
||||||
# |_| |_|
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
|
|
||||||
rofi -show drun
|
|
@ -1,3 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# _
|
||||||
|
# ___| | ___ __ _ _ __ _ _ _ __
|
||||||
|
# / __| |/ _ \/ _` | '_ \ | | | | '_ \
|
||||||
|
# | (__| | __/ (_| | | | | | |_| | |_) |
|
||||||
|
# \___|_|\___|\__,_|_| |_| \__,_| .__/
|
||||||
|
# |_|
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
yay -Scc
|
yay -Scc
|
||||||
su -c 'pacman -Qtdq | pacman -Rns -'
|
su -c 'pacman -Qtdq | pacman -Rns -'
|
||||||
su -c 'pacman -Qqd | pacman -Rsu -'
|
su -c 'pacman -Qqd | pacman -Rsu -'
|
||||||
|