commit c1afb50799c08aa2ed2308e73d7e3084f03e8843 Author: Janis Hutz Date: Fri Feb 28 11:41:18 2025 +0100 Upload from GitHub diff --git a/README.md b/README.md new file mode 100644 index 0000000..75234cf --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# my personal dotfiles for Hyprland and others + +Contains the following config files: + +- waybar conifg (including CSS styling) +- hyprland config (hyprland.conf) +- dunst config +- fish config +- rofi config +- vscodium settings diff --git a/ai-update.sh b/ai-update.sh new file mode 100755 index 0000000..1bd642e --- /dev/null +++ b/ai-update.sh @@ -0,0 +1,3 @@ +docker pull ghcr.io/open-webui/open-webui:latest +docker container rm open-webui +docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v /home/janis/projects/otherProjects/open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:latest diff --git a/ai.sh b/ai.sh new file mode 100755 index 0000000..67f9763 --- /dev/null +++ b/ai.sh @@ -0,0 +1,24 @@ +echo " + ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄ +█ █ █ █ █ █ █ █▄█ █ █ +█ ▄ █ █ █ █ █ ▄ █ █ ▄ █ +█ █ █ █ █ █ █ █ █▄█ █ █ █▄█ █ +█ █▄█ █ █▄▄▄█ █▄▄▄█ █ █ █ +█ █ █ █ ▄ █ ██▄██ █ ▄ █ +█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄█ █▄▄█▄█ █▄█▄█ █▄▄█ + +==> Starting ollama +" + +cmd="ollama serve"; +eval "${cmd}" &>/dev/null & disown; + +echo "==> Starting docker" +systemctl start docker + +echo "==> Starting open-webui." +docker start -i open-webui + +echo "==> Done. Visit http://localhost:3000 for a web-ui, http://localhost:11434 to check ollama status" + +read "Press enter to finish" diff --git a/collect.sh b/collect.sh new file mode 100755 index 0000000..179fec0 --- /dev/null +++ b/collect.sh @@ -0,0 +1,52 @@ +#! /bin/bash + +# Copy VSCodium settings +mkdir -p ./general/configs/VSCodium/User +cp ~/.config/VSCodium/product.json ./general/configs/VSCodium/ +cp -r ~/.config/VSCodium/User/snippets ./general/configs/VSCodium/User/ +cp -r ~/.config/VSCodium/User/globalStorage ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/keybindings.json ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/settings.json ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/syncLocalSettings.json ./general/configs/VSCodium/User/ +rm -rf ./general/configs/VSCodium/User/globalStorage + +rm ./pc/installedPackages.txt +pacman -Qq > ./pc/installedPackages.txt +sudo cat /etc/pacman.conf > ./general/pacman.conf +sudo cat /etc/mkinitcpio.conf > ./general/mkinitcpio.conf +sudo cat /etc/environment > ./pc/environment +sudo cat /etc/default/grub > ./pc/grub +mkdir ./general/docker +sudo cat /etc/docker/daemon.json > ./general/docker/daemon.json + +cp ~/.bash_history ./general +cp ~/.bashrc ./general + +# copy other config files +mkdir ./pc/configs/OpenRGB +mkdir ./pc/configs/Portmaster +cp -r ~/.config/hypr ./pc/configs/ +cp -r ~/.config/waybar ./pc/configs/ +cp -r ~/.config/OpenRGB/OpenRGB.json ./pc/configs/OpenRGB/OpenRGB.json +cp ~/.config/Portmaster/Preferences ./pc/configs/Portmaster/ +cp -r ~/.config/mpv ./general/configs +cp -r ~/.config/wlogout ./general/configs/ +cp -r ~/.config/fish ./general/configs/ +cp -r ~/.config/dunst ./general/configs/ +cp -r ~/.config/rofi ./general/configs/ +cp -r ~/.config/kitty ./general/configs/ +cp -r ~/.config/terminator ./general/configs/ +cp -r ~/.config/Thunar ./general/configs/ +cp -r ~/.config/yazi ./general/configs/ +rm -rf ./pc/configs/hypr/hyprland/ +cp -r ~/.config/hypr/hyprland/* ./general/hyprland/ + +# Get systemd mount jobs +sudo cp -r /etc/systemd/system/mnt* ./pc/mnt +sudo chmod -R 777 ./pc/mnt + + +vscodium --list-extensions > ./general/vscode-extensions + + +echo "Collected. Also consider running nvim-collect!" diff --git a/collectLaptop.sh b/collectLaptop.sh new file mode 100755 index 0000000..447d504 --- /dev/null +++ b/collectLaptop.sh @@ -0,0 +1,29 @@ +#! /bin/bash + +# Copy VSCodium settings +mkdir -p ./general/configs/VSCodium/User +cp ~/.config/VSCodium/product.json ./general/configs/VSCodium/ +cp -r ~/.config/VSCodium/User/snippets ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/keybindings.json ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/settings.json ./general/configs/VSCodium/User/ +cp ~/.config/VSCodium/User/syncLocalSettings.json ./general/configs/VSCodium/User/ + +rm ./laptop/installedPackages.txt +pacman -Qq > ./laptop/installedPackages.txt + +# copy other config files +cp -r ~/.config/hypr ./laptop/configs +cp -r ~/.config/waybar ./laptop/configs +cp -r ~/.config/wlogout ./general/configs +cp -r ~/.config/mpv ./general/configs +cp -r ~/.config/dunst ./general/configs +cp -r ~/.config/fish ./general/configs +cp -r ~/.config/rofi ./general/configs +cp -r ~/.config/yazi ./general/configs +cp -r ~/.config/kitty ./general/configs +rm -rf ./laptop/configs/hypr/hyprland/ +cp -r ~/.config/hypr/hyprland/* ./general/hyprland/ + +echo '=> Collected all laptop config files successfully' + +echo "Also consider running nvim-collect!" diff --git a/fix-da-snippets.py b/fix-da-snippets.py new file mode 100644 index 0000000..5633425 --- /dev/null +++ b/fix-da-snippets.py @@ -0,0 +1,73 @@ +import os +import re +import json +import sys + +def clean_json(content): + # Step 1: Remove comments (lines starting with //) + content = re.sub(r'^//.*\n', '', content, flags=re.MULTILINE) + + # Step 2: Replace single quotes with double quotes for JSON compatibility + content = content.replace("'", '"') + + # Step 3: Remove trailing commas in both objects and arrays + # Remove trailing commas in arrays + content = re.sub(r',\s*([\]}])', r'\1', content) + # Remove trailing commas in objects + content = re.sub(r',\s*(\n|\})', r'\1', content) + + # Step 4: Escape backslashes in LaTeX snippets + content = content.replace("\\", "\\\\") # Double backslashes for JSON + + # Step 5: Parse and re-encode to ensure valid JSON (removes trailing commas) + try: + data = json.loads(content) # Parse the content into a Python dictionary + cleaned_json = json.dumps(data, indent=4) # Re-encode into JSON, pretty-printed + except json.JSONDecodeError as e: + print(f"Error parsing JSON: {e}") + return None + + return cleaned_json + +def process_directory(directory): + # Loop through files in the specified directory (non-recursively) + for filename in os.listdir(directory): + file_path = os.path.join(directory, filename) + + # Only process files that end with .json + if os.path.isfile(file_path) and filename.endswith('.json'): + print(f"Processing {file_path}") + + # Read the file content + with open(file_path, 'r', encoding='utf-8') as file: + content = file.read() + + # Clean the JSON content + cleaned_content = clean_json(content) + + if cleaned_content is not None: + # Write the cleaned content back to the file + with open(file_path, 'w', encoding='utf-8') as file: + file.write(cleaned_content) + print(f"Fixed formatting in {file_path}") + else: + print(f"Failed to fix {file_path} due to JSON parsing error.") + +def main(): + # Check if a directory was passed as an argument, otherwise read from stdin + if len(sys.argv) > 1: + directory = sys.argv[1] + else: + print("Please provide a directory path as an argument.") + sys.exit(1) + + # Check if the directory exists + if not os.path.isdir(directory): + print(f"The provided path '{directory}' is not a valid directory.") + sys.exit(1) + + # Process all .json files in the directory + process_directory(directory) + +if __name__ == '__main__': + main() diff --git a/general/.bash_history b/general/.bash_history new file mode 100644 index 0000000..e691e82 --- /dev/null +++ b/general/.bash_history @@ -0,0 +1,500 @@ +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler-cli.py --onefile --name imagevideoupscaler --hidden-import "bin.engines" +./imagevideoupscaler +pyinstaller imagevideoupscaler-cli.py --onefile --name imagevideoupscaler +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +pyinstaller imagevideoupscaler-cli.py --name imagevideoupscaler +cd dist/imagevideoupscaler/ +./imagevideoupscaler -i +cd ../.. +cd ~/projects/FSRImageVideoUpscalerFrontend_New/ +ls +clear +ls +clear +yay -S rpm-build +yay -S rpm-tools +yay -S dpkg +yay -S fakeroot +clear +pip3 install py2deb +py2deb -r ./ +py2deb -r ~/projects/FSRImageVideoUpscalerFrontend_New/ +pip3 install symbol +clear +yay -S symbol +clear +pip3 install pyinstaller +yay -S python-pip +py2deb +python3 imagevideoupscaler-cli.py +clear +pip3 install symbol +pip3 install setuptools +yay -R python-pip +yay -S python-pip +pip install --upgrade pip +clear +pip install setuptools +yay -S setuptools +sudo pacman -Syu "pacman>=6.0.2-7" +pip3 +yay -S python-pip +yay -S python3-pip +clear +yay -S python-pip +pip3 install +python -m pip3 +python -m pip +pip +pip3 +clear +pip3 +pip3 install +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -M c -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +npm run serve +npm run serve +npm run serve +npm i +npm run serve +clear +cd ../../website/ +cd dist/ +http-server +http-server +git pull origin main +git checkout origin master +git checkout origin main +cd frontend/ +npm run electron:serve +npm i -g @vue/cli +sudo npm i -g @vue/cli +npm audit fix --force +npm audit fix --force +npm audit fix --force +npm i +npm i +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i child_process +clear +npm run electron:serve +npm run serve +npm run serve +npm run serve +cd .. +ls +clear +python3 imagevideoupscaler-cli.py -h +python3 imagevideoupscaler-cli.py -p +python3 imagevideoupscaler-cli.py -h +python3 imagevideoupscaler-cli.py -d ss +cd frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i --save-dev @electron-forge/cli +npm exec --package=@electron-forge/cli -c "electron-forge import" +npm run make +cd src/ +npm run make +clear +cd .. +npm run electron:build +npm run electron:build -- --linux deb --win nsis +clear +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +yay -S libcript +yay -S libssl +clear +npm run electron:build -- --linux deb --linux rpm --win nsis +npm run electron:build -- --linux deb rpm --win nsis +yay -S libxcrypt-compat +npm run electron:build -- --linux deb rpm --win nsis +npm run electron:build -- --linux deb rpm --win nsis +cd ../packaging/ +ls +sudo chmod +x package.sh +./package.sh +mv --help +pip3 install pyinstaller +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +cd packaging/ +ls +sudo chmod +x package.sh +sudo chmod +x package.sh +./package.sh +./package.sh +./package.sh +cd ../dist/imagevideoupscaler/ +cd ../../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +clear +cd ../frontend/ +npm run electron:serve +cd ../packaging/ +./package.sh +cd ../frontend/ +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +clear +cd ../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +./imagevideoupscaler +./imagevideoupscaler -i /home/janis/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -s 2 -S 0.25 +clear +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i socket.io +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i socket.io-client +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +sudo chmod +x ./prepareWindowsPackaging.sh +./prepareWindowsPackaging.sh +wine python -m pip install pyinstaller +./package.sh +./package.sh +wine python -m PyInstaller +./package.sh +cd ../frontend/dist_electron/ +wine imagevideoupscaler\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +clear +cd ../frontend/ +npm run electron:serve +cd .. +python3 imagevideoupscaler-cli.py -d ss +cd frontend/ +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +sudo chmod +x packageWindows.sh +sudo chmod +x packageLinux.sh +./packageWindows.sh +./packageWindows.sh +cd .. +python3 imagevideoupscaler-cli.py -h +cd frontend/ +npm run serve +npm run electron:serve +npm run electron:serve +cd ../frontend/ +cd ../packaging/ +./packageWindows.sh +cd ../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i electron +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +sudo chmod +x startTesting.sh +sudo chmod +x stopTesting.sh +clear +./startTesting.sh +cd ../frontend/ +npm run serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./stopTesting.sh +./stopTesting.sh +./packageWindows.sh +cd .. +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png -s 2 +cd ../fro +cd frontend/ +npm run serve +npm run electron:serve +cd ../packaging/ +./package.sh +./stopTesting.sh +./package.sh +./package.sh +cd ../frontend/ +npm run electron:serve +cd ../packaging/ +./packageWindows.sh +cd src/webapp/ +npm run serve +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe +cd ../packaging/ +clear +./stopTesting.sh +./packageLinux.sh +cd ../frontend/ +./smuL-cli +clear +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +wine -m pip install importlib +clear +./stopTesting.sh +./prepareWindowsPackaging.sh +clear +cd ../ +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +cd packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -h +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +clear +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +clear +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +sudo chmod +x packageTesting.sh +./packageTesting.sh +cd ../frontend/dist_electron/linux-unpacked/ +ls +./simplemediascalerlite +cd ../../ +cd ../packag +cd ../packaging/ +./packageLinux.sh +./packageLinux.sh +./packageLinux.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +wine SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +./package.sh +cd .. +python3 smuL-cli.py -i /home/janis/Downloads/test.png -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -s 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -s 2 +clear +cd ./packaging/ +./packageWindows.sh +./packageWindows.sh +./packageWindows.sh +./packageWindows.sh +./package.sh +cd packag +cd packaging/ +./packageWindows.sh +./packageWindows.sh +cd ../../italian/ +http-server +node server.js +node server.js +node server.js +node server.js +node server.js +node server.js +node server.js +ls | grep -v jpg$ | while IFS= read -r FILENAME; do convert "${FILENAME}" "${FILENAME%.*}.jpg"; done +clear +for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "${i%.*}.mp4"; done +rm ./*.mp4 +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +file="/home/janis/dotfiles/config/vscode-extensions" +while read line; do vscodium --install-extension "${line}"; done < "${file}" +yay -S vscodium +clear +cp ./dotfiles/config/.bashrc .bashrc +clear +exit +clear +sudo plymouth-set-default-theme -R bgrt +cd dotfiles/ +sudo cp ./config/environment /etc/environment +sudo cp ./config/mkinitcpio.conf /etc/mkinitcpio.conf +sudo cp ./config/pacman.conf /etc/pacman.conf +clear +yay -Syu +clear +hugo +clear +cd /tmp +git clone https://github.com/rtlewis1/GTK/tree/Material-Black-Colors-Desktop +cd Material-Black-Colors-Desktop/ +sudo cp ./Material-Black-Blueberry /usr/share/themes +ls +git clone https://github.com/rtlewis1/GTK +cd gtk +cd GTK +git checkout Material-Black-Colors-Desktop +clear +ls +sudo cp ./Material-Black-Blueberry /usr/share/themes +sudo cp -r ./Material-Black-Blueberry /usr/share/themes +cd /tmp +git clone https://github.com/varlesh/oreo-cursors +cd oreo-cursors/generator +echo "black = #424242" > ./colours.conf +ruby convert.rb +cd .. +make build +sudo make install +ls +sudo make +sudo make build +make build +clear +cat build.sh +make build +clear +yay -S librewolf-bin +exit +file="/home/janis/dotfiles/config/vscode-extensions" +while read line; do vscodium --install-extension "${line}"; done < "${file}" diff --git a/general/.bashrc b/general/.bashrc new file mode 100644 index 0000000..95b0a32 --- /dev/null +++ b/general/.bashrc @@ -0,0 +1,359 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export PATH="/home/janis/.local/share/gem/ruby/3.0.0/bin: $PATH" +export PATH="/home/janis/.local/bin: $PATH" +alias editHyprlandConf='nano ~/.config/hypr/hyprland.conf' +alias ls='ls -l --color=auto' +alias ll='ls -la --color=auto' +alias sl='ls --color=auto' +alias start-httpd='sudo systemctl start httpd' +PS1='[\u@\h \W]\$ ' + +################################################################################ +## FUNCTIONS ## +################################################################################ + +## +## ARRANGE $PWD AND STORE IT IN $NEW_PWD +## * The home directory (HOME) is replaced with a ~ +## * The last pwdmaxlen characters of the PWD are displayed +## * Leading partial directory names are striped off +## /home/me/stuff -> ~/stuff (if USER=me) +## /usr/share/big_dir_name -> ../share/big_dir_name (if pwdmaxlen=20) +## +## Original source: WOLFMAN'S color bash promt +## https://wiki.chakralinux.org/index.php?title=Color_Bash_Prompt#Wolfman.27s +## +bash_prompt_command() { + # How many characters of the $PWD should be kept + local pwdmaxlen=25 + + # Indicate that there has been dir truncation + local trunc_symbol=".." + + # Store local dir + local dir=${PWD##*/} + + # Which length to use + pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen )) + + NEW_PWD=${PWD/#$HOME/\~} + + local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen )) + + # Generate name + if [ ${pwdoffset} -gt "0" ] + then + NEW_PWD=${NEW_PWD:$pwdoffset:$pwdmaxlen} + NEW_PWD=${trunc_symbol}/${NEW_PWD#*/} + fi +} + + + + +## +## GENERATE A FORMAT SEQUENCE +## +format_font() +{ + ## FIRST ARGUMENT TO RETURN FORMAT STRING + local output=$1 + + + case $# in + 2) + eval $output="'\[\033[0;${2}m\]'" + ;; + 3) + eval $output="'\[\033[0;${2};${3}m\]'" + ;; + 4) + eval $output="'\[\033[0;${2};${3};${4}m\]'" + ;; + *) + eval $output="'\[\033[0m\]'" + ;; + esac +} + + + +## +## COLORIZE BASH PROMT +## +bash_prompt() { + + ############################################################################ + ## COLOR CODES ## + ## These can be used in the configuration below ## + ############################################################################ + + ## FONT EFFECT + local NONE='0' + local BOLD='1' + local DIM='2' + local UNDERLINE='4' + local BLINK='5' + local INVERT='7' + local HIDDEN='8' + + + ## COLORS + local DEFAULT='9' + local BLACK='0' + local RED='1' + local GREEN='2' + local YELLOW='3' + local BLUE='4' + local MAGENTA='5' + local CYAN='6' + local L_GRAY='7' + local D_GRAY='60' + local L_RED='61' + local L_GREEN='62' + local L_YELLOW='63' + local L_BLUE='64' + local L_MAGENTA='65' + local L_CYAN='66' + local WHITE='67' + + + ## TYPE + local RESET='0' + local EFFECT='0' + local COLOR='30' + local BG='40' + + + ## 256 COLOR CODES + local NO_FORMAT="\[\033[0m\]" + local ORANGE_BOLD="\[\033[1;38;5;208m\]" + local TOXIC_GREEN_BOLD="\[\033[1;38;5;118m\]" + local RED_BOLD="\[\033[1;38;5;1m\]" + local CYAN_BOLD="\[\033[1;38;5;87m\]" + local BLACK_BOLD="\[\033[1;38;5;0m\]" + local WHITE_BOLD="\[\033[1;38;5;15m\]" + local GRAY_BOLD="\[\033[1;90m\]" + local BLUE_BOLD="\[\033[1;38;5;74m\]" + + + + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + ## CONFIGURE HERE ## + + + + ############################################################################ + ## CONFIGURATION ## + ## Choose your color combination here ## + ############################################################################ + local FONT_COLOR_1=$WHITE + local BACKGROUND_1=$RED + local TEXTEFFECT_1=$BOLD + + local FONT_COLOR_2=$WHITE + local BACKGROUND_2=$YELLOW + local TEXTEFFECT_2=$BOLD + + local FONT_COLOR_3=$D_GRAY + local BACKGROUND_3=$WHITE + local TEXTEFFECT_3=$BOLD + + local PROMT_FORMAT=$BLUE_BOLD + + + ############################################################################ + ## EXAMPLE CONFIGURATIONS ## + ## I use them for different hosts. Test them out ;) ## + ############################################################################ + + ## CONFIGURATION: BLUE-WHITE + if [ "$HOSTNAME" = dell ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLUE; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$D_GRAY; BACKGROUND_3=$WHITE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: BLACK-RED + if [ "$HOSTNAME" = giraff6 ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$RED; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$RED_BOLD + fi + + ## CONFIGURATION: RED-BLACK + #FONT_COLOR_1=$WHITE; BACKGROUND_1=$RED; TEXTEFFECT_1=$BOLD + #FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + #FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLACK; TEXTEFFECT_3=$BOLD + #PROMT_FORMAT=$RED_BOLD + + ## CONFIGURATION: CYAN-BLUE + if [ "$HOSTNAME" = sharkoon ]; then + FONT_COLOR_1=$BLACK; BACKGROUND_1=$L_CYAN; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLUE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: GRAY-SCALE + if [ "$HOSTNAME" = giraff ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$L_GRAY; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$BLACK_BOLD + fi + + ## CONFIGURATION: GRAY-CYAN + if [ "$HOSTNAME" = light ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$BLACK; BACKGROUND_3=$L_CYAN; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + + ############################################################################ + ## TEXT FORMATING ## + ## Generate the text formating according to configuration ## + ############################################################################ + + ## CONVERT CODES: add offset + FC1=$(($FONT_COLOR_1+$COLOR)) + BG1=$(($BACKGROUND_1+$BG)) + FE1=$(($TEXTEFFECT_1+$EFFECT)) + + FC2=$(($FONT_COLOR_2+$COLOR)) + BG2=$(($BACKGROUND_2+$BG)) + FE2=$(($TEXTEFFECT_2+$EFFECT)) + + FC3=$(($FONT_COLOR_3+$COLOR)) + BG3=$(($BACKGROUND_3+$BG)) + FE3=$(($TEXTEFFECT_3+$EFFECT)) + + FC4=$(($FONT_COLOR_4+$COLOR)) + BG4=$(($BACKGROUND_4+$BG)) + FE4=$(($TEXTEFFECT_4+$EFFECT)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local TEXT_FORMAT_1 + local TEXT_FORMAT_2 + local TEXT_FORMAT_3 + local TEXT_FORMAT_4 + format_font TEXT_FORMAT_1 $FE1 $FC1 $BG1 + format_font TEXT_FORMAT_2 $FE2 $FC2 $BG2 + format_font TEXT_FORMAT_3 $FC3 $FE3 $BG3 + format_font TEXT_FORMAT_4 $FC4 $FE4 $BG4 + + + # GENERATE PROMT SECTIONS + local PROMT_USER=$"$TEXT_FORMAT_1 \u " + local PROMT_HOST=$"$TEXT_FORMAT_2 \h " + local PROMT_PWD=$"$TEXT_FORMAT_3 \${NEW_PWD} " + local PROMT_INPUT=$"$PROMT_FORMAT " + + + ############################################################################ + ## SEPARATOR FORMATING ## + ## Generate the separators between sections ## + ## Uses background colors of the sections ## + ############################################################################ + + ## CONVERT CODES + TSFC1=$(($BACKGROUND_1+$COLOR)) + TSBG1=$(($BACKGROUND_2+$BG)) + + TSFC2=$(($BACKGROUND_2+$COLOR)) + TSBG2=$(($BACKGROUND_3+$BG)) + + TSFC3=$(($BACKGROUND_3+$COLOR)) + TSBG3=$(($DEFAULT+$BG)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local SEPARATOR_FORMAT_1 + local SEPARATOR_FORMAT_2 + local SEPARATOR_FORMAT_3 + format_font SEPARATOR_FORMAT_1 $TSFC1 $TSBG1 + format_font SEPARATOR_FORMAT_2 $TSFC2 $TSBG2 + format_font SEPARATOR_FORMAT_3 $TSFC3 $TSBG3 + + + # GENERATE SEPARATORS WITH FANCY TRIANGLE + local TRIANGLE=$'\uE0B0' + local SEPARATOR_1=$SEPARATOR_FORMAT_1$TRIANGLE + local SEPARATOR_2=$SEPARATOR_FORMAT_2$TRIANGLE + local SEPARATOR_3=$SEPARATOR_FORMAT_3$TRIANGLE + + + + ############################################################################ + ## WINDOW TITLE ## + ## Prevent messed up terminal-window titles ## + ############################################################################ + case $TERM in + xterm*|rxvt*) + local TITLEBAR='\[\033]0;\u:${NEW_PWD}\007\]' + ;; + *) + local TITLEBAR="" + ;; + esac + + + + ############################################################################ + ## BASH PROMT ## + ## Generate promt and remove format from the rest ## + ############################################################################ + PS1="$TITLEBAR\n${PROMT_USER}${SEPARATOR_1}${PROMT_HOST}${SEPARATOR_2}${PROMT_PWD}${SEPARATOR_3}${PROMT_INPUT}" + + + + ## For terminal line coloring, leaving the rest standard + none="$(tput sgr0)" + trap 'echo -ne "${none}"' DEBUG +} + + + + +################################################################################ +## MAIN ## +################################################################################ + +## Bash provides an environment variable called PROMPT_COMMAND. +## The contents of this variable are executed as a regular Bash command +## just before Bash displays a prompt. +## We want it to call our own command to truncate PWD and store it in NEW_PWD +PROMPT_COMMAND=bash_prompt_command + +## Call bash_promnt only once, then unset it (not needed any more) +## It will set $PS1 with colors and relative to $NEW_PWD, +## which gets updated by $PROMT_COMMAND on behalf of the terminal +bash_prompt +unset bash_prompt + +### EOF ### diff --git a/general/configs/Thunar/accels.scm b/general/configs/Thunar/accels.scm new file mode 100755 index 0000000..5775bc1 --- /dev/null +++ b/general/configs/Thunar/accels.scm @@ -0,0 +1,131 @@ +; thunar GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/ThunarStandardView/sort-by-type" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-last-modified" "") +; (gtk_accel_path "/Thunarwindow/menu" "") +; (gtk_accel_path "/ThunarActionManager/cut" "x") +; (gtk_accel_path "/ThunarStandardView/sort-by-size" "") +; (gtk_accel_path "/ThunarWindow/file-menu" "") +; (gtk_accel_path "/ThunarBookmarks/e92146de8ffbb74bfd99784ed40bdeef" "") +; (gtk_accel_path "/ThunarWindow/close-tab" "w") +; (gtk_accel_path "/ThunarWindow/switch-previous-tab-alt" "ISO_Left_Tab") +; (gtk_accel_path "/ThunarStatusBar/toggle-size" "") +; (gtk_accel_path "/ThunarWindow/new-window" "n") +; (gtk_accel_path "/ThunarWindow/clear-directory-specific-settings" "") +; (gtk_accel_path "/ThunarWindow/close-window" "q") +; (gtk_accel_path "/ThunarWindow/open-parent" "Up") +; (gtk_accel_path "/ThunarWindow/view-side-pane-menu" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-size-in-bytes" "") +; (gtk_accel_path "/ThunarWindow/switch-previous-tab" "Page_Up") +; (gtk_accel_path "/ThunarActionManager/open" "o") +; (gtk_accel_path "/ThunarStandardView/sort-ascending" "") +; (gtk_accel_path "/ThunarWindow/toggle-split-view" "F3") +; (gtk_accel_path "/ThunarActionManager/copy-2" "Insert") +; (gtk_accel_path "/ThunarActionManager/trash-delete" "Delete") +; (gtk_accel_path "/ThunarWindow/view-configure-toolbar" "") +; (gtk_accel_path "/ThunarWindow/open-recent" "") +; (gtk_accel_path "/ThunarBookmarks/7a203ca58c14c76ec1b07d08eaba7e8a" "") +; (gtk_accel_path "/ThunarStandardView/forward" "Right") +; (gtk_accel_path "/ThunarActionManager/restore" "") +; (gtk_accel_path "/ThunarWindow/open-location-alt" "d") +; (gtk_accel_path "/ThunarStandardView/select-by-pattern" "s") +; (gtk_accel_path "/ThunarWindow/zoom-out-alt" "KP_Subtract") +; (gtk_accel_path "/ThunarWindow/contents" "F1") +; (gtk_accel_path "/ThunarWindow/open-file-menu" "F10") +; (gtk_accel_path "/ThunarWindow/show-highlight" "") +; (gtk_accel_path "/ThunarStandardView/sort-descending" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-name" "") +; (gtk_accel_path "/ThunarStandardView/select-all-files" "a") +; (gtk_accel_path "/ThunarActionManager/execute" "") +; (gtk_accel_path "/ThunarStandardView/properties" "Return") +; (gtk_accel_path "/ThunarActionManager/cut-2" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-dtime" "") +; (gtk_accel_path "/ThunarBookmarks/de6d2099b95ef15820d04f5c3a6dc0f8" "") +; (gtk_accel_path "/ThunarWindow/open-templates" "") +; (gtk_accel_path "/ThunarActionManager/paste-2" "Insert") +; (gtk_accel_path "/ThunarWindow/switch-next-tab" "Page_Down") +; (gtk_accel_path "/ThunarStatusBar/toggle-filetype" "") +; (gtk_accel_path "/ThunarWindow/close-all-windows" "w") +; (gtk_accel_path "/ThunarStandardView/create-document" "") +; (gtk_accel_path "/ThunarWindow/detach-tab" "") +; (gtk_accel_path "/ThunarWindow/cancel-search" "Escape") +; (gtk_accel_path "/ThunarWindow/zoom-in-alt2" "equal") +; (gtk_accel_path "/ThunarStatusBar/toggle-hidden-count" "") +; (gtk_accel_path "/ThunarShortcutsPane/sendto-shortcuts" "d") +; (gtk_accel_path "/ThunarActionManager/undo" "z") +; (gtk_accel_path "/ThunarBookmarks/0064c8b8c2b8ae1954479b6f2feab576" "") +; (gtk_accel_path "/ThunarStandardView/toggle-sort-order" "") +; (gtk_accel_path "/ThunarWindow/view-location-selector-entry" "") +; (gtk_accel_path "/ThunarActionManager/paste" "v") +; (gtk_accel_path "/ThunarWindow/zoom-in-alt1" "KP_Add") +; (gtk_accel_path "/ThunarWindow/view-menubar" "m") +; (gtk_accel_path "/ThunarStandardView/back" "Left") +; (gtk_accel_path "/ThunarWindow/open-desktop" "") +; (gtk_accel_path "/ThunarWindow/view-as-detailed-list" "2") +; (gtk_accel_path "/ThunarActionManager/restore-show" "") +; (gtk_accel_path "/ThunarWindow/sendto-menu" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-display-name" "") +; (gtk_accel_path "/ThunarWindow/go-menu" "") +; (gtk_accel_path "/ThunarWindow/zoom-out" "minus") +; (gtk_accel_path "/ThunarWindow/remove-from-recent" "") +; (gtk_accel_path "/ThunarActionManager/open-with-other" "") +; (gtk_accel_path "/ThunarStandardView/invert-selection" "i") +; (gtk_accel_path "/ThunarWindow/view-side-pane-shortcuts" "b") +; (gtk_accel_path "/ThunarWindow/reload-alt-2" "Reload") +; (gtk_accel_path "/ThunarBookmarks/fb8a2fb8c18b440d557134b69e8bfc79" "") +; (gtk_accel_path "/ThunarWindow/view-location-selector-menu" "") +; (gtk_accel_path "/ThunarWindow/edit-menu" "") +; (gtk_accel_path "/ThunarActionManager/copy" "c") +; (gtk_accel_path "/ThunarStandardView/sort-by-mtime" "") +; (gtk_accel_path "/ThunarWindow/reload-alt-1" "F5") +; (gtk_accel_path "/ThunarStandardView/forward-alt" "Forward") +; (gtk_accel_path "/ThunarActionManager/move-to-trash" "") +; (gtk_accel_path "/ThunarActionManager/delete-3" "KP_Delete") +; (gtk_accel_path "/ThunarWindow/bookmarks-menu" "") +; (gtk_accel_path "/ThunarWindow/reload" "r") +; (gtk_accel_path "/ThunarBookmarks/ab554ce947264f765ed1ba66309937f1" "") +; (gtk_accel_path "/ThunarStandardView/arrange-items-menu" "") +; (gtk_accel_path "/ThunarStandardView/unselect-all-files" "Escape") +; (gtk_accel_path "/ThunarWindow/open-computer" "") +; (gtk_accel_path "/ThunarWindow/toggle-image-preview" "") +; (gtk_accel_path "/ThunarWindow/toggle-side-pane" "F9") +; (gtk_accel_path "/ThunarWindow/view-as-icons" "1") +; (gtk_accel_path "/ThunarActionManager/delete-2" "Delete") +; (gtk_accel_path "/ThunarWindow/zoom-in" "plus") +; (gtk_accel_path "/ThunarStandardView/rename" "F2") +; (gtk_accel_path "/ThunarWindow/open-location" "l") +; (gtk_accel_path "/ThunarWindow/view-as-compact-list" "3") +; (gtk_accel_path "/ThunarWindow/view-menu" "") +; (gtk_accel_path "/ThunarWindow/search" "f") +; (gtk_accel_path "/ThunarWindow/new-tab" "t") +; (gtk_accel_path "/ThunarWindow/zoom-reset" "0") +; (gtk_accel_path "/ThunarWindow/contents/help-menu" "") +; (gtk_accel_path "/ThunarActionManager/open-in-new-tab" "p") +; (gtk_accel_path "/ThunarWindow/view-location-selector-buttons" "") +; (gtk_accel_path "/ThunarStandardView/back-alt2" "Back") +; (gtk_accel_path "/ThunarActionManager/redo" "z") +; (gtk_accel_path "/ThunarWindow/open-trash" "") +; (gtk_accel_path "/ThunarActionManager/open-in-new-window" "o") +; (gtk_accel_path "/ThunarWindow/view-statusbar" "") +; (gtk_accel_path "/ThunarActionManager/open-location" "") +; (gtk_accel_path "/ThunarStandardView/duplicate" "") +; (gtk_accel_path "/ThunarActionManager/trash-delete-2" "KP_Delete") +; (gtk_accel_path "/ThunarStandardView/back-alt1" "BackSpace") +; (gtk_accel_path "/ThunarStandardView/create-folder" "n") +; (gtk_accel_path "/ThunarWindow/open-home" "Home") +; (gtk_accel_path "/ThunarWindow/switch-focused-split-view-pane" "") +; (gtk_accel_path "/ThunarWindow/show-hidden" "h") +; (gtk_accel_path "/ThunarStandardView/set-default-app" "") +; (gtk_accel_path "/ThunarWindow/empty-trash" "") +; (gtk_accel_path "/ThunarWindow/preferences" "") +; (gtk_accel_path "/ThunarActionManager/delete" "") +; (gtk_accel_path "/ThunarWindow/open-network" "") +; (gtk_accel_path "/ThunarWindow/view-side-pane-tree" "e") +; (gtk_accel_path "/ThunarWindow/open-file-system" "") +; (gtk_accel_path "/ThunarWindow/search-alt" "Search") +; (gtk_accel_path "/ThunarWindow/switch-next-tab-alt" "Tab") +; (gtk_accel_path "/ThunarActionManager/sendto-desktop" "") +; (gtk_accel_path "/ThunarStandardView/make-link" "") +; (gtk_accel_path "/ThunarWindow/zoom-reset-alt" "KP_0") +; (gtk_accel_path "/ThunarWindow/about" "") diff --git a/general/configs/Thunar/uca.xml b/general/configs/Thunar/uca.xml new file mode 100755 index 0000000..0ddac52 --- /dev/null +++ b/general/configs/Thunar/uca.xml @@ -0,0 +1,25 @@ + + + + utilities-terminal + Open Terminal Here + + 1675076590898177-1 + terminator --working-directory %f + Example for a custom action + + * + + + + + com.github.artemanufrij.findfileconflicts + Fix filenames + + 1691249342110327-1 + /home/janis/scripts/removeSpaces.sh %f + A script that fixes the filenames in a directory recursively + * + * + + diff --git a/general/configs/VSCodium/User/keybindings.json b/general/configs/VSCodium/User/keybindings.json new file mode 100755 index 0000000..23ca3db --- /dev/null +++ b/general/configs/VSCodium/User/keybindings.json @@ -0,0 +1 @@ +// Empty \ No newline at end of file diff --git a/general/configs/VSCodium/User/settings.json b/general/configs/VSCodium/User/settings.json new file mode 100644 index 0000000..0c62e95 --- /dev/null +++ b/general/configs/VSCodium/User/settings.json @@ -0,0 +1,73 @@ +{ + "workbench.colorTheme": "Community Material Theme Darker High Contrast", + "workbench.iconTheme": "eq-material-theme-icons-darker", + "editor.fontFamily": "Source Code Pro", + "python.languageServer": "Jedi", + "python.devOptions": ["DEBUG_ON_STARTUP"], + "python.analysis.logLevel": "Trace", + "git.enableSmartCommit": true, + "git.autofetch": true, + "ltex.language": "en-GB", + "[latex]": { + "editor.defaultFormatter": "James-Yu.latex-workshop" + }, + "latex-workshop.latex.tools": [ + { + "name": "latexmk", + "command": "latexmk", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "--shell-escape", + "-pdf", + "%DOC%" + ] + }, + { + "name": "pdflatex", + "command": "pdflatex", + "args": [ + "--shell-escape", + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "%DOC%" + ] + }, + { + "name": "bibtex", + "command": "bibtex", + "args": [ + "%DOCFILE%" + ], + "env": {} + } + ], + "[vue]": { + "editor.defaultFormatter": "Vue.volar" + }, + "redhat.telemetry.enabled": false, + "editor.defaultFormatter": "vscode.typescript-language-features", + "[html]": { + "editor.defaultFormatter": "vscode.html-language-features" + }, + "cSpell.userWords": [ + "fulfillable", + "libreǝvent", + "unsatisfiable" + ], + "[java]": { + "editor.defaultFormatter": "redhat.java" + }, + "[xml]": { + "editor.defaultFormatter": "redhat.vscode-xml" + }, + "cSpell.language": "en-GB", + "git.openRepositoryInParentFolders": "never", + "[lua]": { + "editor.defaultFormatter": "yinfei.luahelper" + }, + "diffEditor.ignoreTrimWhitespace": false, + +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/docSetup.code-snippets b/general/configs/VSCodium/User/snippets/docSetup.code-snippets new file mode 100755 index 0000000..f818959 --- /dev/null +++ b/general/configs/VSCodium/User/snippets/docSetup.code-snippets @@ -0,0 +1,22 @@ +{ + // Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "docTitle": { + "prefix": "prepareDoc", + "body": "$BLOCK_COMMENT_START\n*\t\t\t\t$WORKSPACE_NAME - $TM_FILENAME\n*\n*\tCreated by Janis Hutz $CURRENT_MONTH/$CURRENT_DATE/$CURRENT_YEAR, Licensed under ${1|the GPL V3,the MIT,a proprietary,the BSD,the LGPL V3,the Apache|} License\n*\t\t\thttps://janishutz.com, development@janishutz.com\n*\n*\n$BLOCK_COMMENT_END" + } +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/html.json b/general/configs/VSCodium/User/snippets/html.json new file mode 100755 index 0000000..adcf69c --- /dev/null +++ b/general/configs/VSCodium/User/snippets/html.json @@ -0,0 +1,58 @@ +{ + // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "impress": { + "prefix": "impress", + "body": [ + "", + "", + "\t\n\t\t$1\n\t\t\n\t", + "\t", + "\t\t
\n\t\t\t

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

\n\t\t\t

For the best experience please use the latest Chrome, Safari or Firefox browser.

\n\t\t
", + "\t\t
", + "\t\t\t
\n\t\t\t\t
", + "\t\t\t\t\t

$2

\n\t\t\t\t
", + "\t\t\t
\n\t\t
", + "\n\t\t\n\t", + "" + ] + }, + "impress-step": { + "prefix": "impressStep", + "body": [ + "\n
", + "\t
", + "\t\t

$2

\n\t
", + "
\n" + ] + }, + "html-basic": { + "prefix": "basic", + "body": [ + "", + "", + "\t\n\t\t$1\n\t\t\n\t\t\n\t\t\n\t", + "\t\n\t\t

$3

", + "\t\n" + ] + }, + "impress-notes": { + "prefix": "impressNotes", + "body": "
\n\t$1\n
" + }, + "impress-substep": { + "prefix": "impressSubstep", + "body": "
\n\t$1\n
" + } +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/javascript.json b/general/configs/VSCodium/User/snippets/javascript.json new file mode 100755 index 0000000..4577ae3 --- /dev/null +++ b/general/configs/VSCodium/User/snippets/javascript.json @@ -0,0 +1,106 @@ +{ + // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "JS-Class": { + "prefix": "jsSetupClass", + "body": "class $1 { \n\tconstructor () {} \n\n \t$2 () {\n\t$3\n\t}\n}", + "description": "Setup the basic structure of a class in JS" + }, + "ExpressJS": { + "prefix": "jsExpressSetup", + "body": [ + "const express = require( 'express' );", + "let app = express();", + "const path = require( 'path' );", + "const expressSession = require( 'express-session' );", + "const fs = require( 'fs' );", + "const bodyParser = require( 'body-parser' );", + "const cookieParser = require( 'cookie-parser' )", + "const favicon = require( 'serve-favicon' );", + "\napp.use( expressSession ( {\n\tsecret: $1,\n\tresave: true,\n\tsaveUninitialized: true\n} ) );", + "app.use( bodyParser.urlencoded( { extended: false } ) );", + "app.use( bodyParser.json() );", + "app.use( cookieParser() );", + "app.use( favicon( path.join( __dirname + '$2' ) ) );\n", + "app.use( ( request, response, next ) => {\n\tresponse.sendFile( path.join( __dirname + '$3' ) ) \n} );", + "\n\napp.get( '/', ( request, response ) => {\n$4\n} );", + "\n\nconst PORT = process.env.PORT || 8080;", + "http.createServer( app ).listen( PORT );" + ] + }, + "ExpressJS-Route": { + "prefix": "jsEjsRoute", + "body": "\n\napp.get( '$1', ( request, response ) => {\n$4\n} );" + }, + "JSAsync": { + "prefix": "jsAsync", + "body": "(async () => {\n$1\n} ) ();" + }, + "JSpromiseReturnFunc": { + "prefix": "jsPromise", + "body": "function $1 () {\n\treturn new Promise( ( resolve, reject ) => {\n\t$2\n\t} );\n}" + }, + "fetch from other url": { + "prefix": "remoteURL", + "body": [ + "localStorage.getItem( 'url' ) + '/$1'", + ], + "description": "remote URL fetching (get from base address from local storage)" + }, + "fetch post": { + "prefix": "fetchPost", + "body": [ + "const fetchOptions = {", + "\tmethod: 'post',", + "\tbody: JSON.stringify( $1 ),", + "\tcredentials: 'include',", + "\theaders: {", + "\t\t'Content-Type': 'application/json',", + "\t\t'charset': 'utf-8'", + "\t}", + "};", + "fetch( $2, fetchOptions ).then( res => {", + "\tif ( res.status === 200 ) {", + "\t\tres.json().then( json => {", + "\t\t\t$3", + "\t\t} );", + "\t}", + "} );", + "$4" + ], + "description": "POST request using fetch" + }, + "fetch get": { + "prefix": "fetchGet", + "body": [ + "fetch( $2, { credentials: 'include' } ).then( res => {", + "\tif ( res.status === 200 ) {", + "\t\tres.json().then( json => {", + "\t\t\t$3", + "\t\t} );", + "\t}", + "} );", + "$4" + ], + "description": "POST request using fetch" + }, + "promise": { + "prefix": "promise", + "body": [ + "return new Promise( ( resolve, reject ) => {", + "\t", + "} );" + ] + } +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/latex.json b/general/configs/VSCodium/User/snippets/latex.json new file mode 100644 index 0000000..772352b --- /dev/null +++ b/general/configs/VSCodium/User/snippets/latex.json @@ -0,0 +1,361 @@ +{ + // Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + // Place your snippets for tex here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "Formula (old)": { + "prefix": "formulaBare", + "body": [ + "\\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=Formula: $1]", + "\t$2", + "\\end{tcolorbox}", + ], + "description": "Red tcolorbox to provide a formula (without the default setup)" + }, + "Prepare Latex doc (old)": { + "prefix": "LaTeX-Prepare-Old", + "body": [ + "\\documentclass{article}\n", + "% Imports %", + "\\usepackage{amsmath}", + "\\usepackage{graphicx}", + "\\usepackage{subcaption}", + "\\usepackage[export]{adjustbox}", + "\\usepackage{tcolorbox}", + "\\usepackage{xcolor}", + "\\usepackage{cancel}", + "\\usepackage{dsfont}", + "\\usepackage{amssymb}", + "\\usepackage[a4paper]{geometry}", + "\\usepackage{parskip}\n", + "% Setup %", + "\\title{\\Huge \\textbf{$1}}", + "\\author{Janis Hutz}\n", + "% Configuring %", + "\\addtolength{\\oddsidemargin}{-0.75in}", + "\\addtolength{\\textwidth}{1.5in}", + "\\addtolength{\\evensidemargin}{-0.75in}", + "\\addtolength{\\topmargin}{-1in}", + "\\addtolength{\\textheight}{2in}\n", + "% Main doc %", + "\\begin{document}", + "\\maketitle", + "$2", + "\\end{document}", + ], + "description": "Prepare a LaTeX Document with all relevant imports" + }, + "prepare LaTeX Document (New)": { + "prefix": "latex-prepare", + "body": [ + "\\documentclass{article}\n", + "\\input{~/projects/generalSchool/helpers.tex}\n", + "\\setup{$1}\n", + "\\begin{document}", + "\\maketitle", + "\\pagestyle{fancy}", + "\\thispagestyle{fancy}\n\n", + "$2\n\n", + "\\end{document}" + ], + "description": "Prepares a full LaTeX Document for use and compiling" + }, + "Fancy table": { + "prefix": "table", + "body": [ + "\\begin{tabular}[h!]{|$1|}", + "\t\\hline", + "\t\\rowcolor{$2}\\multicolumn{$3}{|c|}{$4}\\", + "\t\\hline", + "\t$5\\\\\\", + "\t\\hline", + "\\end{tabular}" + ], + "description": "Inserts a tcolorbox to provide a formula (red)" + }, + "Formula (new)": { + "prefix": "formula", + "body": [ + "\\begin{formula}[]{$1}", + "\t$2", + "\\end{formula}" + ], + "description": "Inserts a tcolorbox to provide a formula (red)" + }, + "Definition (new)": { + "prefix": "definition", + "body": [ + "\\begin{definition}[]{$1}", + "\t$2", + "\\end{definition}" + ], + "description": "Inserts a tcolorbox to provide a definition (blue)" + }, + "Recall (new)": { + "prefix": "recall", + "body": [ + "\\begin{recall}[]{$1}", + "\t$2", + "\\end{recall}" + ], + "description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" + }, + "Important Remarks (new)": { + "prefix": "remarks", + "body": [ + "\\begin{remarks}[]{$1}", + "\t$2", + "\\end{remarks}" + ], + "description": "Inserts a tcolorbox to provide remarks (green)" + }, + "Guides (new)": { + "prefix": "guides", + "body": [ + "\\begin{guides}[]{$1}{${2:Usage}}", + "\t$2", + "\\end{guides}" + ], + "description": "Inserts a tcolorbox to provide guides / instructions on how to use (purple)" + }, + "Properties (new)": { + "prefix": "properties", + "body": [ + "\\begin{properties}[]{$1}", + "\t$2", + "\\end{properties}" + ], + "description": "Inserts a tcolorbox to inform about properties / restrictions / limitations" + }, + "Restrictions (new)": { + "prefix": "restrictions", + "body": [ + "\\begin{restrictions}[]{$1}", + "\t$2", + "\\end{restrictions}" + ], + "description": "Inserts a tcolorbox to inform about restrictions" + }, + "Limitations (new)": { + "prefix": "limitations", + "body": [ + "\\begin{limitations}[]{$1}", + "\t$2", + "\\end{limitations}" + ], + "description": "Inserts a tcolorbox to inform about limitations" + }, + "Theorem (new)": { + "prefix": "theorem", + "body": [ + "\\begin{theorem}[]{$1}", + "\t$2", + "\\end{theorem}" + ], + "description": "Inserts a tcolorbox to inform about theorems" + }, + "Lemma (new)": { + "prefix": "lemma", + "body": [ + "\\begin{lemma}[]{$1}", + "\t$2", + "\\end{lemma}" + ], + "description": "Inserts a tcolorbox to inform about lemmas" + }, + "Corollary (new)": { + "prefix": "corollary", + "body": [ + "\\begin{corollary}[]{$1}", + "\t$2", + "\\end{corollary}" + ], + "description": "Inserts a tcolorbox to inform about corollaries" + }, + "Terms (new)": { + "prefix": "terms", + "body": [ + "\\begin{terms}[]{$1}", + "\t$2", + "\\end{terms}" + ], + "description": "Inserts a tcolorbox to inform about terms" + }, + "Proof (new)": { + "prefix": "proof", + "body": [ + "\\begin{proof}[]{$1}", + "\t$2", + "\\end{proof}" + ], + "description": "Inserts a tcolorbox to show a proof" + }, + "Axiom (new)": { + "prefix": "axiom", + "body": [ + "\\begin{axiom}[]{$1}", + "\t$2", + "\\end{axiom}" + ], + "description": "Inserts a tcolorbox to show an axiom" + }, + "Notation (new)": { + "prefix": "notation", + "body": [ + "\\begin{notation}[]{$1}", + "\t$2", + "\\end{notation}" + ], + "description": "Inserts a tcolorbox to show notation" + }, + "Example (new)": { + "prefix": "example", + "body": [ + "\\begin{example}[]{$1}", + "\t$2", + "\\end{example}" + ], + "description": "Inserts a tcolorbox to show example" + }, + "Usage (languages, new)": { + "prefix": "usage", + "body": [ + "\\begin{usage}[]{$1}", + "\t$2", + "\\end{usage}" + ], + "description": "Inserts a tcolorbox to inform about usage in a language context" + }, + "Conjugation (languages, new)": { + "prefix": "conjugation", + "body": [ + "\\begin{conjugation}[]{$1}", + "\t$2", + "\\end{conjugation}" + ], + "description": "Inserts a tcolorbox to inform about conjugation" + }, + "Forms (languages, new)": { + "prefix": "forms", + "body": [ + "\\begin{forms}[]{$1}", + "\t$2", + "\\end{forms}" + ], + "description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures" + }, + "General-Tcolorbox (new)": { + "prefix": "general-tcb", + "body": [ + "\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}", + "\t$4", + "\\end{general}" + ], + "description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour" + }, + "Derivative": { + "prefix": "derivative", + "body": [ + "\\frac{\\mbox{d}}{\\mbox{d}x}$1" + ] + }, + "Example (inline)": { + "prefix": "example-inline", + "body": [ + "\\inlineex" + ] + }, + "bold": { + "prefix": "#bold", + "body": [ + "\\textbf{$1}" + ] + }, + "italic": { + "prefix": "#i", + "body": [ + "\\textit{$1}" + ] + }, + "bolditalic": { + "prefix": "#bi", + "body": [ + "\\textbf{\\textit{$1}}" + ] + }, + "underlinie": { + "prefix": "#u", + "body": [ + "\\underbar{$1}" + ] + }, + "algebra": { + "prefix": "algebra", + "body": [ + "\\langle $1 \\rangle" + ] + }, + "fill-width": { + "prefix": "#fill", + "body": [ + "\\hspace{\\fill}$1" + ] + }, + "Latex-Colour": { + "prefix": "colour", + "body": [ + "${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}" + ] + }, + "Latex-Text-Colour": { + "prefix": "colour-text", + "body": [ + "\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}" + ] + }, + "German doc": { + "prefix": "latex-german", + "body": [ + "\\usepackage[ngerman]{babel}", + "\\setcounter{lang}{2} % Move below \\begin{document}", + ] + }, + "Letter": { + "prefix": "latex-letter", + "body": [ + "\\documentclass[12pt,a4paper]{scrlttr2}\n", + "\\input{~/projects/generalSchool/letter-helpers.tex}\n", + "% Subject", + "\\setkomavar{subject}{$1}", + "\\begin{document}\\raggedright", + "\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}", + "\t\t\\opening{Intro}\n", + "\t\t$2\n", + "\t\t\\closing{Mit freundlichen Grüssen}", + "\t\\end{letter}", + "\\end{document}", + ] + }, +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/tex.json b/general/configs/VSCodium/User/snippets/tex.json new file mode 100644 index 0000000..8f1f6fe --- /dev/null +++ b/general/configs/VSCodium/User/snippets/tex.json @@ -0,0 +1,124 @@ +{ + // Place your snippets for tex here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "Formula (old)": { + "prefix": "formulaBare", + "body": [ + "\\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=Formula: $1]", + "\t$2", + "\\end{tcolorbox}", + ], + "description": "Red tcolorbox to provide a formula (without the default setup)" + }, + "Prepare Latex doc (old)": { + "prefix": "LaTeX-Prepare-Old", + "body": [ + "\\documentclass{article}\n", + "% Imports %", + "\\usepackage{amsmath}", + "\\usepackage{graphicx}", + "\\usepackage{subcaption}", + "\\usepackage[export]{adjustbox}", + "\\usepackage{tcolorbox}", + "\\usepackage{xcolor}", + "\\usepackage{cancel}", + "\\usepackage{dsfont}", + "\\usepackage{amssymb}", + "\\usepackage[a4paper]{geometry}", + "\\usepackage{parskip}\n", + "% Setup %", + "\\title{\\Huge \\textbf{$1}}", + "\\author{Janis Hutz}\n", + "% Configuring %", + "\\addtolength{\\oddsidemargin}{-0.75in}", + "\\addtolength{\\textwidth}{1.5in}", + "\\addtolength{\\evensidemargin}{-0.75in}", + "\\addtolength{\\topmargin}{-1in}", + "\\addtolength{\\textheight}{2in}\n", + "% Main doc %", + "\\begin{document}", + "\\maketitle", + "$2", + "\\end{document}" + ], + "description": "Prepare a LaTeX Document with all relevant imports" + }, + "prepare LaTeX Document (New)": { + "prefix": "latex-prepare", + "body": [ + "\\documentclass{article}\n", + "\\input{~/projects/generalSchool/helpers.tex}\n", + "\\setup{$1}\n", + "\\begin{document}", + "\\maketitle\n\n", + "$2\n\n", + "\\end{document}" + ], + "description": "Prepares a full LaTeX Document for use and compiling" + }, + "Formula (new)": { + "prefix": "formula", + "body": [ + "\\begin{formula}[]{$1}", + "\t$2", + "\\end{formula}" + ], + "description": "Inserts a tcolorbox to provide a formula (red)" + }, + "Definition (new)": { + "prefix": "definition", + "body": [ + "\\begin{definition}[]{$1}", + "\t$2", + "\\end{definition}" + ], + "description": "Inserts a tcolorbox to provide a definition (blue)" + }, + "Recall (new)": { + "prefix": "recall", + "body": [ + "\\begin{recall}[]{$1}", + "\t$2", + "\\end{recall}" + ], + "description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" + }, + "Important Remarks (new)": { + "prefix": "remarks", + "body": [ + "\\begin{remarks}[]{$1}", + "\t$2", + "\\end{remarks}" + ], + "description": "Inserts a tcolorbox to provide remarks (green)" + }, + "Guides (new)": { + "prefix": "guides", + "body": [ + "\\begin{guides}[]{$1}", + "\t$2", + "\\end{guides}" + ], + "description": "Inserts a tcolorbox to provide guides / instructions on how to use (purple)" + }, + "Properties / Restrictions (new)": { + "prefix": "properties", + "body": [ + "\\begin{properties}[]{$1}", + "\t$2", + "\\end{properties}" + ], + "description": "Inserts a tcolorbox to inform about properties / restrictions / limitations" + } +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/typescript.json b/general/configs/VSCodium/User/snippets/typescript.json new file mode 100644 index 0000000..88d8683 --- /dev/null +++ b/general/configs/VSCodium/User/snippets/typescript.json @@ -0,0 +1,106 @@ +{ + // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "JS-Class": { + "prefix": "jsSetupClass", + "body": "class $1 { \n\tconstructor () {} \n\n \t$2 () {\n\t$3\n\t}\n}", + "description": "Setup the basic structure of a class in JS" + }, + "ExpressJS": { + "prefix": "jsExpressSetup", + "body": [ + "const express = require( 'express' );", + "let app = express();", + "const path = require( 'path' );", + "const expressSession = require( 'express-session' );", + "const fs = require( 'fs' );", + "const bodyParser = require( 'body-parser' );", + "const cookieParser = require( 'cookie-parser' )", + "const favicon = require( 'serve-favicon' );", + "\napp.use( expressSession ( {\n\tsecret: $1,\n\tresave: true,\n\tsaveUninitialized: true\n} ) );", + "app.use( bodyParser.urlencoded( { extended: false } ) );", + "app.use( bodyParser.json() );", + "app.use( cookieParser() );", + "app.use( favicon( path.join( __dirname + '$2' ) ) );\n", + "app.use( ( request, response, next ) => {\n\tresponse.sendFile( path.join( __dirname + '$3' ) ) \n} );", + "\n\napp.get( '/', ( request, response ) => {\n$4\n} );", + "\n\nconst PORT = process.env.PORT || 8080;", + "http.createServer( app ).listen( PORT );" + ] + }, + "ExpressJS-Route": { + "prefix": "jsEjsRoute", + "body": "\n\napp.get( '$1', ( request: express.Request, response: express.Response ) => {\n$4\n} );" + }, + "JSAsync": { + "prefix": "jsAsync", + "body": "(async () => {\n$1\n} ) ();" + }, + "JSpromiseReturnFunc": { + "prefix": "jsPromise", + "body": "function $1 () {\n\treturn new Promise( ( resolve, reject ) => {\n\t$2\n\t} );\n}" + }, + "fetch from other url": { + "prefix": "remoteURL", + "body": [ + "localStorage.getItem( 'url' ) + '/$1'", + ], + "description": "remote URL fetching (get from base address from local storage)" + }, + "fetch post": { + "prefix": "fetchPost", + "body": [ + "const fetchOptions = {", + "\tmethod: 'post',", + "\tbody: JSON.stringify( $1 ),", + "\tcredentials: 'include',", + "\theaders: {", + "\t\t'Content-Type': 'application/json',", + "\t\t'charset': 'utf-8'", + "\t}", + "};", + "fetch( $2, fetchOptions ).then( res => {", + "\tif ( res.status === 200 ) {", + "\t\tres.json().then( json => {", + "\t\t\t$3", + "\t\t} );", + "\t}", + "} );", + "$4" + ], + "description": "POST request using fetch" + }, + "fetch get": { + "prefix": "fetchGet", + "body": [ + "fetch( $2, { credentials: 'include' } ).then( res => {", + "\tif ( res.status === 200 ) {", + "\t\tres.json().then( json => {", + "\t\t\t$3", + "\t\t} );", + "\t}", + "} );", + "$4" + ], + "description": "POST request using fetch" + }, + "promise": { + "prefix": "promise", + "body": [ + "return new Promise( ( resolve, reject ) => {", + "\t", + "} );" + ] + } +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/snippets/vue.json b/general/configs/VSCodium/User/snippets/vue.json new file mode 100755 index 0000000..e7219f6 --- /dev/null +++ b/general/configs/VSCodium/User/snippets/vue.json @@ -0,0 +1,24 @@ +{ + // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log( '$1' );", + // "$2" + // ], + // "description": "Log output to console" + // }, + "script:setup": { + "prefix": "script:setup", + "body": [ + "" + ], + "description": "Setup the basic structure of a class in JS" + }, +} \ No newline at end of file diff --git a/general/configs/VSCodium/User/syncLocalSettings.json b/general/configs/VSCodium/User/syncLocalSettings.json new file mode 100755 index 0000000..25554e0 --- /dev/null +++ b/general/configs/VSCodium/User/syncLocalSettings.json @@ -0,0 +1,36 @@ +{ + "ignoreUploadFiles": [ + "state.*", + "syncLocalSettings.json", + ".DS_Store", + "sync.lock", + "projects.json", + "projects_cache_vscode.json", + "projects_cache_git.json", + "projects_cache_svn.json", + "gpm_projects.json", + "gpm-recentItems.json" + ], + "ignoreUploadFolders": [ + "workspaceStorage" + ], + "ignoreExtensions": [], + "gistDescription": "Visual Studio Code Settings Sync Gist", + "version": 343, + "token": "", + "downloadPublicGist": false, + "supportedFileExtensions": [ + "json", + "code-snippets" + ], + "openTokenLink": true, + "disableUpdateMessage": false, + "lastUpload": null, + "lastDownload": null, + "githubEnterpriseUrl": null, + "askGistDescription": false, + "customFiles": {}, + "hostName": null, + "universalKeybindings": false, + "autoUploadDelay": 20 +} \ No newline at end of file diff --git a/general/configs/VSCodium/product.json b/general/configs/VSCodium/product.json new file mode 100755 index 0000000..ba7257d --- /dev/null +++ b/general/configs/VSCodium/product.json @@ -0,0 +1,8 @@ +{ + "extensionsGallery": { + "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", + "itemUrl": "https://marketplace.visualstudio.com/items", + "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", + "controlUrl": "" + } +} diff --git a/general/configs/dunst/defaultDunst b/general/configs/dunst/defaultDunst new file mode 100644 index 0000000..60f79e2 --- /dev/null +++ b/general/configs/dunst/defaultDunst @@ -0,0 +1,58 @@ +[global] + follow = mouse + indicate_hidden = yes + + offset = 10x10 + + notification_height = 0 + + separator_height = 2 + + padding = 8 + horizontal_padding = 8 + text_icon_padding = 0 + frame_width = 2 + + frame_color = "#a6f7ad" + separator_color = frame + + sort = yes + idle_threshold = 120 + font = monospace 10 + line_height = 0 + markup = full + alignment = left + vertical_alignment = center + show_age_threshold = 60 + word_wrap = yes + stack_duplicates = true + hide_duplicate_count = false + + show_indicators = yes + + min_icon_size = 0 + max_icon_size = 64 + + icon_path = /usr/share/icons/candy-icons/16x16/status/:/usr/share/icons/candy-icons/16x16/devices/:/usr/share/icons/candy-icons/16x16/actions/:/usr/share/icons/candy-icons/16x16/animations/:/usr/share/icons/candy-icons/16x16/apps/:/usr/share/icons/candy-icons/16x16/categories/:/usr/share/icons/candy-icons/16x16/emblems/:/usr/share/icons/candy-icons/16x16/emotes/:/usr/share/icons/candy-icons/16x16/devices/mimetypes:/usr/share/icons/candy-icons/16x16/panel/:/usr/share/icons/candy-icons/16x16/places/ + + dmenu = /usr/bin/wofi -p dunst: + browser = /usr/bin/firefox --new-tab + + title = Dunst + class = Dunst + + corner_radius = 10 + timeout = 5 + +[urgency_low] + background = "#00003a" + foreground = "#CDD6F4" + +[urgency_normal] + background = "#00003a" + foreground = "#CDD6F4" + +[urgency_critical] + background = "#00003a" + foreground = "#CDD6F4" + frame_color = "#6c0000" diff --git a/general/configs/dunst/dunstrc b/general/configs/dunst/dunstrc new file mode 100755 index 0000000..32e0118 --- /dev/null +++ b/general/configs/dunst/dunstrc @@ -0,0 +1,58 @@ +[global] + follow = mouse + indicate_hidden = yes + + offset = 10x10 + + notification_height = 0 + + separator_height = 2 + + padding = 8 + horizontal_padding = 8 + text_icon_padding = 0 + frame_width = 2 + + frame_color = "#cc5c00" + separator_color = frame + + sort = yes + idle_threshold = 120 + font = monospace 10 + line_height = 0 + markup = full + alignment = left + vertical_alignment = center + show_age_threshold = 60 + word_wrap = yes + stack_duplicates = true + hide_duplicate_count = false + + show_indicators = yes + + min_icon_size = 0 + max_icon_size = 64 + + icon_path = /usr/share/icons/candy-icons/16x16/status/:/usr/share/icons/candy-icons/16x16/devices/:/usr/share/icons/candy-icons/16x16/actions/:/usr/share/icons/candy-icons/16x16/animations/:/usr/share/icons/candy-icons/16x16/apps/:/usr/share/icons/candy-icons/16x16/categories/:/usr/share/icons/candy-icons/16x16/emblems/:/usr/share/icons/candy-icons/16x16/emotes/:/usr/share/icons/candy-icons/16x16/devices/mimetypes:/usr/share/icons/candy-icons/16x16/panel/:/usr/share/icons/candy-icons/16x16/places/ + + dmenu = /usr/bin/wofi -p dunst: + browser = /usr/bin/firefox --new-tab + + title = Dunst + class = Dunst + + corner_radius = 10 + timeout = 5 + +[urgency_low] + background = "#000000" + foreground = "#CDD6F4" + +[urgency_normal] + background = "#000000" + foreground = "#CDD6F4" + +[urgency_critical] + background = "#000000" + foreground = "#CDD6F4" + frame_color = "#6c0000" diff --git a/general/configs/dunst/mcLarenDunst b/general/configs/dunst/mcLarenDunst new file mode 100644 index 0000000..e69de29 diff --git a/general/configs/fish/config.fish b/general/configs/fish/config.fish new file mode 100755 index 0000000..c879158 --- /dev/null +++ b/general/configs/fish/config.fish @@ -0,0 +1,111 @@ +alias ls='ls -l --color' +alias ll='ls -la --color' +alias v='nvim' +alias c='clear' +alias bt='bashtop' +alias vicfg='cd ~/.config/nvim/ && nvim' +alias fm='thunar .' +alias gl='git ls-files --others --exclude-standard' +alias gm='gti ls-files -m' +alias gpu='git push' +alias gp='git pull' +alias gc='git commit -a -m' +alias ga='git add ./*' + +function y + set tmp (mktemp -t "yazi-cwd.XXXXXX") + yazi $argv --cwd-file="$tmp" + if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + builtin cd -- "$cwd" + end + rm -f -- "$tmp" +end + +[ -f /usr/share/autojump/autojump.fish ]; and source /usr/share/autojump/autojump.fish + +if status is-interactive + function fish_prompt + + # Cache exit status + set -l last_status $status + + # Set color for variables in prompt + set -l normal (set_color normal) + set -l white (set_color FFFFFF) + set -l turquoise (set_color 5fdfff) + set -l orange (set_color df5f00) + set -l hotpink (set_color df005f) + set -l blue (set_color blue) + set -l limegreen (set_color 87ff00) + set -l purple (set_color af5fff) + set -l red (set_color e70e0e) + + # Configure __fish_git_prompt + set -g __fish_git_prompt_char_stateseparator ' ' + set -g __fish_git_prompt_color 5fdfff + set -g __fish_git_prompt_color_flags df5f00 + set -g __fish_git_prompt_color_prefix white + set -g __fish_git_prompt_color_suffix white + set -g __fish_git_prompt_showdirtystate true + set -g __fish_git_prompt_showuntrackedfiles true + set -g __fish_git_prompt_showstashstate true + + set -g __fish_git_prompt_show_informative_status true + + + # Only calculate once, to save a few CPU cycles when displaying the prompt + if not set -q __fish_prompt_hostname + # set -g __fish_prompt_hostname (hostname|cut -d . -f 1) + set -g __fish_prompt_hostname $orange(prompt_hostname)(set_color normal) + end + if not set -q __fish_prompt_char + if [ (id -u) -eq 0 ] + set -g __fish_prompt_char (set_color red)'λ'(set_color normal) + else + set -g __fish_prompt_char 'λ' + end + end + + # change `at` to `ssh` when an interactive ssh session is present + if [ "$SSH_TTY" = "" ] + set -g location at + # set -g __fish_prompt_hostname (set_color orange)(hostname|cut -d . -f 1) + else # connected via ssh + if [ "$TERM" = "xterm-256color-italic" -o "$TERM" = "tmux-256color" ] + set -g location (echo -e "\e[3mssh\e[23m") + # set -g ssh_hostname (echo -e $blue$__fish_prompt_hostname) + set -g __fish_prompt_hostname $blue(prompt_hostname)(set_color normal) + else + set -g location ssh + # set -g ssh_hostname (echo -e $blue$__fish_prompt_hostname) + set -g __fish_prompt_hostname $blue(prompt_hostname)(set_color normal) + end + end + + if [ (id -u) -eq 0 ] + # top line > Superuser + echo -n $red'╭─'$hotpink$USER $white$location $__fish_prompt_hostname$white' in '$limegreen(pwd)$turquoise + __fish_git_prompt " (%s)" + echo + # bottom line > Superuser + echo -n $red'╰' + echo -n $red'─'$__fish_prompt_char $normal + else # top line > non superuser's + echo -n $white'╭─'$hotpink$USER $white$location $__fish_prompt_hostname$white' in '$limegreen(pwd)$turquoise + __fish_git_prompt " (%s)" + echo + # bottom line > non superuser's + echo -n $white'╰' + echo -n $white'─'$__fish_prompt_char $normal + end + + # NOTE: disable `VIRTUAL_ENV_DISABLE_PROMPT` in `config.fish` + # see: https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT + # support for virtual env name + if set -q VIRTUAL_ENV + echo -n "($turquoise"(basename "$VIRTUAL_ENV")"$white)" + end +end + + +end diff --git a/general/configs/fish/fish_variables b/general/configs/fish/fish_variables new file mode 100755 index 0000000..71bee0c --- /dev/null +++ b/general/configs/fish/fish_variables @@ -0,0 +1,33 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/usr/lib/python3\x2e11/site\x2dpackages\x1e/usr/lib/python3\x2e11\x1e/usr/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/ diff --git a/general/configs/kitty/current-theme.conf b/general/configs/kitty/current-theme.conf new file mode 100644 index 0000000..6cd386b --- /dev/null +++ b/general/configs/kitty/current-theme.conf @@ -0,0 +1,51 @@ +# vim:ft=kitty + +## name: Adwaita darker +## license: MIT +## author: Emil Löfquist (https://github.com/ewal) +## upstream: https://github.com/ewal/kitty-adwaita/blob/main/adwaita_darker.conf +## blurb: Adwaita darker - based on https://github.com/Mofiqul/adwaita.nvim + +background #000000 +foreground #deddda + +selection_background #1c1c1c +selection_foreground #c0bfbc + +url_color #1a5fb4 + +wayland_titlebar_color system +macos_titlebar_color system + +cursor #deddda +cursor_text_color #000000 + +active_border_color #1e1e1e +inactive_border_color #282828 +bell_border_color #ed333b +visual_bell_color none + +active_tab_background #101010 +active_tab_foreground #fcfcfc +inactive_tab_background #1c1c1c +inactive_tab_foreground #b0afac +tab_bar_background none +tab_bar_margin_color none + +color0 #000000 +color1 #ed333b +color2 #57e389 +color3 #ff7800 +color4 #62a0ea +color5 #9141ac +color6 #5bc8af +color7 #deddda + +color8 #9a9996 +color9 #f66151 +color10 #8ff0a4 +color11 #ffa348 +color12 #99c1f1 +color13 #dc8add +color14 #93ddc2 +color15 #f6f5f4 diff --git a/general/configs/kitty/kitty.conf b/general/configs/kitty/kitty.conf new file mode 100644 index 0000000..12f2b84 --- /dev/null +++ b/general/configs/kitty/kitty.conf @@ -0,0 +1,2644 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family Source Code Pro +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +font_size 12.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: The minimum accepted difference in luminance between the foreground +#: and background color, below which kitty will override the +#: foreground color. It is percentage ranging from 0 to 100. If the +#: difference in luminance of the foreground and background is below +#: this threshold, the foreground color will be set to white if the +#: background is dark or black if the background is light. The default +#: value is 0, which means no overriding is performed. Useful when +#: working with applications that use colors that do not contrast well +#: with your preferred color scheme. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). +#: If you see unexpected stripes, dots, lines, incorrect color, no +#: color where you expect color, or any kind of graphic display +#: problem try setting text_fg_override_threshold to 0 to see if this +#: is the cause of the problem. + +}}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is trigerred. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_indicator_opacity 1.0 + +#: The opacity of the scrollback indicator which is a small colored +#: rectangle that moves along the right hand side of the window as you +#: scroll, indicating what fraction you have scrolled. The default is +#: one which means fully opaque, aka visible. Set to a value between +#: zero and one to make the indicator less visible. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +Mouse {{{ + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. +# url_color #0087bd +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +show_hyperlink_targets yes + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} +}}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. Defaults +#: to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preseving aspect +#: ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is "ready" quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the background. A number between zero and one, where +#: one is opaque and zero is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background, so that things like the status bar in vim, powerline +#: prompts, etc. still look good. But it means that if you use a color +#: theme with a background color in your editor, it will not be +#: rendered as transparent. Instead you should change the default +#: background color in your kitty config and not use a background +#: color in the editor color scheme. Or use the escape codes to set +#: the terminals default colors in a shell script to launch your +#: editor. See also transparent_background_colors. Be aware that using +#: a value less than 1.0 is a (possibly significant) performance hit. +#: When using a low value for this setting, it is desirable that you +#: set the background color to a color the matches the general color +#: of the desktop background, for best text rendering. If you want to +#: dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifiying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_opacity is set and transparent windows are supported +#: or background_image is set. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insesitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently active. + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. + +#: bell +#: Ring the terminal bell. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. WARNING: +#: This option works by using a hack when arbitrary color (or +#: background) is configured, as there is no proper Cocoa API for it. +#: It sets the background color of the entire window and makes the +#: titlebar transparent. As such it is incompatible with +#: background_opacity. If you want to use both, you are probably +#: better off just hiding the titlebar with hide_window_decorations. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard +# map cmd+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear anytext at the prompt itself. + +#: Clear up to cursor line + +# map cmd+k clear_terminal to_cursor active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} + + +# BEGIN_KITTY_THEME +# Adwaita darker +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/general/configs/kitty/kitty.conf.bak b/general/configs/kitty/kitty.conf.bak new file mode 100644 index 0000000..e285bcd --- /dev/null +++ b/general/configs/kitty/kitty.conf.bak @@ -0,0 +1,2639 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family Source Code Pro +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +font_size 12.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: The minimum accepted difference in luminance between the foreground +#: and background color, below which kitty will override the +#: foreground color. It is percentage ranging from 0 to 100. If the +#: difference in luminance of the foreground and background is below +#: this threshold, the foreground color will be set to white if the +#: background is dark or black if the background is light. The default +#: value is 0, which means no overriding is performed. Useful when +#: working with applications that use colors that do not contrast well +#: with your preferred color scheme. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). +#: If you see unexpected stripes, dots, lines, incorrect color, no +#: color where you expect color, or any kind of graphic display +#: problem try setting text_fg_override_threshold to 0 to see if this +#: is the cause of the problem. + +}}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is trigerred. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_indicator_opacity 1.0 + +#: The opacity of the scrollback indicator which is a small colored +#: rectangle that moves along the right hand side of the window as you +#: scroll, indicating what fraction you have scrolled. The default is +#: one which means fully opaque, aka visible. Set to a value between +#: zero and one to make the indicator less visible. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +Mouse {{{ + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +url_color #0087bd +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +show_hyperlink_targets yes + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} +}}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. Defaults +#: to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preseving aspect +#: ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is "ready" quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the background. A number between zero and one, where +#: one is opaque and zero is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background, so that things like the status bar in vim, powerline +#: prompts, etc. still look good. But it means that if you use a color +#: theme with a background color in your editor, it will not be +#: rendered as transparent. Instead you should change the default +#: background color in your kitty config and not use a background +#: color in the editor color scheme. Or use the escape codes to set +#: the terminals default colors in a shell script to launch your +#: editor. See also transparent_background_colors. Be aware that using +#: a value less than 1.0 is a (possibly significant) performance hit. +#: When using a low value for this setting, it is desirable that you +#: set the background color to a color the matches the general color +#: of the desktop background, for best text rendering. If you want to +#: dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifiying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_opacity is set and transparent windows are supported +#: or background_image is set. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insesitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently active. + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. + +#: bell +#: Ring the terminal bell. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. WARNING: +#: This option works by using a hack when arbitrary color (or +#: background) is configured, as there is no proper Cocoa API for it. +#: It sets the background color of the entire window and makes the +#: titlebar transparent. As such it is incompatible with +#: background_opacity. If you want to use both, you are probably +#: better off just hiding the titlebar with hide_window_decorations. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard +# map cmd+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear anytext at the prompt itself. + +#: Clear up to cursor line + +# map cmd+k clear_terminal to_cursor active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} diff --git a/general/configs/mpv/fonts/Material-Design-Iconic-Font.ttf b/general/configs/mpv/fonts/Material-Design-Iconic-Font.ttf new file mode 100644 index 0000000..5d489fd Binary files /dev/null and b/general/configs/mpv/fonts/Material-Design-Iconic-Font.ttf differ diff --git a/general/configs/mpv/scripts/modernx.lua b/general/configs/mpv/scripts/modernx.lua new file mode 100644 index 0000000..dce1d49 --- /dev/null +++ b/general/configs/mpv/scripts/modernx.lua @@ -0,0 +1,2742 @@ +-- mpv-osc-modern by maoiscat +-- email:valarmor@163.com +-- https://github.com/maoiscat/mpv-osc-modern + +-- fork by cyl0 +-- https://github.com/cyl0/ModernX/ + +local assdraw = require 'mp.assdraw' +local msg = require 'mp.msg' +local opt = require 'mp.options' +local utils = require 'mp.utils' + +-- +-- Parameters +-- +-- default user option values +-- may change them in osc.conf +local user_opts = { + showwindowed = true, -- show OSC when windowed? + showfullscreen = true, -- show OSC when fullscreen? + idlescreen = true, -- draw logo and text when idle + scalewindowed = 1.0, -- scaling of the controller when windowed + scalefullscreen = 1.0, -- scaling of the controller when fullscreen + scaleforcedwindow = 2.0, -- scaling when rendered on a forced window + vidscale = true, -- scale the controller with the video? + hidetimeout = 1500, -- duration in ms until the OSC hides if no + -- mouse movement. enforced non-negative for the + -- user, but internally negative is 'always-on'. + fadeduration = 250, -- duration of fade out in ms, 0 = no fade + minmousemove = 1, -- minimum amount of pixels the mouse has to + -- move between ticks to make the OSC show up + iamaprogrammer = false, -- use native mpv values and disable OSC + -- internal track list management (and some + -- functions that depend on it) + font = 'mpv-osd-symbols', -- default osc font + seekbarhandlesize = 1.0, -- size ratio of the slider handle, range 0 ~ 1 + seekrange = true, -- show seekrange overlay + seekrangealpha = 64, -- transparency of seekranges + seekbarkeyframes = true, -- use keyframes when dragging the seekbar + showjump = true, -- show "jump forward/backward 5 seconds" buttons + -- shift+left-click to step 1 frame and + -- right-click to jump 1 minute + jumpamount = 5, -- change the jump amount (in seconds by default) + jumpiconnumber = true, -- show different icon when jumpamount is 5, 10, or 30 + jumpmode = 'exact', -- seek mode for jump buttons. e.g. + -- 'exact', 'relative+keyframes', etc. + title = '${media-title}', -- string compatible with property-expansion + -- to be shown as OSC title + showtitle = true, -- show title in OSC + showonpause = true, -- whether to disable the hide timeout on pause + timetotal = true, -- display total time instead of remaining time? + timems = false, -- Display time down to millliseconds by default + visibility = 'auto', -- only used at init to set visibility_mode(...) + windowcontrols = 'auto', -- whether to show window controls + greenandgrumpy = false, -- disable santa hat + language = 'eng', -- eng=English, chs=Chinese + volumecontrol = true, -- whether to show mute button and volume slider + keyboardnavigation = false, -- enable directional keyboard navigation + chapter_fmt = "Chapter: %s", -- chapter print format for seekbar-hover. "no" to disable +} + +-- Icons for jump button depending on jumpamount +local jumpicons = { + [5] = {'\239\142\177', '\239\142\163'}, + [10] = {'\239\142\175', '\239\142\161'}, + [30] = {'\239\142\176', '\239\142\162'}, + default = {'\239\142\178 ', '\239\142\178'}, -- second icon is mirrored in layout() +} + +local icons = { + previous = '\239\142\181', + next = '\239\142\180', + play = '\239\142\170', + pause = '\239\142\167', + backward = '\239\142\160', + forward = '\239\142\159', + audio = '\239\142\183', + volume = '\239\142\188', + volume_mute = '\239\142\187', + sub = '\239\143\147', + minimize = '\239\133\172', + fullscreen = '\239\133\173', + info = '', +} + +-- Localization +local language = { + ['eng'] = { + welcome = '{\\fs24\\1c&H0&\\1c&HFFFFFF&}Drop files or URLs to play here.', -- this text appears when mpv starts + off = 'OFF', + na = 'n/a', + none = 'none', + video = 'Video', + audio = 'Audio', + subtitle = 'Subtitle', + available = 'Available ', + track = ' Tracks:', + playlist = 'Playlist', + nolist = 'Empty playlist.', + chapter = 'Chapter', + nochapter = 'No chapters.', + }, + ['chs'] = { + welcome = '{\\1c&H00\\bord0\\fs30\\fn微软雅黑 light\\fscx125}MPV{\\fscx100} 播放器', -- this text appears when mpv starts + off = '关闭', + na = 'n/a', + none = '无', + video = '视频', + audio = '音频', + subtitle = '字幕', + available = '可选', + track = ':', + playlist = '播放列表', + nolist = '无列表信息', + chapter = '章节', + nochapter = '无章节信息', + }, + ['pl'] = { + welcome = '{\\fs24\\1c&H0&\\1c&HFFFFFF&}Upuść plik lub łącze URL do odtworzenia.', -- this text appears when mpv starts + off = 'WYŁ.', + na = 'n/a', + none = 'nic', + video = 'Wideo', + audio = 'Ścieżka audio', + subtitle = 'Napisy', + available = 'Dostępne ', + track = ' Ścieżki:', + playlist = 'Lista odtwarzania', + nolist = 'Lista odtwarzania pusta.', + chapter = 'Rozdział', + nochapter = 'Brak rozdziałów.', + } +} +-- read options from config and command-line +opt.read_options(user_opts, 'osc', function(list) update_options(list) end) +-- apply lang opts +local texts = language[user_opts.language] +local osc_param = { -- calculated by osc_init() + playresy = 0, -- canvas size Y + playresx = 0, -- canvas size X + display_aspect = 1, + unscaled_y = 0, + areas = {}, +} + +local osc_styles = { + TransBg = '{\\blur100\\bord150\\1c&H000000&\\3c&H000000&}', + SeekbarBg = '{\\blur0\\bord0\\1c&HFFFFFF&}', + SeekbarFg = '{\\blur1\\bord1\\1c&HE39C42&}', + VolumebarBg = '{\\blur0\\bord0\\1c&H999999&}', + VolumebarFg = '{\\blur1\\bord1\\1c&HFFFFFF&}', + Ctrl1 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs36\\fnmaterial-design-iconic-font}', + Ctrl2 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs24\\fnmaterial-design-iconic-font}', + Ctrl2Flip = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs24\\fnmaterial-design-iconic-font\\fry180', + Ctrl3 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs24\\fnmaterial-design-iconic-font}', + Time = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&H000000&\\fs17\\fn' .. user_opts.font .. '}', + Tooltip = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H000000&\\fs18\\fn' .. user_opts.font .. '}', + Title = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H0\\fs38\\q2\\fn' .. user_opts.font .. '}', + WinCtrl = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H0\\fs20\\fnmpv-osd-symbols}', + elementDown = '{\\1c&H999999&}', + elementHighlight = '{\\blur1\\bord1\\1c&HFFC033&}', +} + +-- internal states, do not touch +local state = { + showtime, -- time of last invocation (last mouse move) + osc_visible = false, + anistart, -- time when the animation started + anitype, -- current type of animation + animation, -- current animation alpha + mouse_down_counter = 0, -- used for softrepeat + active_element = nil, -- nil = none, 0 = background, 1+ = see elements[] + active_event_source = nil, -- the 'button' that issued the current event + rightTC_trem = not user_opts.timetotal, -- if the right timecode should display total or remaining time + mp_screen_sizeX, mp_screen_sizeY, -- last screen-resolution, to detect resolution changes to issue reINITs + initREQ = false, -- is a re-init request pending? + last_mouseX, last_mouseY, -- last mouse position, to detect significant mouse movement + mouse_in_window = false, + message_text, + message_hide_timer, + fullscreen = false, + tick_timer = nil, + tick_last_time = 0, -- when the last tick() was run + hide_timer = nil, + cache_state = nil, + idle = false, + enabled = true, + input_enabled = true, + showhide_enabled = false, + dmx_cache = 0, + border = true, + maximized = false, + osd = mp.create_osd_overlay('ass-events'), + mute = false, + lastvisibility = user_opts.visibility, -- save last visibility on pause if showonpause + fulltime = user_opts.timems, + highlight_element = 'cy_audio', + chapter_list = {}, -- sorted by time +} + +local thumbfast = { + width = 0, + height = 0, + disabled = true, + available = false +} + +local window_control_box_width = 138 +local tick_delay = 0.03 + +local is_december = os.date("*t").month == 12 + +--- Automatically disable OSC +local builtin_osc_enabled = mp.get_property_native('osc') +if builtin_osc_enabled then + mp.set_property_native('osc', false) +end + +-- + + +-- WindowControl helpers +function window_controls_enabled() + val = user_opts.windowcontrols + if val == 'auto' then + return (not state.border) or state.fullscreen + else + return val ~= 'no' + end +end + + + +function build_keyboard_controls() + + -- prepare the main button row + local bottom_button_line = {} + table.insert(bottom_button_line, 'cy_audio') + table.insert(bottom_button_line, 'cy_sub') + table.insert(bottom_button_line, 'pl_prev') + table.insert(bottom_button_line, 'skipback') + if user_opts.showjump then + table.insert(bottom_button_line, 'jumpback') + end + table.insert(bottom_button_line, 'playpause') + if user_opts.showjump then + table.insert(bottom_button_line, 'jumpfrwd') + end + table.insert(bottom_button_line, 'skipfrwd') + table.insert(bottom_button_line, 'pl_next') + table.insert(bottom_button_line, 'tog_info') + table.insert(bottom_button_line, 'tog_fs') + + -- build up the main mapping object + local mapping = {} + if window_controls_enabled() then + table.insert(mapping, { + 'minimize', + 'maximize', + 'close' + }) + end + table.insert(mapping, { + 'seekbar' + }) + table.insert(mapping, bottom_button_line) + + return mapping +end + + +-- +-- Helperfunctions +-- + +function set_osd(res_x, res_y, text) + if state.osd.res_x == res_x and + state.osd.res_y == res_y and + state.osd.data == text then + return + end + state.osd.res_x = res_x + state.osd.res_y = res_y + state.osd.data = text + state.osd.z = 1000 + state.osd:update() +end + +-- scale factor for translating between real and virtual ASS coordinates +function get_virt_scale_factor() + local w, h = mp.get_osd_size() + if w <= 0 or h <= 0 then + return 0, 0 + end + return osc_param.playresx / w, osc_param.playresy / h +end + +-- return mouse position in virtual ASS coordinates (playresx/y) +function get_virt_mouse_pos() + if state.mouse_in_window then + local sx, sy = get_virt_scale_factor() + local x, y = mp.get_mouse_pos() + return x * sx, y * sy + else + return -1, -1 + end +end + +function set_virt_mouse_area(x0, y0, x1, y1, name) + local sx, sy = get_virt_scale_factor() + mp.set_mouse_area(x0 / sx, y0 / sy, x1 / sx, y1 / sy, name) +end + +function scale_value(x0, x1, y0, y1, val) + local m = (y1 - y0) / (x1 - x0) + local b = y0 - (m * x0) + return (m * val) + b +end + +-- returns hitbox spanning coordinates (top left, bottom right corner) +-- according to alignment +function get_hitbox_coords(x, y, an, w, h) + + local alignments = { + [1] = function () return x, y-h, x+w, y end, + [2] = function () return x-(w/2), y-h, x+(w/2), y end, + [3] = function () return x-w, y-h, x, y end, + + [4] = function () return x, y-(h/2), x+w, y+(h/2) end, + [5] = function () return x-(w/2), y-(h/2), x+(w/2), y+(h/2) end, + [6] = function () return x-w, y-(h/2), x, y+(h/2) end, + + [7] = function () return x, y, x+w, y+h end, + [8] = function () return x-(w/2), y, x+(w/2), y+h end, + [9] = function () return x-w, y, x, y+h end, + } + + return alignments[an]() +end + +function get_hitbox_coords_geo(geometry) + return get_hitbox_coords(geometry.x, geometry.y, geometry.an, + geometry.w, geometry.h) +end + +function get_element_hitbox(element) + return element.hitbox.x1, element.hitbox.y1, + element.hitbox.x2, element.hitbox.y2 +end + +function mouse_hit(element) + return mouse_hit_coords(get_element_hitbox(element)) +end + +function mouse_hit_coords(bX1, bY1, bX2, bY2) + local mX, mY = get_virt_mouse_pos() + return (mX >= bX1 and mX <= bX2 and mY >= bY1 and mY <= bY2) +end + +function limit_range(min, max, val) + if val > max then + val = max + elseif val < min then + val = min + end + return val +end + +-- translate value into element coordinates +function get_slider_ele_pos_for(element, val) + + local ele_pos = scale_value( + element.slider.min.value, element.slider.max.value, + element.slider.min.ele_pos, element.slider.max.ele_pos, + val) + + return limit_range( + element.slider.min.ele_pos, element.slider.max.ele_pos, + ele_pos) +end + +-- translates global (mouse) coordinates to value +function get_slider_value_at(element, glob_pos) + + local val = scale_value( + element.slider.min.glob_pos, element.slider.max.glob_pos, + element.slider.min.value, element.slider.max.value, + glob_pos) + + return limit_range( + element.slider.min.value, element.slider.max.value, + val) +end + +-- get value at current mouse position +function get_slider_value(element) + return get_slider_value_at(element, get_virt_mouse_pos()) +end + +function countone(val) + if not (user_opts.iamaprogrammer) then + val = val + 1 + end + return val +end + +-- multiplies two alpha values, formular can probably be improved +function mult_alpha(alphaA, alphaB) + return 255 - (((1-(alphaA/255)) * (1-(alphaB/255))) * 255) +end + +function add_area(name, x1, y1, x2, y2) + -- create area if needed + if (osc_param.areas[name] == nil) then + osc_param.areas[name] = {} + end + table.insert(osc_param.areas[name], {x1=x1, y1=y1, x2=x2, y2=y2}) +end + +function ass_append_alpha(ass, alpha, modifier) + local ar = {} + + for ai, av in pairs(alpha) do + av = mult_alpha(av, modifier) + if state.animation then + av = mult_alpha(av, state.animation) + end + ar[ai] = av + end + + ass:append(string.format('{\\1a&H%X&\\2a&H%X&\\3a&H%X&\\4a&H%X&}', + ar[1], ar[2], ar[3], ar[4])) +end + +function ass_draw_cir_cw(ass, x, y, r) + ass:round_rect_cw(x-r, y-r, x+r, y+r, r) +end + +function ass_draw_rr_h_cw(ass, x0, y0, x1, y1, r1, hexagon, r2) + if hexagon then + ass:hexagon_cw(x0, y0, x1, y1, r1, r2) + else + ass:round_rect_cw(x0, y0, x1, y1, r1, r2) + end +end + +function ass_draw_rr_h_ccw(ass, x0, y0, x1, y1, r1, hexagon, r2) + if hexagon then + ass:hexagon_ccw(x0, y0, x1, y1, r1, r2) + else + ass:round_rect_ccw(x0, y0, x1, y1, r1, r2) + end +end + + +-- +-- Tracklist Management +-- + +local nicetypes = {video = texts.video, audio = texts.audio, sub = texts.subtitle} + +-- updates the OSC internal playlists, should be run each time the track-layout changes +function update_tracklist() + local tracktable = mp.get_property_native('track-list', {}) + + -- by osc_id + tracks_osc = {} + tracks_osc.video, tracks_osc.audio, tracks_osc.sub = {}, {}, {} + -- by mpv_id + tracks_mpv = {} + tracks_mpv.video, tracks_mpv.audio, tracks_mpv.sub = {}, {}, {} + for n = 1, #tracktable do + if not (tracktable[n].type == 'unknown') then + local type = tracktable[n].type + local mpv_id = tonumber(tracktable[n].id) + + -- by osc_id + table.insert(tracks_osc[type], tracktable[n]) + + -- by mpv_id + tracks_mpv[type][mpv_id] = tracktable[n] + tracks_mpv[type][mpv_id].osc_id = #tracks_osc[type] + end + end +end + +-- return a nice list of tracks of the given type (video, audio, sub) +function get_tracklist(type) + local msg = texts.available .. nicetypes[type] .. texts.track + if #tracks_osc[type] == 0 then + msg = msg .. texts.none + else + for n = 1, #tracks_osc[type] do + local track = tracks_osc[type][n] + local lang, title, selected = 'unknown', '', '○' + if not(track.lang == nil) then lang = track.lang end + if not(track.title == nil) then title = track.title end + if (track.id == tonumber(mp.get_property(type))) then + selected = '●' + end + msg = msg..'\n'..selected..' '..n..': ['..lang..'] '..title + end + end + return msg +end + +-- relatively change the track of given by tracks + --(+1 -> next, -1 -> previous) +function set_track(type, next) + local current_track_mpv, current_track_osc + if (mp.get_property(type) == 'no') then + current_track_osc = 0 + else + current_track_mpv = tonumber(mp.get_property(type)) + current_track_osc = tracks_mpv[type][current_track_mpv].osc_id + end + local new_track_osc = (current_track_osc + next) % (#tracks_osc[type] + 1) + local new_track_mpv + if new_track_osc == 0 then + new_track_mpv = 'no' + else + new_track_mpv = tracks_osc[type][new_track_osc].id + end + + mp.commandv('set', type, new_track_mpv) + +-- if (new_track_osc == 0) then +-- show_message(nicetypes[type] .. ' Track: none') +-- else +-- show_message(nicetypes[type] .. ' Track: ' +-- .. new_track_osc .. '/' .. #tracks_osc[type] +-- .. ' ['.. (tracks_osc[type][new_track_osc].lang or 'unknown') ..'] ' +-- .. (tracks_osc[type][new_track_osc].title or '')) +-- end +end + +-- get the currently selected track of , OSC-style counted +function get_track(type) + local track = mp.get_property(type) + if track ~= 'no' and track ~= nil then + local tr = tracks_mpv[type][tonumber(track)] + if tr then + return tr.osc_id + end + end + return 0 +end + +-- +-- Element Management +-- + +local elements = {} + +function prepare_elements() + + -- remove elements without layout or invisble + local elements2 = {} + for n, element in pairs(elements) do + if not (element.layout == nil) and (element.visible) then + table.insert(elements2, element) + end + end + elements = elements2 + + function elem_compare (a, b) + return a.layout.layer < b.layout.layer + end + + table.sort(elements, elem_compare) + + + for _,element in pairs(elements) do + + local elem_geo = element.layout.geometry + + -- Calculate the hitbox + local bX1, bY1, bX2, bY2 = get_hitbox_coords_geo(elem_geo) + element.hitbox = {x1 = bX1, y1 = bY1, x2 = bX2, y2 = bY2} + + local style_ass = assdraw.ass_new() + + -- prepare static elements + style_ass:append('{}') -- hack to troll new_event into inserting a \n + style_ass:new_event() + style_ass:pos(elem_geo.x, elem_geo.y) + style_ass:an(elem_geo.an) + style_ass:append(element.layout.style) + + element.style_ass = style_ass + + local static_ass = assdraw.ass_new() + + + if (element.type == 'box') then + --draw box + static_ass:draw_start() + ass_draw_rr_h_cw(static_ass, 0, 0, elem_geo.w, elem_geo.h, + element.layout.box.radius, element.layout.box.hexagon) + static_ass:draw_stop() + + elseif (element.type == 'slider') then + --draw static slider parts + local slider_lo = element.layout.slider + -- calculate positions of min and max points + element.slider.min.ele_pos = user_opts.seekbarhandlesize * elem_geo.h / 2 + element.slider.max.ele_pos = elem_geo.w - element.slider.min.ele_pos + element.slider.min.glob_pos = element.hitbox.x1 + element.slider.min.ele_pos + element.slider.max.glob_pos = element.hitbox.x1 + element.slider.max.ele_pos + + static_ass:draw_start() + -- a hack which prepares the whole slider area to allow center placements such like an=5 + static_ass:rect_cw(0, 0, elem_geo.w, elem_geo.h) + static_ass:rect_ccw(0, 0, elem_geo.w, elem_geo.h) + -- marker nibbles + if not (element.slider.markerF == nil) and (slider_lo.gap > 0) then + local markers = element.slider.markerF() + for _,marker in pairs(markers) do + if (marker >= element.slider.min.value) and (marker <= element.slider.max.value) then + local s = get_slider_ele_pos_for(element, marker) + if (slider_lo.gap > 5) then -- draw triangles + --top + if (slider_lo.nibbles_top) then + static_ass:move_to(s - 3, slider_lo.gap - 5) + static_ass:line_to(s + 3, slider_lo.gap - 5) + static_ass:line_to(s, slider_lo.gap - 1) + end + --bottom + if (slider_lo.nibbles_bottom) then + static_ass:move_to(s - 3, elem_geo.h - slider_lo.gap + 5) + static_ass:line_to(s, elem_geo.h - slider_lo.gap + 1) + static_ass:line_to(s + 3, elem_geo.h - slider_lo.gap + 5) + end + else -- draw 2x1px nibbles + --top + if (slider_lo.nibbles_top) then + static_ass:rect_cw(s - 1, 0, s + 1, slider_lo.gap); + end + --bottom + if (slider_lo.nibbles_bottom) then + static_ass:rect_cw(s - 1, elem_geo.h-slider_lo.gap, s + 1, elem_geo.h); + end + end + end + end + end + end + + element.static_ass = static_ass + + -- if the element is supposed to be disabled, + -- style it accordingly and kill the eventresponders + if not (element.enabled) then + element.layout.alpha[1] = 136 + element.eventresponder = nil + end + -- gray out the element if it is toggled off + if (element.off) then + element.layout.alpha[1] = 136 + end + + end +end + +-- +-- Element Rendering +-- + +-- returns nil or a chapter element from the native property chapter-list +function get_chapter(possec) + local cl = state.chapter_list -- sorted, get latest before possec, if any + + for n=#cl,1,-1 do + if possec >= cl[n].time then + return cl[n] + end + end +end + +function render_elements(master_ass) + -- when the slider is dragged or hovered and we have a target chapter name + -- then we use it instead of the normal title. we calculate it before the + -- render iterations because the title may be rendered before the slider. + state.forced_title = nil + if thumbfast.disabled then + local se, ae = state.slider_element, elements[state.active_element] + if user_opts.chapter_fmt ~= "no" and se and (ae == se or (not ae and mouse_hit(se))) then + local dur = mp.get_property_number("duration", 0) + if dur > 0 then + local possec = get_slider_value(se) * dur / 100 -- of mouse pos + local ch = get_chapter(possec) + if ch and ch.title and ch.title ~= "" then + state.forced_title = string.format(user_opts.chapter_fmt, ch.title) + end + end + end + end + + for n=1, #elements do + local element = elements[n] + local style_ass = assdraw.ass_new() + style_ass:merge(element.style_ass) + ass_append_alpha(style_ass, element.layout.alpha, 0) + + if element.eventresponder and (state.active_element == n) then + -- run render event functions + if not (element.eventresponder.render == nil) then + element.eventresponder.render(element) + end + if mouse_hit(element) then + -- mouse down styling + if (element.styledown) then + style_ass:append(osc_styles.elementDown) + end + if (element.softrepeat) and (state.mouse_down_counter >= 15 + and state.mouse_down_counter % 5 == 0) then + + element.eventresponder[state.active_event_source..'_down'](element) + end + state.mouse_down_counter = state.mouse_down_counter + 1 + end + end + + if user_opts.keyboardnavigation and state.highlight_element == element.name then + style_ass:append(osc_styles.elementHighlight) + end + + local elem_ass = assdraw.ass_new() + elem_ass:merge(style_ass) + + if not (element.type == 'button') then + elem_ass:merge(element.static_ass) + end + + if (element.type == 'slider') then + + local slider_lo = element.layout.slider + local elem_geo = element.layout.geometry + local s_min = element.slider.min.value + local s_max = element.slider.max.value + -- draw pos marker + local pos = element.slider.posF() + local seekRanges = element.slider.seekRangesF() + local rh = user_opts.seekbarhandlesize * elem_geo.h / 2 -- Handle radius + local xp + + if pos then + xp = get_slider_ele_pos_for(element, pos) + ass_draw_cir_cw(elem_ass, xp, elem_geo.h/2, rh) + elem_ass:rect_cw(0, slider_lo.gap, xp, elem_geo.h - slider_lo.gap) + end + + if seekRanges then + elem_ass:draw_stop() + elem_ass:merge(element.style_ass) + ass_append_alpha(elem_ass, element.layout.alpha, user_opts.seekrangealpha) + elem_ass:merge(element.static_ass) + + for _,range in pairs(seekRanges) do + local pstart = get_slider_ele_pos_for(element, range['start']) + local pend = get_slider_ele_pos_for(element, range['end']) + elem_ass:rect_cw(pstart - rh, slider_lo.gap, pend + rh, elem_geo.h - slider_lo.gap) + end + end + + elem_ass:draw_stop() + + -- add tooltip + if not (element.slider.tooltipF == nil) then + if mouse_hit(element) then + local sliderpos = get_slider_value(element) + local tooltiplabel = element.slider.tooltipF(sliderpos) + local an = slider_lo.tooltip_an + local ty + if (an == 2) then + ty = element.hitbox.y1 + else + ty = element.hitbox.y1 + elem_geo.h/2 + end + + local tx = get_virt_mouse_pos() + if (slider_lo.adjust_tooltip) then + if (an == 2) then + if (sliderpos < (s_min + 3)) then + an = an - 1 + elseif (sliderpos > (s_max - 3)) then + an = an + 1 + end + elseif (sliderpos > (s_max-s_min)/2) then + an = an + 1 + tx = tx - 5 + else + an = an - 1 + tx = tx + 10 + end + end + + -- tooltip label + elem_ass:new_event() + elem_ass:pos(tx, ty) + elem_ass:an(an) + elem_ass:append(slider_lo.tooltip_style) + ass_append_alpha(elem_ass, slider_lo.alpha, 0) + elem_ass:append(tooltiplabel) + + -- thumbnail + if not thumbfast.disabled then + local osd_w = mp.get_property_number("osd-width") + if osd_w then + local r_w, r_h = get_virt_scale_factor() + + local tooltip_font_size = 18 + local thumbPad = 4 + local thumbMarginX = 18 / r_w + local thumbMarginY = tooltip_font_size + thumbPad + 2 / r_h + local tooltipBgColor = "FFFFFF" + local tooltipBgAlpha = 80 + local thumbX = math.min(osd_w - thumbfast.width - thumbMarginX, math.max(thumbMarginX, tx / r_w - thumbfast.width / 2)) + local thumbY = (ty - thumbMarginY) / r_h - thumbfast.height + + thumbX = math.floor(thumbX + 0.5) + thumbY = math.floor(thumbY + 0.5) + + elem_ass:new_event() + elem_ass:pos(thumbX * r_w, ty - thumbMarginY - thumbfast.height * r_h) + elem_ass:an(7) + elem_ass:append(osc_styles.Tooltip) + elem_ass:draw_start() + elem_ass:rect_cw(-thumbPad * r_w, -thumbPad * r_h, (thumbfast.width + thumbPad) * r_w, (thumbfast.height + thumbPad) * r_h) + elem_ass:draw_stop() + + mp.commandv("script-message-to", "thumbfast", "thumb", + mp.get_property_number("duration", 0) * (sliderpos / 100), + thumbX, + thumbY + ) + + local se, ae = state.slider_element, elements[state.active_element] + if user_opts.chapter_fmt ~= "no" and se and (ae == se or (not ae and mouse_hit(se))) then + local dur = mp.get_property_number("duration", 0) + if dur > 0 then + local possec = get_slider_value(se) * dur / 100 -- of mouse pos + local ch = get_chapter(possec) + if ch and ch.title and ch.title ~= "" then + elem_ass:new_event() + elem_ass:pos((thumbX + thumbfast.width / 2) * r_w, thumbY * r_h - tooltip_font_size) + elem_ass:an(an) + elem_ass:append(slider_lo.tooltip_style) + ass_append_alpha(elem_ass, slider_lo.alpha, 0) + elem_ass:append(string.format(user_opts.chapter_fmt, ch.title)) + end + end + end + end + end + else + if thumbfast.available then + mp.commandv("script-message-to", "thumbfast", "clear") + end + end + end + + elseif (element.type == 'button') then + + local buttontext + if type(element.content) == 'function' then + buttontext = element.content() -- function objects + elseif not (element.content == nil) then + buttontext = element.content -- text objects + end + + buttontext = buttontext:gsub(':%((.?.?.?)%) unknown ', ':%(%1%)') --gsub('%) unknown %(\'', '') + + local maxchars = element.layout.button.maxchars + -- 认为1个中文字符约等于1.5个英文字符 + -- local charcount = buttontext:len()- (buttontext:len()-select(2, buttontext:gsub('[^\128-\193]', '')))/1.5 + local charcount = (buttontext:len() + select(2, buttontext:gsub('[^\128-\193]', ''))*2) / 3 + if not (maxchars == nil) and (charcount > maxchars) then + local limit = math.max(0, maxchars - 3) + if (charcount > limit) then + while (charcount > limit) do + buttontext = buttontext:gsub('.[\128-\191]*$', '') + charcount = (buttontext:len() + select(2, buttontext:gsub('[^\128-\193]', ''))*2) / 3 + end + buttontext = buttontext .. '...' + end + end + + elem_ass:append(buttontext) + + -- add tooltip + if not (element.tooltipF == nil) and element.enabled then + if mouse_hit(element) then + local tooltiplabel = element.tooltipF + local an = 1 + local ty = element.hitbox.y1 + local tx = get_virt_mouse_pos() + + if ty < osc_param.playresy / 2 then + ty = element.hitbox.y2 + an = 7 + end + + -- tooltip label + if type(element.tooltipF) == 'function' then + tooltiplabel = element.tooltipF() + else + tooltiplabel = element.tooltipF + end + elem_ass:new_event() + elem_ass:pos(tx, ty) + elem_ass:an(an) + elem_ass:append(element.tooltip_style) + elem_ass:append(tooltiplabel) + end + end + end + + master_ass:merge(elem_ass) + end +end + +-- +-- Message display +-- + +-- pos is 1 based +function limited_list(prop, pos) + local proplist = mp.get_property_native(prop, {}) + local count = #proplist + if count == 0 then + return count, proplist + end + + local fs = tonumber(mp.get_property('options/osd-font-size')) + local max = math.ceil(osc_param.unscaled_y*0.75 / fs) + if max % 2 == 0 then + max = max - 1 + end + local delta = math.ceil(max / 2) - 1 + local begi = math.max(math.min(pos - delta, count - max + 1), 1) + local endi = math.min(begi + max - 1, count) + + local reslist = {} + for i=begi, endi do + local item = proplist[i] + item.current = (i == pos) and true or nil + table.insert(reslist, item) + end + return count, reslist +end + +function get_playlist() + local pos = mp.get_property_number('playlist-pos', 0) + 1 + local count, limlist = limited_list('playlist', pos) + if count == 0 then + return texts.nolist + end + + local message = string.format(texts.playlist .. ' [%d/%d]:\n', pos, count) + for i, v in ipairs(limlist) do + local title = v.title + local _, filename = utils.split_path(v.filename) + if title == nil then + title = filename + end + message = string.format('%s %s %s\n', message, + (v.current and '●' or '○'), title) + end + return message +end + +function get_chapterlist() + local pos = mp.get_property_number('chapter', 0) + 1 + local count, limlist = limited_list('chapter-list', pos) + if count == 0 then + return texts.nochapter + end + + local message = string.format(texts.chapter.. ' [%d/%d]:\n', pos, count) + for i, v in ipairs(limlist) do + local time = mp.format_time(v.time) + local title = v.title + if title == nil then + title = string.format(texts.chapter .. ' %02d', i) + end + message = string.format('%s[%s] %s %s\n', message, time, + (v.current and '●' or '○'), title) + end + return message +end + +function show_message(text, duration) + + --print('text: '..text..' duration: ' .. duration) + if duration == nil then + duration = tonumber(mp.get_property('options/osd-duration')) / 1000 + elseif not type(duration) == 'number' then + print('duration: ' .. duration) + end + + -- cut the text short, otherwise the following functions + -- may slow down massively on huge input + text = string.sub(text, 0, 4000) + + -- replace actual linebreaks with ASS linebreaks + text = string.gsub(text, '\n', '\\N') + + state.message_text = text + + if not state.message_hide_timer then + state.message_hide_timer = mp.add_timeout(0, request_tick) + end + state.message_hide_timer:kill() + state.message_hide_timer.timeout = duration + state.message_hide_timer:resume() + request_tick() +end + +function render_message(ass) + if state.message_hide_timer and state.message_hide_timer:is_enabled() and + state.message_text + then + local _, lines = string.gsub(state.message_text, '\\N', '') + + local fontsize = tonumber(mp.get_property('options/osd-font-size')) + local outline = tonumber(mp.get_property('options/osd-border-size')) + local maxlines = math.ceil(osc_param.unscaled_y*0.75 / fontsize) + local counterscale = osc_param.playresy / osc_param.unscaled_y + + fontsize = fontsize * counterscale / math.max(0.65 + math.min(lines/maxlines, 1), 1) + outline = outline * counterscale / math.max(0.75 + math.min(lines/maxlines, 1)/2, 1) + + local style = '{\\bord' .. outline .. '\\fs' .. fontsize .. '}' + + + ass:new_event() + ass:append(style .. state.message_text) + else + state.message_text = nil + end +end + +-- +-- Initialisation and Layout +-- + +function new_element(name, type) + elements[name] = {} + elements[name].type = type + elements[name].name = name + + -- add default stuff + elements[name].eventresponder = {} + elements[name].visible = true + elements[name].enabled = true + elements[name].softrepeat = false + elements[name].styledown = (type == 'button') + elements[name].state = {} + + if (type == 'slider') then + elements[name].slider = {min = {value = 0}, max = {value = 100}} + end + + + return elements[name] +end + +function add_layout(name) + if not (elements[name] == nil) then + -- new layout + elements[name].layout = {} + + -- set layout defaults + elements[name].layout.layer = 50 + elements[name].layout.alpha = {[1] = 0, [2] = 255, [3] = 255, [4] = 255} + + if (elements[name].type == 'button') then + elements[name].layout.button = { + maxchars = nil, + } + elseif (elements[name].type == 'slider') then + -- slider defaults + elements[name].layout.slider = { + border = 1, + gap = 1, + nibbles_top = true, + nibbles_bottom = true, + adjust_tooltip = true, + tooltip_style = '', + tooltip_an = 2, + alpha = {[1] = 0, [2] = 255, [3] = 88, [4] = 255}, + } + elseif (elements[name].type == 'box') then + elements[name].layout.box = {radius = 0, hexagon = false} + end + + return elements[name].layout + else + msg.error('Can\'t add_layout to element \''..name..'\', doesn\'t exist.') + end +end + +-- Window Controls +function window_controls() + local wc_geo = { + x = 0, + y = 32, + an = 1, + w = osc_param.playresx, + h = 32, + } + + local controlbox_w = window_control_box_width + local titlebox_w = wc_geo.w - controlbox_w + + -- Default alignment is 'right' + local controlbox_left = wc_geo.w - controlbox_w + local titlebox_left = wc_geo.x + local titlebox_right = wc_geo.w - controlbox_w + + add_area('window-controls', + get_hitbox_coords(controlbox_left, wc_geo.y, wc_geo.an, + controlbox_w, wc_geo.h)) + + local lo + + local button_y = wc_geo.y - (wc_geo.h / 2) + local first_geo = + {x = controlbox_left + 27, y = button_y, an = 5, w = 40, h = wc_geo.h} + local second_geo = + {x = controlbox_left + 69, y = button_y, an = 5, w = 40, h = wc_geo.h} + local third_geo = + {x = controlbox_left + 115, y = button_y, an = 5, w = 40, h = wc_geo.h} + + -- Window control buttons use symbols in the custom mpv osd font + -- because the official unicode codepoints are sufficiently + -- exotic that a system might lack an installed font with them, + -- and libass will complain that they are not present in the + -- default font, even if another font with them is available. + + -- Close: ?? + ne = new_element('close', 'button') + ne.content = '\238\132\149' + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('quit') end + lo = add_layout('close') + lo.geometry = third_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 + + -- Minimize: ?? + ne = new_element('minimize', 'button') + ne.content = '\\n\238\132\146' + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'window-minimized') end + lo = add_layout('minimize') + lo.geometry = first_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 + + -- Maximize: ?? /?? + ne = new_element('maximize', 'button') + if state.maximized or state.fullscreen then + ne.content = '\238\132\148' + else + ne.content = '\238\132\147' + end + ne.eventresponder['mbtn_left_up'] = + function () + if state.fullscreen then + mp.commandv('cycle', 'fullscreen') + else + mp.commandv('cycle', 'window-maximized') + end + end + lo = add_layout('maximize') + lo.geometry = second_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 +end + +-- +-- Layouts +-- + +local layouts = {} + +-- Default layout +layouts = function () + + local osc_geo = {w, h} + + osc_geo.w = osc_param.playresx + osc_geo.h = 180 + + -- origin of the controllers, left/bottom corner + local posX = 0 + local posY = osc_param.playresy + + osc_param.areas = {} -- delete areas + + -- area for active mouse input + add_area('input', get_hitbox_coords(posX, posY, 1, osc_geo.w, 104)) + + -- area for show/hide + add_area('showhide', 0, 0, osc_param.playresx, osc_param.playresy) + + -- fetch values + local osc_w, osc_h= + osc_geo.w, osc_geo.h + + -- + -- Controller Background + -- + local lo + + new_element('TransBg', 'box') + lo = add_layout('TransBg') + lo.geometry = {x = posX, y = posY, an = 7, w = osc_w, h = 1} + lo.style = osc_styles.TransBg + lo.layer = 10 + lo.alpha[3] = 0 + + -- + -- Alignment + -- + local refX = osc_w / 2 + local refY = posY + local geo + + -- + -- Seekbar + -- + new_element('seekbarbg', 'box') + lo = add_layout('seekbarbg') + lo.geometry = {x = refX , y = refY - 96 , an = 5, w = osc_geo.w - 50, h = 2} + lo.layer = 13 + lo.style = osc_styles.SeekbarBg + lo.alpha[1] = 128 + lo.alpha[3] = 128 + + lo = add_layout('seekbar') + lo.geometry = {x = refX, y = refY - 96 , an = 5, w = osc_geo.w - 50, h = 16} + lo.style = osc_styles.SeekbarFg + lo.slider.gap = 7 + lo.slider.tooltip_style = osc_styles.Tooltip + lo.slider.tooltip_an = 2 + + local showjump = user_opts.showjump + local offset = showjump and 60 or 0 + + -- + -- Volumebar + -- + lo = new_element('volumebarbg', 'box') + lo.visible = (osc_param.playresx >= 750) and user_opts.volumecontrol + lo = add_layout('volumebarbg') + lo.geometry = {x = 155, y = refY - 40, an = 4, w = 80, h = 2} + lo.layer = 13 + lo.style = osc_styles.VolumebarBg + + + lo = add_layout('volumebar') + lo.geometry = {x = 155, y = refY - 40, an = 4, w = 80, h = 8} + lo.style = osc_styles.VolumebarFg + lo.slider.gap = 3 + lo.slider.tooltip_style = osc_styles.Tooltip + lo.slider.tooltip_an = 2 + + -- buttons + lo = add_layout('pl_prev') + lo.geometry = {x = refX - 120 - offset, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + lo = add_layout('skipback') + lo.geometry = {x = refX - 60 - offset, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + + if showjump then + lo = add_layout('jumpback') + lo.geometry = {x = refX - 60, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + end + + lo = add_layout('playpause') + lo.geometry = {x = refX, y = refY - 40 , an = 5, w = 45, h = 45} + lo.style = osc_styles.Ctrl1 + + if showjump then + lo = add_layout('jumpfrwd') + lo.geometry = {x = refX + 60, y = refY - 40 , an = 5, w = 30, h = 24} + + -- HACK: jumpfrwd's icon must be mirrored for nonstandard # of seconds + -- as the font only has an icon without a number for rewinding + lo.style = (user_opts.jumpiconnumber and jumpicons[user_opts.jumpamount] ~= nil) and osc_styles.Ctrl2 or osc_styles.Ctrl2Flip + end + + lo = add_layout('skipfrwd') + lo.geometry = {x = refX + 60 + offset, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + lo = add_layout('pl_next') + lo.geometry = {x = refX + 120 + offset, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + + -- Time + lo = add_layout('tc_left') + lo.geometry = {x = 25, y = refY - 84, an = 7, w = 64, h = 20} + lo.style = osc_styles.Time + + + lo = add_layout('tc_right') + lo.geometry = {x = osc_geo.w - 25 , y = refY -84, an = 9, w = 64, h = 20} + lo.style = osc_styles.Time + + lo = add_layout('cy_audio') + lo.geometry = {x = 37, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + lo.visible = (osc_param.playresx >= 540) + + lo = add_layout('cy_sub') + lo.geometry = {x = 87, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + lo.visible = (osc_param.playresx >= 600) + + lo = add_layout('vol_ctrl') + lo.geometry = {x = 137, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + lo.visible = (osc_param.playresx >= 650) + + lo = add_layout('tog_fs') + lo.geometry = {x = osc_geo.w - 37, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + lo.visible = (osc_param.playresx >= 540) + + lo = add_layout('tog_info') + lo.geometry = {x = osc_geo.w - 87, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + lo.visible = (osc_param.playresx >= 600) + + geo = { x = 25, y = refY - 132, an = 1, w = osc_geo.w - 50, h = 48 } + lo = add_layout('title') + lo.geometry = geo + lo.style = string.format('%s{\\clip(%f,%f,%f,%f)}', osc_styles.Title, + geo.x, geo.y - geo.h, geo.x + geo.w , geo.y + 5) + lo.alpha[3] = 0 + lo.button.maxchars = geo.w / 23 +end + +-- Validate string type user options +function validate_user_opts() + if user_opts.windowcontrols ~= 'auto' and + user_opts.windowcontrols ~= 'yes' and + user_opts.windowcontrols ~= 'no' then + msg.warn('windowcontrols cannot be \'' .. + user_opts.windowcontrols .. '\'. Ignoring.') + user_opts.windowcontrols = 'auto' + end +end + +function update_options(list) + validate_user_opts() + request_tick() + visibility_mode(user_opts.visibility, true) + update_duration_watch() + request_init() +end + +-- OSC INIT +function osc_init() + msg.debug('osc_init') + + -- set canvas resolution according to display aspect and scaling setting + local baseResY = 720 + local display_w, display_h, display_aspect = mp.get_osd_size() + local scale = 1 + + if (mp.get_property('video') == 'no') then -- dummy/forced window + scale = user_opts.scaleforcedwindow + elseif state.fullscreen then + scale = user_opts.scalefullscreen + else + scale = user_opts.scalewindowed + end + + if user_opts.vidscale then + osc_param.unscaled_y = baseResY + else + osc_param.unscaled_y = display_h + end + osc_param.playresy = osc_param.unscaled_y / scale + if (display_aspect > 0) then + osc_param.display_aspect = display_aspect + end + osc_param.playresx = osc_param.playresy * osc_param.display_aspect + + -- stop seeking with the slider to prevent skipping files + state.active_element = nil + + elements = {} + + -- some often needed stuff + local pl_count = mp.get_property_number('playlist-count', 0) + local have_pl = (pl_count > 1) + local pl_pos = mp.get_property_number('playlist-pos', 0) + 1 + local have_ch = (mp.get_property_number('chapters', 0) > 0) + local loop = mp.get_property('loop-playlist', 'no') + + local ne + + -- playlist buttons + -- prev + ne = new_element('pl_prev', 'button') + + ne.content = icons.previous + ne.enabled = (pl_pos > 1) or (loop ~= 'no') + ne.eventresponder['mbtn_left_up'] = + function () + mp.commandv('playlist-prev', 'weak') + end + ne.eventresponder['mbtn_right_up'] = + function () show_message(get_playlist()) end + + --next + ne = new_element('pl_next', 'button') + + ne.content = icons.next + ne.enabled = (have_pl and (pl_pos < pl_count)) or (loop ~= 'no') + ne.eventresponder['mbtn_left_up'] = + function () + mp.commandv('playlist-next', 'weak') + end + ne.eventresponder['mbtn_right_up'] = + function () show_message(get_playlist()) end + + + --play control buttons + --playpause + ne = new_element('playpause', 'button') + + ne.content = function () + if mp.get_property('pause') == 'yes' then + return (icons.play) + else + return (icons.pause) + end + end + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'pause') end + --ne.eventresponder['mbtn_right_up'] = + -- function () mp.commandv('script-binding', 'open-file-dialog') end + + if user_opts.showjump then + local jumpamount = user_opts.jumpamount + local jumpmode = user_opts.jumpmode + local icons = jumpicons.default + if user_opts.jumpiconnumber then + icons = jumpicons[jumpamount] or jumpicons.default + end + + --jumpback + ne = new_element('jumpback', 'button') + + ne.softrepeat = true + ne.content = icons[1] + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek -5') end + function () mp.commandv('seek', -jumpamount, jumpmode) end + ne.eventresponder['shift+mbtn_left_down'] = + function () mp.commandv('frame-back-step') end + ne.eventresponder['mbtn_right_down'] = + --function () mp.command('seek -60') end + function () mp.commandv('seek', -60, jumpmode) end + ne.eventresponder['enter'] = + --function () mp.command('seek -5') end + function () mp.commandv('seek', -jumpamount, jumpmode) end + + + --jumpfrwd + ne = new_element('jumpfrwd', 'button') + + ne.softrepeat = true + ne.content = icons[2] + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek +5') end + function () mp.commandv('seek', jumpamount, jumpmode) end + ne.eventresponder['shift+mbtn_left_down'] = + function () mp.commandv('frame-step') end + ne.eventresponder['mbtn_right_down'] = + --function () mp.command('seek +60') end + function () mp.commandv('seek', 60, jumpmode) end + ne.eventresponder['enter'] = + --function () mp.command('seek +5') end + function () mp.commandv('seek', jumpamount, jumpmode) end + end + + + --skipback + ne = new_element('skipback', 'button') + + ne.softrepeat = true + ne.content = icons.backward + ne.enabled = (have_ch) -- disables button when no chapters available. + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek -5') end + --function () mp.commandv('seek', -5, 'relative', 'keyframes') end + function () mp.commandv("add", "chapter", -1) end + --ne.eventresponder['shift+mbtn_left_down'] = + --function () mp.commandv('frame-back-step') end + ne.eventresponder['mbtn_right_down'] = + function () show_message(get_chapterlist()) end + --function () mp.command('seek -60') end + --function () mp.commandv('seek', -60, 'relative', 'keyframes') end + ne.eventresponder['enter'] = + --function () mp.command('seek -5') end + --function () mp.commandv('seek', -5, 'relative', 'keyframes') end + function () mp.commandv("add", "chapter", -1) end + + --skipfrwd + ne = new_element('skipfrwd', 'button') + + ne.softrepeat = true + ne.content = icons.forward + ne.enabled = (have_ch) -- disables button when no chapters available. + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek +5') end + --function () mp.commandv('seek', 5, 'relative', 'keyframes') end + function () mp.commandv("add", "chapter", 1) end + --ne.eventresponder['shift+mbtn_left_down'] = + --function () mp.commandv('frame-step') end + ne.eventresponder['mbtn_right_down'] = + function () show_message(get_chapterlist()) end + --function () mp.command('seek +60') end + --function () mp.commandv('seek', 60, 'relative', 'keyframes') end + ne.eventresponder['enter'] = + --function () mp.command('seek +5') end + --function () mp.commandv('seek', 5, 'relative', 'keyframes') end + function () mp.commandv("add", "chapter", 1) end + + -- + update_tracklist() + + --cy_audio + ne = new_element('cy_audio', 'button') + ne.enabled = (#tracks_osc.audio > 0) + ne.off = (get_track('audio') == 0) + ne.visible = (osc_param.playresx >= 540) + ne.content = icons.audio + ne.tooltip_style = osc_styles.Tooltip + ne.tooltipF = function () + local msg = texts.off + if not (get_track('audio') == 0) then + msg = (texts.audio .. ' [' .. get_track('audio') .. ' ∕ ' .. #tracks_osc.audio .. '] ') + local prop = mp.get_property('current-tracks/audio/title') --('current-tracks/audio/lang') + if not prop then + prop = texts.na + end + msg = msg .. '[' .. prop .. ']' + prop = mp.get_property('current-tracks/audio/lang') --('current-tracks/audio/title') + if prop then + msg = msg .. ' ' .. prop + end + return msg + end + return msg + end + ne.eventresponder['mbtn_left_up'] = + function () set_track('audio', 1) end + ne.eventresponder['mbtn_right_up'] = + function () set_track('audio', -1) end + ne.eventresponder['shift+mbtn_left_down'] = + function () show_message(get_tracklist('audio')) end + ne.eventresponder['enter'] = + function () set_track('audio', 1); show_message(get_tracklist('audio')) end + + --cy_sub + ne = new_element('cy_sub', 'button') + ne.enabled = (#tracks_osc.sub > 0) + ne.off = (get_track('sub') == 0) + ne.visible = (osc_param.playresx >= 600) + ne.content = icons.sub + ne.tooltip_style = osc_styles.Tooltip + ne.tooltipF = function () + local msg = texts.off + if not (get_track('sub') == 0) then + msg = (texts.subtitle .. ' [' .. get_track('sub') .. ' ∕ ' .. #tracks_osc.sub .. '] ') + local prop = mp.get_property('current-tracks/sub/lang') + if not prop then + prop = texts.na + end + msg = msg .. '[' .. prop .. ']' + prop = mp.get_property('current-tracks/sub/title') + if prop then + msg = msg .. ' ' .. prop + end + return msg + end + return msg + end + ne.eventresponder['mbtn_left_up'] = + function () set_track('sub', 1) end + ne.eventresponder['mbtn_right_up'] = + function () set_track('sub', -1) end + ne.eventresponder['shift+mbtn_left_down'] = + function () show_message(get_tracklist('sub')) end + ne.eventresponder['enter'] = + function () set_track('sub', 1); show_message(get_tracklist('sub')) end + + -- vol_ctrl + ne = new_element('vol_ctrl', 'button') + ne.enabled = (get_track('audio')>0) + ne.visible = (osc_param.playresx >= 650) and user_opts.volumecontrol + ne.content = function () + if (state.mute) then + return (icons.volume_mute) + else + return (icons.volume) + end + end + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'mute') end + ne.eventresponder["wheel_up_press"] = + function () mp.commandv("osd-auto", "add", "volume", 5) end + ne.eventresponder["wheel_down_press"] = + function () mp.commandv("osd-auto", "add", "volume", -5) end + + --tog_fs + ne = new_element('tog_fs', 'button') + ne.content = function () + if (state.fullscreen) then + return (icons.minimize) + else + return (icons.fullscreen) + end + end + ne.visible = (osc_param.playresx >= 540) + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'fullscreen') end + + --tog_info + ne = new_element('tog_info', 'button') + ne.content = icons.info + ne.visible = (osc_param.playresx >= 600) + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('script-binding', 'stats/display-stats-toggle') end + + -- title + ne = new_element('title', 'button') + ne.content = function () + local title = state.forced_title or + mp.command_native({"expand-text", user_opts.title}) + if state.paused then + title = title:gsub('\\n', ' '):gsub('\\$', ''):gsub('{','\\{') + else + title = title:gsub('\\n', ' '):gsub('\\$', ''):gsub('{','\\{') --title = ' ' + end + return not (title == '') and title or ' ' + end + ne.visible = osc_param.playresy >= 320 and user_opts.showtitle + + --seekbar + ne = new_element('seekbar', 'slider') + + ne.enabled = not (mp.get_property('percent-pos') == nil) + state.slider_element = ne.enabled and ne or nil -- used for forced_title + ne.slider.markerF = function () + local duration = mp.get_property_number('duration', nil) + if not (duration == nil) then + local chapters = mp.get_property_native('chapter-list', {}) + local markers = {} + for n = 1, #chapters do + markers[n] = (chapters[n].time / duration * 100) + end + return markers + else + return {} + end + end + ne.slider.posF = + function () return mp.get_property_number('percent-pos', nil) end + ne.slider.tooltipF = function (pos) + local duration = mp.get_property_number('duration', nil) + if not ((duration == nil) or (pos == nil)) then + possec = duration * (pos / 100) + return mp.format_time(possec) + else + return '' + end + end + ne.slider.seekRangesF = function() + if not user_opts.seekrange then + return nil + end + local cache_state = state.cache_state + if not cache_state then + return nil + end + local duration = mp.get_property_number('duration', nil) + if (duration == nil) or duration <= 0 then + return nil + end + local ranges = cache_state['seekable-ranges'] + if #ranges == 0 then + return nil + end + local nranges = {} + for _, range in pairs(ranges) do + nranges[#nranges + 1] = { + ['start'] = 100 * range['start'] / duration, + ['end'] = 100 * range['end'] / duration, + } + end + return nranges + end + ne.eventresponder['mouse_move'] = --keyframe seeking when mouse is dragged + function (element) + if not element.state.mbtnleft then return end -- allow drag for mbtnleft only! + -- mouse move events may pile up during seeking and may still get + -- sent when the user is done seeking, so we need to throw away + -- identical seeks + local seekto = get_slider_value(element) + if (element.state.lastseek == nil) or + (not (element.state.lastseek == seekto)) then + local flags = 'absolute-percent' + if not user_opts.seekbarkeyframes then + flags = flags .. '+exact' + end + mp.commandv('seek', seekto, flags) + element.state.lastseek = seekto + end + + end + ne.eventresponder['mbtn_left_down'] = --exact seeks on single clicks + function (element) + mp.commandv('seek', get_slider_value(element), 'absolute-percent', 'exact') + element.state.mbtnleft = true + end + ne.eventresponder['mbtn_left_up'] = + function (element) element.state.mbtnleft = false end + ne.eventresponder['mbtn_right_down'] = --seeks to chapter start + function (element) + local duration = mp.get_property_number('duration', nil) + if not (duration == nil) then + local chapters = mp.get_property_native('chapter-list', {}) + if #chapters > 0 then + local pos = get_slider_value(element) + local ch = #chapters + for n = 1, ch do + if chapters[n].time / duration * 100 >= pos then + ch = n - 1 + break + end + end + mp.commandv('set', 'chapter', ch - 1) + --if chapters[ch].title then show_message(chapters[ch].time) end + end + end + end + ne.eventresponder['reset'] = + function (element) element.state.lastseek = nil end + + --volumebar + ne = new_element('volumebar', 'slider') + ne.visible = (osc_param.playresx >= 700) and user_opts.volumecontrol + ne.enabled = (get_track('audio')>0) + ne.slider.markerF = function () + return {} + end + ne.slider.seekRangesF = function() + return nil + end + ne.slider.posF = + function () + local val = mp.get_property_number('volume', nil) + return val*val/100 + end + ne.eventresponder['mouse_move'] = + function (element) + if not element.state.mbtnleft then return end -- allow drag for mbtnleft only! + local seekto = get_slider_value(element) + if (element.state.lastseek == nil) or + (not (element.state.lastseek == seekto)) then + mp.commandv('set', 'volume', 10*math.sqrt(seekto)) + element.state.lastseek = seekto + end + end + ne.eventresponder['mbtn_left_down'] = --exact seeks on single clicks + function (element) + local seekto = get_slider_value(element) + mp.commandv('set', 'volume', 10*math.sqrt(seekto)) + element.state.mbtnleft = true + end + ne.eventresponder['mbtn_left_up'] = + function (element) element.state.mbtnleft = false end + ne.eventresponder['reset'] = + function (element) element.state.lastseek = nil end + ne.eventresponder["wheel_up_press"] = + function () mp.commandv("osd-auto", "add", "volume", 5) end + ne.eventresponder["wheel_down_press"] = + function () mp.commandv("osd-auto", "add", "volume", -5) end + + -- tc_left (current pos) + ne = new_element('tc_left', 'button') + ne.content = function () + if (state.fulltime) then + return (mp.get_property_osd('playback-time/full')) + else + return (mp.get_property_osd('playback-time')) + end + end + ne.eventresponder["mbtn_left_up"] = function () + state.fulltime = not state.fulltime + request_init() + end + -- tc_right (total/remaining time) + ne = new_element('tc_right', 'button') + ne.content = function () + if (mp.get_property_number('duration', 0) <= 0) then return '--:--:--' end + if (state.rightTC_trem) then + if (state.fulltime) then + return ('-'..mp.get_property_osd('playtime-remaining/full')) + else + return ('-'..mp.get_property_osd('playtime-remaining')) + end + else + if (state.fulltime) then + return (mp.get_property_osd('duration/full')) + else + return (mp.get_property_osd('duration')) + end + + end + end + ne.eventresponder['mbtn_left_up'] = + function () state.rightTC_trem = not state.rightTC_trem end + + -- load layout + layouts() + + -- load window controls + if window_controls_enabled() then + window_controls() + end + + --do something with the elements + prepare_elements() +end + +function shutdown() + +end + +-- +-- Other important stuff +-- + + +function show_osc() + -- show when disabled can happen (e.g. mouse_move) due to async/delayed unbinding + if not state.enabled then return end + + msg.trace('show_osc') + --remember last time of invocation (mouse move) + state.showtime = mp.get_time() + + osc_visible(true) + + if user_opts.keyboardnavigation == true then + osc_enable_key_bindings() + end + + if (user_opts.fadeduration > 0) then + state.anitype = nil + end +end + +function hide_osc() + msg.trace('hide_osc') + if not state.enabled then + -- typically hide happens at render() from tick(), but now tick() is + -- no-op and won't render again to remove the osc, so do that manually. + state.osc_visible = false + render_wipe() + if user_opts.keyboardnavigation == true then + osc_disable_key_bindings() + end + elseif (user_opts.fadeduration > 0) then + if not(state.osc_visible == false) then + state.anitype = 'out' + request_tick() + end + else + osc_visible(false) + end +end + +function osc_visible(visible) + if state.osc_visible ~= visible then + state.osc_visible = visible + end + request_tick() +end + +function pause_state(name, enabled) + state.paused = enabled + mp.add_timeout(0.1, function() state.osd:update() end) + if user_opts.showonpause then + if enabled then + state.lastvisibility = user_opts.visibility + visibility_mode("always", true) + show_osc() + else + visibility_mode(state.lastvisibility, true) + end + end + request_tick() +end + +function cache_state(name, st) + state.cache_state = st + request_tick() +end + +-- Request that tick() is called (which typically re-renders the OSC). +-- The tick is then either executed immediately, or rate-limited if it was +-- called a small time ago. +function request_tick() + if state.tick_timer == nil then + state.tick_timer = mp.add_timeout(0, tick) + end + + if not state.tick_timer:is_enabled() then + local now = mp.get_time() + local timeout = tick_delay - (now - state.tick_last_time) + if timeout < 0 then + timeout = 0 + end + state.tick_timer.timeout = timeout + state.tick_timer:resume() + end +end + +function mouse_leave() + if get_hidetimeout() >= 0 then + hide_osc() + end + -- reset mouse position + state.last_mouseX, state.last_mouseY = nil, nil + state.mouse_in_window = false +end + +function request_init() + state.initREQ = true + request_tick() +end + +-- Like request_init(), but also request an immediate update +function request_init_resize() + request_init() + -- ensure immediate update + state.tick_timer:kill() + state.tick_timer.timeout = 0 + state.tick_timer:resume() +end + +function render_wipe() + msg.trace('render_wipe()') + state.osd:remove() +end + +function render() + msg.trace('rendering') + local current_screen_sizeX, current_screen_sizeY, aspect = mp.get_osd_size() + local mouseX, mouseY = get_virt_mouse_pos() + local now = mp.get_time() + + -- check if display changed, if so request reinit + if not (state.mp_screen_sizeX == current_screen_sizeX + and state.mp_screen_sizeY == current_screen_sizeY) then + + request_init_resize() + + state.mp_screen_sizeX = current_screen_sizeX + state.mp_screen_sizeY = current_screen_sizeY + end + + -- init management + if state.active_element then + -- mouse is held down on some element - keep ticking and igore initReq + -- till it's released, or else the mouse-up (click) will misbehave or + -- get ignored. that's because osc_init() recreates the osc elements, + -- but mouse handling depends on the elements staying unmodified + -- between mouse-down and mouse-up (using the index active_element). + request_tick() + elseif state.initREQ then + osc_init() + state.initREQ = false + + -- store initial mouse position + if (state.last_mouseX == nil or state.last_mouseY == nil) + and not (mouseX == nil or mouseY == nil) then + + state.last_mouseX, state.last_mouseY = mouseX, mouseY + end + end + + + -- fade animation + if not(state.anitype == nil) then + + if (state.anistart == nil) then + state.anistart = now + end + + if (now < state.anistart + (user_opts.fadeduration/1000)) then + + if (state.anitype == 'in') then --fade in + osc_visible(true) + state.animation = scale_value(state.anistart, + (state.anistart + (user_opts.fadeduration/1000)), + 255, 0, now) + elseif (state.anitype == 'out') then --fade out + state.animation = scale_value(state.anistart, + (state.anistart + (user_opts.fadeduration/1000)), + 0, 255, now) + end + + else + if (state.anitype == 'out') then + osc_visible(false) + end + state.anistart = nil + state.animation = nil + state.anitype = nil + end + else + state.anistart = nil + state.animation = nil + state.anitype = nil + end + + --mouse show/hide area + for k,cords in pairs(osc_param.areas['showhide']) do + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'showhide') + end + if osc_param.areas['showhide_wc'] then + for k,cords in pairs(osc_param.areas['showhide_wc']) do + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'showhide_wc') + end + else + set_virt_mouse_area(0, 0, 0, 0, 'showhide_wc') + end + do_enable_keybindings() + + --mouse input area + local mouse_over_osc = false + + for _,cords in ipairs(osc_param.areas['input']) do + if state.osc_visible then -- activate only when OSC is actually visible + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'input') + end + if state.osc_visible ~= state.input_enabled then + if state.osc_visible then + mp.enable_key_bindings('input') + else + mp.disable_key_bindings('input') + end + state.input_enabled = state.osc_visible + end + + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + + if osc_param.areas['window-controls'] then + for _,cords in ipairs(osc_param.areas['window-controls']) do + if state.osc_visible then -- activate only when OSC is actually visible + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'window-controls') + mp.enable_key_bindings('window-controls') + else + mp.disable_key_bindings('window-controls') + end + + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + end + + if osc_param.areas['window-controls-title'] then + for _,cords in ipairs(osc_param.areas['window-controls-title']) do + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + end + + -- autohide + if not (state.showtime == nil) and (get_hidetimeout() >= 0) then + local timeout = state.showtime + (get_hidetimeout()/1000) - now + if timeout <= 0 then + if (state.active_element == nil) and not (mouse_over_osc) then + hide_osc() + end + else + -- the timer is only used to recheck the state and to possibly run + -- the code above again + if not state.hide_timer then + state.hide_timer = mp.add_timeout(0, tick) + end + state.hide_timer.timeout = timeout + -- re-arm + state.hide_timer:kill() + state.hide_timer:resume() + end + end + + + -- actual rendering + local ass = assdraw.ass_new() + + -- Messages + render_message(ass) + + -- actual OSC + if state.osc_visible then + render_elements(ass) + end + + -- submit + set_osd(osc_param.playresy * osc_param.display_aspect, + osc_param.playresy, ass.text) +end + +-- +-- Eventhandling +-- + +local function element_has_action(element, action) + return element and element.eventresponder and + element.eventresponder[action] +end + +function process_event(source, what) + local action = string.format('%s%s', source, + what and ('_' .. what) or '') + + if what == 'down' or what == 'press' then + + for n = 1, #elements do + + if mouse_hit(elements[n]) and + elements[n].eventresponder and + (elements[n].eventresponder[source .. '_up'] or + elements[n].eventresponder[action]) then + + if what == 'down' then + state.active_element = n + state.active_event_source = source + end + -- fire the down or press event if the element has one + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + end + + end + end + + elseif what == 'up' then + + if elements[state.active_element] then + local n = state.active_element + + if n == 0 then + --click on background (does not work) + elseif element_has_action(elements[n], action) and + mouse_hit(elements[n]) then + + elements[n].eventresponder[action](elements[n]) + end + + --reset active element + if element_has_action(elements[n], 'reset') then + elements[n].eventresponder['reset'](elements[n]) + end + + end + state.active_element = nil + state.mouse_down_counter = 0 + + elseif source == 'mouse_move' then + + state.mouse_in_window = true + + local mouseX, mouseY = get_virt_mouse_pos() + if (user_opts.minmousemove == 0) or + (not ((state.last_mouseX == nil) or (state.last_mouseY == nil)) and + ((math.abs(mouseX - state.last_mouseX) >= user_opts.minmousemove) + or (math.abs(mouseY - state.last_mouseY) >= user_opts.minmousemove) + ) + ) then + show_osc() + end + state.last_mouseX, state.last_mouseY = mouseX, mouseY + + local n = state.active_element + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + end + end + + -- ensure rendering after any (mouse) event - icons could change etc + request_tick() +end + +local logo_lines = { + -- White border + "{\\c&HE5E5E5&\\p6}m 895 10 b 401 10 0 410 0 905 0 1399 401 1800 895 1800 1390 1800 1790 1399 1790 905 1790 410 1390 10 895 10 {\\p0}", + -- Purple fill + "{\\c&H682167&\\p6}m 925 42 b 463 42 87 418 87 880 87 1343 463 1718 925 1718 1388 1718 1763 1343 1763 880 1763 418 1388 42 925 42{\\p0}", + -- Darker fill + "{\\c&H430142&\\p6}m 1605 828 b 1605 1175 1324 1456 977 1456 631 1456 349 1175 349 828 349 482 631 200 977 200 1324 200 1605 482 1605 828{\\p0}", + -- White fill + "{\\c&HDDDBDD&\\p6}m 1296 910 b 1296 1131 1117 1310 897 1310 676 1310 497 1131 497 910 497 689 676 511 897 511 1117 511 1296 689 1296 910{\\p0}", + -- Triangle + "{\\c&H691F69&\\p6}m 762 1113 l 762 708 b 881 776 1000 843 1119 911 1000 978 881 1046 762 1113{\\p0}", +} + +local santa_hat_lines = { + -- Pompoms + "{\\c&HC0C0C0&\\p6}m 500 -323 b 491 -322 481 -318 475 -311 465 -312 456 -319 446 -318 434 -314 427 -304 417 -297 410 -290 404 -282 395 -278 390 -274 387 -267 381 -265 377 -261 379 -254 384 -253 397 -244 409 -232 425 -228 437 -228 446 -218 457 -217 462 -216 466 -213 468 -209 471 -205 477 -203 482 -206 491 -211 499 -217 508 -222 532 -235 556 -249 576 -267 584 -272 584 -284 578 -290 569 -305 550 -312 533 -309 523 -310 515 -316 507 -321 505 -323 503 -323 500 -323{\\p0}", + "{\\c&HE0E0E0&\\p6}m 315 -260 b 286 -258 259 -240 246 -215 235 -210 222 -215 211 -211 204 -188 177 -176 172 -151 170 -139 163 -128 154 -121 143 -103 141 -81 143 -60 139 -46 125 -34 129 -17 132 -1 134 16 142 30 145 56 161 80 181 96 196 114 210 133 231 144 266 153 303 138 328 115 373 79 401 28 423 -24 446 -73 465 -123 483 -174 487 -199 467 -225 442 -227 421 -232 402 -242 384 -254 364 -259 342 -250 322 -260 320 -260 317 -261 315 -260{\\p0}", + -- Main cap + "{\\c&H0000F0&\\p6}m 1151 -523 b 1016 -516 891 -458 769 -406 693 -369 624 -319 561 -262 526 -252 465 -235 479 -187 502 -147 551 -135 588 -111 1115 165 1379 232 1909 761 1926 800 1952 834 1987 858 2020 883 2053 912 2065 952 2088 1000 2146 962 2139 919 2162 836 2156 747 2143 662 2131 615 2116 567 2122 517 2120 410 2090 306 2089 199 2092 147 2071 99 2034 64 1987 5 1928 -41 1869 -86 1777 -157 1712 -256 1629 -337 1578 -389 1521 -436 1461 -476 1407 -509 1343 -507 1284 -515 1240 -519 1195 -521 1151 -523{\\p0}", + -- Cap shadow + "{\\c&H0000AA&\\p6}m 1657 248 b 1658 254 1659 261 1660 267 1669 276 1680 284 1689 293 1695 302 1700 311 1707 320 1716 325 1726 330 1735 335 1744 347 1752 360 1761 371 1753 352 1754 331 1753 311 1751 237 1751 163 1751 90 1752 64 1752 37 1767 14 1778 -3 1785 -24 1786 -45 1786 -60 1786 -77 1774 -87 1760 -96 1750 -78 1751 -65 1748 -37 1750 -8 1750 20 1734 78 1715 134 1699 192 1694 211 1689 231 1676 246 1671 251 1661 255 1657 248 m 1909 541 b 1914 542 1922 549 1917 539 1919 520 1921 502 1919 483 1918 458 1917 433 1915 407 1930 373 1942 338 1947 301 1952 270 1954 238 1951 207 1946 214 1947 229 1945 239 1939 278 1936 318 1924 356 1923 362 1913 382 1912 364 1906 301 1904 237 1891 175 1887 150 1892 126 1892 101 1892 68 1893 35 1888 2 1884 -9 1871 -20 1859 -14 1851 -6 1854 9 1854 20 1855 58 1864 95 1873 132 1883 179 1894 225 1899 273 1908 362 1910 451 1909 541{\\p0}", + -- Brim and tip pompom + "{\\c&HF8F8F8&\\p6}m 626 -191 b 565 -155 486 -196 428 -151 387 -115 327 -101 304 -47 273 2 267 59 249 113 219 157 217 213 215 265 217 309 260 302 285 283 373 264 465 264 555 257 608 252 655 292 709 287 759 294 816 276 863 298 903 340 972 324 1012 367 1061 394 1125 382 1167 424 1213 462 1268 482 1322 506 1385 546 1427 610 1479 662 1510 690 1534 725 1566 752 1611 796 1664 830 1703 880 1740 918 1747 986 1805 1005 1863 991 1897 932 1916 880 1914 823 1945 777 1961 725 1979 673 1957 622 1938 575 1912 534 1862 515 1836 473 1790 417 1755 351 1697 305 1658 266 1633 216 1593 176 1574 138 1539 116 1497 110 1448 101 1402 77 1371 37 1346 -16 1295 15 1254 6 1211 -27 1170 -62 1121 -86 1072 -104 1027 -128 976 -133 914 -130 851 -137 794 -162 740 -181 679 -168 626 -191 m 2051 917 b 1971 932 1929 1017 1919 1091 1912 1149 1923 1214 1970 1254 2000 1279 2027 1314 2066 1325 2139 1338 2212 1295 2254 1238 2281 1203 2287 1158 2282 1116 2292 1061 2273 1006 2229 970 2206 941 2167 938 2138 918{\\p0}", +} + +-- called by mpv on every frame +function tick() + if (not state.enabled) then return end + + if (state.idle) then + + -- render idle message + msg.trace('idle message') + local _, _, display_aspect = mp.get_osd_size() + local display_h = 360 + local display_w = display_h * display_aspect + -- logo is rendered at 2^(6-1) = 32 times resolution with size 1800x1800 + local icon_x, icon_y = (display_w - 1800 / 32) / 2, 140 + local line_prefix = ('{\\rDefault\\an7\\1a&H00&\\bord0\\shad0\\pos(%f,%f)}'):format(icon_x, icon_y) + + local ass = assdraw.ass_new() + -- mpv logo + if user_opts.idlescreen then + for i, line in ipairs(logo_lines) do + ass:new_event() + ass:append(line_prefix .. line) + end + end + + -- Santa hat + if is_december and user_opts.idlescreen and not user_opts.greenandgrumpy then + for i, line in ipairs(santa_hat_lines) do + ass:new_event() + ass:append(line_prefix .. line) + end + end + + if user_opts.idlescreen then + ass:new_event() + ass:pos(display_w / 2, icon_y + 65) + ass:an(8) + ass:append(texts.welcome) + end + set_osd(display_w, display_h, ass.text) + + if state.showhide_enabled then + mp.disable_key_bindings('showhide') + mp.disable_key_bindings('showhide_wc') + state.showhide_enabled = false + end + + + elseif (state.fullscreen and user_opts.showfullscreen) + or (not state.fullscreen and user_opts.showwindowed) then + + -- render the OSC + render() + else + -- Flush OSD + set_osd(osc_param.playresy, osc_param.playresy, '') + end + + state.tick_last_time = mp.get_time() + + if state.anitype ~= nil then + -- state.anistart can be nil - animation should now start, or it can + -- be a timestamp when it started. state.idle has no animation. + if not state.idle and + (not state.anistart or + mp.get_time() < 1 + state.anistart + user_opts.fadeduration/1000) + then + -- animating or starting, or still within 1s past the deadline + request_tick() + else + kill_animation() + end + end +end + +function do_enable_keybindings() + if state.enabled then + if not state.showhide_enabled then + mp.enable_key_bindings('showhide', 'allow-vo-dragging+allow-hide-cursor') + mp.enable_key_bindings('showhide_wc', 'allow-vo-dragging+allow-hide-cursor') + end + state.showhide_enabled = true + end +end + +function enable_osc(enable) + state.enabled = enable + if enable then + do_enable_keybindings() + else + hide_osc() -- acts immediately when state.enabled == false + if state.showhide_enabled then + mp.disable_key_bindings('showhide') + mp.disable_key_bindings('showhide_wc') + end + state.showhide_enabled = false + end +end + +-- duration is observed for the sole purpose of updating chapter markers +-- positions. live streams with chapters are very rare, and the update is also +-- expensive (with request_init), so it's only observed when we have chapters +-- and the user didn't disable the livemarkers option (update_duration_watch). +function on_duration() request_init() end + +local duration_watched = false +function update_duration_watch() + local want_watch = user_opts.livemarkers and + (mp.get_property_number("chapters", 0) or 0) > 0 and + true or false -- ensure it's a boolean + + if (want_watch ~= duration_watched) then + if want_watch then + mp.observe_property("duration", nil, on_duration) + else + mp.unobserve_property(on_duration) + end + duration_watched = want_watch + end +end + +validate_user_opts() +update_duration_watch() + +mp.register_event('shutdown', shutdown) +mp.register_event('start-file', request_init) +mp.observe_property('track-list', nil, request_init) +mp.observe_property('playlist', nil, request_init) +mp.observe_property("chapter-list", "native", function(_, list) + list = list or {} -- safety, shouldn't return nil + table.sort(list, function(a, b) return a.time < b.time end) + state.chapter_list = list + update_duration_watch() + request_init() +end) + +mp.register_script_message('osc-message', show_message) +mp.register_script_message('osc-chapterlist', function(dur) + show_message(get_chapterlist(), dur) +end) +mp.register_script_message('osc-playlist', function(dur) + show_message(get_playlist(), dur) +end) +mp.register_script_message('osc-tracklist', function(dur) + local msg = {} + for k,v in pairs(nicetypes) do + table.insert(msg, get_tracklist(k)) + end + show_message(table.concat(msg, '\n\n'), dur) +end) + +mp.observe_property('fullscreen', 'bool', + function(name, val) + state.fullscreen = val + request_init_resize() + end +) +mp.observe_property('mute', 'bool', + function(name, val) + state.mute = val + end +) +mp.observe_property('border', 'bool', + function(name, val) + state.border = val + request_init_resize() + end +) +mp.observe_property('window-maximized', 'bool', + function(name, val) + state.maximized = val + request_init_resize() + end +) +mp.observe_property('idle-active', 'bool', + function(name, val) + state.idle = val + request_tick() + end +) +mp.observe_property('pause', 'bool', pause_state) +mp.observe_property('demuxer-cache-state', 'native', cache_state) +mp.observe_property('vo-configured', 'bool', function(name, val) + request_tick() +end) +mp.observe_property('playback-time', 'number', function(name, val) + request_tick() +end) +mp.observe_property('osd-dimensions', 'native', function(name, val) + -- (we could use the value instead of re-querying it all the time, but then + -- we might have to worry about property update ordering) + request_init_resize() +end) + +-- mouse show/hide bindings +mp.set_key_bindings({ + {'mouse_move', function(e) process_event('mouse_move', nil) end}, + {'mouse_leave', mouse_leave}, +}, 'showhide', 'force') +mp.set_key_bindings({ + {'mouse_move', function(e) process_event('mouse_move', nil) end}, + {'mouse_leave', mouse_leave}, +}, 'showhide_wc', 'force') +do_enable_keybindings() + +--mouse input bindings +mp.set_key_bindings({ + {"mbtn_left", function(e) process_event("mbtn_left", "up") end, + function(e) process_event("mbtn_left", "down") end}, + {"shift+mbtn_left", function(e) process_event("shift+mbtn_left", "up") end, + function(e) process_event("shift+mbtn_left", "down") end}, + {"mbtn_right", function(e) process_event("mbtn_right", "up") end, + function(e) process_event("mbtn_right", "down") end}, + -- alias to shift_mbtn_left for single-handed mouse use + {"mbtn_mid", function(e) process_event("shift+mbtn_left", "up") end, + function(e) process_event("shift+mbtn_left", "down") end}, + {"wheel_up", function(e) process_event("wheel_up", "press") end}, + {"wheel_down", function(e) process_event("wheel_down", "press") end}, + {"mbtn_left_dbl", "ignore"}, + {"shift+mbtn_left_dbl", "ignore"}, + {"mbtn_right_dbl", "ignore"}, +}, "input", "force") +mp.enable_key_bindings('input') + +mp.set_key_bindings({ + {'mbtn_left', function(e) process_event('mbtn_left', 'up') end, + function(e) process_event('mbtn_left', 'down') end}, +}, 'window-controls', 'force') +mp.enable_key_bindings('window-controls') + +function get_hidetimeout() + if user_opts.visibility == 'always' then + return -1 -- disable autohide + end + return user_opts.hidetimeout +end + +function always_on(val) + if state.enabled then + if val then + show_osc() + else + hide_osc() + end + end +end + +-- mode can be auto/always/never/cycle +-- the modes only affect internal variables and not stored on its own. +function visibility_mode(mode, no_osd) + if mode == "cycle" then + if not state.enabled then + mode = "auto" + elseif user_opts.visibility ~= "always" then + mode = "always" + else + mode = "never" + end + end + + if mode == 'auto' then + always_on(false) + enable_osc(true) + elseif mode == 'always' then + enable_osc(true) + always_on(true) + elseif mode == 'never' then + enable_osc(false) + else + msg.warn('Ignoring unknown visibility mode \"' .. mode .. '\"') + return + end + + user_opts.visibility = mode + mp.set_property_native("user-data/osc/visibility", user_opts.visibility) + + if not no_osd and tonumber(mp.get_property('osd-level')) >= 1 then + mp.osd_message('OSC visibility: ' .. mode) + end + + -- Reset the input state on a mode change. The input state will be + -- recalcuated on the next render cycle, except in 'never' mode where it + -- will just stay disabled. + mp.disable_key_bindings('input') + mp.disable_key_bindings('window-controls') + state.input_enabled = false + request_tick() +end + + +-- KeyboardControl +-- + +local osc_key_bindings = {} + +function osc_kb_control_up() + visibility_mode('always', true) + local keyboard_controls = build_keyboard_controls() + local rows = {} + local active_row_index = 0 + local active_row_name = nil + + local row_index = -1 + for row_name, row_controls in pairs(keyboard_controls) do + row_index = row_index + 1 + rows[row_index] = row_name + for i, control in pairs(row_controls) do + if control == state.highlight_element then + active_row_index = row_index + active_row_name = row_name + end + end + end + + if active_row_index - 1 < 0 then + return + end + + local next_row_index = active_row_index - 1 + + local new_active_row_name = rows[next_row_index] + local new_active_row = keyboard_controls[new_active_row_name] + + for i, control in pairs(new_active_row) do + state.highlight_element = control + return + end +end + +function osc_kb_control_down() + visibility_mode('always', true) + local keyboard_controls = build_keyboard_controls() + local rows = {} + local active_row_index = 0 + local active_row_name = nil + + local row_index = -1 + for row_name, row_controls in pairs(keyboard_controls) do + row_index = row_index + 1 + rows[row_index] = row_name + for i, control in pairs(row_controls) do + if control == state.highlight_element then + active_row_index = row_index + active_row_name = row_name + end + end + end + + if active_row_index + 1 > #rows then + return + end + + local next_row_index = active_row_index + 1 + + local new_active_row_name = rows[next_row_index] + local new_active_row = keyboard_controls[new_active_row_name] + + for i, control in pairs(new_active_row) do + state.highlight_element = control + return + end + +end + +function osc_kb_control_left() + visibility_mode('always', true) + local keyboard_controls = build_keyboard_controls() + + local active_control_name = nil + for row_name, row_controls in pairs(keyboard_controls) do + local controls = {} + local controls_index = -1 + for i, control in pairs(row_controls) do + controls_index = controls_index + 1 + controls[controls_index] = control + if control == state.highlight_element then + active_control_index = controls_index + active_control_name = control + end + end + + if active_control_name == 'seekbar' then + mp.commandv('seek', -5, 'exact', 'keyframes') + return + end + + if active_control_name then + if active_control_index - 1 < 0 then + return + end + + local next_control_index = active_control_index - 1 + state.highlight_element = controls[next_control_index] + return + end + end + +end + +function osc_kb_control_right() + visibility_mode('always', true) + local keyboard_controls = build_keyboard_controls() + + local active_control_name = nil + for row_name, row_controls in pairs(keyboard_controls) do + local controls = {} + local controls_index = -1 + for i, control in pairs(row_controls) do + controls_index = controls_index + 1 + controls[controls_index] = control + if control == state.highlight_element then + active_control_index = controls_index + active_control_name = control + end + end + + if active_control_name == 'seekbar' then + mp.commandv('seek', 5, 'exact', 'keyframes') + return + end + + if active_control_name then + if active_control_index + 1 > #controls then + return + end + + local next_control_index = active_control_index + 1 + state.highlight_element = controls[next_control_index] + return + end + end + +end + +function osc_kb_control_back() + visibility_mode('auto', true) +end + +function osc_kb_control_enter() + visibility_mode('always', true) + for n = 1, #elements do + if elements[n].name == state.highlight_element then + + local action = 'enter' + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + return + end + + local action = 'mbtn_left_up' + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + return + end + end + end + +end + +function osc_add_key_binding(key, name, fn, flags) + osc_key_bindings[#osc_key_bindings + 1] = name + mp.add_forced_key_binding(key, name, fn, flags) +end + +-- This is based on code from https://github.com/darsain/uosc +function osc_enable_key_bindings() + osc_key_bindings = {} + -- The `mp.set_key_bindings()` method would be easier here, but that + -- doesn't support 'repeatable' flag, so we are stuck with this monster. + osc_add_key_binding('up', 'osc-kb-control-prev1', osc_kb_control_up, 'repeatable') + osc_add_key_binding('down', 'osc-kb-control-next1', osc_kb_control_down, 'repeatable') + osc_add_key_binding('left', 'osc-kb-control-left1', osc_kb_control_left, 'repeatable') + osc_add_key_binding('right', 'osc-kb-control-right1', osc_kb_control_right, 'repeatable') + osc_add_key_binding('enter', 'osc-kb-control-select-alt3', osc_kb_control_enter, 'repeatable') + osc_add_key_binding('esc', 'osc-kb-control-close', osc_kb_control_back, 'repeatable') +end + +function osc_disable_key_bindings() + for _, name in ipairs(osc_key_bindings) do mp.remove_key_binding(name) end + osc_key_bindings = {} +end + + + +visibility_mode(user_opts.visibility, true) +mp.register_script_message('osc-visibility', visibility_mode) +mp.add_key_binding(nil, 'visibility', function() visibility_mode('cycle') end) + +mp.register_script_message("thumbfast-info", function(json) + local data = utils.parse_json(json) + if type(data) ~= "table" or not data.width or not data.height then + msg.error("thumbfast-info: received json didn't produce a table with thumbnail information") + else + thumbfast = data + end +end) + +set_virt_mouse_area(0, 0, 0, 0, 'input') +set_virt_mouse_area(0, 0, 0, 0, 'window-controls') diff --git a/general/configs/rofi/applets/android/apps.sh b/general/configs/rofi/applets/android/apps.sh new file mode 100755 index 0000000..466c629 --- /dev/null +++ b/general/configs/rofi/applets/android/apps.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/six.rasi" + +# Links +terminal="" +files="" +editor="" +browser="" +music="" +settings="" + +# Error msg +msg() { + rofi -theme "$dir/message.rasi" -e "$1" +} + +# Variable passed to rofi +options="$terminal\n$files\n$editor\n$browser\n$music\n$settings" + +chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)" +case $chosen in + $terminal) + if [[ -f /usr/bin/termite ]]; then + termite & + elif [[ -f /usr/bin/urxvt ]]; then + urxvt & + elif [[ -f /usr/bin/kitty ]]; then + kitty & + elif [[ -f /usr/bin/xterm ]]; then + xterm & + elif [[ -f /usr/bin/xfce4-terminal ]]; then + xfce4-terminal & + elif [[ -f /usr/bin/gnome-terminal ]]; then + gnome-terminal & + else + msg "No suitable terminal found!" + fi + ;; + $files) + if [[ -f /usr/bin/thunar ]]; then + thunar & + elif [[ -f /usr/bin/pcmanfm ]]; then + pcmanfm & + else + msg "No suitable file manager found!" + fi + ;; + $editor) + if [[ -f /usr/bin/geany ]]; then + geany & + elif [[ -f /usr/bin/leafpad ]]; then + leafpad & + elif [[ -f /usr/bin/mousepad ]]; then + mousepad & + elif [[ -f /usr/bin/code ]]; then + code & + else + msg "No suitable text editor found!" + fi + ;; + $browser) + if [[ -f /usr/bin/firefox ]]; then + firefox & + elif [[ -f /usr/bin/chromium ]]; then + chromium & + elif [[ -f /usr/bin/midori ]]; then + midori & + else + msg "No suitable web browser found!" + fi + ;; + $music) + if [[ -f /usr/bin/lxmusic ]]; then + lxmusic & + else + msg "No suitable music player found!" + fi + ;; + $settings) + if [[ -f /usr/bin/xfce4-settings-manager ]]; then + xfce4-settings-manager & + else + msg "No suitable settings manager found!" + fi + ;; +esac + diff --git a/general/configs/rofi/applets/android/backlight.sh b/general/configs/rofi/applets/android/backlight.sh new file mode 100755 index 0000000..d37f975 --- /dev/null +++ b/general/configs/rofi/applets/android/backlight.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/three.rasi" + +# Error msg +msg() { + rofi -theme "$dir/message.rasi" -e "$1" +} + +## Get Brightness +if [[ -f /bin/brightnessctl ]]; then + BNESS="$(brightnessctl get)" + MAX="$(brightnessctl max)" + PERC="$((BNESS*100/MAX))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/blight ]]; then + DEVICE=$(ls /sys/class/backlight | head -n 1) + BNESS="$(blight -d $DEVICE get brightness)" + PERC="$(($BNESS*100/255))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/xbacklight ]]; then + VAR="$(xbacklight -get)" + BLIGHT="$(printf "%.0f\n" "$VAR")" +else + msg "No suitable backlight utility found!" + exit 1 +fi + +if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then + MSG="Low" +elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then + MSG="Optimal" +elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then + MSG="High" +elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then + MSG="Too Much" +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_OPT="" + +notify="notify-send -u low -t 1500" +options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT%" -dmenu -selected-row 1)" +case $chosen in + "$ICON_UP") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -inc 10 && $notify "Brightness Up $ICON_UP" + fi + ;; + "$ICON_DOWN") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 10%- && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set -10% && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -dec 10 && $notify "Brightness Down $ICON_DOWN" + fi + ;; + "$ICON_OPT") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -set 30 && $notify "Optimal Brightness $ICON_OPT" + fi + ;; +esac + diff --git a/general/configs/rofi/applets/android/colors.rasi b/general/configs/rofi/applets/android/colors.rasi new file mode 100755 index 0000000..5ce46fc --- /dev/null +++ b/general/configs/rofi/applets/android/colors.rasi @@ -0,0 +1,22 @@ +/* + * Change the colorscheme for every menu simply by editing this file... + * + * Available Color Schemes + * // Dark + * material-dark/amber material-dark/blue material-dark/blue_grey material-dark/brown material-dark/cyan material-dark/deep_orange + * material-dark/deep_purple material-dark/green material-dark/grey material-dark/indigo material-dark/light_blue material-dark/light_green + * material-dark/lime material-dark/orange material-dark/pink material-dark/purple material-dark/red material-dark/teal + * material-dark/yellow + * // Light + * material-light/amber material-light/blue material-light/blue_grey material-light/brown material-light/cyan material-light/deep_orange + * material-light/deep_purple material-light/green material-light/grey material-light/indigo material-light/light_blue material-light/light_green + * material-light/lime material-light/orange material-light/pink material-light/purple material-light/red material-light/teal + * material-light/yellow + * + * // Other + * adapta, adapta-nokto, arc, arc-dark, adwaita, gruvbox, dark + * armchair, darkpink, fresh, inside, party, sirin + * + */ + +@import "../styles/arc.rasi" diff --git a/general/configs/rofi/applets/android/confirm.rasi b/general/configs/rofi/applets/android/confirm.rasi new file mode 100755 index 0000000..970783f --- /dev/null +++ b/general/configs/rofi/applets/android/confirm.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; + font: "Iosevka Nerd Font 12"; +} + +window { + width: 225px; + padding: 25px; + border: 0px; + border-radius: 12px; + border-color: @accent; + location: center; + y-offset: -20px; +} + +entry { + expand: true; + text-color: @accent; +} diff --git a/general/configs/rofi/applets/android/five.rasi b/general/configs/rofi/applets/android/five.rasi new file mode 100755 index 0000000..29cdcce --- /dev/null +++ b/general/configs/rofi/applets/android/five.rasi @@ -0,0 +1,92 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + disable-history: false; + sidebar-mode: false; +} + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + width: 100px; + location: east; + x-offset: -15px; + y-offset: 0px; +} + +listview { + lines: 5; + margin: 8px; + spacing: 8px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ listview ]; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 26px 26px 26px 26px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 10px; +} + +element normal.active, +element alternate.active { + background-color: @background-alt; + text-color: @foreground; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 10px; + border-color: @border; +} + +element selected.urgent { + background-color: @urgent; + text-color: @foreground; +} + +element selected.active { + background-color: @background-alt; + color: @foreground; +} diff --git a/general/configs/rofi/applets/android/message.rasi b/general/configs/rofi/applets/android/message.rasi new file mode 100755 index 0000000..f35d3a2 --- /dev/null +++ b/general/configs/rofi/applets/android/message.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; + font: "Iosevka Nerd Font 12"; +} + +window { + width: 360px; + padding: 25px; + border: 0px; + border-radius: 12px; + border-color: @accent; + location: center; + y-offset: -20px; +} + +entry { + expand: true; + text-color: @accent; +} diff --git a/general/configs/rofi/applets/android/mpd.sh b/general/configs/rofi/applets/android/mpd.sh new file mode 100755 index 0000000..6f15be0 --- /dev/null +++ b/general/configs/rofi/applets/android/mpd.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/six.rasi" + +# Gets the current status of mpd (for us to parse it later on) +status="$(mpc status)" +# Defines the Play / Pause option content +if [[ $status == *"[playing]"* ]]; then + play_pause="" +else + play_pause="" +fi +active="" +urgent="" + +# Display if repeat mode is on / off +tog_repeat="" +if [[ $status == *"repeat: on"* ]]; then + active="-a 4" +elif [[ $status == *"repeat: off"* ]]; then + urgent="-u 4" +else + tog_repeat=" Parsing error" +fi + +# Display if random mode is on / off +tog_random="" +if [[ $status == *"random: on"* ]]; then + [ -n "$active" ] && active+=",5" || active="-a 5" +elif [[ $status == *"random: off"* ]]; then + [ -n "$urgent" ] && urgent+=",5" || urgent="-u 5" +else + tog_random=" Parsing error" +fi +stop="" +next="" +previous="" + +# Variable passed to rofi +options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random" + +# Get the current playing song +current=$(mpc -f %title% current) +# If mpd isn't running it will return an empty string, we don't want to display that +if [[ -z "$current" ]]; then + current="-" +fi + +# Spawn the mpd menu with the "Play / Pause" entry selected by default +chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)" +case $chosen in + $previous) + mpc -q prev && notify-send -u low -t 1800 " $(mpc current)" + ;; + $play_pause) + mpc -q toggle && notify-send -u low -t 1800 " $(mpc current)" + ;; + $stop) + mpc -q stop + ;; + $next) + mpc -q next && notify-send -u low -t 1800 " $(mpc current)" + ;; + $tog_repeat) + mpc -q repeat + ;; + $tog_random) + mpc -q random + ;; +esac diff --git a/general/configs/rofi/applets/android/powermenu.sh b/general/configs/rofi/applets/android/powermenu.sh new file mode 100755 index 0000000..e28c731 --- /dev/null +++ b/general/configs/rofi/applets/android/powermenu.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/five.rasi" + +uptime=$(uptime -p | sed -e 's/up //g') + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $dir/confirm.rasi +} + +# Message +msg() { + rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + mpc -q pause + amixer set Master mute + systemctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then + openbox --exit + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg exit + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/general/configs/rofi/applets/android/quicklinks.sh b/general/configs/rofi/applets/android/quicklinks.sh new file mode 100755 index 0000000..e2ae62f --- /dev/null +++ b/general/configs/rofi/applets/android/quicklinks.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/six.rasi" + +# Error msg +msg() { + rofi -theme "$dir/message.rasi" -e "$1" +} + +# Browser +if [[ -f /usr/bin/firefox ]]; then + app="firefox" +elif [[ -f /usr/bin/chromium ]]; then + app="chromium" +elif [[ -f /usr/bin/midori ]]; then + app="midori" +else + msg "No suitable web browser found!" + exit 1 +fi + +# Links +google="" +facebook="" +twitter="" +github="" +mail="" +youtube="" + +# Variable passed to rofi +options="$google\n$facebook\n$twitter\n$github\n$mail\n$youtube" + +chosen="$(echo -e "$options" | $rofi_command -p "Open In : Firefox" -dmenu -selected-row 0)" +case $chosen in + $google) + $app https://www.google.com & + ;; + $facebook) + $app https://www.facebook.com & + ;; + $twitter) + $app https://www.twitter.com & + ;; + $github) + $app https://www.github.com & + ;; + $mail) + $app https://www.gmail.com & + ;; + $youtube) + $app https://www.youtube.com & + ;; +esac + diff --git a/general/configs/rofi/applets/android/screenshot.sh b/general/configs/rofi/applets/android/screenshot.sh new file mode 100755 index 0000000..95abe34 --- /dev/null +++ b/general/configs/rofi/applets/android/screenshot.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/three.rasi" + +# Error msg +msg() { + rofi -theme "$dir/message.rasi" -e "Please install 'scrot' first." +} + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $area) + if [[ -f /usr/bin/scrot ]]; then + scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $window) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; +esac + diff --git a/general/configs/rofi/applets/android/six.rasi b/general/configs/rofi/applets/android/six.rasi new file mode 100755 index 0000000..e654946 --- /dev/null +++ b/general/configs/rofi/applets/android/six.rasi @@ -0,0 +1,92 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + disable-history: false; + sidebar-mode: false; +} + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + width: 100px; + location: east; + x-offset: -15px; + y-offset: 0px; +} + +listview { + lines: 6; + margin: 8px; + spacing: 8px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ listview ]; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 26px 26px 26px 26px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 10px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 10px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/android/three.rasi b/general/configs/rofi/applets/android/three.rasi new file mode 100755 index 0000000..0a09705 --- /dev/null +++ b/general/configs/rofi/applets/android/three.rasi @@ -0,0 +1,92 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + disable-history: false; + sidebar-mode: false; +} + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + width: 100px; + location: east; + x-offset: -15px; + y-offset: 0px; +} + +listview { + lines: 3; + margin: 8px; + spacing: 8px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ listview ]; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 26px 26px 26px 26px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 10px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 10px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/android/volume.sh b/general/configs/rofi/applets/android/volume.sh new file mode 100755 index 0000000..429db8c --- /dev/null +++ b/general/configs/rofi/applets/android/volume.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/applets/android" +rofi_command="rofi -theme $dir/three.rasi" + +## Get Volume +#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%') +MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%') + +active="" +urgent="" + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"on"* ]]; then + VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%" +else + VOLUME="Mu..." +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_MUTED="" + +options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)" +case $chosen in + $ICON_UP) + amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP" + ;; + $ICON_DOWN) + amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN" + ;; + $ICON_MUTED) + amixer -q set Master toggle + ;; +esac + diff --git a/general/configs/rofi/applets/applets/apps.sh b/general/configs/rofi/applets/applets/apps.sh new file mode 100755 index 0000000..f8129ce --- /dev/null +++ b/general/configs/rofi/applets/applets/apps.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/apps.rasi" + +# Links +terminal="" +files="" +editor="" +browser="" +music="" +settings="" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +# Variable passed to rofi +options="$terminal\n$files\n$editor\n$browser\n$music\n$settings" + +chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)" +case $chosen in + $terminal) + if [[ -f /usr/bin/termite ]]; then + termite & + elif [[ -f /usr/bin/urxvt ]]; then + urxvt & + elif [[ -f /usr/bin/kitty ]]; then + kitty & + elif [[ -f /usr/bin/xterm ]]; then + xterm & + elif [[ -f /usr/bin/xfce4-terminal ]]; then + xfce4-terminal & + elif [[ -f /usr/bin/gnome-terminal ]]; then + gnome-terminal & + else + msg "No suitable terminal found!" + fi + ;; + $files) + if [[ -f /usr/bin/thunar ]]; then + thunar & + elif [[ -f /usr/bin/pcmanfm ]]; then + pcmanfm & + else + msg "No suitable file manager found!" + fi + ;; + $editor) + if [[ -f /usr/bin/geany ]]; then + geany & + elif [[ -f /usr/bin/leafpad ]]; then + leafpad & + elif [[ -f /usr/bin/mousepad ]]; then + mousepad & + elif [[ -f /usr/bin/code ]]; then + code & + else + msg "No suitable text editor found!" + fi + ;; + $browser) + if [[ -f /usr/bin/firefox ]]; then + firefox & + elif [[ -f /usr/bin/chromium ]]; then + chromium & + elif [[ -f /usr/bin/midori ]]; then + midori & + else + msg "No suitable web browser found!" + fi + ;; + $music) + if [[ -f /usr/bin/lxmusic ]]; then + lxmusic & + else + msg "No suitable music player found!" + fi + ;; + $settings) + if [[ -f /usr/bin/xfce4-settings-manager ]]; then + xfce4-settings-manager & + else + msg "No suitable settings manager found!" + fi + ;; +esac diff --git a/general/configs/rofi/applets/applets/backlight.sh b/general/configs/rofi/applets/applets/backlight.sh new file mode 100755 index 0000000..b94cfa7 --- /dev/null +++ b/general/configs/rofi/applets/applets/backlight.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/backlight.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +## Get Brightness +if [[ -f /bin/brightnessctl ]]; then + BNESS="$(brightnessctl get)" + MAX="$(brightnessctl max)" + PERC="$((BNESS*100/MAX))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/blight ]]; then + DEVICE=$(ls /sys/class/backlight | head -n 1) + BNESS="$(blight -d $DEVICE get brightness)" + PERC="$(($BNESS*100/255))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/xbacklight ]]; then + VAR="$(xbacklight -get)" + BLIGHT="$(printf "%.0f\n" "$VAR")" +else + msg "No suitable backlight utility found!" + exit 1 +fi + +if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then + MSG="Low" +elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then + MSG="Optimal" +elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then + MSG="High" +elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then + MSG="Too Much" +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_OPT="" + +notify="notify-send -u low -t 1500" +options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT%" -dmenu -selected-row 1)" +case $chosen in + "$ICON_UP") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -inc 10 && $notify "Brightness Up $ICON_UP" + fi + ;; + "$ICON_DOWN") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 10%- && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set -10% && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -dec 10 && $notify "Brightness Down $ICON_DOWN" + fi + ;; + "$ICON_OPT") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -set 30 && $notify "Optimal Brightness $ICON_OPT" + fi + ;; +esac + diff --git a/general/configs/rofi/applets/applets/battery.sh b/general/configs/rofi/applets/applets/battery.sh new file mode 100755 index 0000000..8a38ab4 --- /dev/null +++ b/general/configs/rofi/applets/applets/battery.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/battery.rasi" + +## Get data +BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)" +CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)" + +active="" +urgent="" + +if [[ $CHARGE = *"Charging"* ]]; then + active="-a 1" + ICON_CHRG="" + MSG=$CHARGE +elif [[ $CHARGE = *"Full"* ]]; then + active="-u 1" + ICON_CHRG="" + MSG=$CHARGE +else + urgent="-u 1" + ICON_CHRG="" + MSG=$CHARGE +fi + +# Discharging +#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then +# ICON_DISCHRG="" +if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then + ICON_DISCHRG="" +fi + +## Icons +ICON_PMGR="" + +options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$BATTERY%" -dmenu $active $urgent -selected-row 0)" +case $chosen in + $ICON_CHRG) + ;; + $ICON_DISCHRG) + ;; + $ICON_PMGR) + xfce4-power-manager-settings + ;; +esac + diff --git a/general/configs/rofi/applets/applets/configs/circle/apps.rasi b/general/configs/rofi/applets/applets/configs/circle/apps.rasi new file mode 100755 index 0000000..5bd1300 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/apps.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/backlight.rasi b/general/configs/rofi/applets/applets/configs/circle/backlight.rasi new file mode 100755 index 0000000..5c6bf3b --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/backlight.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/battery.rasi b/general/configs/rofi/applets/applets/configs/circle/battery.rasi new file mode 100755 index 0000000..db6d8d0 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/battery.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 260px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/mpd.rasi b/general/configs/rofi/applets/applets/configs/circle/mpd.rasi new file mode 100755 index 0000000..e49f391 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/mpd.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/network.rasi b/general/configs/rofi/applets/applets/configs/circle/network.rasi new file mode 100755 index 0000000..4ccc4fc --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/network.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 335px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/powermenu.rasi b/general/configs/rofi/applets/applets/configs/circle/powermenu.rasi new file mode 100755 index 0000000..2dfc85d --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/powermenu.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 420px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/quicklinks.rasi b/general/configs/rofi/applets/applets/configs/circle/quicklinks.rasi new file mode 100755 index 0000000..1eb01ec --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/quicklinks.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/screenshot.rasi b/general/configs/rofi/applets/applets/configs/circle/screenshot.rasi new file mode 100755 index 0000000..801f6f4 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/screenshot.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/time.rasi b/general/configs/rofi/applets/applets/configs/circle/time.rasi new file mode 100755 index 0000000..cc3fd05 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/time.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 450px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 10px 40px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/circle/volume.rasi b/general/configs/rofi/applets/applets/configs/circle/volume.rasi new file mode 100755 index 0000000..3b533e4 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/circle/volume.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 40px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 25px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; + border-radius: 25px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 0px 2px 0px; + border-radius: 100%; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/apps.rasi b/general/configs/rofi/applets/applets/configs/rounded/apps.rasi new file mode 100755 index 0000000..616a144 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/apps.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/backlight.rasi b/general/configs/rofi/applets/applets/configs/rounded/backlight.rasi new file mode 100755 index 0000000..5ce20c4 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/backlight.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/battery.rasi b/general/configs/rofi/applets/applets/configs/rounded/battery.rasi new file mode 100755 index 0000000..801e962 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/battery.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/mpd.rasi b/general/configs/rofi/applets/applets/configs/rounded/mpd.rasi new file mode 100755 index 0000000..61595af --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/mpd.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/network.rasi b/general/configs/rofi/applets/applets/configs/rounded/network.rasi new file mode 100755 index 0000000..54e40d0 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/network.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 335px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/powermenu.rasi b/general/configs/rofi/applets/applets/configs/rounded/powermenu.rasi new file mode 100755 index 0000000..51a8b13 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/powermenu.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 420px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/quicklinks.rasi b/general/configs/rofi/applets/applets/configs/rounded/quicklinks.rasi new file mode 100755 index 0000000..b44f3b2 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/quicklinks.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/screenshot.rasi b/general/configs/rofi/applets/applets/configs/rounded/screenshot.rasi new file mode 100755 index 0000000..4c1071e --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/screenshot.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/time.rasi b/general/configs/rofi/applets/applets/configs/rounded/time.rasi new file mode 100755 index 0000000..bee4545 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/time.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 450px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 30px 10px 30px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/rounded/volume.rasi b/general/configs/rofi/applets/applets/configs/rounded/volume.rasi new file mode 100755 index 0000000..43f753d --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/rounded/volume.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 12px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 12px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 12px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 12px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @background-light; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/apps.rasi b/general/configs/rofi/applets/applets/configs/square/apps.rasi new file mode 100755 index 0000000..6760c56 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/apps.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/backlight.rasi b/general/configs/rofi/applets/applets/configs/square/backlight.rasi new file mode 100755 index 0000000..5dcf4b1 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/backlight.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/battery.rasi b/general/configs/rofi/applets/applets/configs/square/battery.rasi new file mode 100755 index 0000000..cfa2adf --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/battery.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/mpd.rasi b/general/configs/rofi/applets/applets/configs/square/mpd.rasi new file mode 100755 index 0000000..ec2eff9 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/mpd.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/network.rasi b/general/configs/rofi/applets/applets/configs/square/network.rasi new file mode 100755 index 0000000..f57cb17 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/network.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 350px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 3px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/powermenu.rasi b/general/configs/rofi/applets/applets/configs/square/powermenu.rasi new file mode 100755 index 0000000..6bd1c96 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/powermenu.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 420px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/quicklinks.rasi b/general/configs/rofi/applets/applets/configs/square/quicklinks.rasi new file mode 100755 index 0000000..731ed7e --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/quicklinks.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 500px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/screenshot.rasi b/general/configs/rofi/applets/applets/configs/square/screenshot.rasi new file mode 100755 index 0000000..5c1fa95 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/screenshot.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/time.rasi b/general/configs/rofi/applets/applets/configs/square/time.rasi new file mode 100755 index 0000000..7022da9 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/time.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 450px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 3px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 30px 10px 30px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/configs/square/volume.rasi b/general/configs/rofi/applets/applets/configs/square/volume.rasi new file mode 100755 index 0000000..adfeb39 --- /dev/null +++ b/general/configs/rofi/applets/applets/configs/square/volume.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 12"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: southeast; + width: 250px; + x-offset: -15px; + y-offset: -45px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 12px; + margin: 12px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 20"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 19px 10px 19px 10px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/applets/mpd.sh b/general/configs/rofi/applets/applets/mpd.sh new file mode 100755 index 0000000..d1f3d2b --- /dev/null +++ b/general/configs/rofi/applets/applets/mpd.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/mpd.rasi" + +# Gets the current status of mpd (for us to parse it later on) +status="$(mpc status)" +# Defines the Play / Pause option content +if [[ $status == *"[playing]"* ]]; then + play_pause="" +else + play_pause="" +fi +active="" +urgent="" + +# Display if repeat mode is on / off +tog_repeat="" +if [[ $status == *"repeat: on"* ]]; then + active="-a 4" +elif [[ $status == *"repeat: off"* ]]; then + urgent="-u 4" +else + tog_repeat=" Parsing error" +fi + +# Display if random mode is on / off +tog_random="" +if [[ $status == *"random: on"* ]]; then + [ -n "$active" ] && active+=",5" || active="-a 5" +elif [[ $status == *"random: off"* ]]; then + [ -n "$urgent" ] && urgent+=",5" || urgent="-u 5" +else + tog_random=" Parsing error" +fi +stop="" +next="" +previous="" + +# Variable passed to rofi +options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random" + +# Get the current playing song +current=$(mpc -f "%title%" current) +# If mpd isn't running it will return an empty string, we don't want to display that +if [[ -z "$current" ]]; then + current="-" +fi + +# Spawn the mpd menu with the "Play / Pause" entry selected by default +chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)" +case $chosen in + $previous) + mpc -q prev && notify-send -u low -t 1800 " $(mpc current)" + ;; + $play_pause) + mpc -q toggle && notify-send -u low -t 1800 " $(mpc current)" + ;; + $stop) + mpc -q stop + ;; + $next) + mpc -q next && notify-send -u low -t 1800 " $(mpc current)" + ;; + $tog_repeat) + mpc -q repeat + ;; + $tog_random) + mpc -q random + ;; +esac diff --git a/general/configs/rofi/applets/applets/network.sh b/general/configs/rofi/applets/applets/network.sh new file mode 100755 index 0000000..260eddb --- /dev/null +++ b/general/configs/rofi/applets/applets/network.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/network.rasi" + +## Get info +IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')" +#SSID="$(iwgetid -r)" +#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')" +#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )" +STATUS="$(nmcli radio wifi)" + +active="" +urgent="" + +if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then + if [[ $STATUS == *"enable"* ]]; then + if [[ $IFACE == e* ]]; then + connected="" + else + connected="" + fi + active="-a 0" + SSID="﬉ $(iwgetid -r)" + PIP="$(wget --timeout=30 http://ipinfo.io/ip -qO -)" + fi +else + urgent="-u 0" + SSID="Disconnected" + PIP="Not Available" + connected="" +fi + +## Icons +bmon="" +launch_cli="" +launch="" + +options="$connected\n$bmon\n$launch_cli\n$launch" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$SSID" -dmenu $active $urgent -selected-row 1)" +case $chosen in + $connected) + if [[ $STATUS == *"enable"* ]]; then + nmcli radio wifi off + else + nmcli radio wifi on + fi + ;; + $bmon) + termite -e bmon + ;; + $launch_cli) + termite -e nmtui + ;; + $launch) + nm-connection-editor + ;; +esac + diff --git a/general/configs/rofi/applets/applets/powermenu.sh b/general/configs/rofi/applets/applets/powermenu.sh new file mode 100755 index 0000000..500cbce --- /dev/null +++ b/general/configs/rofi/applets/applets/powermenu.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/powermenu.rasi" + +uptime=$(uptime -p | sed -e 's/up //g') +cpu=$($HOME/.config/rofi/bin/usedcpu) +memory=$($HOME/.config/rofi/bin/usedram) + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $HOME/.config/rofi/applets/styles/confirm.rasi +} + +# Message +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "UP - $uptime" -dmenu -selected-row 2)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + mpc -q pause + amixer set Master mute + systemctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then + openbox --exit + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg exit + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/general/configs/rofi/applets/applets/quicklinks.sh b/general/configs/rofi/applets/applets/quicklinks.sh new file mode 100755 index 0000000..e736b71 --- /dev/null +++ b/general/configs/rofi/applets/applets/quicklinks.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/quicklinks.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +# Browser +if [[ -f /usr/bin/firefox ]]; then + app="firefox" +elif [[ -f /usr/bin/chromium ]]; then + app="chromium" +elif [[ -f /usr/bin/midori ]]; then + app="midori" +else + msg "No suitable web browser found!" + exit 1 +fi + +# Links +google="" +facebook="" +twitter="" +github="" +mail="" +youtube="" + +# Variable passed to rofi +options="$google\n$facebook\n$twitter\n$github\n$mail\n$youtube" + +chosen="$(echo -e "$options" | $rofi_command -p "Open In : $app" -dmenu -selected-row 0)" +case $chosen in + $google) + $app https://www.google.com & + ;; + $facebook) + $app https://www.facebook.com & + ;; + $twitter) + $app https://www.twitter.com & + ;; + $github) + $app https://www.github.com & + ;; + $mail) + $app https://www.gmail.com & + ;; + $youtube) + $app https://www.youtube.com & + ;; +esac + diff --git a/general/configs/rofi/applets/applets/screenshot.sh b/general/configs/rofi/applets/applets/screenshot.sh new file mode 100755 index 0000000..f614599 --- /dev/null +++ b/general/configs/rofi/applets/applets/screenshot.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/screenshot.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "Please install 'scrot' first." +} + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p 'scrot' -dmenu -selected-row 1)" +case $chosen in + $screen) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $area) + if [[ -f /usr/bin/scrot ]]; then + scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $window) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; +esac + diff --git a/general/configs/rofi/applets/applets/style.sh b/general/configs/rofi/applets/applets/style.sh new file mode 100755 index 0000000..68b9668 --- /dev/null +++ b/general/configs/rofi/applets/applets/style.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Available Styles +# >> Created and tested on : rofi 1.6.0-1 +# +# square circle rounded + +style="square" + +# uncomment these lines to enable random style +#styles=('square' 'circle' 'rounded') +#style="${styles[$(( $RANDOM % 3 ))]}" + +# print style name +echo "$style" diff --git a/general/configs/rofi/applets/applets/time.sh b/general/configs/rofi/applets/applets/time.sh new file mode 100755 index 0000000..b8e7e8c --- /dev/null +++ b/general/configs/rofi/applets/applets/time.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/time.rasi" + +## Get time and date +TIME="$(date +"%I:%M %p")" +DN=$(date +"%A") +MN=$(date +"%B") +DAY="$(date +"%d")" +MONTH="$(date +"%m")" +YEAR="$(date +"%Y")" + +options="$DAY\n$MONTH\n$YEAR" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p " $DN, $TIME" -dmenu -selected-row 1)" diff --git a/general/configs/rofi/applets/applets/volume.sh b/general/configs/rofi/applets/applets/volume.sh new file mode 100755 index 0000000..7be3242 --- /dev/null +++ b/general/configs/rofi/applets/applets/volume.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/applets/style.sh)" + +dir="$HOME/.config/rofi/applets/applets/configs/$style" +rofi_command="rofi -theme $dir/volume.rasi" + +## Get Volume +#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%') +MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%') + +active="" +urgent="" + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"on"* ]]; then + VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%" +else + VOLUME="Mute" +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_MUTED="" + +options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)" +case $chosen in + $ICON_UP) + amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP" + ;; + $ICON_DOWN) + amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN" + ;; + $ICON_MUTED) + amixer -q set Master toggle + ;; +esac + diff --git a/general/configs/rofi/applets/menu/apps.sh b/general/configs/rofi/applets/menu/apps.sh new file mode 100755 index 0000000..b5dd989 --- /dev/null +++ b/general/configs/rofi/applets/menu/apps.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/apps.rasi" + +# Links +terminal="" +files="" +editor="" +browser="" +music="" +settings="" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +# Variable passed to rofi +options="$terminal\n$files\n$editor\n$browser\n$music\n$settings" + +chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)" +case $chosen in + $terminal) + if [[ -f /usr/bin/termite ]]; then + termite & + elif [[ -f /usr/bin/urxvt ]]; then + urxvt & + elif [[ -f /usr/bin/kitty ]]; then + kitty & + elif [[ -f /usr/bin/xterm ]]; then + xterm & + elif [[ -f /usr/bin/xfce4-terminal ]]; then + xfce4-terminal & + elif [[ -f /usr/bin/gnome-terminal ]]; then + gnome-terminal & + else + msg "No suitable terminal found!" + fi + ;; + $files) + if [[ -f /usr/bin/thunar ]]; then + thunar & + elif [[ -f /usr/bin/pcmanfm ]]; then + pcmanfm & + else + msg "No suitable file manager found!" + fi + ;; + $editor) + if [[ -f /usr/bin/geany ]]; then + geany & + elif [[ -f /usr/bin/leafpad ]]; then + leafpad & + elif [[ -f /usr/bin/mousepad ]]; then + mousepad & + elif [[ -f /usr/bin/code ]]; then + code & + else + msg "No suitable text editor found!" + fi + ;; + $browser) + if [[ -f /usr/bin/firefox ]]; then + firefox & + elif [[ -f /usr/bin/chromium ]]; then + chromium & + elif [[ -f /usr/bin/midori ]]; then + midori & + else + msg "No suitable web browser found!" + fi + ;; + $music) + if [[ -f /usr/bin/lxmusic ]]; then + lxmusic & + else + msg "No suitable music player found!" + fi + ;; + $settings) + if [[ -f /usr/bin/xfce4-settings-manager ]]; then + xfce4-settings-manager & + else + msg "No suitable settings manager found!" + fi + ;; +esac diff --git a/general/configs/rofi/applets/menu/backlight.sh b/general/configs/rofi/applets/menu/backlight.sh new file mode 100755 index 0000000..15333eb --- /dev/null +++ b/general/configs/rofi/applets/menu/backlight.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/backlight.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +## Get Brightness +if [[ -f /bin/brightnessctl ]]; then + BNESS="$(brightnessctl get)" + MAX="$(brightnessctl max)" + PERC="$((BNESS*100/MAX))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/blight ]]; then + DEVICE=$(ls /sys/class/backlight | head -n 1) + BNESS="$(blight -d $DEVICE get brightness)" + PERC="$(($BNESS*100/255))" + BLIGHT=${PERC%.*} +elif [[ -f /usr/bin/xbacklight ]]; then + VAR="$(xbacklight -get)" + BLIGHT="$(printf "%.0f\n" "$VAR")" +else + msg "No suitable backlight utility found!" + exit 1 +fi + +if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then + MSG="Low" +elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then + MSG="Optimal" +elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then + MSG="High" +elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then + MSG="Too Much" +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_OPT="" + +notify="notify-send -u low -t 1500" +options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT% : $MSG" -dmenu -selected-row 1)" +case $chosen in + "$ICON_UP") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set +10% && $notify "Brightness Up $ICON_UP" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -inc 10 && $notify "Brightness Up $ICON_UP" + fi + ;; + "$ICON_DOWN") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 10%- && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set -10% && $notify "Brightness Down $ICON_DOWN" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -dec 10 && $notify "Brightness Down $ICON_DOWN" + fi + ;; + "$ICON_OPT") + if [[ -f /bin/brightnessctl ]]; then + brightnessctl -q set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/blight ]]; then + blight -d "$DEVICE" set 25% && $notify "Optimal Brightness $ICON_OPT" + elif [[ -f /usr/bin/xbacklight ]]; then + xbacklight -set 30 && $notify "Optimal Brightness $ICON_OPT" + fi + ;; +esac + diff --git a/general/configs/rofi/applets/menu/battery.sh b/general/configs/rofi/applets/menu/battery.sh new file mode 100755 index 0000000..c279794 --- /dev/null +++ b/general/configs/rofi/applets/menu/battery.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/battery.rasi" + +## Get data +BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)" +CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)" + +active="" +urgent="" + +if [[ $CHARGE = *"Charging"* ]]; then + active="-a 1" + ICON_CHRG="" + MSG=$CHARGE +elif [[ $CHARGE = *"Full"* ]]; then + active="-u 1" + ICON_CHRG="" + MSG=$CHARGE +else + urgent="-u 1" + ICON_CHRG="" + MSG=$CHARGE +fi + +# Discharging +#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then +# ICON_DISCHRG="" +if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then + ICON_DISCHRG="" +elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then + ICON_DISCHRG="" +fi + +## Icons +ICON_PMGR="" + +options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$MSG : $BATTERY%" -dmenu $active $urgent -selected-row 0)" +case $chosen in + $ICON_CHRG) + ;; + $ICON_DISCHRG) + ;; + $ICON_PMGR) + xfce4-power-manager-settings + ;; +esac + diff --git a/general/configs/rofi/applets/menu/configs/circle/apps.rasi b/general/configs/rofi/applets/menu/configs/circle/apps.rasi new file mode 100755 index 0000000..c2042b3 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/apps.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/backlight.rasi b/general/configs/rofi/applets/menu/configs/circle/backlight.rasi new file mode 100755 index 0000000..2688014 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/backlight.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/battery.rasi b/general/configs/rofi/applets/menu/configs/circle/battery.rasi new file mode 100755 index 0000000..9444210 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/battery.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/mpd.rasi b/general/configs/rofi/applets/menu/configs/circle/mpd.rasi new file mode 100755 index 0000000..04ba678 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/mpd.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/network.rasi b/general/configs/rofi/applets/menu/configs/circle/network.rasi new file mode 100755 index 0000000..2a7de93 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/network.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 650px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/powermenu.rasi b/general/configs/rofi/applets/menu/configs/circle/powermenu.rasi new file mode 100755 index 0000000..6e0131b --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/powermenu.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 800px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/quicklinks.rasi b/general/configs/rofi/applets/menu/configs/circle/quicklinks.rasi new file mode 100755 index 0000000..a8a6ba3 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/quicklinks.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/screenshot.rasi b/general/configs/rofi/applets/menu/configs/circle/screenshot.rasi new file mode 100755 index 0000000..519560e --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/screenshot.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/time.rasi b/general/configs/rofi/applets/menu/configs/circle/time.rasi new file mode 100755 index 0000000..ac0ffc8 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/time.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 700px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 48"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 60px 0px 60px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/circle/volume.rasi b/general/configs/rofi/applets/menu/configs/circle/volume.rasi new file mode 100755 index 0000000..0fb93ca --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/circle/volume.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 100%; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 100%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 100%; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 100%; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 100%; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/apps.rasi b/general/configs/rofi/applets/menu/configs/rounded/apps.rasi new file mode 100755 index 0000000..dcddce8 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/apps.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/backlight.rasi b/general/configs/rofi/applets/menu/configs/rounded/backlight.rasi new file mode 100755 index 0000000..84c27c1 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/backlight.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/battery.rasi b/general/configs/rofi/applets/menu/configs/rounded/battery.rasi new file mode 100755 index 0000000..198ccc6 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/battery.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/mpd.rasi b/general/configs/rofi/applets/menu/configs/rounded/mpd.rasi new file mode 100755 index 0000000..a7ba438 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/mpd.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/network.rasi b/general/configs/rofi/applets/menu/configs/rounded/network.rasi new file mode 100755 index 0000000..3a49537 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/network.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 650px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/powermenu.rasi b/general/configs/rofi/applets/menu/configs/rounded/powermenu.rasi new file mode 100755 index 0000000..d64175f --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/powermenu.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 800px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/quicklinks.rasi b/general/configs/rofi/applets/menu/configs/rounded/quicklinks.rasi new file mode 100755 index 0000000..7536a86 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/quicklinks.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/screenshot.rasi b/general/configs/rofi/applets/menu/configs/rounded/screenshot.rasi new file mode 100755 index 0000000..b468206 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/screenshot.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/time.rasi b/general/configs/rofi/applets/menu/configs/rounded/time.rasi new file mode 100755 index 0000000..a56c59d --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/time.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 700px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 48"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/rounded/volume.rasi b/general/configs/rofi/applets/menu/configs/rounded/volume.rasi new file mode 100755 index 0000000..7da2a4a --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/rounded/volume.rasi @@ -0,0 +1,128 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 20px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background; + text-color: @accent; + border: 0px 2px 0px 2px; + border-radius: 12px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 10px 10px 0px 10px; + border-radius: 12px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 15px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 20px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 20px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 20px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/apps.rasi b/general/configs/rofi/applets/menu/configs/square/apps.rasi new file mode 100755 index 0000000..559c7e5 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/apps.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Apps "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/backlight.rasi b/general/configs/rofi/applets/menu/configs/square/backlight.rasi new file mode 100755 index 0000000..bb20f5e --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/backlight.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Brightness "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/battery.rasi b/general/configs/rofi/applets/menu/configs/square/battery.rasi new file mode 100755 index 0000000..0b0a6c2 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/battery.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Battery "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Iosevka Nerd Font 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/mpd.rasi b/general/configs/rofi/applets/menu/configs/square/mpd.rasi new file mode 100755 index 0000000..b489728 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/mpd.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 3px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " MPD "; + background-color: @accent; + text-color: @background; + padding: 14px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/network.rasi b/general/configs/rofi/applets/menu/configs/square/network.rasi new file mode 100755 index 0000000..4d5bfde --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/network.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 650px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 4px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Network "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 4; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/powermenu.rasi b/general/configs/rofi/applets/menu/configs/square/powermenu.rasi new file mode 100755 index 0000000..9dcc9e2 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/powermenu.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 800px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 4px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " System "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 5; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/quicklinks.rasi b/general/configs/rofi/applets/menu/configs/square/quicklinks.rasi new file mode 100755 index 0000000..77d7d72 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/quicklinks.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 950px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Quick Links "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 6; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/screenshot.rasi b/general/configs/rofi/applets/menu/configs/square/screenshot.rasi new file mode 100755 index 0000000..a95d9e2 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/screenshot.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Screenshot "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/time.rasi b/general/configs/rofi/applets/menu/configs/square/time.rasi new file mode 100755 index 0000000..7c81666 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/time.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 700px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 4px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Time "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "Hurmit Nerd Font Mono 48"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/configs/square/volume.rasi b/general/configs/rofi/applets/menu/configs/square/volume.rasi new file mode 100755 index 0000000..f83d167 --- /dev/null +++ b/general/configs/rofi/applets/menu/configs/square/volume.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + show-icons: false; + font: "Comfortaa 14"; + disable-history: false; + sidebar-mode: false; +} + +@import "../../../styles/colors.rasi" + +* { + background-color: @background; + text-color: @foreground; +} + +window { + transparency: "real"; + border-radius: 0px; + location: center; + width: 500px; + x-offset: 0px; + y-offset: 0px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-light; + text-color: @accent; + border: 2px 2px 2px 2px; + border-radius: 0px; + border-color: @accent; +} + +textbox-prompt-colon { + expand: false; + str: " Volume "; + background-color: @accent; + text-color: @background; + padding: 12px 10px 0px 10px; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + spacing: 0px; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @accent; + margin: 0px 0px 0px 0px; + padding: 0px; + position: center; +} + +listview { + columns: 3; + lines: 1; + spacing: 15px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + children: [ inputbar, listview ]; + spacing: 15px; + margin: 40px; +} + +element { + background-color: @background-light; + text-color: @foreground; + orientation: vertical; + border-radius: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 32"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 40px 0px 40px 0px; +} + +element normal.urgent, +element alternate.urgent { + background-color: @off; + text-color: @background; + border-radius: 0px; +} + +element normal.active, +element alternate.active { + background-color: @on; + text-color: @background; +} + +element selected { + background-color: @accent; + text-color: @background; + border: 0px; + border-radius: 0px; + border-color: @border; +} + +element selected.urgent { + background-color: @on; + text-color: @background; +} + +element selected.active { + background-color: @off; + color: @background; +} diff --git a/general/configs/rofi/applets/menu/mpd.sh b/general/configs/rofi/applets/menu/mpd.sh new file mode 100755 index 0000000..3eb5498 --- /dev/null +++ b/general/configs/rofi/applets/menu/mpd.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/mpd.rasi" + +# Gets the current status of mpd (for us to parse it later on) +status="$(mpc status)" +# Defines the Play / Pause option content +if [[ $status == *"[playing]"* ]]; then + play_pause="" +else + play_pause="" +fi +active="" +urgent="" + +# Display if repeat mode is on / off +tog_repeat="" +if [[ $status == *"repeat: on"* ]]; then + active="-a 4" +elif [[ $status == *"repeat: off"* ]]; then + urgent="-u 4" +else + tog_repeat=" Parsing error" +fi + +# Display if random mode is on / off +tog_random="" +if [[ $status == *"random: on"* ]]; then + [ -n "$active" ] && active+=",5" || active="-a 5" +elif [[ $status == *"random: off"* ]]; then + [ -n "$urgent" ] && urgent+=",5" || urgent="-u 5" +else + tog_random=" Parsing error" +fi +stop="" +next="" +previous="" + +# Variable passed to rofi +options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random" + +# Get the current playing song +current=$(mpc -f "%artist% - %title%" current) +# If mpd isn't running it will return an empty string, we don't want to display that +if [[ -z "$current" ]]; then + current="-" +fi + +# Spawn the mpd menu with the "Play / Pause" entry selected by default +chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)" +case $chosen in + $previous) + mpc -q prev && notify-send -u low -t 1800 " $(mpc current)" + ;; + $play_pause) + mpc -q toggle && notify-send -u low -t 1800 " $(mpc current)" + ;; + $stop) + mpc -q stop + ;; + $next) + mpc -q next && notify-send -u low -t 1800 " $(mpc current)" + ;; + $tog_repeat) + mpc -q repeat + ;; + $tog_random) + mpc -q random + ;; +esac diff --git a/general/configs/rofi/applets/menu/network.sh b/general/configs/rofi/applets/menu/network.sh new file mode 100755 index 0000000..6e50332 --- /dev/null +++ b/general/configs/rofi/applets/menu/network.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/network.rasi" + +## Get info +IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')" +#SSID="$(iwgetid -r)" +#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')" +#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )" +STATUS="$(nmcli radio wifi)" + +active="" +urgent="" + +if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then + if [[ $STATUS == *"enable"* ]]; then + if [[ $IFACE == e* ]]; then + connected="" + else + connected="" + fi + active="-a 0" + SSID="﬉ $(iwgetid -r)" + PIP="$(wget --timeout=30 http://ipinfo.io/ip -qO -)" + fi +else + urgent="-u 0" + SSID="Disconnected" + PIP="Not Available" + connected="" +fi + +## Icons +bmon="" +launch_cli="" +launch="" + +options="$connected\n$bmon\n$launch_cli\n$launch" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$SSID : $PIP" -dmenu $active $urgent -selected-row 1)" +case $chosen in + $connected) + if [[ $STATUS == *"enable"* ]]; then + nmcli radio wifi off + else + nmcli radio wifi on + fi + ;; + $bmon) + termite -e bmon + ;; + $launch_cli) + termite -e nmtui + ;; + $launch) + nm-connection-editor + ;; +esac + diff --git a/general/configs/rofi/applets/menu/powermenu.sh b/general/configs/rofi/applets/menu/powermenu.sh new file mode 100755 index 0000000..7316af7 --- /dev/null +++ b/general/configs/rofi/applets/menu/powermenu.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/powermenu.rasi" + +uptime=$(uptime -p | sed -e 's/up //g') +cpu=$($HOME/.config/rofi/bin/usedcpu) +memory=$($HOME/.config/rofi/bin/usedram) + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $HOME/.config/rofi/applets/styles/confirm.rasi +} + +# Message +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "祥 $uptime |  $cpu | ﬙ $memory " -dmenu -selected-row 2)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + mpc -q pause + amixer set Master mute + systemctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then + openbox --exit + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg exit + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/general/configs/rofi/applets/menu/quicklinks.sh b/general/configs/rofi/applets/menu/quicklinks.sh new file mode 100755 index 0000000..c2f0495 --- /dev/null +++ b/general/configs/rofi/applets/menu/quicklinks.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/quicklinks.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "$1" +} + +# Browser +if [[ -f /usr/bin/firefox ]]; then + app="firefox" +elif [[ -f /usr/bin/chromium ]]; then + app="chromium" +elif [[ -f /usr/bin/midori ]]; then + app="midori" +else + msg "No suitable web browser found!" + exit 1 +fi + +# Links +google="" +facebook="" +twitter="" +github="" +mail="" +youtube="" + +# Variable passed to rofi +options="$google\n$facebook\n$twitter\n$github\n$mail\n$youtube" + +chosen="$(echo -e "$options" | $rofi_command -p "Open In : $app" -dmenu -selected-row 0)" +case $chosen in + $google) + $app https://www.google.com & + ;; + $facebook) + $app https://www.facebook.com & + ;; + $twitter) + $app https://www.twitter.com & + ;; + $github) + $app https://www.github.com & + ;; + $mail) + $app https://www.gmail.com & + ;; + $youtube) + $app https://www.youtube.com & + ;; +esac + diff --git a/general/configs/rofi/applets/menu/screenshot.sh b/general/configs/rofi/applets/menu/screenshot.sh new file mode 100755 index 0000000..24c5e1b --- /dev/null +++ b/general/configs/rofi/applets/menu/screenshot.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/screenshot.rasi" + +# Error msg +msg() { + rofi -theme "$HOME/.config/rofi/applets/styles/message.rasi" -e "Please install 'scrot' first." +} + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p 'App : scrot' -dmenu -selected-row 1)" +case $chosen in + $screen) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $area) + if [[ -f /usr/bin/scrot ]]; then + scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; + $window) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' + else + msg + fi + ;; +esac + diff --git a/general/configs/rofi/applets/menu/style.sh b/general/configs/rofi/applets/menu/style.sh new file mode 100755 index 0000000..68b9668 --- /dev/null +++ b/general/configs/rofi/applets/menu/style.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Available Styles +# >> Created and tested on : rofi 1.6.0-1 +# +# square circle rounded + +style="square" + +# uncomment these lines to enable random style +#styles=('square' 'circle' 'rounded') +#style="${styles[$(( $RANDOM % 3 ))]}" + +# print style name +echo "$style" diff --git a/general/configs/rofi/applets/menu/time.sh b/general/configs/rofi/applets/menu/time.sh new file mode 100755 index 0000000..4432676 --- /dev/null +++ b/general/configs/rofi/applets/menu/time.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/time.rasi" + +## Get time and date +TIME="$(date +"%I:%M %p")" +DN=$(date +"%A") +MN=$(date +"%B") +DAY="$(date +"%d")" +MONTH="$(date +"%m")" +YEAR="$(date +"%Y")" + +options="$DAY\n$MONTH\n$YEAR" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p " at $TIME on $DN in $MN" -dmenu -selected-row 1)" diff --git a/general/configs/rofi/applets/menu/volume.sh b/general/configs/rofi/applets/menu/volume.sh new file mode 100755 index 0000000..7e4a0d8 --- /dev/null +++ b/general/configs/rofi/applets/menu/volume.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +style="$($HOME/.config/rofi/applets/menu/style.sh)" + +dir="$HOME/.config/rofi/applets/menu/configs/$style" +rofi_command="rofi -theme $dir/volume.rasi" + +## Get Volume +#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%') +MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%') + +active="" +urgent="" + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"off"* ]]; then + active="-a 1" +else + urgent="-u 1" +fi + +if [[ $MUTE == *"on"* ]]; then + VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%" +else + VOLUME="Mute" +fi + +## Icons +ICON_UP="" +ICON_DOWN="" +ICON_MUTED="" + +options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN" + +## Main +chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)" +case $chosen in + $ICON_UP) + amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP" + ;; + $ICON_DOWN) + amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN" + ;; + $ICON_MUTED) + amixer -q set Master toggle + ;; +esac + diff --git a/general/configs/rofi/applets/styles/adapta-nokto.rasi b/general/configs/rofi/applets/styles/adapta-nokto.rasi new file mode 100755 index 0000000..3c4ef95 --- /dev/null +++ b/general/configs/rofi/applets/styles/adapta-nokto.rasi @@ -0,0 +1,8 @@ +* { + accent: #00BCD4; + background: #263238; + background-light: #293840; + foreground: #E7E8EB; + on: #44ad4d; + off: #e34039; +} diff --git a/general/configs/rofi/applets/styles/adapta.rasi b/general/configs/rofi/applets/styles/adapta.rasi new file mode 100755 index 0000000..c1c9999 --- /dev/null +++ b/general/configs/rofi/applets/styles/adapta.rasi @@ -0,0 +1,8 @@ +* { + accent: #00ADC2; + background: #FFFFFF; + background-light: #E7E7E7; + foreground: #535353; + on: #44ad4d; + off: #e34039; +} diff --git a/general/configs/rofi/applets/styles/adwaita.rasi b/general/configs/rofi/applets/styles/adwaita.rasi new file mode 100755 index 0000000..81cd482 --- /dev/null +++ b/general/configs/rofi/applets/styles/adwaita.rasi @@ -0,0 +1,8 @@ +* { + accent: #2E6BB6; + background: #2D2D2D; + background-light: #353535; + foreground: #E7E8EB; + on: #44ad4d; + off: #e34039; +} diff --git a/general/configs/rofi/applets/styles/arc-dark.rasi b/general/configs/rofi/applets/styles/arc-dark.rasi new file mode 100755 index 0000000..41f775f --- /dev/null +++ b/general/configs/rofi/applets/styles/arc-dark.rasi @@ -0,0 +1,8 @@ +* { + accent: #6BA0DE; + background: #383C4A; + background-light: #404552; + foreground: #E4E4E4; + on: #44ad4d; + off: #e34039; +} diff --git a/general/configs/rofi/applets/styles/arc.rasi b/general/configs/rofi/applets/styles/arc.rasi new file mode 100755 index 0000000..a5c211b --- /dev/null +++ b/general/configs/rofi/applets/styles/arc.rasi @@ -0,0 +1,8 @@ +* { + accent: #5294E2; + background: #FFFFFF; + background-light: #E7E8EB; + foreground: #333333; + on: #44ad4d; + off: #e34039; +} diff --git a/general/configs/rofi/applets/styles/armchair.rasi b/general/configs/rofi/applets/styles/armchair.rasi new file mode 100755 index 0000000..93a9e2f --- /dev/null +++ b/general/configs/rofi/applets/styles/armchair.rasi @@ -0,0 +1,8 @@ +* { + accent: #E85A50; + background: #EAE8DC; + background-light: #E4D9C8; + foreground: #8E8D89; + on: #66bb6a; + off: #F68887; +} diff --git a/general/configs/rofi/applets/styles/colors.rasi b/general/configs/rofi/applets/styles/colors.rasi new file mode 100755 index 0000000..f9043a3 --- /dev/null +++ b/general/configs/rofi/applets/styles/colors.rasi @@ -0,0 +1,22 @@ +/* + * Change the colorscheme for every menu simply by editing this file... + * + * Available Color Schemes + * // Dark + * material-dark/amber material-dark/blue material-dark/blue_grey material-dark/brown material-dark/cyan material-dark/deep_orange + * material-dark/deep_purple material-dark/green material-dark/grey material-dark/indigo material-dark/light_blue material-dark/light_green + * material-dark/lime material-dark/orange material-dark/pink material-dark/purple material-dark/red material-dark/teal + * material-dark/yellow + * // Light + * material-light/amber material-light/blue material-light/blue_grey material-light/brown material-light/cyan material-light/deep_orange + * material-light/deep_purple material-light/green material-light/grey material-light/indigo material-light/light_blue material-light/light_green + * material-light/lime material-light/orange material-light/pink material-light/purple material-light/red material-light/teal + * material-light/yellow + * + * // Other + * adapta, adapta-nokto, arc, arc-dark, adwaita, gruvbox, dark + * armchair, darkpink, fresh, inside, party, sirin + * + */ + +@import "dark.rasi" diff --git a/general/configs/rofi/applets/styles/confirm.rasi b/general/configs/rofi/applets/styles/confirm.rasi new file mode 100755 index 0000000..79a4be2 --- /dev/null +++ b/general/configs/rofi/applets/styles/confirm.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; + font: "Comfortaa 12"; +} + +window { + width: 225px; + padding: 25px; + border: 0px; + border-radius: 0px; + border-color: @accent; + location: center; + y-offset: -20px; +} + +entry { + expand: true; + text-color: @accent; +} diff --git a/general/configs/rofi/applets/styles/dark.rasi b/general/configs/rofi/applets/styles/dark.rasi new file mode 100755 index 0000000..162207b --- /dev/null +++ b/general/configs/rofi/applets/styles/dark.rasi @@ -0,0 +1,8 @@ +* { + accent: #A9C03F; + background: #141c21; + background-light: #1C252A; + foreground: #93a1a1; + on: #5BB462; + off: #DE635E; +} diff --git a/general/configs/rofi/applets/styles/darkpink.rasi b/general/configs/rofi/applets/styles/darkpink.rasi new file mode 100755 index 0000000..3bae851 --- /dev/null +++ b/general/configs/rofi/applets/styles/darkpink.rasi @@ -0,0 +1,8 @@ +* { + accent: #F75176; + background: #414656; + background-light: #4B5060; + foreground: #F2F7E3; + on: #CDF0D9; + off: #FF796A; +} diff --git a/general/configs/rofi/applets/styles/fresh.rasi b/general/configs/rofi/applets/styles/fresh.rasi new file mode 100755 index 0000000..a19ceb1 --- /dev/null +++ b/general/configs/rofi/applets/styles/fresh.rasi @@ -0,0 +1,8 @@ +* { + accent: #043968; + background: #5CDB94; + background-light: #59C78A; + foreground: #303030; + on: #2e7d32; + off: #d32f2f; +} diff --git a/general/configs/rofi/applets/styles/gruvbox.rasi b/general/configs/rofi/applets/styles/gruvbox.rasi new file mode 100755 index 0000000..9f686f0 --- /dev/null +++ b/general/configs/rofi/applets/styles/gruvbox.rasi @@ -0,0 +1,8 @@ +* { + accent: #83a598; + background: #282828; + background-light: #303030; + foreground: #ebdbb2; + on: #44ad4d; + off: #fb4934; +} diff --git a/general/configs/rofi/applets/styles/inside.rasi b/general/configs/rofi/applets/styles/inside.rasi new file mode 100755 index 0000000..8436894 --- /dev/null +++ b/general/configs/rofi/applets/styles/inside.rasi @@ -0,0 +1,8 @@ +* { + accent: #C7493A; + background: #151515; + background-light: #202020; + foreground: #AD8174; + on: #689775; + off: #A33327; +} diff --git a/general/configs/rofi/applets/styles/material-dark/amber.rasi b/general/configs/rofi/applets/styles/material-dark/amber.rasi new file mode 100755 index 0000000..14cbfcd --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/amber.rasi @@ -0,0 +1,8 @@ +* { + accent: #ffc107; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/blue.rasi b/general/configs/rofi/applets/styles/material-dark/blue.rasi new file mode 100755 index 0000000..821e449 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/blue.rasi @@ -0,0 +1,8 @@ +* { + accent: #1e88e5; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/blue_grey.rasi b/general/configs/rofi/applets/styles/material-dark/blue_grey.rasi new file mode 100755 index 0000000..d810c0d --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/blue_grey.rasi @@ -0,0 +1,8 @@ +* { + accent: #607d8b; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/brown.rasi b/general/configs/rofi/applets/styles/material-dark/brown.rasi new file mode 100755 index 0000000..edf7633 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/brown.rasi @@ -0,0 +1,8 @@ +* { + accent: #8d6e63; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/cyan.rasi b/general/configs/rofi/applets/styles/material-dark/cyan.rasi new file mode 100755 index 0000000..8de289c --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/cyan.rasi @@ -0,0 +1,8 @@ +* { + accent: #26c6da; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/deep_orange.rasi b/general/configs/rofi/applets/styles/material-dark/deep_orange.rasi new file mode 100755 index 0000000..6c061b3 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/deep_orange.rasi @@ -0,0 +1,8 @@ +* { + accent: #ff5722; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/deep_purple.rasi b/general/configs/rofi/applets/styles/material-dark/deep_purple.rasi new file mode 100755 index 0000000..d30571e --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/deep_purple.rasi @@ -0,0 +1,8 @@ +* { + accent: #7e57c2; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/green.rasi b/general/configs/rofi/applets/styles/material-dark/green.rasi new file mode 100755 index 0000000..674280b --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/green.rasi @@ -0,0 +1,8 @@ +* { + accent: #4caf50; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #a5d6a7; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/grey.rasi b/general/configs/rofi/applets/styles/material-dark/grey.rasi new file mode 100755 index 0000000..6c5e57c --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/grey.rasi @@ -0,0 +1,8 @@ +* { + accent: #9e9e9e; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/indigo.rasi b/general/configs/rofi/applets/styles/material-dark/indigo.rasi new file mode 100755 index 0000000..8f89719 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/indigo.rasi @@ -0,0 +1,8 @@ +* { + accent: #5c6bc0; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/light_blue.rasi b/general/configs/rofi/applets/styles/material-dark/light_blue.rasi new file mode 100755 index 0000000..d3f4e1b --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/light_blue.rasi @@ -0,0 +1,8 @@ +* { + accent: #039be5; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/light_green.rasi b/general/configs/rofi/applets/styles/material-dark/light_green.rasi new file mode 100755 index 0000000..5afdf7a --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/light_green.rasi @@ -0,0 +1,8 @@ +* { + accent: #8bc34a; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #4caf50; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/lime.rasi b/general/configs/rofi/applets/styles/material-dark/lime.rasi new file mode 100755 index 0000000..c32550e --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/lime.rasi @@ -0,0 +1,8 @@ +* { + accent: #cddc39; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/orange.rasi b/general/configs/rofi/applets/styles/material-dark/orange.rasi new file mode 100755 index 0000000..2f26952 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/orange.rasi @@ -0,0 +1,8 @@ +* { + accent: #ff9800; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/pink.rasi b/general/configs/rofi/applets/styles/material-dark/pink.rasi new file mode 100755 index 0000000..ef7a0af --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/pink.rasi @@ -0,0 +1,8 @@ +* { + accent: #ec407a; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/purple.rasi b/general/configs/rofi/applets/styles/material-dark/purple.rasi new file mode 100755 index 0000000..a1dd6d4 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/purple.rasi @@ -0,0 +1,8 @@ +* { + accent: #ab47bc; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/red.rasi b/general/configs/rofi/applets/styles/material-dark/red.rasi new file mode 100755 index 0000000..f5d3862 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/red.rasi @@ -0,0 +1,8 @@ +* { + accent: #ef5350; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef9a9a; +} diff --git a/general/configs/rofi/applets/styles/material-dark/teal.rasi b/general/configs/rofi/applets/styles/material-dark/teal.rasi new file mode 100755 index 0000000..e6cdb73 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/teal.rasi @@ -0,0 +1,8 @@ +* { + accent: #009688; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-dark/yellow.rasi b/general/configs/rofi/applets/styles/material-dark/yellow.rasi new file mode 100755 index 0000000..d2788b0 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-dark/yellow.rasi @@ -0,0 +1,8 @@ +* { + accent: #ffeb3b; + background: #212121; + background-light: #272727; + foreground: #bdbdbd; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/amber.rasi b/general/configs/rofi/applets/styles/material-light/amber.rasi new file mode 100755 index 0000000..c02ae2a --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/amber.rasi @@ -0,0 +1,8 @@ +* { + accent: #ff8f00; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/blue.rasi b/general/configs/rofi/applets/styles/material-light/blue.rasi new file mode 100755 index 0000000..780663e --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/blue.rasi @@ -0,0 +1,8 @@ +* { + accent: #1565c0; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/blue_grey.rasi b/general/configs/rofi/applets/styles/material-light/blue_grey.rasi new file mode 100755 index 0000000..8e15a53 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/blue_grey.rasi @@ -0,0 +1,8 @@ +* { + accent: #607d8b; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/brown.rasi b/general/configs/rofi/applets/styles/material-light/brown.rasi new file mode 100755 index 0000000..3f7d39f --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/brown.rasi @@ -0,0 +1,8 @@ +* { + accent: #795548; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/cyan.rasi b/general/configs/rofi/applets/styles/material-light/cyan.rasi new file mode 100755 index 0000000..d879af0 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/cyan.rasi @@ -0,0 +1,8 @@ +* { + accent: #00acc1; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/deep_orange.rasi b/general/configs/rofi/applets/styles/material-light/deep_orange.rasi new file mode 100755 index 0000000..23f5815 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/deep_orange.rasi @@ -0,0 +1,8 @@ +* { + accent: #f4511e; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/deep_purple.rasi b/general/configs/rofi/applets/styles/material-light/deep_purple.rasi new file mode 100755 index 0000000..cc5ec7d --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/deep_purple.rasi @@ -0,0 +1,8 @@ +* { + accent: #5e35b1; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/green.rasi b/general/configs/rofi/applets/styles/material-light/green.rasi new file mode 100755 index 0000000..f476e01 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/green.rasi @@ -0,0 +1,8 @@ +* { + accent: #43a047; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/grey.rasi b/general/configs/rofi/applets/styles/material-light/grey.rasi new file mode 100755 index 0000000..6936929 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/grey.rasi @@ -0,0 +1,8 @@ +* { + accent: #555555; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/indigo.rasi b/general/configs/rofi/applets/styles/material-light/indigo.rasi new file mode 100755 index 0000000..f0508c3 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/indigo.rasi @@ -0,0 +1,8 @@ +* { + accent: #3949ab; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/light_blue.rasi b/general/configs/rofi/applets/styles/material-light/light_blue.rasi new file mode 100755 index 0000000..a0db87a --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/light_blue.rasi @@ -0,0 +1,8 @@ +* { + accent: #039be5; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/light_green.rasi b/general/configs/rofi/applets/styles/material-light/light_green.rasi new file mode 100755 index 0000000..0e33cef --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/light_green.rasi @@ -0,0 +1,8 @@ +* { + accent: #558b2f; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/lime.rasi b/general/configs/rofi/applets/styles/material-light/lime.rasi new file mode 100755 index 0000000..044eb62 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/lime.rasi @@ -0,0 +1,8 @@ +* { + accent: #afb42b; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/orange.rasi b/general/configs/rofi/applets/styles/material-light/orange.rasi new file mode 100755 index 0000000..072c9e2 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/orange.rasi @@ -0,0 +1,8 @@ +* { + accent: #ef6c00; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/pink.rasi b/general/configs/rofi/applets/styles/material-light/pink.rasi new file mode 100755 index 0000000..e17d94d --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/pink.rasi @@ -0,0 +1,8 @@ +* { + accent: #d81b60; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/purple.rasi b/general/configs/rofi/applets/styles/material-light/purple.rasi new file mode 100755 index 0000000..fa95bb9 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/purple.rasi @@ -0,0 +1,8 @@ +* { + accent: #8e24aa; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/red.rasi b/general/configs/rofi/applets/styles/material-light/red.rasi new file mode 100755 index 0000000..d3ebcc0 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/red.rasi @@ -0,0 +1,8 @@ +* { + accent: #d32f2f; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/teal.rasi b/general/configs/rofi/applets/styles/material-light/teal.rasi new file mode 100755 index 0000000..b137892 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/teal.rasi @@ -0,0 +1,8 @@ +* { + accent: #00796b; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/material-light/yellow.rasi b/general/configs/rofi/applets/styles/material-light/yellow.rasi new file mode 100755 index 0000000..8f68244 --- /dev/null +++ b/general/configs/rofi/applets/styles/material-light/yellow.rasi @@ -0,0 +1,8 @@ +* { + accent: #f9a825; + background: #f5f5f5; + background-light: #e0e0e0; + foreground: #424242; + on: #66bb6a; + off: #ef5350; +} diff --git a/general/configs/rofi/applets/styles/message.rasi b/general/configs/rofi/applets/styles/message.rasi new file mode 100755 index 0000000..69d5b07 --- /dev/null +++ b/general/configs/rofi/applets/styles/message.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @background; + text-color: @foreground; + font: "Comfortaa 12"; +} + +window { + width: 360px; + padding: 25px; + border: 0px; + border-radius: 0px; + border-color: @accent; + location: center; + y-offset: -20px; +} + +entry { + expand: true; + text-color: @accent; +} diff --git a/general/configs/rofi/applets/styles/minimo.rasi b/general/configs/rofi/applets/styles/minimo.rasi new file mode 100755 index 0000000..b6fa284 --- /dev/null +++ b/general/configs/rofi/applets/styles/minimo.rasi @@ -0,0 +1,8 @@ +* { + accent: #656565; + background: #C6C6C4; + background-light: #FFFFFF; + foreground: #909090; + on: #226827; + off: #682226; +} diff --git a/general/configs/rofi/applets/styles/party.rasi b/general/configs/rofi/applets/styles/party.rasi new file mode 100755 index 0000000..d8ea9af --- /dev/null +++ b/general/configs/rofi/applets/styles/party.rasi @@ -0,0 +1,8 @@ +* { + accent: #FFE401; + background: #272727; + background-light: #323232; + foreground: #747474; + on: #13A76B; + off: #FF652F; +} diff --git a/general/configs/rofi/applets/styles/sirin.rasi b/general/configs/rofi/applets/styles/sirin.rasi new file mode 100755 index 0000000..302cbce --- /dev/null +++ b/general/configs/rofi/applets/styles/sirin.rasi @@ -0,0 +1,8 @@ +* { + accent: #106466; + background: #FFCB9B; + background-light: #D8B08C; + foreground: #2C3532; + on: #43a047; + off: #ef5350; +} diff --git a/general/configs/rofi/bin/usedcpu b/general/configs/rofi/bin/usedcpu new file mode 100755 index 0000000..512933c --- /dev/null +++ b/general/configs/rofi/bin/usedcpu @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +PREV_TOTAL=0 +PREV_IDLE=0 + +cpuFile="/tmp/.cpu" + +if [[ -f "${cpuFile}" ]]; then + fileCont=$(cat "${cpuFile}") + PREV_TOTAL=$(echo "${fileCont}" | head -n 1) + PREV_IDLE=$(echo "${fileCont}" | tail -n 1) +fi + +CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics. +unset CPU[0] # Discard the "cpu" prefix. +IDLE=${CPU[4]} # Get the idle CPU time. + +# Calculate the total CPU time. +TOTAL=0 + +for VALUE in "${CPU[@]:0:4}"; do + let "TOTAL=$TOTAL+$VALUE" +done + +if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then + # Calculate the CPU usage since we last checked. + let "DIFF_IDLE=$IDLE-$PREV_IDLE" + let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL" + let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10" + if [[ $1 = "-i" ]]; then + echo " ${DIFF_USAGE}%" + else + echo "${DIFF_USAGE}%" + fi +else + if [[ $1 = "-i" ]]; then + echo " ?" + else + echo "?" + fi +fi + +# Remember the total and idle CPU times for the next check. +echo "${TOTAL}" > "${cpuFile}" +echo "${IDLE}" >> "${cpuFile}" diff --git a/general/configs/rofi/bin/usedram b/general/configs/rofi/bin/usedram new file mode 100755 index 0000000..e8a6108 --- /dev/null +++ b/general/configs/rofi/bin/usedram @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +mem_info=$( + + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/global/icons/google.svg b/general/configs/rofi/global/icons/google.svg new file mode 100755 index 0000000..21e5bf3 --- /dev/null +++ b/general/configs/rofi/global/icons/google.svg @@ -0,0 +1,365 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/global/icons/history.svg b/general/configs/rofi/global/icons/history.svg new file mode 100755 index 0000000..872bac8 --- /dev/null +++ b/general/configs/rofi/global/icons/history.svg @@ -0,0 +1,75 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/general/configs/rofi/global/icons/result.svg b/general/configs/rofi/global/icons/result.svg new file mode 100755 index 0000000..0f4d883 --- /dev/null +++ b/general/configs/rofi/global/icons/result.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/global/icons/suggestion.svg b/general/configs/rofi/global/icons/suggestion.svg new file mode 100755 index 0000000..bf67346 --- /dev/null +++ b/general/configs/rofi/global/icons/suggestion.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/general/configs/rofi/global/rofi-spotlight.sh b/general/configs/rofi/global/rofi-spotlight.sh new file mode 100755 index 0000000..d993949 --- /dev/null +++ b/general/configs/rofi/global/rofi-spotlight.sh @@ -0,0 +1,692 @@ +#!/usr/bin/env bash + +TMP_DIR="/tmp/rofi/${USER}/" + +PREV_LOC_FILE="${TMP_DIR}rofi_fb_prevloc" +CURRENT_FILE="${TMP_DIR}rofi_fb_current_file" + +MY_PATH="$(realpath "$0" | xargs dirname)" +HIST_FILE="${MY_PATH}/history.txt" + +OPENER=xdg-open +TERM_EMU=wezterm +TEXT_EDITOR=$EDITOR +FILE_MANAGER=xdg-open +BLUETOOTH_SEND=blueman-sendto + +CUR_DIR=$PWD +NEXT_DIR="" +FD_INSTALLED=$(command -v fd) + +SHOW_HIDDEN=false + +# Setup menu options +declare -a OPEN_FILE_LOCATION=( + "Open file location in ${TERM_EMU}" + "Open file location in ${FILE_MANAGER}" +) +declare -a RUN_COMMANDS=( + "Run" + "Execute in ${TERM_EMU}" +) +declare -a STANDARD_CONTROLS=( + "Move to trash" + "Delete" + "Back" +) +declare -a SHELL_NO_X_OPTIONS=( + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a SHELL_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${SHELL_NO_X_OPTIONS[@]}" +) +declare -a BIN_NO_X_OPTIONS=( + "${OPEN_FILE_LOCATION[@]}" + "Back" +) +declare -a BIN_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${BIN_NO_X_OPTIONS[@]}" +) +declare -a TEXT_OPTIONS=("${SHELL_NO_X_OPTIONS[@]}") +declare -a HTML_OPTIONS=( + "Open" + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a XCF_SVG_OPTIONS=( + "Open" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a IMAGE_OPTIONS=( + "Open" + "Send via Bluetooth" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) + +declare -a ALL_OPTIONS=() + +# Combine all context menu +COMBINED_OPTIONS=( + "${SHELL_OPTIONS[@]}" + "${IMAGE_OPTIONS[@]}" +) + +# Remove duplicates +ALL_OPTIONS=("$(printf '%s\n' "${COMBINED_OPTIONS[@]}" | sort -u)") + +# Create tmp dir for rofi +[ ! -d "${TMP_DIR}" ] && mkdir -p "${TMP_DIR}"; + +# Create hist file if it doesn't exist +[ ! -f "${HIST_FILE}" ] && touch "${HIST_FILE}" + +# Help message +if [ -n "$*" ] && [[ "$*" = ":help" ]] +then + echo -en "Rofi Spotlight +A Rofi with file and web searching functionality + +Commands: +:help to print this help message +:h or :hidden to show hidden files/dirs +:sh or :show_hist to show search history +:ch or :clear_hist to clear search history +:xdg to jump to an xdg directory +Examples: + :xdg DOCUMENTS + :xdg DOWNLOADS +Also supports incomplete path: +Examples: + :xdg doc + :xdg down +For more info about XDG dirs, see: +\`man xdg-user-dir\` + +File search syntaxes: +! to search for a file and web suggestions +? to search parent directories +Examples: + !half-life 3 + ?portal 3 + +Web search syntaxes: +! to gets search suggestions +:web/:w to also to gets search suggestions +:webbro/:wb to search directly from your browser +Examples: + !how to install archlinux + :web how to install gentoo + :w how to make a nuclear fission + :webbro how to install wine in windowsxp +Back\0icon\x1fdraw-arrow-back\n" + + exit +fi + +# Return the icon string +function icon_file_type(){ + icon_name="" + mime_type=$(file --mime-type -b "${1}") + + case "${mime_type}" in + "inode/directory") + case "${1}" in + "Desktop/" ) + icon_name='folder-blue-desktop' + ;; + "Documents/" ) + icon_name='folder-blue-documents' + ;; + "Downloads/" ) + icon_name='folder-blue-downloads' + ;; + "Music/" ) + icon_name='folder-blue-music' + ;; + "Pictures/" ) + icon_name='folder-blue-pictures' + ;; + "Public/" ) + icon_name='folder-blue-public' + ;; + "Templates/" ) + icon_name='folder-blue-templates' + ;; + "Videos/" ) + icon_name='folder-blue-videos' + ;; + "root/" ) + icon_name='folder-root' + ;; + "home/" | "${USER}/") + icon_name='folder-home' + ;; + *"$" ) + icon_name='folder-blue' + ;; + *) + icon_name='folder-blue' + ;; + esac + ;; + "inode/symlink" ) + icon_name='inode-symlink' + ;; + "audio/flac" | "audio/mpeg" ) + icon_name='music' + ;; + "video/mp4" ) + icon_name='video-mp4' + ;; + "video/x-matroska" ) + icon_name=video-x-matroska + ;; + "image/x-xcf" ) + # notify-send '123' + icon_name='image-x-xcf' + ;; + "image/jpeg" | "image/png" | "image/svg+xml") + icon_name="${CUR_DIR}/${1}" + ;; + "image/gif" ) + icon_name='gif' + ;; + "image/vnd.adobe.photoshop" ) + icon_name='image-vnd.adobe.photoshop' + ;; + "image/webp" ) + icon_name='gif' + ;; + "application/x-pie-executable" ) + icon_name='binary' + ;; + "application/pdf" ) + icon_name='pdf' + ;; + "application/zip" ) + icon_name='application-zip' + ;; + "application/x-xz" ) + icon_name='application-x-xz-compressed-tar' + ;; + "application/x-7z-compressed" ) + icon_name='application-x-7zip' + ;; + "application/x-rar" ) + icon_name='application-x-rar' + ;; + "application/octet-stream" | "application/x-iso9660-image" ) + icon_name='application-x-iso' + ;; + "application/x-dosexec" ) + icon_name='application-x-ms-dos-executable' + ;; + "text/plain" ) + icon_name='application-text' + ;; + "text/x-shellscript" ) + icon_name='application-x-shellscript' + ;; + "text/html" ) + icon_name='text-html' + ;; + "font/sfnt" | "application/vnd.ms-opentype" ) + icon_name='application-x-font-ttf' + ;; + * ) + case "${1}" in + *."docx" | *".doc" ) + icon_name='application-msword' + ;; + *."apk" ) + icon_name='android-package-archive' + ;; + * ) + icon_name='unknown' + ;; + esac + ;; + esac + + echo -en "$1\0icon\x1f$icon_name\n" +} + +export -f icon_file_type + +# Pass the argument to python script +function web_search() { + # Pass the search query to web-search script + "${MY_PATH}/web-search.py" "${1}" + exit; +} + +# Handles the web search method +if [ ! -z "$@" ] && ([[ "$@" == ":webbro"* ]] || [[ "$@" == ":wb"* ]]) +then + remove='' + [[ "$*" = ":webbro"* ]] && remove=":webbro" || remove=":wb" + + # Search directly from your web browser + web_search "$(printf '%s\n' "${1//$remove/}")" + exit; + +elif [ ! -z "$@" ] && ([[ "$@" == ":web"* ]] || [[ "$@" == ":w"* ]]) +then + remove='' + [[ "$*" = ":web"* ]] && remove=":web" || remove=":w" + + # Get search suggestions + web_search "!$(printf '%s\n' "${1//$remove/}")" + exit; +fi + +function find_query() { + QUERY=${1} + if [[ ! "${QUERY}" =~ ( |\') ]] + then + if [ -z "$FD_INSTALLED" ]; + then + find "${HOME}" -iname *"${QUERY}"* | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + else + fd -H ${QUERY} ${HOME} | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + fi + fi +} + +# File and calls to the web search +if [ ! -z "$@" ] && ([[ "$@" == ?(\~)/* ]] || [[ "$@" == \?* ]] || [[ "$@" == \!* ]]) +then + QUERY=$@ + + echo "${QUERY}" >> "${HIST_FILE}" + + if [[ "$@" == ?(\~)/* ]] + then + [[ "$*" = \~* ]] && QUERY="${QUERY//"~"/"$HOME"}" + + coproc ${OPENER} "${QUERY}" > /dev/null 2>&1 + exec 1>&- + exit + + elif [[ "$@" == \?* ]] + then + find_query ${QUERY#\?} + + else + # Find the file + find_query ${QUERY#!} + + # Web search + web_search "! ${QUERY#!}" + fi + exit; +fi + +# Create notification if there's an error +function create_notification() { + case "${1}" in + "denied" ) + notify-send -a "Global Search" "Permission denied!" \ + 'You have no permission to access '"${CUR_DIR}!" + ;; + "deleted" ) + notify-send -a "Global Search" "Success!" \ + 'File deleted!' + ;; + "trashed" ) + notify-send -a "Global Search" "Success!" \ + 'The file has been moved to trash!' + ;; + "cleared" ) + notify-send -a "Global Search" "Success!" \ + 'Search history has been successfully cleared!' + ;; + * ) + notify-send -a "Global Search" "Somethings wrong I can feel it!" \ + 'This incident will be reported!' + ;; + esac +} + +# Show the files in the current directory +function navigate_to() { + # process current dir. + if [ -n "${CUR_DIR}" ] + then + CUR_DIR=$(readlink -e "${CUR_DIR}") + if [ ! -d "${CUR_DIR}" ] || [ ! -r "${CUR_DIR}" ] + then + create_notification "denied" + CUR_DIR=$(realpath ${CUR_DIR} | xargs dirname) + echo "${CUR_DIR}" > "${PREV_LOC_FILE}" + else + echo "${CUR_DIR}/" > "${PREV_LOC_FILE}" + fi + pushd "${CUR_DIR}" >/dev/null || exit + fi + + printf "..\0icon\x1fup\n" + + if [[ -z "$FD_INSTALLED" ]] + then + #Group directories + if [[ ${SHOW_HIDDEN} == true ]] + then + for i in .*/ + do + [[ -d "${i}" ]] && ([[ "${i}" != "./" ]] && [[ "${i}" != "../"* ]]) && icon_file_type "${i}" + done + fi + for i in */ + do + [[ -d "${i}" ]] && icon_file_type "${i}" + done + #Group files + if [[ ${SHOW_HIDDEN} = true ]] + then + for i in .* + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + fi + for i in * + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + else + THREADS=$(getconf _NPROCESSORS_ONLN) + export CUR_DIR + if [[ ${SHOW_HIDDEN} == true ]] + then + fd -Ht d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -Ht f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + else + fd -t d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -t f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + fi + fi +} + +# Set XDG dir +function return_xdg_dir() { + target_dir=${1^^} + + if [[ "HOME" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir) + + elif [[ "DESKTOP" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DESKTOP) + + elif [[ "DOCUMENTS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOCUMENTS) + + elif [[ "DOWNLOADS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOWNLOAD) + + elif [[ "MUSIC" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir MUSIC) + + elif [[ "PICTURES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PICTURES) + + elif [[ "PUBLICSHARE" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PUBLICSHARE) + + elif [[ "TEMPLATES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir TEMPLATES) + + elif [[ "VIDEOS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir VIDEOS) + + elif [[ "ROOT" == *"${target_dir}"* ]] + then + CUR_DIR="/" + + else + CUR_DIR="${HOME}" + fi + navigate_to + exit; +} + +# Show and Clear History +if [ ! -z "$@" ] && ([[ "$@" == ":sh" ]] || [[ "$@" == ":show_hist" ]]) +then + hist=$(tac "${HIST_FILE}") + + echo -en "Back\0icon\x1fdraw-arrow-back\n" + [ -z "${hist}" ] && echo -en "No History Yet\0icon\x1ftext-plain\n" + + while IFS= read -r line; + do + echo -en "${line}\0icon\x1f${MY_PATH}/icons/history.svg\n"; + done <<< "${hist}" + + exit; +elif [ ! -z "$@" ] && ([[ "$@" == ":ch" ]] || [[ "$@" == ":clear_hist" ]]) +then + :> "${HIST_FILE}" + create_notification "cleared" + + CUR_DIR="${HOME}" + navigate_to + exit; +fi + +# Accepts XDG command +if [[ ! -z "$@" ]] && [[ "$@" == ":xdg"* ]] +then + NEXT_DIR=${*//":xdg "/} + + [[ -n "$NEXT_DIR" ]] && return_xdg_dir "${NEXT_DIR}" || return_xdg_dir "${HOME}" +fi + +# Read last location, otherwise we default to PWD. +[ -f "${PREV_LOC_FILE}" ] && CUR_DIR=$(< "${PREV_LOC_FILE}") + +if [[ ! -z "$@" ]] && ([[ "$@" == ":h" ]] || [[ "$@" == ":hidden" ]]) +then + SHOW_HIDDEN=true + navigate_to + exit; +fi + +# Handle argument. +[ -n "$*" ] && CUR_DIR="${CUR_DIR}/$*" + +# Context Menu +if [ -n "$*" ] && [[ "${ALL_OPTIONS[*]} " = *"$*"* ]] +then + case "${1}" in + "Run" ) + coproc ( eval "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Execute in ${TERM_EMU}" ) + coproc ( eval "${TERM_EMU} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open" ) + coproc ( eval "${OPENER} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${TERM_EMU}" ) + file_path="$(< ${CURRENT_FILE})" + coproc ( ${TERM_EMU} bash -c "cd ${file_path%/*} ; ${SHELL}" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${FILE_MANAGER}" ) + file_path="$(< "${CURRENT_FILE}")" + coproc ( eval "${FILE_MANAGER} "${file_path%/*}"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Edit" ) + coproc ( eval "${TERM_EMU} ${TEXT_EDITOR} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Move to trash" ) + coproc( gio trash "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + create_notification "trashed" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Delete" ) + shred "$(< ${CURRENT_FILE})" + rm "$(< ${CURRENT_FILE})" + create_notification "deleted" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Send via Bluetooth" ) + rfkill unblock bluetooth && bluetoothctl power on + sleep 1 + blueman-sendto "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 + kill -9 $(pgrep rofi) + ;; + "Back" ) + CUR_DIR="$(< ${PREV_LOC_FILE})" + navigate_to + ;; + esac + exit; +fi + +function context_menu_icons() { + + if [[ "${1}" == "Run" ]] + then + echo '\0icon\x1fsystem-run\n' + + elif [[ "${1}" == "Execute in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open" ]] + then + echo "\0icon\x1futilities-x-terminal\n" + + elif [[ "${1}" == "Open file location in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open file location in ${FILE_MANAGER}" ]] + then + echo "\0icon\x1fblue-folder-open\n" + + elif [[ "${1}" == "Edit" ]] + then + echo "\0icon\x1faccessories-text-editor\n" + + elif [[ "${1}" == "Move to trash" ]] + then + echo "\0icon\x1fapplication-x-trash\n" + + elif [[ "${1}" == "Delete" ]] + then + echo "\0icon\x1findicator-trashindicator\n" + + elif [[ "${1}" == "Send via Bluetooth" ]] + then + echo "\0icon\x1fbluetooth\n" + + elif [[ "${1}" == "Back" ]] + then + echo "\0icon\x1fback\n" + fi +} + +function print_context_menu() { + declare -a arg_arr=("${!1}") + + for menu in "${arg_arr[@]}" + do + printf "$menu$(context_menu_icons "${menu}")\n" + done +} + +function context_menu() { + + type="$(file --mime-type -b "${CUR_DIR}")" + + if [ -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + if [ -x "${CUR_DIR}" ]; + then + print_context_menu SHELL_OPTIONS[@] + else + print_context_menu SHELL_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "application/x-executable" ]] || [[ "${type}" == "application/x-pie-executable" ]] + then + if [ -x "${CUR_DIR}" ] + then + print_context_menu BIN_OPTIONS[@] + else + print_context_menu BIN_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "text/plain" ]] + then + print_context_menu TEXT_OPTIONS[@] + + elif [[ "${type}" == "text/html" ]] + then + print_context_menu HTML_OPTIONS[@] + + elif [[ "${type}" == "image/jpeg" ]] || [[ "${type}" == "image/png" ]] + then + print_context_menu IMAGE_OPTIONS[@] + + elif [[ "${type}" == "image/x-xcf" ]] || [[ "${type}" == "image/svg+xml" ]] + then + print_context_menu XCF_SVG_OPTIONS[@] + + elif [ ! -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + coproc ( exec "${CUR_DIR}" & > /dev/null 2>&1 ) + + else + if [ ! -d "${CUR_DIR}" ] && [ ! -f "${CUR_DIR}" ] + then + QUERY="${CUR_DIR//*\/\//}" + + echo "${QUERY}" >> "${HIST_FILE}" + + find_query "${QUERY#!}" + + web_search "!${QUERY}" + else + coproc ( ${OPENER} "${CUR_DIR}" & > /dev/null 2>&1 ) + fi + fi + exit; +} + +# If argument is not a directory/folder +if [ ! -d "${CUR_DIR}" ] +then + echo "${CUR_DIR}" > "${CURRENT_FILE}" + context_menu + exit; +fi + +navigate_to diff --git a/general/configs/rofi/global/rofi.rasi b/general/configs/rofi/global/rofi.rasi new file mode 100755 index 0000000..819fc2b --- /dev/null +++ b/general/configs/rofi/global/rofi.rasi @@ -0,0 +1,162 @@ +configuration { + font: "Inter Regular 10"; + sidebar-mode: true; + show-icons: true; + icon-theme: "Nordzy"; + fullscreen: false; + threads: 0; + matching: "fuzzy"; + scroll-method: 0; + monitor: "primary"; +} + +* { + transparent: #00000000; + foreground: #F2F2F2EE; + background-selected: #F2F2F245; + background-active: #F2F2F230; + background-white: #F2F2F211; + background-black: #00000000; + urgent: #E91E6366; + urgent-selected: #E91E6377; +} + +window { + transparency: "real"; + background-color: #1917244D; + text-color: #6e6a86; + location: west; + anchor: west; + x-offset: 5px; + y-offset: -50px; + height: 70%; + width: 350px; + orientation: vertical; +} + +prompt { + enabled: false; +} + +button { + action: "ok"; + str: " "; + font: "FantasqueSansMono Nerd Font 16"; + expand: false; + text-color: #6e6a86; + background-color: @transparent; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +entry { + font: "Inter Regular 12"; + background-color: @transparent; + text-color: #6e6a86; + expand: true; + vertical-align: 0.5; + horizontal-align: 0; + placeholder: "Global Search"; + placeholder-color: @foreground; + blink: true; +} + +entry-wrapper { + orientation: horizontal; + margin: 0 12px 0 12px; + spacing: 24px; + vertical-align: 0.5; + background-color: @transparent; + children: [ button, entry ]; +} + +inputbar { + padding: 14px; + margin: 10px 10px 14px 10px; + background-color: #26233a; + text-color: @foreground; + expand: false; + border-radius: 9px; + position: north; + children: [ entry-wrapper ]; +} + +listview { + background-color: @transparent; + spacing: 0; + cycle: true; + dynamic: true; + scrollbar: true; +} + +mainbox { + width: 200px; + expand: true; + spacing: 12px; + padding: 5px; + background-color: @background-black; + children: [ inputbar, listview ]; +} + +scrollbar { + background-color: @background-white; + handle-width: 0; + margin: 0 0 5px 0; + border-radius: 9px; +} + +element { + background-color: @transparent; + text-color: @foreground; + orientation: horizontal; + border: 0; + border-color: @background-white; + border-radius: 6px; + spacing: 24px; + margin: 0px 12px 0px 12px; + padding: 10px 24px 10px 24px; +} + +element-icon { + size: 24px; + border: 0; + border-color: @transparent; + background-color: transparent; +} + +element-text { + font: "Inter Regular 11"; + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + color: #6e6a86; + background-color: transparent; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 9px; +} + +element normal.active, +element alternate.active { + background-color: @background-active; + text-color: @foreground; +} + +element selected { + background-color: #403d5220; + text-color: @foreground; +} + +element selected.urgent { + background-color: @urgent-selected; + text-color: @foreground; +} + +element selected.active { + background-color: #403d5220; + color: @foreground-selected; +} \ No newline at end of file diff --git a/general/configs/rofi/global/web-search.py b/general/configs/rofi/global/web-search.py new file mode 100755 index 0000000..ba314d5 --- /dev/null +++ b/general/configs/rofi/global/web-search.py @@ -0,0 +1,167 @@ +#!/usr/bin/env python3 + +# MIT License + +# Copyright (c) 2019 Paolo Donadeo + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + +import json +import re +import urllib.parse +import urllib.request +import sys +import os +import datetime +import gzip + +import subprocess as sp + +import html + + +################################################################################ +##### C O N F I G U R A T I O N ###### +################################################################################ +SEARCH_ENGINE = 'google' # or 'duckduckgo' +BROWSER = 'firefox' # or 'firefox', 'chromium', 'brave', 'lynx' +TERMINAL = ['kitty', '--'] # or ['st', '-e'] or something like that +################################################################################ + +CONFIG = { + 'BROWSER_PATH' : { + 'chrome' : ['google-chrome-stable'], + 'firefox' : ['firefox'], + 'chromium' : ['chromium-browser'], + 'brave' : ['brave-browser'], + 'lynx' : TERMINAL + ['lynx'] + }, + 'USER_AGENT' : { + 'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + 'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0', + 'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36', + 'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36', + 'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d' + }, + 'SEARCH_ENGINE_NAME' : { + 'google' : 'Google', + 'duckduckgo' : 'DuckDuckGo' + }, + 'SEARCH_URL' : { + 'google' : 'https://www.google.com/search?q=', + 'duckduckgo' : 'https://duckduckgo.com/?q=' + }, + 'SUGGESTION_URL' : { + 'google' : 'https://www.google.com/complete/search?', + 'duckduckgo' : 'https://duckduckgo.com/ac/?' + } +} + +def cleanhtml(txt): + return re.sub(r'<.*?>', '', txt) + +def fetch_suggestions(search_string): + if SEARCH_ENGINE == 'google': + r = { + 'q' : search_string, + 'cp' : '11', + 'client' : 'psy-ab', + 'xssi' : 't', + 'gs_ri' : 'gws-wiz', + 'hl' : 'en-IT', + 'authuser' : '0' + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + headers = { + 'sec-fetch-mode' : 'cors', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'pragma' : 'no-cache', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'www.google.com', + 'referer' : 'https://www.google.com/', + 'sec-fetch-site' : 'same-origin' + } + req = urllib.request.Request(url, headers=headers, method='GET') + + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).split(b'\n')[1] + reply_data = json.loads(reply_data) + return [ cleanhtml(res[0]).strip() for res in reply_data[0] ] + else: # 'duckduckgo' + if search_string.startswith('!'): + bang_search = True + search_string = search_string.lstrip('!') + else: + bang_search = False + r = { + 'q' : search_string, + 'callback' : 'autocompleteCallback', + 'kl' : 'wt-wt', + '_' : str(int((datetime.datetime.now().timestamp())*1000)) + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + if bang_search: + url = url.replace('?q=', '?q=!') + headers = { + 'pragma' : 'no-cache', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'sec-fetch-mode' : 'no-cors', + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'duckduckgo.com', + 'referer' : 'https://duckduckgo.com/', + 'sec-fetch-site' : 'same-origin', + } + req = urllib.request.Request(url, headers=headers, method='GET') + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).decode('utf8') + reply_data = json.loads(re.match(r'autocompleteCallback\((.*)\);', reply_data).group(1)) + return [ cleanhtml(res['phrase']).strip() for res in reply_data ] + +def main(): + search_string = html.unescape((' '.join(sys.argv[1:])).strip()) + + path_str = os.path.dirname(os.path.realpath(__file__)) + '/' + icon_path_str = path_str + 'icons/' + icon_name = icon_path_str + + if SEARCH_ENGINE == 'google': + icon_name += 'google.svg' + else: + icon_name += 'ddg.svg' + + if search_string.startswith('!'): + search_string = search_string.rstrip('!').strip() + results = fetch_suggestions(search_string) + for r in results: + print(":wb " + html.unescape(r) + "\0icon\x1f"+icon_name+"\n") + else: + url = CONFIG['SEARCH_URL'][SEARCH_ENGINE] + urllib.parse.quote_plus(search_string) + sp.Popen(CONFIG['BROWSER_PATH'][BROWSER] + [url], stdout=sp.DEVNULL, stderr=sp.DEVNULL, shell=False) + +if __name__ == "__main__": + try: + main() + except Exception as e: + if e: + sys.exit(1) diff --git a/general/configs/rofi/powermenu/drop_square.rasi b/general/configs/rofi/powermenu/drop_square.rasi new file mode 100755 index 0000000..b4ae903 --- /dev/null +++ b/general/configs/rofi/powermenu/drop_square.rasi @@ -0,0 +1,123 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "FantasqueSansMono Nerd Font 14"; + show-icons: false; + icon-theme: "Papirus"; + drun-display-format: "{name}"; + disable-history: false; + sidebar-mode: false; +} + +@import "styles/colors.rasi" + +window { + transparency: "real"; + background-color: @background; + text-color: @foreground; + border-radius: 0px; + height: 42%; + width: 100%; + location: north; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 1% 1% 1% 0%; + background-color: @background-alt; + text-color: @foreground; +} + +textbox-prompt-colon { + expand: false; + str: "System |"; + background-color: @background-alt; + text-color: @foreground; + padding: 1% 0.5% 1% 7%; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @background-alt; + text-color: @foreground; + expand: false; + border: 0% 0% 0.2% 0%; + border-radius: 0% 0% 0% 0%; + border-color: @border; + margin: 0% 33.25% 0% 20%; + padding: 0.5%; + position: center; +} + +listview { + background-color: @background; + margin: 0% 0% 0% 0%; + spacing: 3%; + cycle: true; + dynamic: true; + layout: horizontal; +} + +mainbox { + background-color: @background; + children: [ listview, inputbar ]; + spacing: 0%; + padding: 5% 0% 5% 13.25%; +} + +element { + background-color: @background-alt; + text-color: @foreground; + orientation: horizontal; + border-radius: 0%; +} + +element-text { + background-color: #00000000; + text-color: inherit; + font: "feather 64"; + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 6.5% 4% 6.5% 4%; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 0.2%; +} + +element normal.active, +element alternate.active { + background-color: @background-alt; + text-color: @foreground; +} + +element selected { + background-color: @selected; + text-color: @foreground; + border: 0% 0% 0.2% 0%; + border-radius: 0%; + border-color: @border; +} + +element selected.urgent { + background-color: @urgent; + text-color: @foreground; +} + +element selected.active { + background-color: @background-alt; + color: @foreground; +} diff --git a/general/configs/rofi/powermenu/powermenu.rasi b/general/configs/rofi/powermenu/powermenu.rasi new file mode 100755 index 0000000..41fc910 --- /dev/null +++ b/general/configs/rofi/powermenu/powermenu.rasi @@ -0,0 +1,93 @@ +configuration { + font: "JetBrainsMono Nerd Font 36"; + drun-display-format: "{name}"; + fullscreen: false; + threads: 0; + matching: "fuzzy"; + scroll-method: 0; + disable-history: false; + fullscreen: true; +} + +* { + transparent: #00000000; + foreground: #F2F2F2EE; + background-selected: #F2F2F245; + background-active: #F2F2F230; + background-white: #F2F2F211; + background-black: #00000066; + urgent: #E91E6366; + urgent-selected: #E91E6377; +} + +window { + transparency: "real"; + background-color: @transparent; + text-color: @foreground; + location: northwest; + anchor: northwest; +} + +inputbar { + margin: 0; + padding: 0; + children: [ entry-wrapper ]; +} + +listview { + background-color: @transparent; + lines: 6; + spacing: 5%; + cycle: false; + dynamic: true; + layout: horizontal; +} + +mainbox { + background-color: @background-black; + children: [ inputbar, listview ]; + padding: calc(50% - 70px) 0% 0% 15%; +} + +element { + background-color: @transparent; + text-color: @foreground; + orientation: horizontal; + border-radius: 10px; + padding: 30px; + vertical: 0.5; +} + +element-text { + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 9px; +} + +element normal.active, +element alternate.active { + background-color: @background-active; + text-color: @foreground; +} + +element selected { + background-color: #29B6F6; + text-color: #212121; +} + +element selected.urgent { + background-color: @urgent-selected; + text-color: @foreground; +} + +element selected.active { + background-color: @background-active; + color: @foreground-selected; +} diff --git a/general/configs/rofi/powermenu/powermenu.sh b/general/configs/rofi/powermenu/powermenu.sh new file mode 100755 index 0000000..f857ac5 --- /dev/null +++ b/general/configs/rofi/powermenu/powermenu.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +# Available Styles +# >> Created and tested on : rofi 1.6.0-1 +# +# column_circle column_square column_rounded column_alt +# card_circle card_square card_rounded card_alt +# dock_circle dock_square dock_rounded dock_alt +# drop_circle drop_square drop_rounded drop_alt +# full_circle full_square full_rounded full_alt +# row_circle row_square row_rounded row_alt + +theme="drop_square" +dir="$HOME/.config/rofi/powermenu" + + +uptime=$(uptime -p | sed -e 's/up //g') + +rofi_command="rofi -theme $dir/$theme" + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Message +msg() { + rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)" +case $chosen in + $shutdown) + systemctl poweroff + ;; + $reboot) + systemctl reboot + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + mpc -q pause + amixer set Master mute + systemctl suspend + ;; + $logout) + if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then + openbox --exit + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg exit + fi + ;; +esac diff --git a/general/configs/rofi/powermenu/styles/berry.rasi b/general/configs/rofi/powermenu/styles/berry.rasi new file mode 100755 index 0000000..025c231 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/berry.rasi @@ -0,0 +1,9 @@ +* { + background: #280F28ff; + background-alt: #2D142Cff; + foreground: #ffffffA6; + border: #EE4540ff; + border-alt: #C92A42ff; + selected: #510A3299; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/bluish.rasi b/general/configs/rofi/powermenu/styles/bluish.rasi new file mode 100755 index 0000000..2305bd5 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/bluish.rasi @@ -0,0 +1,9 @@ +* { + background: #EFF0F1FF; + background-alt: #E3E3E3FF; + foreground: #000000A6; + border: #000B83FF; + border-alt: #3DAEE9FF; + selected: #93CEE9FF; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/cocoa.rasi b/general/configs/rofi/powermenu/styles/cocoa.rasi new file mode 100755 index 0000000..31f780d --- /dev/null +++ b/general/configs/rofi/powermenu/styles/cocoa.rasi @@ -0,0 +1,9 @@ +* { + background: #3C3945FF; + background-alt: #413E4Aff; + foreground: #F7C7B2ff; + border: #B38184ff; + border-alt: #F3B69Eff; + selected: #B381841a; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/colors.rasi b/general/configs/rofi/powermenu/styles/colors.rasi new file mode 100755 index 0000000..a1d2937 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/colors.rasi @@ -0,0 +1,10 @@ +/* + * Change the colorscheme for every menu simply by editing this file... + * + * Available Color Schemes + * + * bluish berry nordic nightly gotham mask faded cocoa + * + */ + +@import "nordic.rasi" diff --git a/general/configs/rofi/powermenu/styles/faded.rasi b/general/configs/rofi/powermenu/styles/faded.rasi new file mode 100755 index 0000000..0eebd64 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/faded.rasi @@ -0,0 +1,9 @@ +* { + background: #57678CFF; + background-alt: #5E6C91ff; + foreground: #FFFCFFff; + border: #FF83A7ff; + border-alt: #F4BB6Cff; + selected: #A0B5F44c; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/gotham.rasi b/general/configs/rofi/powermenu/styles/gotham.rasi new file mode 100755 index 0000000..2bae381 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/gotham.rasi @@ -0,0 +1,9 @@ +* { + background: #24334Aff; + background-alt: #29384Fff; + foreground: #FEFFF1ff; + border: #3A6081ff; + border-alt: #715979ff; + selected: #C46C854C; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/mask.rasi b/general/configs/rofi/powermenu/styles/mask.rasi new file mode 100755 index 0000000..c63ac9e --- /dev/null +++ b/general/configs/rofi/powermenu/styles/mask.rasi @@ -0,0 +1,9 @@ +* { + background: #3E4667ff; + background-alt: #434C6Dff; + foreground: #FAF7CCff; + border: #CA8CA5ff; + border-alt: #F0B2B3ff; + selected: #EFD4B61a; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/nightly.rasi b/general/configs/rofi/powermenu/styles/nightly.rasi new file mode 100755 index 0000000..400e6cd --- /dev/null +++ b/general/configs/rofi/powermenu/styles/nightly.rasi @@ -0,0 +1,9 @@ +* { + background: #25344Bff; + background-alt: #2A3950ff; + foreground: #FEFFF1ff; + border: #A162F7ff; + border-alt: #45E3FFff; + selected: #6F88FE1a; + urgent: #DA4453FF; +} diff --git a/general/configs/rofi/powermenu/styles/nordic.rasi b/general/configs/rofi/powermenu/styles/nordic.rasi new file mode 100755 index 0000000..3c42c77 --- /dev/null +++ b/general/configs/rofi/powermenu/styles/nordic.rasi @@ -0,0 +1,9 @@ +* { + background: #2E3440ff; + background-alt: #2E3440ff; + foreground: #8FBCBBff; + border: #bbbbbbff; + border-alt: #ccccccff; + selected: #444444ff; + urgent: #777777FF; +} diff --git a/general/configs/rofi/scripts/emoji b/general/configs/rofi/scripts/emoji new file mode 100755 index 0000000..dcc641e --- /dev/null +++ b/general/configs/rofi/scripts/emoji @@ -0,0 +1,5 @@ +#!/bin/bash + +DIR="$HOME/.config" + +rofi -show emoji -modi emoji -theme $DIR/rofi/Themes/emojis.rasi diff --git a/general/configs/rofi/scripts/powermenu.sh b/general/configs/rofi/scripts/powermenu.sh new file mode 100755 index 0000000..ac31173 --- /dev/null +++ b/general/configs/rofi/scripts/powermenu.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/five.rasi" + +uptime=$(uptime -p | sed -e 's/up //g') + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $dir/confirm.rasi +} + +# Message +msg() { + rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/voidwm" ]]; then + pkill dwm + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3" ]]; then + i3-msg exit + elif [[ "$DESKTOP_SESSION" == "/usr/local/bin/dwm" ]]; then + pkill dwm + elif [[ "$DESKTOP_SESSION" == "awesome" ]]; then + pkill awesome + else + pkill Hyprland + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/general/configs/rofi/scripts/screenshot-wl.sh b/general/configs/rofi/scripts/screenshot-wl.sh new file mode 100755 index 0000000..fcb907e --- /dev/null +++ b/general/configs/rofi/scripts/screenshot-wl.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/three.rasi" + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + sleep 0.4; grim -t png - | wl-copy -t image/png + ;; + $area) + grim -g "$(slurp)" -t png - | wl-copy -t image/png + ;; + $window) + sleep 0.4; grim -g "$(hyprctl activewindow | grep at: | cut -d' ' -f2) $(hyprctl activewindow | grep size: | cut -d' ' -f2 | sed 's/,/x/g')" - | wl-copy + ;; +esac + diff --git a/general/configs/rofi/scripts/screenshot.sh b/general/configs/rofi/scripts/screenshot.sh new file mode 100755 index 0000000..0b26829 --- /dev/null +++ b/general/configs/rofi/scripts/screenshot.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/three.rasi" + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + scrot -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; + $area) + scrot -s --line mode=edge -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; + $window) + scrot -u -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; +esac + diff --git a/general/configs/rofi/spotlight/history.txt b/general/configs/rofi/spotlight/history.txt new file mode 100755 index 0000000..d0143a7 --- /dev/null +++ b/general/configs/rofi/spotlight/history.txt @@ -0,0 +1,3 @@ +!te +A Rofi with file and web searching functionality +!test diff --git a/general/configs/rofi/spotlight/icons/ddg.svg b/general/configs/rofi/spotlight/icons/ddg.svg new file mode 100755 index 0000000..20ea387 --- /dev/null +++ b/general/configs/rofi/spotlight/icons/ddg.svg @@ -0,0 +1,615 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/spotlight/icons/google.svg b/general/configs/rofi/spotlight/icons/google.svg new file mode 100755 index 0000000..21e5bf3 --- /dev/null +++ b/general/configs/rofi/spotlight/icons/google.svg @@ -0,0 +1,365 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/spotlight/icons/history.svg b/general/configs/rofi/spotlight/icons/history.svg new file mode 100755 index 0000000..872bac8 --- /dev/null +++ b/general/configs/rofi/spotlight/icons/history.svg @@ -0,0 +1,75 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/general/configs/rofi/spotlight/icons/result.svg b/general/configs/rofi/spotlight/icons/result.svg new file mode 100755 index 0000000..0f4d883 --- /dev/null +++ b/general/configs/rofi/spotlight/icons/result.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/general/configs/rofi/spotlight/rofi-spotlight.sh b/general/configs/rofi/spotlight/rofi-spotlight.sh new file mode 100755 index 0000000..0ed30e9 --- /dev/null +++ b/general/configs/rofi/spotlight/rofi-spotlight.sh @@ -0,0 +1,692 @@ +#!/usr/bin/env bash + +TMP_DIR="/tmp/rofi/${USER}/" + +PREV_LOC_FILE="${TMP_DIR}rofi_fb_prevloc" +CURRENT_FILE="${TMP_DIR}rofi_fb_current_file" + +MY_PATH="$(realpath "$0" | xargs dirname)" +HIST_FILE="${MY_PATH}/history.txt" + +OPENER=xdg-open +TERM_EMU=terminator +TEXT_EDITOR=$EDITOR +FILE_MANAGER=xdg-open +BLUETOOTH_SEND=blueman-sendto + +CUR_DIR=$PWD +NEXT_DIR="" +FD_INSTALLED=$(command -v fd) + +SHOW_HIDDEN=false + +# Setup menu options +declare -a OPEN_FILE_LOCATION=( + "Open file location in ${TERM_EMU}" + "Open file location in ${FILE_MANAGER}" +) +declare -a RUN_COMMANDS=( + "Run" + "Execute in ${TERM_EMU}" +) +declare -a STANDARD_CONTROLS=( + "Move to trash" + "Delete" + "Back" +) +declare -a SHELL_NO_X_OPTIONS=( + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a SHELL_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${SHELL_NO_X_OPTIONS[@]}" +) +declare -a BIN_NO_X_OPTIONS=( + "${OPEN_FILE_LOCATION[@]}" + "Back" +) +declare -a BIN_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${BIN_NO_X_OPTIONS[@]}" +) +declare -a TEXT_OPTIONS=("${SHELL_NO_X_OPTIONS[@]}") +declare -a HTML_OPTIONS=( + "Open" + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a XCF_SVG_OPTIONS=( + "Open" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a IMAGE_OPTIONS=( + "Open" + "Send via Bluetooth" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) + +declare -a ALL_OPTIONS=() + +# Combine all context menu +COMBINED_OPTIONS=( + "${SHELL_OPTIONS[@]}" + "${IMAGE_OPTIONS[@]}" +) + +# Remove duplicates +ALL_OPTIONS=("$(printf '%s\n' "${COMBINED_OPTIONS[@]}" | sort -u)") + +# Create tmp dir for rofi +[ ! -d "${TMP_DIR}" ] && mkdir -p "${TMP_DIR}"; + +# Create hist file if it doesn't exist +[ ! -f "${HIST_FILE}" ] && touch "${HIST_FILE}" + +# Help message +if [ -n "$*" ] && [[ "$*" = ":help" ]] +then + echo -en "Rofi Spotlight +A Rofi with file and web searching functionality + +Commands: +:help to print this help message +:h or :hidden to show hidden files/dirs +:sh or :show_hist to show search history +:ch or :clear_hist to clear search history +:xdg to jump to an xdg directory +Examples: + :xdg DOCUMENTS + :xdg DOWNLOADS +Also supports incomplete path: +Examples: + :xdg doc + :xdg down +For more info about XDG dirs, see: +\`man xdg-user-dir\` + +File search syntaxes: +! to search for a file and web suggestions +? to search parent directories +Examples: + !half-life 3 + ?portal 3 + +Web search syntaxes: +! to gets search suggestions +:web/:w to also to gets search suggestions +:webbro/:wb to search directly from your browser +Examples: + !how to install archlinux + :web how to install gentoo + :w how to make a nuclear fission + :webbro how to install wine in windowsxp +Back\0icon\x1fdraw-arrow-back\n" + + exit +fi + +# Return the icon string +function icon_file_type(){ + icon_name="" + mime_type=$(file --mime-type -b "${1}") + + case "${mime_type}" in + "inode/directory") + case "${1}" in + "Desktop/" ) + icon_name='folder-blue-desktop' + ;; + "Documents/" ) + icon_name='folder-blue-documents' + ;; + "Downloads/" ) + icon_name='folder-blue-downloads' + ;; + "Music/" ) + icon_name='folder-blue-music' + ;; + "Pictures/" ) + icon_name='folder-blue-pictures' + ;; + "Public/" ) + icon_name='folder-blue-public' + ;; + "Templates/" ) + icon_name='folder-blue-templates' + ;; + "Videos/" ) + icon_name='folder-blue-videos' + ;; + "root/" ) + icon_name='folder-root' + ;; + "home/" | "${USER}/") + icon_name='folder-home' + ;; + *"$" ) + icon_name='folder-blue' + ;; + *) + icon_name='folder-blue' + ;; + esac + ;; + "inode/symlink" ) + icon_name='inode-symlink' + ;; + "audio/flac" | "audio/mpeg" ) + icon_name='music' + ;; + "video/mp4" ) + icon_name='video-mp4' + ;; + "video/x-matroska" ) + icon_name=video-x-matroska + ;; + "image/x-xcf" ) + # notify-send '123' + icon_name='image-x-xcf' + ;; + "image/jpeg" | "image/png" | "image/svg+xml") + icon_name="${CUR_DIR}/${1}" + ;; + "image/gif" ) + icon_name='gif' + ;; + "image/vnd.adobe.photoshop" ) + icon_name='image-vnd.adobe.photoshop' + ;; + "image/webp" ) + icon_name='gif' + ;; + "application/x-pie-executable" ) + icon_name='binary' + ;; + "application/pdf" ) + icon_name='pdf' + ;; + "application/zip" ) + icon_name='application-zip' + ;; + "application/x-xz" ) + icon_name='application-x-xz-compressed-tar' + ;; + "application/x-7z-compressed" ) + icon_name='application-x-7zip' + ;; + "application/x-rar" ) + icon_name='application-x-rar' + ;; + "application/octet-stream" | "application/x-iso9660-image" ) + icon_name='application-x-iso' + ;; + "application/x-dosexec" ) + icon_name='application-x-ms-dos-executable' + ;; + "text/plain" ) + icon_name='application-text' + ;; + "text/x-shellscript" ) + icon_name='application-x-shellscript' + ;; + "text/html" ) + icon_name='text-html' + ;; + "font/sfnt" | "application/vnd.ms-opentype" ) + icon_name='application-x-font-ttf' + ;; + * ) + case "${1}" in + *."docx" | *".doc" ) + icon_name='application-msword' + ;; + *."apk" ) + icon_name='android-package-archive' + ;; + * ) + icon_name='unknown' + ;; + esac + ;; + esac + + echo -en "$1\0icon\x1f$icon_name\n" +} + +export -f icon_file_type + +# Pass the argument to python script +function web_search() { + # Pass the search query to web-search script + "${MY_PATH}/web-search.py" "${1}" + exit; +} + +# Handles the web search method +if [ ! -z "$@" ] && ([[ "$@" == ":webbro"* ]] || [[ "$@" == ":wb"* ]]) +then + remove='' + [[ "$*" = ":webbro"* ]] && remove=":webbro" || remove=":wb" + + # Search directly from your web browser + web_search "$(printf '%s\n' "${1//$remove/}")" + exit; + +elif [ ! -z "$@" ] && ([[ "$@" == ":web"* ]] || [[ "$@" == ":w"* ]]) +then + remove='' + [[ "$*" = ":web"* ]] && remove=":web" || remove=":w" + + # Get search suggestions + web_search "!$(printf '%s\n' "${1//$remove/}")" + exit; +fi + +function find_query() { + QUERY=${1} + if [[ ! "${QUERY}" =~ ( |\') ]] + then + if [ -z "$FD_INSTALLED" ]; + then + find "${HOME}" -iname *"${QUERY}"* | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + else + fd -H ${QUERY} ${HOME} | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + fi + fi +} + +# File and calls to the web search +if [ ! -z "$@" ] && ([[ "$@" == ?(\~)/* ]] || [[ "$@" == \?* ]] || [[ "$@" == \!* ]]) +then + QUERY=$@ + + echo "${QUERY}" >> "${HIST_FILE}" + + if [[ "$@" == ?(\~)/* ]] + then + [[ "$*" = \~* ]] && QUERY="${QUERY//"~"/"$HOME"}" + + coproc ${OPENER} "${QUERY}" > /dev/null 2>&1 + exec 1>&- + exit + + elif [[ "$@" == \?* ]] + then + find_query ${QUERY#\?} + + else + # Find the file + find_query ${QUERY#!} + + # Web search + web_search "! ${QUERY#!}" + fi + exit; +fi + +# Create notification if there's an error +function create_notification() { + case "${1}" in + "denied" ) + notify-send -a "Global Search" "Permission denied!" \ + 'You have no permission to access '"${CUR_DIR}!" + ;; + "deleted" ) + notify-send -a "Global Search" "Success!" \ + 'File deleted!' + ;; + "trashed" ) + notify-send -a "Global Search" "Success!" \ + 'The file has been moved to trash!' + ;; + "cleared" ) + notify-send -a "Global Search" "Success!" \ + 'Search history has been successfully cleared!' + ;; + * ) + notify-send -a "Global Search" "Somethings wrong I can feel it!" \ + 'This incident will be reported!' + ;; + esac +} + +# Show the files in the current directory +function navigate_to() { + # process current dir. + if [ -n "${CUR_DIR}" ] + then + CUR_DIR=$(readlink -e "${CUR_DIR}") + if [ ! -d "${CUR_DIR}" ] || [ ! -r "${CUR_DIR}" ] + then + create_notification "denied" + CUR_DIR=$(realpath ${CUR_DIR} | xargs dirname) + echo "${CUR_DIR}" > "${PREV_LOC_FILE}" + else + echo "${CUR_DIR}/" > "${PREV_LOC_FILE}" + fi + pushd "${CUR_DIR}" >/dev/null || exit + fi + + printf "..\0icon\x1fup\n" + + if [[ -z "$FD_INSTALLED" ]] + then + #Group directories + if [[ ${SHOW_HIDDEN} == true ]] + then + for i in .*/ + do + [[ -d "${i}" ]] && ([[ "${i}" != "./" ]] && [[ "${i}" != "../"* ]]) && icon_file_type "${i}" + done + fi + for i in */ + do + [[ -d "${i}" ]] && icon_file_type "${i}" + done + #Group files + if [[ ${SHOW_HIDDEN} = true ]] + then + for i in .* + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + fi + for i in * + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + else + THREADS=$(getconf _NPROCESSORS_ONLN) + export CUR_DIR + if [[ ${SHOW_HIDDEN} == true ]] + then + fd -Ht d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -Ht f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + else + fd -t d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -t f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + fi + fi +} + +# Set XDG dir +function return_xdg_dir() { + target_dir=${1^^} + + if [[ "HOME" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir) + + elif [[ "DESKTOP" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DESKTOP) + + elif [[ "DOCUMENTS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOCUMENTS) + + elif [[ "DOWNLOADS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOWNLOAD) + + elif [[ "MUSIC" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir MUSIC) + + elif [[ "PICTURES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PICTURES) + + elif [[ "PUBLICSHARE" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PUBLICSHARE) + + elif [[ "TEMPLATES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir TEMPLATES) + + elif [[ "VIDEOS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir VIDEOS) + + elif [[ "ROOT" == *"${target_dir}"* ]] + then + CUR_DIR="/" + + else + CUR_DIR="${HOME}" + fi + navigate_to + exit; +} + +# Show and Clear History +if [ ! -z "$@" ] && ([[ "$@" == ":sh" ]] || [[ "$@" == ":show_hist" ]]) +then + hist=$(tac "${HIST_FILE}") + + echo -en "Back\0icon\x1fdraw-arrow-back\n" + [ -z "${hist}" ] && echo -en "No History Yet\0icon\x1ftext-plain\n" + + while IFS= read -r line; + do + echo -en "${line}\0icon\x1f${MY_PATH}/icons/history.svg\n"; + done <<< "${hist}" + + exit; +elif [ ! -z "$@" ] && ([[ "$@" == ":ch" ]] || [[ "$@" == ":clear_hist" ]]) +then + :> "${HIST_FILE}" + create_notification "cleared" + + CUR_DIR="${HOME}" + navigate_to + exit; +fi + +# Accepts XDG command +if [[ ! -z "$@" ]] && [[ "$@" == ":xdg"* ]] +then + NEXT_DIR=${*//":xdg "/} + + [[ -n "$NEXT_DIR" ]] && return_xdg_dir "${NEXT_DIR}" || return_xdg_dir "${HOME}" +fi + +# Read last location, otherwise we default to PWD. +[ -f "${PREV_LOC_FILE}" ] && CUR_DIR=$(< "${PREV_LOC_FILE}") + +if [[ ! -z "$@" ]] && ([[ "$@" == ":h" ]] || [[ "$@" == ":hidden" ]]) +then + SHOW_HIDDEN=true + navigate_to + exit; +fi + +# Handle argument. +[ -n "$*" ] && CUR_DIR="${CUR_DIR}/$*" + +# Context Menu +if [ -n "$*" ] && [[ "${ALL_OPTIONS[*]} " = *"$*"* ]] +then + case "${1}" in + "Run" ) + coproc ( eval "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Execute in ${TERM_EMU}" ) + coproc ( eval "${TERM_EMU} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open" ) + coproc ( eval "${OPENER} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${TERM_EMU}" ) + file_path="$(< ${CURRENT_FILE})" + coproc ( ${TERM_EMU} bash -c "cd ${file_path%/*} ; ${SHELL}" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${FILE_MANAGER}" ) + file_path="$(< "${CURRENT_FILE}")" + coproc ( eval "${FILE_MANAGER} "${file_path%/*}"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Edit" ) + coproc ( eval "${TERM_EMU} ${TEXT_EDITOR} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Move to trash" ) + coproc( gio trash "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + create_notification "trashed" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Delete" ) + shred "$(< ${CURRENT_FILE})" + rm "$(< ${CURRENT_FILE})" + create_notification "deleted" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Send via Bluetooth" ) + rfkill unblock bluetooth && bluetoothctl power on + sleep 1 + blueman-sendto "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 + kill -9 $(pgrep rofi) + ;; + "Back" ) + CUR_DIR="$(< ${PREV_LOC_FILE})" + navigate_to + ;; + esac + exit; +fi + +function context_menu_icons() { + + if [[ "${1}" == "Run" ]] + then + echo '\0icon\x1fsystem-run\n' + + elif [[ "${1}" == "Execute in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open" ]] + then + echo "\0icon\x1futilities-x-terminal\n" + + elif [[ "${1}" == "Open file location in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open file location in ${FILE_MANAGER}" ]] + then + echo "\0icon\x1fblue-folder-open\n" + + elif [[ "${1}" == "Edit" ]] + then + echo "\0icon\x1faccessories-text-editor\n" + + elif [[ "${1}" == "Move to trash" ]] + then + echo "\0icon\x1fapplication-x-trash\n" + + elif [[ "${1}" == "Delete" ]] + then + echo "\0icon\x1findicator-trashindicator\n" + + elif [[ "${1}" == "Send via Bluetooth" ]] + then + echo "\0icon\x1fbluetooth\n" + + elif [[ "${1}" == "Back" ]] + then + echo "\0icon\x1fback\n" + fi +} + +function print_context_menu() { + declare -a arg_arr=("${!1}") + + for menu in "${arg_arr[@]}" + do + printf "$menu$(context_menu_icons "${menu}")\n" + done +} + +function context_menu() { + + type="$(file --mime-type -b "${CUR_DIR}")" + + if [ -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + if [ -x "${CUR_DIR}" ]; + then + print_context_menu SHELL_OPTIONS[@] + else + print_context_menu SHELL_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "application/x-executable" ]] || [[ "${type}" == "application/x-pie-executable" ]] + then + if [ -x "${CUR_DIR}" ] + then + print_context_menu BIN_OPTIONS[@] + else + print_context_menu BIN_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "text/plain" ]] + then + print_context_menu TEXT_OPTIONS[@] + + elif [[ "${type}" == "text/html" ]] + then + print_context_menu HTML_OPTIONS[@] + + elif [[ "${type}" == "image/jpeg" ]] || [[ "${type}" == "image/png" ]] + then + print_context_menu IMAGE_OPTIONS[@] + + elif [[ "${type}" == "image/x-xcf" ]] || [[ "${type}" == "image/svg+xml" ]] + then + print_context_menu XCF_SVG_OPTIONS[@] + + elif [ ! -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + coproc ( exec "${CUR_DIR}" & > /dev/null 2>&1 ) + + else + if [ ! -d "${CUR_DIR}" ] && [ ! -f "${CUR_DIR}" ] + then + QUERY="${CUR_DIR//*\/\//}" + + echo "${QUERY}" >> "${HIST_FILE}" + + find_query "${QUERY#!}" + + web_search "!${QUERY}" + else + coproc ( ${OPENER} "${CUR_DIR}" & > /dev/null 2>&1 ) + fi + fi + exit; +} + +# If argument is not a directory/folder +if [ ! -d "${CUR_DIR}" ] +then + echo "${CUR_DIR}" > "${CURRENT_FILE}" + context_menu + exit; +fi + +navigate_to diff --git a/general/configs/rofi/spotlight/rofi.rasi b/general/configs/rofi/spotlight/rofi.rasi new file mode 100755 index 0000000..13fc4fa --- /dev/null +++ b/general/configs/rofi/spotlight/rofi.rasi @@ -0,0 +1,153 @@ +configuration { + font: "Inter Regular 10"; + show-icons: true; + drun-display-format: "{name}"; + fullscreen: false; + threads: 0; + matching: "fuzzy"; + scroll-method: 0; + disable-history: false; + fullscreen: false; + window-thumbnail: true; +} + +* { + background: rgba(5, 0, 52, 1); + foreground: #FFFFFFFF; + background-selected: #F2F2F245; + background-active: #F2F2F230; + background-white: rgba(0, 0, 0, 1); + background-black: rgba(0, 0, 0, 1); + urgent: rgba(5, 0, 52, 1); + urgent-selected: #E91E6377; +} + +window { + background-color: @background; + location: center; + anchor: center; + x-offset: 0px; + height: 50%; + width: 750px; + orientation: vertical; + border-radius: 12px; +} + +prompt { + enabled: false; +} + +button { + action: "ok"; + str: "🔎 "; + font: "FantasqueSansMono Nerd Font 11"; + expand: false; + text-color: @foreground; + background-color: @background; + vertical-align: 0.7; + horizontal-align: 0.5; + border-radius: 15px; +} + +entry { + font: "Inter Regular 11"; + background-color: @background; + text-color: @foreground; + expand: true; + vertical-align: 0.5; + horizontal-align: 0.5; + placeholder: "Type to search"; + placeholder-color: @foreground; + blink: true; +} + +case-indicator { + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +entry-wrapper { + orientation: horizontal; + vertical-align: 0.5; + spacing: 4px; + background-color: @background; + children: [ button, entry, case-indicator ]; +} + +inputbar { + background-color: @background-white; + text-color: @foreground; + expand: false; + border-radius: 24px; + margin: 0px 225px 0px 225px; + padding: 10px 10px 10px 10px; + position: north; + children: [ entry-wrapper ]; +} + +listview { + background-color: @background; + columns: 2; + spacing: 5px; + cycle: false; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background-black; + children: [ inputbar, listview ]; + spacing: 25px; + padding: 40px 25px 25px 25px; +} + +element { + background-color: @background; + text-color: @foreground; + orientation: horizontal; + border-radius: 6px; + padding: 5px 10px 5px 10px; +} + +element-icon { + size: 36px; + border: 0; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0 10px 0 10px; +} + +element normal.urgent, +element alternate.urgent { + str: "t"; + background-color: @urgent; + text-color: @foreground; + border-radius: 9px; +} + +element normal.active, +element alternate.active { + background-color: @background-active; + text-color: @foreground; +} + +element selected { + background-color: @background-selected; + text-color: @foreground; +} + +element selected.urgent { + background-color: @urgent-selected; + text-color: @foreground; +} + +element selected.active { + background-color: @background-active; + color: @foreground-selected; +} diff --git a/general/configs/rofi/spotlight/web-search.py b/general/configs/rofi/spotlight/web-search.py new file mode 100755 index 0000000..936f065 --- /dev/null +++ b/general/configs/rofi/spotlight/web-search.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python3 + +# MIT License + +# Copyright (c) 2019 Paolo Donadeo + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + +import json +import re +import urllib.parse +import urllib.request +import sys +import os +import datetime +import gzip + +import subprocess as sp + +import html + + +################################################################################ +##### C O N F I G U R A T I O N ###### +################################################################################ +SEARCH_ENGINE = 'duckduckgo' # or 'duckduckgo' +BROWSER = 'librewolf' # or 'firefox', 'chromium', 'brave', 'lynx' +TERMINAL = ['terminator', '--'] # or ['st', '-e'] or something like that +################################################################################ + +CONFIG = { + 'BROWSER_PATH' : { + 'chrome' : ['google-chrome-stable'], + 'firefox' : ['firefox'], + 'librewolf' : ['librewolf'], + 'chromium' : ['chromium-browser'], + 'brave' : ['brave-browser'], + 'lynx' : TERMINAL + ['lynx'] + }, + 'USER_AGENT' : { + 'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + 'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0', + 'librewolf' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0', + 'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36', + 'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36', + 'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d' + }, + 'SEARCH_ENGINE_NAME' : { + 'google' : 'Google', + 'duckduckgo' : 'DuckDuckGo' + }, + 'SEARCH_URL' : { + 'google' : 'https://www.google.com/search?q=', + 'duckduckgo' : 'https://duckduckgo.com/?q=' + }, + 'SUGGESTION_URL' : { + 'google' : 'https://www.google.com/complete/search?', + 'duckduckgo' : 'https://duckduckgo.com/ac/?' + } +} + +def cleanhtml(txt): + return re.sub(r'<.*?>', '', txt) + +def fetch_suggestions(search_string): + if SEARCH_ENGINE == 'google': + r = { + 'q' : search_string, + 'cp' : '11', + 'client' : 'psy-ab', + 'xssi' : 't', + 'gs_ri' : 'gws-wiz', + 'hl' : 'en-IT', + 'authuser' : '0' + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + headers = { + 'sec-fetch-mode' : 'cors', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'pragma' : 'no-cache', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'www.google.com', + 'referer' : 'https://www.google.com/', + 'sec-fetch-site' : 'same-origin' + } + req = urllib.request.Request(url, headers=headers, method='GET') + + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).split(b'\n')[1] + reply_data = json.loads(reply_data) + return [ cleanhtml(res[0]).strip() for res in reply_data[0] ] + else: # 'duckduckgo' + if search_string.startswith('!'): + bang_search = True + search_string = search_string.lstrip('!') + else: + bang_search = False + r = { + 'q' : search_string, + 'callback' : 'autocompleteCallback', + 'kl' : 'wt-wt', + '_' : str(int((datetime.datetime.now().timestamp())*1000)) + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + if bang_search: + url = url.replace('?q=', '?q=!') + headers = { + 'pragma' : 'no-cache', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'sec-fetch-mode' : 'no-cors', + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'duckduckgo.com', + 'referer' : 'https://duckduckgo.com/', + 'sec-fetch-site' : 'same-origin', + } + req = urllib.request.Request(url, headers=headers, method='GET') + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).decode('utf8') + reply_data = json.loads(re.match(r'autocompleteCallback\((.*)\);', reply_data).group(1)) + return [ cleanhtml(res['phrase']).strip() for res in reply_data ] + +def main(): + search_string = html.unescape((' '.join(sys.argv[1:])).strip()) + + path_str = os.path.dirname(os.path.realpath(__file__)) + '/' + icon_path_str = path_str + 'icons/' + icon_name = icon_path_str + + if SEARCH_ENGINE == 'google': + icon_name += 'google.svg' + else: + icon_name += 'ddg.svg' + + if search_string.startswith('!'): + search_string = search_string.rstrip('!').strip() + results = fetch_suggestions(search_string) + for r in results: + print(":wb " + html.unescape(r) + "\0icon\x1f"+icon_name+"\n") + else: + url = CONFIG['SEARCH_URL'][SEARCH_ENGINE] + urllib.parse.quote_plus(search_string) + sp.Popen(CONFIG['BROWSER_PATH'][BROWSER] + [url], stdout=sp.DEVNULL, stderr=sp.DEVNULL, shell=False) + +if __name__ == "__main__": + try: + main() + except Exception as e: + if e: + sys.exit(1) diff --git a/general/configs/rofi/themes/arc_dark_transparent_colors.rasi b/general/configs/rofi/themes/arc_dark_transparent_colors.rasi new file mode 100755 index 0000000..4dc8195 --- /dev/null +++ b/general/configs/rofi/themes/arc_dark_transparent_colors.rasi @@ -0,0 +1,34 @@ +/******************************************************* + * ROFI Arch Dark Transparent colors for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +* { + selected-normal-foreground: rgba ( 255, 147, 5, 100 % ); + foreground: rgba ( 196, 203, 212, 100 % ); + normal-foreground: @foreground; + alternate-normal-background: rgba ( 45, 48, 59, 1 % ); + red: rgba ( 220, 50, 47, 100 % ); + selected-urgent-foreground: rgba ( 249, 249, 249, 100 % ); + blue: rgba ( 38, 139, 210, 100 % ); + urgent-foreground: rgba ( 204, 102, 102, 100 % ); + alternate-urgent-background: rgba ( 75, 81, 96, 90 % ); + active-foreground: rgba ( 101, 172, 255, 100 % ); + lightbg: rgba ( 238, 232, 213, 100 % ); + selected-active-foreground: rgba ( 249, 249, 249, 100 % ); + alternate-active-background: rgba ( 45, 48, 59, 88 % ); + background: rgba ( 45, 48, 59, 88 % ); + alternate-normal-foreground: @foreground; + normal-background: rgba ( 45, 48, 59, 1 % ); + lightfg: rgba ( 88, 104, 117, 100 % ); + selected-normal-background: rgba ( 24, 26, 32, 100 % ); + border-color: rgba ( 124, 131, 137, 100 % ); + spacing: 2; + separatorcolor: rgba ( 45, 48, 59, 1 % ); + urgent-background: rgba ( 45, 48, 59, 15 % ); + selected-urgent-background: rgba ( 165, 66, 66, 100 % ); + alternate-urgent-foreground: @urgent-foreground; + background-color: rgba ( 0, 0, 0, 0 % ); + alternate-active-foreground: @active-foreground; + active-background: rgba ( 29, 31, 33, 17 % ); + selected-active-background: rgba ( 26, 28, 35, 100 % ); +} diff --git a/general/configs/rofi/themes/defaultTheme.rasi b/general/configs/rofi/themes/defaultTheme.rasi new file mode 100755 index 0000000..7d4774c --- /dev/null +++ b/general/configs/rofi/themes/defaultTheme.rasi @@ -0,0 +1,78 @@ +* { + background: rgba(0, 30, 50, 1); + foreground: #ffffff; + border-color: @background; + bg-selected: #282c34; + grey: #565c64; + spacing: 2; + width: 30em; + margin: 0; + padding: 0; +} + +#window { + background-color: @background; + border: 0; + padding: 0; + location: west; + anchor: west; + height: 70%; + margin: 0; +} + +#mainbox { + background-color: @background; + spacing: 10px; + margin: 10px 0 0 0; + width: 200px; +} + +#inputbar { + children: [prompt,entry]; + background-color: @background; +} + +#listview { + background-color: @background; + fixed-height: true; + margin: 5px 0 0 10px; +} + +#element { + padding: 5px; + background-color: @background; + text-color: @foreground; +} + +element selected { + background-color: @bg-selected; + text-color: @foreground; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element-icon { + background-color: inherit; + margin: 0 4px 0 0; + size: 25px; +} + +#entry { + background-color: @background; + text-color: @foreground; + placeholder: "Search"; + placeholder-color: @grey; + font: "Sora Regular 20"; +} + +#prompt { + background-color: @background; + padding: 0 4px; + margin: 0 5px 0 0; + text-color: @foreground; + font: "Sora Regular 20"; +} + diff --git a/general/configs/rofi/themes/mcLarenTheme.rasi b/general/configs/rofi/themes/mcLarenTheme.rasi new file mode 100644 index 0000000..9db5700 --- /dev/null +++ b/general/configs/rofi/themes/mcLarenTheme.rasi @@ -0,0 +1,82 @@ +* { + background: rgba(0, 0, 0, 1); + foreground: #ffffff; + mclaren: #cc5c00; + border-color: @mclaren; + bg-selected: #282c34; + grey: #565c64; + spacing: 2; + width: 30em; + margin: 0; + padding: 0; +} + +#window { + background-color: @background; + border-color: @mclaren; + border: 1px; + border-radius: 10px; + padding: 0; + location: west; + anchor: west; + margin: 0; +} + +#mainbox { + background-color: @background; + spacing: 10px; + margin: 10px 0 0 0; + width: 200px; +} + +#inputbar { + children: [prompt,entry]; + background-color: @background; +} + +#listview { + background-color: @background; + fixed-height: true; + margin: 5px 0 0 10px; +} + +#element { + padding: 5px; + background-color: @background; + text-color: @foreground; +} + +element selected { + background-color: @bg-selected; + text-color: @mclaren; + border: 1px; + border-radius: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element-icon { + background-color: inherit; + margin: 0 4px 0 0; + size: 25px; +} + +#entry { + background-color: @background; + text-color: @mclaren; + placeholder: "Search"; + placeholder-color: @grey; + font: "Sora Regular 20"; +} + +#prompt { + background-color: @background; + padding: 0 4px; + margin: 0 5px 0 0; + text-color: @foreground; + font: "Sora Regular 20"; +} + diff --git a/general/configs/rofi/themes/nord.rasi b/general/configs/rofi/themes/nord.rasi new file mode 100755 index 0000000..e81b5eb --- /dev/null +++ b/general/configs/rofi/themes/nord.rasi @@ -0,0 +1,127 @@ +/** + * Nordic rofi theme + * Adapted by undiabler + * + * Nord Color palette imported from https://www.nordtheme.com/ + * + */ + + +* { + nord0: #2e3440; + nord1: #3b4252; + nord2: #434c5e; + nord3: #4c566a; + + nord4: #d8dee9; + nord5: #e5e9f0; + nord6: #eceff4; + + nord7: #8fbcbb; + nord8: #88c0d0; + nord9: #81a1c1; + nord10: #5e81ac; + nord11: #bf616a; + + nord12: #d08770; + nord13: #ebcb8b; + nord14: #a3be8c; + nord15: #b48ead; + + foreground: @nord9; + backlight: #ccffeedd; + background-color: transparent; + + highlight: underline bold #eceff4; + + transparent: rgba(46,52,64,0); +} + +window { + location: center; + anchor: center; + transparency: "screenshot"; + padding: 10px; + border: 0px; + border-radius: 6px; + + background-color: @transparent; + spacing: 0; + children: [mainbox]; + orientation: horizontal; +} + +mainbox { + spacing: 0; + children: [ inputbar, message, listview ]; +} + +message { + color: @nord0; + padding: 5; + border-color: @foreground; + border: 0px 2px 2px 2px; + background-color: @nord7; +} + +inputbar { + color: @nord6; + padding: 11px; + background-color: #3b4252; + + border: 1px; + border-radius: 6px 6px 0px 0px; + border-color: @nord10; +} + +entry, prompt, case-indicator { + text-font: inherit; + text-color:inherit; +} + +prompt { + margin: 0px 1em 0em 0em ; +} + +listview { + padding: 8px; + border-radius: 0px 0px 6px 6px; + border-color: @nord10; + border: 0px 1px 1px 1px; + background-color: rgba(46,52,64,0.9); + dynamic: false; +} + +element { + padding: 3px; + vertical-align: 0.5; + border-radius: 4px; + background-color: transparent; + color: @foreground; + text-color: rgb(216, 222, 233); +} + +element selected.normal { + background-color: @nord7; + text-color: #2e3440; +} + +element-text, element-icon { + background-color: inherit; + text-color: inherit; +} + +button { + padding: 6px; + color: @foreground; + horizontal-align: 0.5; + + border: 2px 0px 2px 2px; + border-radius: 4px 0px 0px 4px; + border-color: @foreground; +} + +button selected normal { + border: 2px 0px 2px 2px; + border-color: @foreground; +} \ No newline at end of file diff --git a/general/configs/rofi/themes/power.rasi b/general/configs/rofi/themes/power.rasi new file mode 100755 index 0000000..8c70407 --- /dev/null +++ b/general/configs/rofi/themes/power.rasi @@ -0,0 +1,78 @@ +* { + background: rgba(0, 30, 50, 1); + foreground: #ffffff; + border-color: @background; + bg-selected: #282c34; + grey: #565c64; + spacing: 2; + width: 20em; + margin: 0; + padding: 0; +} + +#window { + background-color: @background; + border: 0; + padding: 0; + location: west; + anchor: west; + height: 40%; + margin: 0; +} + +#mainbox { + background-color: @background; + spacing: 10px; + margin: 10px 0 0 0; + width: 200px; +} + +#inputbar { + children: [prompt,entry]; + background-color: @background; +} + +#listview { + background-color: @background; + fixed-height: true; + margin: 5px 0 0 10px; +} + +#element { + padding: 5px; + background-color: @background; + text-color: @foreground; +} + +element selected { + background-color: @bg-selected; + text-color: @foreground; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element-icon { + background-color: inherit; + margin: 0 4px 0 0; + size: 25px; +} + +#entry { + background-color: @background; + text-color: @foreground; + placeholder: "Search"; + placeholder-color: @grey; + font: "Sora Regular 20"; +} + +#prompt { + background-color: @background; + padding: 0 4px; + margin: 0 5px 0 0; + text-color: @foreground; + font: "Sora Regular 20"; +} + diff --git a/general/configs/rofi/themes/runnerTheme.rasi b/general/configs/rofi/themes/runnerTheme.rasi new file mode 100755 index 0000000..7d4774c --- /dev/null +++ b/general/configs/rofi/themes/runnerTheme.rasi @@ -0,0 +1,78 @@ +* { + background: rgba(0, 30, 50, 1); + foreground: #ffffff; + border-color: @background; + bg-selected: #282c34; + grey: #565c64; + spacing: 2; + width: 30em; + margin: 0; + padding: 0; +} + +#window { + background-color: @background; + border: 0; + padding: 0; + location: west; + anchor: west; + height: 70%; + margin: 0; +} + +#mainbox { + background-color: @background; + spacing: 10px; + margin: 10px 0 0 0; + width: 200px; +} + +#inputbar { + children: [prompt,entry]; + background-color: @background; +} + +#listview { + background-color: @background; + fixed-height: true; + margin: 5px 0 0 10px; +} + +#element { + padding: 5px; + background-color: @background; + text-color: @foreground; +} + +element selected { + background-color: @bg-selected; + text-color: @foreground; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element-icon { + background-color: inherit; + margin: 0 4px 0 0; + size: 25px; +} + +#entry { + background-color: @background; + text-color: @foreground; + placeholder: "Search"; + placeholder-color: @grey; + font: "Sora Regular 20"; +} + +#prompt { + background-color: @background; + padding: 0 4px; + margin: 0 5px 0 0; + text-color: @foreground; + font: "Sora Regular 20"; +} + diff --git a/general/configs/rofi/themes/sidetab-nord.rasi b/general/configs/rofi/themes/sidetab-nord.rasi new file mode 100755 index 0000000..49a1f49 --- /dev/null +++ b/general/configs/rofi/themes/sidetab-nord.rasi @@ -0,0 +1,78 @@ +* { + background: #1e222a; + foreground: #E5E9F0; + border-color: @background; + bg-selected: #282c34; + grey: #565c64; + spacing: 2; + width: 30em; + margin: 0; + padding: 0; +} + +#window { + background-color: @background; + border: 0; + padding: 0; + location: west; + anchor: west; + height: 100%; + margin: 0; +} + +#mainbox { + background-color: @background; + spacing: 10px; + margin: 10px 0 0 0; + width: 200px; +} + +#inputbar { + children: [prompt,entry]; + background-color: @background; +} + +#listview { + background-color: @background; + fixed-height: true; + margin: 5px 0 0 10px; +} + +#element { + padding: 5px; + background-color: @background; + text-color: @foreground; +} + +element selected { + background-color: @bg-selected; + text-color: @foreground; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element-icon { + background-color: inherit; + margin: 0 4px 0 0; + size: 25px; +} + +#entry { + background-color: @background; + text-color: @foreground; + placeholder: "Search"; + placeholder-color: @grey; + font: "Sora Regular 20"; +} + +#prompt { + background-color: @background; + padding: 0 4px; + margin: 0 5px 0 0; + text-color: @foreground; + font: "Sora Regular 20"; +} + diff --git a/general/configs/rofi/themes/sidetab.rasi b/general/configs/rofi/themes/sidetab.rasi new file mode 100755 index 0000000..507e3c4 --- /dev/null +++ b/general/configs/rofi/themes/sidetab.rasi @@ -0,0 +1,135 @@ +/******************************************************* + * ROFI configs i3 Apps menu for EndeavourOS + * Maintainer: joekamprad + *******************************************************/ +configuration { + font: "Sourcecode Pro Regular 10"; + show-icons: true; + icon-theme: "Arc-X-D"; + display-drun: "Apps"; + drun-display-format: "{name}"; + scroll-method: 0; + disable-history: false; + sidebar-mode: false; +} + +@import "~/.config/rofi/arc_dark_transparent_colors.rasi" + +window { + background-color: @background; + border: 0; + padding: 30; +} +listview { + lines: 10; + columns: 3; +} +mainbox { + border: 0; + padding: 0; +} +message { + border: 2px 0px 0px ; + border-color: @separatorcolor; + padding: 1px ; +} +textbox { + text-color: @foreground; +} +listview { + fixed-height: 0; + border: 8px 0px 0px ; + border-color: @separatorcolor; + spacing: 8px ; + scrollbar: false; + padding: 2px 0px 0px ; +} +element { + border: 0; + padding: 1px ; +} +element-text { + background-color: inherit; + text-color: inherit; +} +element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +scrollbar { + width: 4px ; + border: 0; + handle-color: @normal-foreground; + handle-width: 8px ; + padding: 0; +} +mode-switcher { + border: 2px 0px 0px ; + border-color: @separatorcolor; +} +button { + spacing: 0; + text-color: @normal-foreground; +} +button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px ; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + spacing: 0; + text-color: @normal-foreground; +} +prompt { + spacing: 0; + text-color: @normal-foreground; +} +inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em ; + text-color: @normal-foreground; +} \ No newline at end of file diff --git a/general/configs/terminator/config b/general/configs/terminator/config new file mode 100755 index 0000000..6a401a1 --- /dev/null +++ b/general/configs/terminator/config @@ -0,0 +1,21 @@ +[global_config] +[keybindings] +[profiles] + [[default]] + background_darkness = 0.9 + background_type = transparent + font = Source Code Pro 10 + foreground_color = "#cc5c00" + custom_command = fish + use_system_font = False + title_transmit_fg_color = "#000000" + title_transmit_bg_color = "#cc5c00" +[layouts] + [[default]] + [[[window0]]] + type = Window + parent = "" + [[[child1]]] + type = Terminal + parent = window0 +[plugins] diff --git a/general/configs/wlogout/default-style.css b/general/configs/wlogout/default-style.css new file mode 100644 index 0000000..56a3578 --- /dev/null +++ b/general/configs/wlogout/default-style.css @@ -0,0 +1,60 @@ +window { + font-family: monospace; + font-size: 14pt; + color: #ffffff; /* text */ + background-color: rgba(1, 9, 36, 0.5); +} + +button { + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + border: none; + background-color: rgba(30, 30, 46, 0); + margin: 5px; + transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; +} + +button:hover { + background-color: rgba(0, 94, 31, 0.2); +} + +button:focus { + background-color: rgba(0, 94, 31, 1); + color: #1e1e2e; +} + +#lock { + background-image: image(url("./lock.png")); +} +#lock:focus { + background-image: image(url("./lock-hover.png")); +} + +#logout { + background-image: image(url("./logout.png")); +} +#logout:focus { + background-image: image(url("./logout-hover.png")); +} + +#suspend { + background-image: image(url("./sleep.png")); +} +#suspend:focus { + background-image: image(url("./sleep-hover.png")); +} + +#shutdown { + background-image: image(url("./power.png")); +} +#shutdown:focus { + background-image: image(url("./power-hover.png")); +} + +#reboot { + background-image: image(url("./restart.png")); +} +#reboot:focus { + background-image: image(url("./restart-hover.png")); +} diff --git a/general/configs/wlogout/layout b/general/configs/wlogout/layout new file mode 100755 index 0000000..86b2184 --- /dev/null +++ b/general/configs/wlogout/layout @@ -0,0 +1,30 @@ +{ + "label" : "lock", + "action" : "hyprlock", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "logout", + "action" : "hyprctl dispatch exit 0", + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u" +} diff --git a/general/configs/wlogout/lock-hover.png b/general/configs/wlogout/lock-hover.png new file mode 100755 index 0000000..8fb86fe Binary files /dev/null and b/general/configs/wlogout/lock-hover.png differ diff --git a/general/configs/wlogout/lock.png b/general/configs/wlogout/lock.png new file mode 100755 index 0000000..430451c Binary files /dev/null and b/general/configs/wlogout/lock.png differ diff --git a/general/configs/wlogout/logout-hover.png b/general/configs/wlogout/logout-hover.png new file mode 100755 index 0000000..9e570a9 Binary files /dev/null and b/general/configs/wlogout/logout-hover.png differ diff --git a/general/configs/wlogout/logout.png b/general/configs/wlogout/logout.png new file mode 100755 index 0000000..128c995 Binary files /dev/null and b/general/configs/wlogout/logout.png differ diff --git a/general/configs/wlogout/mclaren-style.css b/general/configs/wlogout/mclaren-style.css new file mode 100644 index 0000000..e69de29 diff --git a/general/configs/wlogout/power-hover.png b/general/configs/wlogout/power-hover.png new file mode 100755 index 0000000..122d331 Binary files /dev/null and b/general/configs/wlogout/power-hover.png differ diff --git a/general/configs/wlogout/power.png b/general/configs/wlogout/power.png new file mode 100755 index 0000000..ce56166 Binary files /dev/null and b/general/configs/wlogout/power.png differ diff --git a/general/configs/wlogout/restart-hover.png b/general/configs/wlogout/restart-hover.png new file mode 100755 index 0000000..3e18536 Binary files /dev/null and b/general/configs/wlogout/restart-hover.png differ diff --git a/general/configs/wlogout/restart.png b/general/configs/wlogout/restart.png new file mode 100755 index 0000000..7855d40 Binary files /dev/null and b/general/configs/wlogout/restart.png differ diff --git a/general/configs/wlogout/sleep-hover.png b/general/configs/wlogout/sleep-hover.png new file mode 100755 index 0000000..0fd3bad Binary files /dev/null and b/general/configs/wlogout/sleep-hover.png differ diff --git a/general/configs/wlogout/sleep.png b/general/configs/wlogout/sleep.png new file mode 100755 index 0000000..6a3d607 Binary files /dev/null and b/general/configs/wlogout/sleep.png differ diff --git a/general/configs/wlogout/style.css b/general/configs/wlogout/style.css new file mode 100755 index 0000000..48b3a11 --- /dev/null +++ b/general/configs/wlogout/style.css @@ -0,0 +1,60 @@ +window { + font-family: monospace; + font-size: 14pt; + color: #ffffff; /* text */ + background-color: rgba(0, 0, 0, 0.6); +} + +button { + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + border: none; + background-color: rgba(30, 30, 46, 0); + margin: 5px; + transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; +} + +button:hover { + background-color: rgba(204, 92, 0, 0.3); +} + +button:focus { + background-color: #cc5c00; + color: #1e1e2e; +} + +#lock { + background-image: image(url("./lock.png")); +} +#lock:focus { + background-image: image(url("./lock-hover.png")); +} + +#logout { + background-image: image(url("./logout.png")); +} +#logout:focus { + background-image: image(url("./logout-hover.png")); +} + +#suspend { + background-image: image(url("./sleep.png")); +} +#suspend:focus { + background-image: image(url("./sleep-hover.png")); +} + +#shutdown { + background-image: image(url("./power.png")); +} +#shutdown:focus { + background-image: image(url("./power-hover.png")); +} + +#reboot { + background-image: image(url("./restart.png")); +} +#reboot:focus { + background-image: image(url("./restart-hover.png")); +} diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE b/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE new file mode 100644 index 0000000..9a5124e --- /dev/null +++ b/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 - sxyazi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme b/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme new file mode 100644 index 0000000..44b4479 --- /dev/null +++ b/general/configs/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Himanshu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/README.md b/general/configs/yazi/flavors/tokyo-night.yazi/README.md new file mode 100644 index 0000000..ec2a2e6 --- /dev/null +++ b/general/configs/yazi/flavors/tokyo-night.yazi/README.md @@ -0,0 +1,37 @@ +
+ Yazi logo +
+ +

+ Tokyo Night Flavor for Yazi +

+ +## 👀 Preview + + + +## 🎨 Installation + +```bash +# Linux/macOS +git clone https://github.com/BennyOe/tokyo-night.yazi.git ~/.config/yazi/flavors/tokyo-night.yazi + +# Windows +git clone https://github.com/BennyOe/tokyo-night.yazi.git %AppData%\yazi\config\flavors\tokyo-night.yazi +``` + +## ⚙️ Usage + +Add the these lines to your `theme.toml` configuration file to use it: + + +```toml +[flavor] +use = "tokyo-night" +``` + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/flavor.toml b/general/configs/yazi/flavors/tokyo-night.yazi/flavor.toml new file mode 100644 index 0000000..c6d3303 --- /dev/null +++ b/general/configs/yazi/flavors/tokyo-night.yazi/flavor.toml @@ -0,0 +1,167 @@ +# : Manager {{{ + +[manager] +cwd = { fg = "#7aa2f7" } # Blue + +# Hovered +hovered = { reversed = true } +preview_hovered = { underline = true } + +# Find +find_keyword = { fg = "#f7768e", bold = true, italic = true, underline = true } # Red +find_position = { fg = "#bb9af7", bg = "reset", bold = true, italic = true } # Magenta + +# Marker +marker_copied = { fg = "#9ece6a", bg = "#9ece6a" } # Green +marker_cut = { fg = "#e0af68", bg = "#f7768e" } # Red +marker_marked = { fg = "#7aa2f7", bg = "#7dcfff" } # Cyan +marker_selected = { fg = "#e0af68", bg = "#e0af68" } # Yellow + +# Tab +tab_active = { bg = "#282C34", fg = "#7aa2f7" } # Darkened background, Blue text +tab_inactive = {} +tab_width = 1 + +# Count +count_copied = { fg = "#414868", bg = "#9ece6a" } # Darkened black on Green +count_cut = { fg = "#414868", bg = "#e0af68" } # Darkened black on Yellow +count_selected = { fg = "#414868", bg = "#7aa2f7" } # Darkened black on Blue + +# Border +border_symbol = "│" +border_style = { fg = "#414868" } # Darkened black + +# : }}} + + +# : Status {{{ + +[status] +separator_open = "" +separator_close = "" +separator_style = { fg = "#7aa2f7", bg = "#414868" } # Blue on Darkened black + +# Mode +mode_normal = { fg = "#414868", bg = "#7aa2f7", bold = true } # Darkened black on Blue +mode_select = { fg = "#414868", bg = "#9ece6a", bold = true } # Darkened black on Green +mode_unset = { fg = "#414868", bg = "#bb9af7", bold = true } # Darkened black on Magenta + +# Progress +progress_label = { fg = "#a9b1d6", bold = true } # White +progress_normal = { fg = "#7aa2f7", bg = "#414868" } # Blue on Darkened black +progress_error = { fg = "#f7768e", bg = "#414868" } # Red on Darkened black + +# Permissions +permissions_t = { fg = "#7aa2f7" } # Blue +permissions_r = { fg = "#9ece6a" } # Green +permissions_w = { fg = "#e0af68" } # Yellow +permissions_x = { fg = "#f7768e" } # Red +permissions_s = { fg = "#bb9af7" } # Magenta + +# : }}} + + +# : Select {{{ + +[select] +border = { fg = "#7aa2f7" } # Blue +active = { fg = "#bb9af7", bold = true } # Magenta +inactive = {} + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#7aa2f7" } # Blue +title = {} +value = {} +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[completion] +border = { fg = "#7aa2f7" } # Blue + +# : }}} + + +# : Tasks {{{ + +[tasks] +border = { fg = "#7aa2f7" } # Blue +title = {} +hovered = { fg = "#bb9af7", underline = true } # Magenta + +# : }}} +# : Which {{{ + +[which] +mask = { bg = "#414868" } # Darkened black +cand = { fg = "#9ece6a" } # Green +rest = { fg = "#a9b1d6" } # White +desc = { fg = "#bb9af7" } # Magenta +separator = "  " +separator_style = { fg = "#626880" } # Darkened gray + +# : }}} + + +# : Help {{{ + +[help] +on = { fg = "#9ece6a" } # Green +run = { fg = "#bb9af7" } # Magenta +hovered = { reversed = true, bold = true } +footer = { fg = "#a9b1d6", bg = "#c6d0f5" } # White on Light gray + +# : }}} + + +# : Notify {{{ + +[notify] +title_info = { fg = "#9ece6a" } # Green +title_warn = { fg = "#f7768e" } # Red +title_error = { fg = "#e0af68" } # Yellow + +# : }}} + + +# : File-specific styles {{{ + +[filetype] + +rules = [ + # Images + { mime = "image/*", fg = "#e0af68" }, # Yellow + + # Media + { mime = "video/*", fg = "#f7768e" }, # Red + { mime = "audio/*", fg = "#f7768e" }, # Red + + # Archives + { mime = "application/zip", fg = "#bb9af7" }, # Magenta + { mime = "application/x-tar", fg = "#bb9af7" }, # Magenta + { mime = "application/x-bzip*", fg = "#bb9af7" }, # Magenta + { mime = "application/x-bzip2", fg = "#bb9af7" }, # Magenta + { mime = "application/x-7z-compressed", fg = "#bb9af7" }, # Magenta + { mime = "application/x-rar", fg = "#bb9af7" }, # Magenta + { mime = "application/x-xz", fg = "#bb9af7" }, # Magenta + + # Documents + { mime = "application/doc", fg = "#9ece6a" }, # Green + { mime = "application/pdf", fg = "#9ece6a" }, # Green + { mime = "application/rtf", fg = "#9ece6a" }, # Green + { mime = "application/vnd.*", fg = "#9ece6a" }, # Green + + # Fallback + { name = "*", fg = "#c6d0f5" }, # Light gray + { name = "*/", fg = "#7aa2f7" } # Blue +] + +# : }}} diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/preview.png b/general/configs/yazi/flavors/tokyo-night.yazi/preview.png new file mode 100644 index 0000000..75f2f4a Binary files /dev/null and b/general/configs/yazi/flavors/tokyo-night.yazi/preview.png differ diff --git a/general/configs/yazi/flavors/tokyo-night.yazi/tmtheme.xml b/general/configs/yazi/flavors/tokyo-night.yazi/tmtheme.xml new file mode 100644 index 0000000..21d2163 --- /dev/null +++ b/general/configs/yazi/flavors/tokyo-night.yazi/tmtheme.xml @@ -0,0 +1,1329 @@ + + + + + author + Kristi Russell (http://github.com/enkia) + colorSpaceName + sRGB + name + Enki-Tokyo-Night + semanticClass + enki.theme.tokyo + settings + + + settings + + activeGuide + #363b54 + background + #1d1f29 + caret + #DBC08A + findHighlight + #ffa300 + findHighlightForeground + #000000 + foreground + #AFBAD4ff + guide + #4f4f5e40 + gutterForeground + #3b415caa + inactiveSelection + #282833 + invisibles + #4f4f5e + lineHighlight + #00000030 + phantomCss + <![CDATA[ html { position: relative; } ]]> + popupCss + <![CDATA[ html { color: #B376B3; background-color: #2b2d3a; padding: 10px; } a { color: #6189BB; line-height: 1.2; text-decoration: none; } .error, .deleted { color: #50B4DC; } .success, .inserted { color: #9DBA72; } .warning, .modified { color: #ffa300; } ]]> + selection + #9D599D40 + selectionBorder + #9D599D + shadow + #00000010 + stackGuide + #4f4f5e60 + tagsOptions + underline + + + + name + Italics - Comments, Storage, Keyword Flow, Vue attributes, Decorators + scope + comment, meta.var.expr storage.type, keyword.control.flow, meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html, tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js, storage.modifier + settings + + fontStyle + italic + + + + name + Comment + scope + comment, comment.block.documentation, punctuation.definition.comment + settings + + foreground + #444b6a + + + + name + Comment Doc + scope + comment.block.documentation variable, comment.block.documentation storage, comment.block.documentation punctuation, comment.block.documentation keyword, comment.block.documentation support, comment.block.documentation markup, comment.block.documentation markup.inline.raw.string.markdown, keyword.other.phpdoc.php + settings + + foreground + #7982a9 + + + + name + Number, Boolean, Undefined, Null + scope + variable.other.constant, punctuation.definition.constant, constant.language, constant.numeric, support.constant + settings + + foreground + #ff9e64 + + + + name + String, Symbols, Markup Heading + scope + string, constant.other.symbol, constant.other.key, markup.heading, meta.attribute-selector + settings + + fontStyle + + foreground + #9ece6a + + + + name + Colors + scope + constant.other.color, constant.other.color.rgb-value.hex punctuation.definition.constant + settings + + foreground + #9aa5ce + + + + name + Invalid + scope + invalid, invalid.illegal + settings + + foreground + #ff5370 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #bb9af7 + + + + name + Storage Type + scope + storage.type + settings + + foreground + #bb9af7 + + + + name + Storage - modifier, var, const, let + scope + meta.var.expr storage.type, storage.modifier + settings + + foreground + #9d7cd8 + + + + name + Interpolation + scope + punctuation.definition.template-expression, punctuation.section.embedded + settings + + foreground + #7dcfff + + + + name + Spread + scope + keyword.operator.spread, keyword.operator.rest + settings + + fontStyle + bold + foreground + #f7768e + + + + name + Operator, Misc + scope + keyword.operator, keyword.control.as, keyword.other, keyword.operator.bitwise.shift, punctuation, punctuation.definition.constant.markdown, punctuation.definition.string, punctuation.support.type.property-name, text.html.vue-html meta.tag, punctuation.definition.keyword, punctuation.terminator.rule, punctuation.definition.entity, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, keyword.other.template, keyword.other.substitution, entity.name.operator, text.html.vue meta.tag.block.any.html, text.html.vue meta.tag.inline.any.html, text.html.vue meta.tag.other.html, text.html.twig meta.tag.inline.any.html, text.html.twig meta.tag.block.any.html, text.html.twig meta.tag.structure.any.html, text.html.twig meta.tag.any.html + settings + + foreground + #89ddff + + + + name + Import, Export, From, Default + scope + keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.default, meta.import keyword.other + settings + + foreground + #7dcfff + + + + name + Keyword + scope + keyword, keyword.control, keyword.other.important + settings + + foreground + #bb9af7 + + + + name + Keyword SQL + scope + keyword.other.DML + settings + + foreground + #7dcfff + + + + name + Keyword Operator Logical, Arrow, Ternary, Comparison + scope + keyword.operator.logical, storage.type.function, keyword.operator.bitwise, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.relational, keyword.operator.or.regexp + settings + + foreground + #bb9af7 + + + + name + Tag + scope + entity.name.tag, entity.name.tag support.class.component, meta.tag + settings + + foreground + #f7768e + + + + name + Tag Punctuation + scope + punctuation.definition.tag, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html + settings + + foreground + #ba3c97 + + + + name + Blade + scope + keyword.blade, entity.name.function.blade + settings + + foreground + #7aa2f7 + + + + name + PHP - Embedded Tag + scope + punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php + settings + + foreground + #0db9d7 + + + + name + Smarty - Twig tag - Blade + scope + punctuation.definition.variable.smarty, punctuation.section.embedded.begin.smarty, punctuation.section.embedded.end.smarty, meta.tag.template.value.twig, punctuation.section.tag.twig, meta.tag.expression.twig, punctuation.definition.tag.expression.twig, punctuation.definition.tag.output.twig, variable.parameter.smarty + settings + + foreground + #7DCFFF + + + + name + Smarty - Twig variable - function + scope + variable.other.property.twig, support.function.twig, meta.function-call.twig, keyword.control.twig, keyword.control.smarty, keyword.operator.other.twig, keyword.operator.comparison.twig, support.function.functions.twig, support.function.functions.twig, keyword.operator.assignment.twig, support.function.filters.twig, support.function.built-in.smarty, keyword.operator.smarty, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php entity.name.tag.block.any.html, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php constant.other.inline-data.html, text.blade text.html.blade custom.compiler.blade.php support.function constant.other.inline-data.html + settings + + foreground + #0db9d7 + + + + name + Globals - PHP Constants etc + scope + constant.other.php, variable.other.global.safer, variable.other.global.safer punctuation.definition.variable, variable.other.global, variable.other.global punctuation.definition.variable, constant.other + settings + + foreground + #e0af68 + + + + name + Variables + scope + variable, support.variable, string constant.other.placeholder + settings + + foreground + #c0caf5 + + + + name + Object Variable + scope + variable.other.object, support.module.node + settings + + foreground + #c0caf5 + + + + name + Object Key + scope + meta.object-literal.key, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js, string.alias.graphql, string.unquoted.graphql, string.unquoted.alias.graphql, meta.field.declaration.ts variable.object.property + settings + + foreground + #73daca + + + + name + Object Property + scope + variable.other.property, support.variable.property, support.variable.property.dom, meta.function-call variable.other.object.property, variable.language.prototype, meta.property.object, variable.other.member + settings + + foreground + #7dcfff + + + + name + Object Property + scope + variable.other.object.property + settings + + foreground + #c0caf5 + + + + name + Object Literal Member lvl 3 (Vue Prop Validation) + scope + meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.object-literal.key + settings + + foreground + #41a6b5 + + + + name + C-related Block Level Variables + scope + source.cpp meta.block variable.other + settings + + foreground + #f7768e + + + + name + Other Variable + scope + support.other.variable + settings + + foreground + #f7768e + + + + name + Methods + scope + meta.class-method.js entity.name.function.js, entity.name.method.js, variable.function.constructor, keyword.other.special-method, storage.type.cs + settings + + foreground + #7aa2f7 + + + + name + Function Definition + scope + entity.name.function, meta.function-call, meta.function-call entity.name.function, variable.function, meta.definition.method entity.name.function, meta.object-literal entity.name.function + settings + + foreground + #7aa2f7 + + + + name + Function Argument + scope + variable.parameter.function.language.special, variable.parameter, meta.function.parameters punctuation.definition.variable, meta.function.parameter variable + settings + + foreground + #e0af68 + + + + name + Constant, Tag Attribute + scope + keyword.other.type.php, storage.type.php, constant.character, constant.escape, keyword.other.unit + settings + + foreground + #bb9af7 + + + + name + Variable Definition + scope + meta.definition.variable variable.other.constant, meta.definition.variable variable.other.readwrite, variable.other.declaration + settings + + foreground + #bb9af7 + + + + name + Inherited Class + scope + entity.other.inherited-class + settings + + fontStyle + + foreground + #bb9af7 + + + + name + Class, Support, DOM, etc + scope + support.class, support.type, variable.other.readwrite.alias, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, support.type.sys-types, support.variable.dom, support.constant.math, support.type.object.module, support.constant.json, entity.name.namespace, meta.import.qualifier, entity.name.class + settings + + foreground + #0db9d7 + + + + name + Class Name + scope + entity.name + settings + + foreground + #c0caf5 + + + + name + Support Function + scope + support.function + settings + + foreground + #0db9d7 + + + + name + CSS Class and Support + scope + source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name, support.type.property-name.css, support.type.vendored.property-name, support.type.map.key + settings + + foreground + #7aa2f7 + + + + name + CSS Font + scope + support.constant.font-name, meta.definition.variable + settings + + foreground + #9ece6a + + + + name + CSS Class + scope + entity.other.attribute-name.class, meta.at-rule.mixin.scss entity.name.function.scss + settings + + foreground + #9ece6a + + + + name + CSS ID + scope + entity.other.attribute-name.id + settings + + foreground + #fc7b7b + + + + name + CSS Tag + scope + entity.name.tag.css, entity.name.tag.reference, entity.name.tag.scss + settings + + foreground + #0db9d7 + + + + name + CSS Tag Reference + scope + entity.name.tag.reference + settings + + foreground + #e0af68 + + + + name + CSS Property Separator + scope + meta.property-list punctuation.separator.key-value + settings + + foreground + #9abdf5 + + + + name + CSS Punctuation + scope + meta.property-list, punctuation.definition.entity.css + settings + + foreground + #e0af68 + + + + name + SCSS @ + scope + meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.include entity.name.function.scss, meta.at-rule.include keyword.control.at-rule.include + settings + + foreground + #bb9af7 + + + + name + SCSS Mixins, Extends, Include Keyword + scope + keyword.control.at-rule.include punctuation.definition.keyword, keyword.control.at-rule.mixin punctuation.definition.keyword, meta.at-rule.include keyword.control.at-rule.include, keyword.control.at-rule.extend punctuation.definition.keyword, meta.at-rule.extend keyword.control.at-rule.extend, entity.other.attribute-name.placeholder.css punctuation.definition.entity.css, meta.at-rule.media keyword.control.at-rule.media, meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.function keyword.control.at-rule.function, keyword.control punctuation.definition.keyword, meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss, meta.at-rule.import.scss keyword.control.at-rule.import.scss + settings + + foreground + #9d7cd8 + + + + name + SCSS Include Mixin Argument + scope + meta.property-list meta.at-rule.include + settings + + foreground + #c0caf5 + + + + name + CSS value + scope + support.constant.property-value + settings + + foreground + #ff9e64 + + + + name + Sub-methods + scope + entity.name.module.js, variable.import.parameter.js, variable.other.class.js + settings + + foreground + #c0caf5 + + + + name + Language methods + scope + variable.language + settings + + foreground + #f7768e + + + + name + Variable punctuation + scope + variable.other punctuation.definition.variable + settings + + foreground + #c0caf5 + + + + name + Keyword this with Punctuation, ES7 Bind Operator + scope + source.js constant.other.object.key.js string.unquoted.label.js, variable.language.this punctuation.definition.variable, keyword.other.this + settings + + foreground + #f7768e + + + + name + HTML Attributes + scope + entity.other.attribute-name, text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.blade entity.other.attribute-name.class, text.html.smarty entity.other.attribute-name.class + settings + + foreground + #bb9af7 + + + + name + Vue Template attributes + scope + meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html + settings + + foreground + #bb9af7 + + + + name + Vue Template attribute separator + scope + meta.directive.vue punctuation.separator.key-value.html + settings + + foreground + #89ddff + + + + name + CSS IDs + scope + source.sass keyword.control + settings + + foreground + #7aa2f7 + + + + name + CSS psuedo selectors + scope + entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.placeholder, meta.property-list meta.property-value + settings + + foreground + #bb9af7 + + + + name + Inserted + scope + markup.inserted + settings + + foreground + #449dab + + + + name + Deleted + scope + markup.deleted + settings + + foreground + #914c54 + + + + name + Changed + scope + markup.changed + settings + + foreground + #6183bb + + + + name + Regular Expressions + scope + string.regexp + settings + + foreground + #b4f9f8 + + + + name + Regular Expressions - Punctuation + scope + punctuation.definition.group + settings + + foreground + #f7768e + + + + name + Regular Expressions - Character Class + scope + constant.other.character-class.regexp + settings + + foreground + #bb9af7 + + + + name + Regular Expressions - Character Class Set + scope + constant.other.character-class.set.regexp, punctuation.definition.character-class.regexp + settings + + foreground + #e0af68 + + + + name + Regular Expressions - Quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #89ddff + + + + name + Regular Expressions - Backslash + scope + constant.character.escape.backslash + settings + + foreground + #c0caf5 + + + + name + Escape Characters + scope + constant.character.escape + settings + + foreground + #89ddff + + + + name + Decorators + scope + tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js + settings + + foreground + #7aa2f7 + + + + name + CSS Units + scope + keyword.other.unit + settings + + foreground + #f7768e + + + + name + JSON Key - Level 0 + scope + source.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #7aa2f7 + + + + name + JSON Key - Level 1 + scope + source.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #0db9d7 + + + + name + JSON Key - Level 2 + scope + source.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #7dcfff + + + + name + JSON Key - Level 3 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #bb9af7 + + + + name + JSON Key - Level 4 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #e0af68 + + + + name + JSON Key - Level 5 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #0db9d7 + + + + name + JSON Key - Level 6 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #73daca + + + + name + JSON Key - Level 7 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json + settings + + foreground + #f7768e + + + + name + JSON Key - Level 8 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json + settings + + foreground + #9ece6a + + + + name + JSON Key - value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #9ece6a + + + + name + Plain Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + #9abdf5 + + + + name + Block Punctuation + scope + meta.block, meta.brace, punctuation.definition.block, punctuation.definition.use, punctuation.definition.group.shell, punctuation.definition.class, punctuation.definition.begin.bracket, punctuation.definition.end.bracket, punctuation.definition.parameters, punctuation.definition.arguments, punctuation.definition.dictionary, punctuation.definition.array, punctuation.section + settings + + foreground + #9abdf5 + + + + name + Markdown - Plain + scope + meta.jsx.children, meta.embedded.block + settings + + foreground + #c0caf5 + + + + name + HTML text + scope + text.html + settings + + foreground + #9aa5ce + + + + name + Markdown - Markup Raw Inline + scope + text.html.markdown markup.inline.raw.markdown + settings + + foreground + #bb9af7 + + + + name + Markdown - Markup Raw Inline Punctuation + scope + text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown + settings + + foreground + #4E5579 + + + + name + Markdown - Heading 1 + scope + heading.1.markdown entity.name, heading.1.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #89ddff + + + + name + Markdown - Heading 2 + scope + heading.2.markdown entity.name, heading.2.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #61bdf2 + + + + name + Markdown - Heading 3 + scope + heading.3.markdown entity.name, heading.3.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #7aa2f7 + + + + name + Markdown - Heading 4 + scope + heading.4.markdown entity.name, heading.4.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #6d91de + + + + name + Markdown - Heading 5 + scope + heading.5.markdown entity.name, heading.5.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #9aa5ce + + + + name + Markdown - Heading 6 + scope + heading.6.markdown entity.name, heading.6.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #747ca1 + + + + name + Markup - Italic + scope + markup.italic, markup.italic punctuation + settings + + fontStyle + italic + foreground + #c0caf5 + + + + name + Markup - Bold + scope + markup.bold, markup.bold punctuation + settings + + fontStyle + bold + foreground + #c0caf5 + + + + name + Markup - Bold-Italic + scope + markup.bold markup.italic, markup.bold markup.italic punctuation + settings + + fontStyle + bold italic + foreground + #c0caf5 + + + + name + Markup - Underline + scope + markup.underline, markup.underline punctuation + settings + + fontStyle + underline + + + + name + Markdown - Blockquote + scope + markup.quote punctuation.definition.blockquote.markdown + settings + + foreground + #4e5579 + + + + name + Markup - Quote + scope + markup.quote + settings + + fontStyle + italic + + + + name + Markdown - Link + scope + string.other.link, markup.underline.link, constant.other.reference.link.markdown, string.other.link.description.title.markdown + settings + + foreground + #73daca + + + + name + Markdown - Fenced Code Block + scope + markup.fenced_code.block.markdown, markup.inline.raw.string.markdown, variable.language.fenced.markdown + settings + + foreground + #89ddff + + + + name + Markdown - Separator + scope + meta.separator + settings + + fontStyle + bold + foreground + #444b6a + + + + name + Markup - Table + scope + markup.table + settings + + foreground + #c0cefc + + + + name + Token - Info + scope + token.info-token + settings + + foreground + #0db9d7 + + + + name + Token - Warn + scope + token.warn-token + settings + + foreground + #ffdb69 + + + + name + Token - Error + scope + token.error-token + settings + + foreground + #db4b4b + + + + name + Token - Debug + scope + token.debug-token + settings + + foreground + #b267e6 + + + + name + Apache Tag + scope + entity.tag.apacheconf + settings + + foreground + #f7768e + + + + name + Preprocessor + scope + meta.preprocessor + settings + + foreground + #73daca + + + + name + ENV value + scope + source.env + settings + + foreground + #7aa2f7 + + + + uuid + 06f855e3-9fb7-4fb1-b790-aef06065f34e + + diff --git a/general/configs/yazi/theme.toml b/general/configs/yazi/theme.toml new file mode 100644 index 0000000..a1460bf --- /dev/null +++ b/general/configs/yazi/theme.toml @@ -0,0 +1,2 @@ +[flavor] +use = "tokyo-night" diff --git a/general/docker/daemon.json b/general/docker/daemon.json new file mode 100644 index 0000000..581de36 --- /dev/null +++ b/general/docker/daemon.json @@ -0,0 +1,3 @@ +{ + "data-root": "/mnt/storage/docker" +} diff --git a/general/hyprland/binds.conf b/general/hyprland/binds.conf new file mode 100644 index 0000000..30ac1f9 --- /dev/null +++ b/general/hyprland/binds.conf @@ -0,0 +1,140 @@ +#----------# +# KEYBINDS # +#----------# +$mainMod = SUPER +# These key-binds are non-specific, laptop config has a separate file that includes +# extra config for it specifically +bind = $mainMod, Q, killactive +bind = $mainMod SHIFT, Q, exit +bind = $mainMod, Return, exec, kitty +bind = $mainMod, C, killactive, +# bind = $mainMod, E, exec, thunar +bind = $mainMod SHIFT, E, exec, thunar +bind = $mainMod, E, exec, kitty --hold fish -c "y" +bind = $mainMod, V, togglefloating, +bind = $mainMod, F, fullscreen, + +# Launch commands +bind = $mainMod SHIFT, L, exec, librewolf +bind = $mainMod SHIFT, D, exec, vesktop +bind = $mainMod SHIFT, V, exec, vscodium +bind = $mainMod SHIFT, T, exec, thunderbird +bind = $mainMod SHIFT, H, exec, heroic +bind = $mainMod SHIFT, I, exec, notify-send 'AirPlay video server starting...' && terminator -e "systemctl start avahi-daemon && sleep 5 && uxplay -n LinuxVideoPlay -nh" +bind = $mainMod SHIFT, A, exec, notify-send 'AirPlay server starting...' && terminator -T "hidden-terminator" -e "systemctl start avahi-daemon && shairport-sync -a LinuxPlay" +bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' && corectrl +bind = $mainMod SHIFT, P, exec, notify-send 'Steam is launching...' && steam +bind = $mainMod SHIFT, R, exec, notify-send 'Launching in Remoteplay optimised session' && steam -pipewire +bind = $mainMod CTRL, K, exec, notify-send 'Insta-Kill activated' && hyprctl kill +bind = $mainMod SHIFT, O, exec, terminator -e "~/projects/dotfiles/ai.sh" + +# Screenshots +bind = $mainMod SHIFT, S, exec, grimblast --notify copy area +bind = $mainMod CTRL, S, exec, grimblast --notify copysave area +bind = $mainMod ALT, S, exec, grimblast --notify save area +bind = , PRINT, exec, grimblast --notify copy screen +bind = CTRL, PRINT, exec, grimblast --notify copysave screen +bind = SHIFT, PRINT, exec, grimblast --notify save screen + +# Rofi commands +bind = $mainMod, Space, exec, killall rofi || rofi -show combi -modes combi -combi-modes "window,drun,run" +bind = $mainMod SHIFT, Space, exec, rofi -modi "Global Search":"~/.config/rofi/spotlight/rofi-spotlight.sh" -show "Global Search" -config ~/.config/rofi/spotlight/rofi.rasi +bind = $mainMod, P, exec, killall rofi || rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi + +# Logout commands +bind = $mainMod, escape, exec, wlogout +bind = $mainMod ALT CTRL, L, exec, hyprlock --immediate + + +#--------------# +# Layout binds # +#--------------# + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Same with vim-motions +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, j, movefocus, d +bind = $mainMod, k, movefocus, u + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 +bind = $mainMod ALT, left, workspace, e-1 +bind = $mainMod ALT, right, workspace, e+1 +bind = $mainMod ALT, h, workspace, e-1 +bind = $mainMod ALT, l, workspace, e+1 + + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 +bind = $mainMod SHIFT, left, movetoworkspace, e-1 +bind = $mainMod SHIFT, right, movetoworkspace, e+1 +bind = $mainMod SHIFT, j, movetoworkspace, e-1 +bind = $mainMod SHIFT, k, movetoworkspace, e+1 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Tile window to a part of the screen +bind = $mainMod CTRL, left, movewindow, left +bind = $mainMod CTRL, right, movewindow, right + +# move to next window / previous window with ALT + Tab / SHIFT + ALT + Tab +bind = ALT SHIFT, tab, cyclenext, prev +# bind = ALT, tab, cyclenext, next +# bind = ALT CTRL, tab, focusurgentorlast +bind = ALT, tab, focusurgentorlast + +# Master layout commands +bind = $mainMod CTRL, M, layoutmsg, swapwithmaster +bind = $mainMod SHIFT, A, layoutmsg, addmaster +bind = $mainMod SHIFT CTRL, right, layoutmsg, orientationnext +bind = $mainMod SHIFT CTRL, left, layoutmsg, orientationprev + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + + +# Freeze +bind = $mainMod SHIFT, escape, exec, hyprfreeze -a + + +# Volume control +bind = ,code:123, exec, pamixer -i 5 +bind = ,code:122, exec, pamixer -d 5 +bind = ,code:121, exec, pamixer -t + + +# Brightness-Control +bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%' +bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%' + + +# Monitor config binds +bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 1920x0, 1, mirror, DP-1 && notify-send 'Set FPV goggles to mirror main screen' +bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 3840x0, 1 && notify-send 'Set to expand FPV goggles' diff --git a/general/hyprland/general.conf b/general/hyprland/general.conf new file mode 100644 index 0000000..c3edb5e --- /dev/null +++ b/general/hyprland/general.conf @@ -0,0 +1,122 @@ +#-----------------------# +# LAUNCHING OF PROGRAMS # +#-----------------------# +exec-once = dunst --startup_notification +exec-once = ~/.config/hypr/xdg-portal-hyprland +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = waybar +exec-once = hypridle + +exec-once = nm-applet +exec-once = nextcloud --background + + +exec = hyprctl setcursor oreo_spark_blue_cursors 24 +env = QT_QPA_PLATFORM,wayland +env = QT_QPA_PLATFORM_THEME,qt6ct +env = OLLAMA_HOST,0.0.0.0 + +#-------# +# INPUT # +#-------# +input { + kb_layout = ch + natural_scroll = true + + numlock_by_default = true + + follow_mouse = 2 + mouse_refocus = true + + touchpad { + disable_while_typing = true + natural_scroll = true + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = true + workspace_swipe_distance = 300 +} + + +#----------------# +# GENERAL CONFIG # +#----------------# +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 3 + gaps_out = 10 + border_size = 1 + col.active_border = rgba(cc5c00ff) rgba(cc5c00ff) rgba(ff0000ff) 45deg + col.inactive_border = rgba(595959aa) + + layout = master + no_border_on_floating = false +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + inactive_opacity = 1 + rounding = 10 + + shadow { + enabled = true + range = 4 + color = rgba(1a1a1aee) + } + + blur { + enabled = true + xray = true + new_optimizations = true + size = 1 + passes = 2 + } + dim_inactive = true + dim_strength = 0.1 +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = false + vrr = 2 + allow_session_lock_restore = true +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +# no_gaps_when_only = true +} + + +cursor { + no_warps = false + inactive_timeout = 60 +} diff --git a/general/hyprland/windowrules.conf b/general/hyprland/windowrules.conf new file mode 100644 index 0000000..34fd193 --- /dev/null +++ b/general/hyprland/windowrules.conf @@ -0,0 +1,108 @@ +#-----------------# +# WORKSPACE RULES # +#-----------------# +# Display full sized (without gaps), if only window on screen +workspace = w[tv1], gapsout:0, gapsin:0 +workspace = f[1], gapsout:0, gapsin:0 +windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1] +windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1] +windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] +windowrulev2 = rounding 0, floating:0, onworkspace:f[1] + +$mainMod = SUPER + +#--------------# +# WINDOW RULES # +#--------------# +windowrule = float, title:.*(rofi).* +windowrulev2 = animation popin, title:.*(rofi).* +windowrulev2 = center, title:(rofi)(.*) + +windowrulev2 = move 1450 50, title:^(.*)(Power menu)$ +windowrule = workspace 2, evince +windowrulev2 = workspace 2, title:.*(Okular).* +windowrulev2 = fullscreen, title:wlogout +windowrule = workspace 2, librewolf +windowrulev2 = workspace 2, title:LibreWolf +windowrulev2 = workspace 2, title:(.*)(Discord)(.*) +windowrulev2 = workspace 3, title:^(Steam)(.*)$ +windowrulev2 = workspace 1, title:^(.*)(VSCodium)$ +windowrulev2 = center, title:^(.*)(VSCodium)$ +windowrule = workspace 3, minecraft-launcher +windowrule = tile, minecraft-launcher +windowrulev2 = fullscreen, title:^(.*)(Minecraft)(.*)$ +windowrulev2 = workspace 3, title:^(.*)(Minecraft)(.*)$ + +windowrulev2 = workspace 1, title:^(.*)hidden-terminator*(.*)$ +windowrulev2 = size 0 0, title:^(.*)hidden-terminator*(.*)$ +windowrulev2 = move 0 0, title:^(.*)hidden-terminator*(.*)$ +windowrulev2 = float, title:^(.*)hidden-terminator*(.*)$ + +# Set floating windows & position them centered +windowrule = float, file_progress +windowrule = center, file_progress + +windowrule = float, confirm +windowrule = center, confirm + +windowrule = float, dialog +windowrule = center, dialog + +windowrule = float, download +windowrule = center, download + +windowrule = float, notification +windowrule = center, notification + +windowrule = float, error +windowrule = center, error + +windowrule = float, splash +windowrule = center, splash + +windowrule = float, confirmreset +windowrule = center, confirmreset + +windowrulev2 = float, title:Open File +windowrulev2 = center, title:Open File + +windowrulev2 = float, title:branchdialog +windowrulev2 = center, title:branchdialog + +windowrule = float, Lxappearance +windowrule = center, Lxappearance + +windowrulev2 = float, title:^(Media viewer)$ +windowrulev2 = center, title:^(Media viewer)$ + +windowrulev2 = float, title:^(Volume Control)$ +windowrulev2 = center, title:^(Volume Control)$ + +windowrulev2 = float, title:^(Picture-in-Picture)$ +windowrulev2 = center, title:^(Picture-in-Picture)$ + +windowrulev2 = float, title:^(File Operation Progress)$ +windowrulev2 = center, title:^(File Operation Progress)$ + +windowrulev2 = float, title:^(Loading)(.*)$ +windowrulev2 = center, title:^(Loading)(.*)$ + +windowrule = float, pavucontrol-qt +windowrule = center, pavucontrol-qt + +windowrule = float, pavucontrol +windowrule = center, pavucontrol + +windowrule = float, file-roller +windowrule = center, file-roller + +windowrulev2 = idleinhibit focus, title:^(Rocket League)(.*)$ +windowrulev2 = fullscreen, title:^(Steam Big Picture)$ +windowrule = idleinhibit always, steam +windowrule = idleinhibit always, lutris +windowrule = idleinhibit focus, vlc +windowrule = idleinhibit focus, supertuxkart +windowrulev2 = idleinhibit fullscreen, title:^(.*)(Discord)(.*)$ +windowrulev2 = idleinhibit fullscreen, title:^(.*)(~)(.*)$ +windowrulev2 = idleinhibit focus, title:^(.*)(~)(.*)$ +windowrulev2 = idleinhibit focus, title:^(.*)(LibreWolf)(.*)$ diff --git a/general/mkinitcpio.conf b/general/mkinitcpio.conf new file mode 100644 index 0000000..2fd80a4 --- /dev/null +++ b/general/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck plymouth) + +# COMPRESSION +# Use this to compress the initramfs image. By default, zstd compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" diff --git a/general/pacman.conf b/general/pacman.conf new file mode 100644 index 0000000..7d7c2fd --- /dev/null +++ b/general/pacman.conf @@ -0,0 +1,100 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto +ILoveCandy +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#NoProgressBar +CheckSpace +#VerbosePkgLists +ParallelDownloads = 5 + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[extra-testing] +#Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[arch4edu] +Server = https://de.arch4edu.mirror.kescher.at/$arch + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/general/vscode-extensions b/general/vscode-extensions new file mode 100644 index 0000000..d61326c --- /dev/null +++ b/general/vscode-extensions @@ -0,0 +1,49 @@ +aaron-bond.better-comments +abusaidm.html-snippets +bmewburn.vscode-intelephense-client +bungcip.better-toml +dbaeumer.vscode-eslint +dlasagno.rasi +donjayamanne.jquerysnippets +ecmel.vscode-html-css +equinusocio.vsc-community-material-theme +equinusocio.vsc-material-theme +equinusocio.vsc-material-theme-icons +eww-yuck.yuck +fivethree.vscode-hugo-snippets +formulahendry.auto-rename-tag +gitlab.gitlab-workflow +golang.go +hollowtree.vue-snippets +ionic.ionic +james-yu.latex-workshop +lllllllqw.jsdoc +mads-hartmann.bash-ide-vscode +mathematic.vscode-latex +mathiasfrohlich.kotlin +mechatroner.rainbow-csv +ms-python.debugpy +ms-python.python +ms-vscode.cpptools +nadim-vscode.html-meta-tags-hero +nilssoderman.sitemap-generator +pwabuilder.pwa-studio +quicktype.quicktype +redhat.java +redhat.vscode-xml +rust-lang.rust-analyzer +sbsnippets.pytorch-snippets +spences10.robots-txt +streetsidesoftware.code-spell-checker +streetsidesoftware.code-spell-checker-german +svelte.svelte-vscode +tecosaur.latex-utilities +valentjn.vscode-ltex +vitest.explorer +vscjava.vscode-java-debug +vscjava.vscode-java-test +vscodevim.vim +vue.volar +wayou.vscode-todo-highlight +xdebug.php-debug +yinfei.luahelper diff --git a/install-new.sh b/install-new.sh new file mode 100644 index 0000000..3dea5af --- /dev/null +++ b/install-new.sh @@ -0,0 +1,58 @@ +echo "Welcome!" + +currentDir=pwd + +sudo pacman-key --recv-keys 7931B6D628C8D3BA +sudo pacman-key --finger 7931B6D628C8D3BA +sudo pacman-key --lsign-key 7931B6D628C8D3BA + +curl -O https://mirrors.tuna.tsinghua.edu.cn/arch4edu/any/arch4edu-keyring-20200805-1-any.pkg.tar.zst +pacman -U arch4edu-keyring-20200805-1-any.pkg.tar.zst + +echo " + +Installed arch4edu keyring, running reflector to update pacman mirrorlist... + +" +sudo pacman -Syu base-devel git reflector +sudo reflector -c 'Switzerland, Germany' --sort 'rate' --protocol https --latest 10 --save /etc/pacman.d/mirrorlist + +echo " + +Mirrorlist created, installing yay + +" + +cd /tmp +git clone https://aur.archlinux.org/yay.git +cd yay && makepkg -si + +echo " + +yay installed, updating & installing + +" + +yay -Syu + +# Hyprland +yay -S hyprland hypridle hyprfreeze hyprlock plymouth dunst rofi wlogout waybar xdg-desktop-portal-hyprland pipewire pipewire-alsa pipewire-pulse pipewire-jack mesa thunar yazi wireplumber grimblast wl-clipboard wget ttf-fantasque-nerd ttf-jetbrains-mono-nerd ttf-fluentui-system-icons ttf-comfortaa + +# Core +yay -S fish adobe-source-code-pro-fonts gnome-font-viewer gnome-characters gnome-tweaks lxappearance kvantum gnome-keyring smartmontools ffmpeg polkit-gnome swaybg network-manager-applet polkit-kde-agent cpupower-gui + +# Programming +yay -S meld docker vscodium kitty fish docker terminator ghex nodejs npm python-pip git-credential-manager-core-bin wine kate rustup cargo filezilla typescript-language-server php jdk vscode-css-languageserver vscode-html-languageserver bash-language-server +sudo npm i -g @vue/typescript-plugin + +# nvim +yay -S neovim lua lua-language-server tree-sitter texlab stylua luarocks jdtls perl julia autojump pyright + +# Internet +yay -S librewolf-bin webcord-bin thunderbird rustdesk brave-bin + +# Utilities +yay -S okular vlc nextcloud-client p7zip zip unzip gnome-keyring noto-fonts thunderbird pamixer pavucontrol light neofetch bashtop hugo sddm uxplay upower + +# LaTeX +yay -S texlive biber diff --git a/install-part-two.sh b/install-part-two.sh new file mode 100644 index 0000000..53cc98b --- /dev/null +++ b/install-part-two.sh @@ -0,0 +1,30 @@ +echo "Welcome!" + +file="/home/janis/projects/dotfiles/pc/vscode-extensions" +while read line; do + vscodium --install-extension "${line}" +done < "${file}" + +echo "\n==> VSCode Extensions installed\n" + +cp -r ./pc/.config/* ~/.config +cp ./pc/.bashrc ~/.bashrc +cp ./pc/.bash_history ~/.bash_history + +sudo cp ./pc/mkinitcpio.conf /etc/mkinitcpio.conf +sudo cp ./pc/environment /etc/environment +sudo cp ./pc/grub /etc/default/grub +sudo plymouth-set-default-theme -R bgrt + +sudo mkinitcpio -P + +cd /tmp +git clone https://github.com/rtlewis1/GTK +cd GTK/ +git checkout Material-Black-Colors-Desktop +sudo cp -r ./Material-Black-Blueberry /usr/share/themes + +cd /tmp +git clone https://github.com/sandesh236/monterey-grub-theme +cd monterey-grub-theme/ +sudo ./install.sh diff --git a/laptop/.bashrc b/laptop/.bashrc new file mode 100755 index 0000000..95b0a32 --- /dev/null +++ b/laptop/.bashrc @@ -0,0 +1,359 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export PATH="/home/janis/.local/share/gem/ruby/3.0.0/bin: $PATH" +export PATH="/home/janis/.local/bin: $PATH" +alias editHyprlandConf='nano ~/.config/hypr/hyprland.conf' +alias ls='ls -l --color=auto' +alias ll='ls -la --color=auto' +alias sl='ls --color=auto' +alias start-httpd='sudo systemctl start httpd' +PS1='[\u@\h \W]\$ ' + +################################################################################ +## FUNCTIONS ## +################################################################################ + +## +## ARRANGE $PWD AND STORE IT IN $NEW_PWD +## * The home directory (HOME) is replaced with a ~ +## * The last pwdmaxlen characters of the PWD are displayed +## * Leading partial directory names are striped off +## /home/me/stuff -> ~/stuff (if USER=me) +## /usr/share/big_dir_name -> ../share/big_dir_name (if pwdmaxlen=20) +## +## Original source: WOLFMAN'S color bash promt +## https://wiki.chakralinux.org/index.php?title=Color_Bash_Prompt#Wolfman.27s +## +bash_prompt_command() { + # How many characters of the $PWD should be kept + local pwdmaxlen=25 + + # Indicate that there has been dir truncation + local trunc_symbol=".." + + # Store local dir + local dir=${PWD##*/} + + # Which length to use + pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen )) + + NEW_PWD=${PWD/#$HOME/\~} + + local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen )) + + # Generate name + if [ ${pwdoffset} -gt "0" ] + then + NEW_PWD=${NEW_PWD:$pwdoffset:$pwdmaxlen} + NEW_PWD=${trunc_symbol}/${NEW_PWD#*/} + fi +} + + + + +## +## GENERATE A FORMAT SEQUENCE +## +format_font() +{ + ## FIRST ARGUMENT TO RETURN FORMAT STRING + local output=$1 + + + case $# in + 2) + eval $output="'\[\033[0;${2}m\]'" + ;; + 3) + eval $output="'\[\033[0;${2};${3}m\]'" + ;; + 4) + eval $output="'\[\033[0;${2};${3};${4}m\]'" + ;; + *) + eval $output="'\[\033[0m\]'" + ;; + esac +} + + + +## +## COLORIZE BASH PROMT +## +bash_prompt() { + + ############################################################################ + ## COLOR CODES ## + ## These can be used in the configuration below ## + ############################################################################ + + ## FONT EFFECT + local NONE='0' + local BOLD='1' + local DIM='2' + local UNDERLINE='4' + local BLINK='5' + local INVERT='7' + local HIDDEN='8' + + + ## COLORS + local DEFAULT='9' + local BLACK='0' + local RED='1' + local GREEN='2' + local YELLOW='3' + local BLUE='4' + local MAGENTA='5' + local CYAN='6' + local L_GRAY='7' + local D_GRAY='60' + local L_RED='61' + local L_GREEN='62' + local L_YELLOW='63' + local L_BLUE='64' + local L_MAGENTA='65' + local L_CYAN='66' + local WHITE='67' + + + ## TYPE + local RESET='0' + local EFFECT='0' + local COLOR='30' + local BG='40' + + + ## 256 COLOR CODES + local NO_FORMAT="\[\033[0m\]" + local ORANGE_BOLD="\[\033[1;38;5;208m\]" + local TOXIC_GREEN_BOLD="\[\033[1;38;5;118m\]" + local RED_BOLD="\[\033[1;38;5;1m\]" + local CYAN_BOLD="\[\033[1;38;5;87m\]" + local BLACK_BOLD="\[\033[1;38;5;0m\]" + local WHITE_BOLD="\[\033[1;38;5;15m\]" + local GRAY_BOLD="\[\033[1;90m\]" + local BLUE_BOLD="\[\033[1;38;5;74m\]" + + + + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + ## CONFIGURE HERE ## + + + + ############################################################################ + ## CONFIGURATION ## + ## Choose your color combination here ## + ############################################################################ + local FONT_COLOR_1=$WHITE + local BACKGROUND_1=$RED + local TEXTEFFECT_1=$BOLD + + local FONT_COLOR_2=$WHITE + local BACKGROUND_2=$YELLOW + local TEXTEFFECT_2=$BOLD + + local FONT_COLOR_3=$D_GRAY + local BACKGROUND_3=$WHITE + local TEXTEFFECT_3=$BOLD + + local PROMT_FORMAT=$BLUE_BOLD + + + ############################################################################ + ## EXAMPLE CONFIGURATIONS ## + ## I use them for different hosts. Test them out ;) ## + ############################################################################ + + ## CONFIGURATION: BLUE-WHITE + if [ "$HOSTNAME" = dell ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLUE; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$D_GRAY; BACKGROUND_3=$WHITE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: BLACK-RED + if [ "$HOSTNAME" = giraff6 ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$RED; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$RED_BOLD + fi + + ## CONFIGURATION: RED-BLACK + #FONT_COLOR_1=$WHITE; BACKGROUND_1=$RED; TEXTEFFECT_1=$BOLD + #FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + #FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLACK; TEXTEFFECT_3=$BOLD + #PROMT_FORMAT=$RED_BOLD + + ## CONFIGURATION: CYAN-BLUE + if [ "$HOSTNAME" = sharkoon ]; then + FONT_COLOR_1=$BLACK; BACKGROUND_1=$L_CYAN; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLUE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: GRAY-SCALE + if [ "$HOSTNAME" = giraff ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$L_GRAY; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$BLACK_BOLD + fi + + ## CONFIGURATION: GRAY-CYAN + if [ "$HOSTNAME" = light ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$BLACK; BACKGROUND_3=$L_CYAN; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + + ############################################################################ + ## TEXT FORMATING ## + ## Generate the text formating according to configuration ## + ############################################################################ + + ## CONVERT CODES: add offset + FC1=$(($FONT_COLOR_1+$COLOR)) + BG1=$(($BACKGROUND_1+$BG)) + FE1=$(($TEXTEFFECT_1+$EFFECT)) + + FC2=$(($FONT_COLOR_2+$COLOR)) + BG2=$(($BACKGROUND_2+$BG)) + FE2=$(($TEXTEFFECT_2+$EFFECT)) + + FC3=$(($FONT_COLOR_3+$COLOR)) + BG3=$(($BACKGROUND_3+$BG)) + FE3=$(($TEXTEFFECT_3+$EFFECT)) + + FC4=$(($FONT_COLOR_4+$COLOR)) + BG4=$(($BACKGROUND_4+$BG)) + FE4=$(($TEXTEFFECT_4+$EFFECT)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local TEXT_FORMAT_1 + local TEXT_FORMAT_2 + local TEXT_FORMAT_3 + local TEXT_FORMAT_4 + format_font TEXT_FORMAT_1 $FE1 $FC1 $BG1 + format_font TEXT_FORMAT_2 $FE2 $FC2 $BG2 + format_font TEXT_FORMAT_3 $FC3 $FE3 $BG3 + format_font TEXT_FORMAT_4 $FC4 $FE4 $BG4 + + + # GENERATE PROMT SECTIONS + local PROMT_USER=$"$TEXT_FORMAT_1 \u " + local PROMT_HOST=$"$TEXT_FORMAT_2 \h " + local PROMT_PWD=$"$TEXT_FORMAT_3 \${NEW_PWD} " + local PROMT_INPUT=$"$PROMT_FORMAT " + + + ############################################################################ + ## SEPARATOR FORMATING ## + ## Generate the separators between sections ## + ## Uses background colors of the sections ## + ############################################################################ + + ## CONVERT CODES + TSFC1=$(($BACKGROUND_1+$COLOR)) + TSBG1=$(($BACKGROUND_2+$BG)) + + TSFC2=$(($BACKGROUND_2+$COLOR)) + TSBG2=$(($BACKGROUND_3+$BG)) + + TSFC3=$(($BACKGROUND_3+$COLOR)) + TSBG3=$(($DEFAULT+$BG)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local SEPARATOR_FORMAT_1 + local SEPARATOR_FORMAT_2 + local SEPARATOR_FORMAT_3 + format_font SEPARATOR_FORMAT_1 $TSFC1 $TSBG1 + format_font SEPARATOR_FORMAT_2 $TSFC2 $TSBG2 + format_font SEPARATOR_FORMAT_3 $TSFC3 $TSBG3 + + + # GENERATE SEPARATORS WITH FANCY TRIANGLE + local TRIANGLE=$'\uE0B0' + local SEPARATOR_1=$SEPARATOR_FORMAT_1$TRIANGLE + local SEPARATOR_2=$SEPARATOR_FORMAT_2$TRIANGLE + local SEPARATOR_3=$SEPARATOR_FORMAT_3$TRIANGLE + + + + ############################################################################ + ## WINDOW TITLE ## + ## Prevent messed up terminal-window titles ## + ############################################################################ + case $TERM in + xterm*|rxvt*) + local TITLEBAR='\[\033]0;\u:${NEW_PWD}\007\]' + ;; + *) + local TITLEBAR="" + ;; + esac + + + + ############################################################################ + ## BASH PROMT ## + ## Generate promt and remove format from the rest ## + ############################################################################ + PS1="$TITLEBAR\n${PROMT_USER}${SEPARATOR_1}${PROMT_HOST}${SEPARATOR_2}${PROMT_PWD}${SEPARATOR_3}${PROMT_INPUT}" + + + + ## For terminal line coloring, leaving the rest standard + none="$(tput sgr0)" + trap 'echo -ne "${none}"' DEBUG +} + + + + +################################################################################ +## MAIN ## +################################################################################ + +## Bash provides an environment variable called PROMPT_COMMAND. +## The contents of this variable are executed as a regular Bash command +## just before Bash displays a prompt. +## We want it to call our own command to truncate PWD and store it in NEW_PWD +PROMPT_COMMAND=bash_prompt_command + +## Call bash_promnt only once, then unset it (not needed any more) +## It will set $PS1 with colors and relative to $NEW_PWD, +## which gets updated by $PROMT_COMMAND on behalf of the terminal +bash_prompt +unset bash_prompt + +### EOF ### diff --git a/laptop/configs/hypr/hypridle.conf b/laptop/configs/hypr/hypridle.conf new file mode 100644 index 0000000..c39dccf --- /dev/null +++ b/laptop/configs/hypr/hypridle.conf @@ -0,0 +1,39 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ██ █ ██ ███ █████████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██ + +general { + lock_cmd = hyprlock --immediate + unlock_cmd = loginctl unlock-session + before_sleep_cmd = hyprlock --immediate + after_sleep_cmd = hyprlock --immediate +} + +listener { + timeout = 100 + on-timeout = notify-send "Entering idle state... (200s to screen off)" + on-resume = notify-send "Welcome back!" +} + +listener { + timeout = 200 + on-timeout = notify-send "100s to screen off" && sleep 5 && hyprlock +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = systemctl suspend + on-resume = hyprctl dispatch dpms on +} \ No newline at end of file diff --git a/laptop/configs/hypr/hyprland-old.conf b/laptop/configs/hypr/hyprland-old.conf new file mode 100644 index 0000000..b5568f4 --- /dev/null +++ b/laptop/configs/hypr/hyprland-old.conf @@ -0,0 +1,349 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + + + +#----------# +# MONITORS # +#----------# + +monitor=eDP-1, 2880x1800@60, 0x0, 1.5 +# monitor=,highres highrr, auto, 1 + + +#-----------------------# +# LAUNCHING OF PROGRAMS # +#-----------------------# +exec-once = dunst +# exec-once = wl-clipboard-history -t +exec-once = ~/.config/hypr/xdg-portal-hyprland +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = waybar +exec-once = hypridle + +# exec-once = openrgb --startminimized +# exec-once = polychromatic-tray-applet +# exec-once = blueman-applet +exec-once = nm-applet +exec-once = nextcloud + +exec = swaybg -m fill -i /home/janis/Pictures/arch-bg.png + +exec = hyprctl setcursor oreo_spark_blue_cursors 36 +env = QT_QPA_PLATFORM,wayland +env = QT_QPA_PLATFORM_THEME,qt6ct +# env = GDK_SCALE,2 +# env = GDK_DPI_SCALE,0.75 + +env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor +env = X_CURSOR_THEME, Oreo_spark_blue_cursor +env = XCURSOR_SIZE,24 +# env = ELECTRON_OZONE_PLATFORM_HINT,wayland + +#-------# +# INPUT # +#-------# +input { + kb_layout = ch + natural_scroll = true + + numlock_by_default = true + + follow_mouse = 2 + mouse_refocus = true + + touchpad { + disable_while_typing = true + natural_scroll = true + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + + +#----------------# +# GENERAL CONFIG # +#----------------# +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 3 + gaps_out = 10 + border_size = 1 + col.active_border = rgba(2288ffee) rgba(a6f7adff) 45deg + col.inactive_border = rgba(595959aa) + + layout = master + no_border_on_floating = false +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + inactive_opacity = 1 + rounding = 10 + + shadow { + enabled = false + range = 4 + color = rgba(1a1a1aee) + } + + blur { + enabled = false + xray = true + new_optimizations = true + size = 1 + passes = 2 + } + dim_inactive = true + dim_strength = 0.1 +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = false + vrr = 2 + vfr = 1 + allow_session_lock_restore = true +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = true + workspace_swipe_distance = 300 +} + +cursor { + no_warps = false + inactive_timeout = 60 +} + +xwayland { + force_zero_scaling = true +} + + +# Display full sized (without gaps), if only window on screen +workspace = w[tv1], gapsout:0, gapsin:0 +workspace = f[1], gapsout:0, gapsin:0 +windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1] +windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1] +windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] +windowrulev2 = rounding 0, floating:0, onworkspace:f[1] + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# WINDOW RULES +windowrule = float, title:^(.*)(rofi)(.*)$ +# windowrule = size 800 900, title:^(.*)(rofi)(.*)$ +windowrule = animation popin, title:^(.*)(rofi)(.*)$ +windowrule = center, title:^(.*)(rofi)(.*)$ +windowrule = move 1450 50, title:^(.*)(Power menu)$ +windowrule = workspace 2, evince +windowrule = workspace 2, okular +windowrule = fullscreen, title:wlogout +windowrule = workspace 2, title:^(.*)(LibreWolf)(.*)$ +windowrule = workspace 2, title:^(.*)(WebCord)(.*)$ +windowrule = workspace 3, title:^(Steam)(.*)$ +windowrule = workspace 1, title:^(.*)(VSCodium)$ +windowrule = workspace 3, minecraft-launcher +windowrule = tile, minecraft-launcher +windowrule = fullscreen, title:^(.*)Minecraft*(.*)$ +windowrule = workspace 3, title:^(.*)Minecraft*(.*)$ +# Hide terminator +windowrule = float, title:^(.*)hidden-terminator(.*)$ +windowrule = size 0 0, title:^(.*)hidden-terminator(.*)$ +windowrule = move 3000 0, title:^(.*)hidden-terminator(.*)$ +windowrule = workspace 1, title:^(.*)hidden-terminator(.*)$ + +windowrule = float, file_progress +windowrule = float, confirm +windowrule = float, dialog +windowrule = float, download +windowrule = float, notification +windowrule = float, error +windowrule = float, splash +windowrule = float, confirmreset +windowrule = float, title:Open File +windowrule = float, title:branchdialog +windowrule = float, Lxappearance +windowrule = float, title:^(Media viewer)$ +windowrule = float, title:^(Volume Control)$ +windowrule = float, title:^(Picture-in-Picture)$ +windowrule = float, title:^(Loading)(.*)$ +windowrule = float, pavucontrol-qt +windowrule = float, pavucontrol +windowrule = float, file-roller +windowrule = idleinhibit always, ^(Steam)$ +windowrule = idleinhibit focus, ^(Rocket League)(.*)$ +windowrule = fullscreen, ^(Steam Big Picture)$ +windowrule = idleinhibit always, steam +windowrule = idleinhibit always, lutris +windowrule = idleinhibit focus, vlc +windowrule = idleinhibit focus, supertuxkart +windowrule = idleinhibit fullscreen, title:^(.*)(WebCord)(.*)$ +windowrule = idleinhibit fullscreen, title:^(.*)(~)(.*)$ +windowrule = idleinhibit focus, title:^(.*)(~)(.*)$ +windowrule = idleinhibit focus, title:^(.*)(LibreWolf)(.*)$ + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, killactive +bind = $mainMod SHIFT, Q, exit +bind = $mainMod, Return, exec, kitty +# bind = $mainMod, Return, exec, terminator +bind = $mainMod, C, killactive, +bind = $mainMod, E, exec, thunar +bind = $mainMod, V, togglefloating, +bind = $mainMod, F, fullscreen, + +# Launch commands +bind = $mainMod SHIFT, L, exec, librewolf +bind = $mainMod SHIFT, K, exec, librewolf http://localhost:8080/admin && librewolf http://localhost:8081/test/login +bind = $mainMod SHIFT, D, exec, terminator --title "hidden-terminator" -e "GDK_SCALE=2 webcord && exit" +# bind = $mainMod SHIFT, D, exec, webcord +# bind = $mainMod SHIFT, V, exec, terminator --title "hidden-terminator" -e "GDK_SCALE=2 codium && exit" +bind = $mainMod SHIFT, V, exec, codium +bind = $mainMod SHIFT, T, exec, thunderbird +bind = $mainMod SHIFT, M, exec, systemctl start docker && terminator -e "sudo docker run -it --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /home/janis/projects:/mnt rocm/pytorch:latest" +# bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' && /usr/lib/polkit-kde-authentication-agent-1 && notify-send 'Starting CoreCtrl...' && corectrl +bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' && corectrl +bind = $mainMod SHIFT, P, exec, notify-send 'Steam is launching...' && steam +bind = $mainMod SHIFT, R, exec, notify-send 'START CORECTRL! (Super + Shift + G twice). Launching in Remoteplay optimised session' && steam -pipewire +bind = $mainMod CTRL, K, exec, notify-send 'Insta-Kill activated' && hyprctl kill + +# Screenshots +bind = $mainMod SHIFT, S, exec, grimblast --notify copy area +bind = $mainMod CTRL, S, exec, grimblast --notify copysave area +bind = $mainMod ALT, S, exec, grimblast --notify save area +bind = , PRINT, exec, grimblast --notify copy screen +bind = CTRL, PRINT, exec, grimblast --notify copysave screen +bind = SHIFT, PRINT, exec, grimblast --notify save screen + +# Rofi commands +bind = $mainMod, Space, exec, killall rofi || rofi -show combi -modes combi -combi-modes "window,drun,run" +bind = $mainMod SHIFT, Space, exec, rofi -modi "Global Search":"~/.config/rofi/spotlight/rofi-spotlight.sh" -show "Global Search" -config ~/.config/rofi/spotlight/rofi.rasi +bind = $mainMod, P, exec, killall rofi || rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi + +# Logout commands +bind = $mainMod, escape, exec, wlogout +bind = $mainMod, L, exec, hyprlock +#bind = $mainMod, L, exec, swaylock --screenshots --clock --indicator --grace 10 --fade-in 2 --effect-blur 10x10 --indicator-radius 200 --ring-color ff0202 --show-failed-attempts --effect-greyscale --effect-vignette 0.6:0.6 + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 +bind = $mainMod ALT, left, workspace, e-1 +bind = $mainMod ALT, right, workspace, e+1 + + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 +bind = $mainMod SHIFT, left, movetoworkspace, e-1 +bind = $mainMod SHIFT, right, movetoworkspace, e+1 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Tile window to a part of the screen +bind = $mainMod CTRL, left, movewindow, left +bind = $mainMod CTRL, right, movewindow, right + +# move to next window / previous window with ALT + Tab / SHIFT + ALT + Tab +bind = ALT SHIFT, tab, cyclenext, prev +# bind = ALT, tab, cyclenext, next +# bind = ALT CTRL, tab, focusurgentorlast +bind = ALT, tab, focusurgentorlast + +# Master layout commands +bind = $mainMod CTRL, M, layoutmsg, swapwithmaster +bind = $mainMod SHIFT, A, layoutmsg, addmaster +bind = $mainMod SHIFT CTRL, right, layoutmsg, orientationnext +bind = $mainMod SHIFT CTRL, left, layoutmsg, orientationprev + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + + +# Freeze +bind = $mainMod SHIFT, escape, exec, hyprfreeze -a + + +# Volume control +bind = ,code:123, exec, pamixer -i 5 +bind = ,code:122, exec, pamixer -d 5 +bind = ,code:121, exec, pamixer -t + + +# Brightness-Control +bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%' +bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%' + + +# Monitor config binds +bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display' +bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display' + +# Internal display controls +bind = $mainMod ALT, E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && notify-send 'Set to battery optimized display settings' +bind = $mainMod ALT, P, exec, hyprctl keyword monitor eDP-1, preferred, 0x0, 1.5 && notify-send 'Set to performance optimized display settings' diff --git a/laptop/configs/hypr/hyprland.conf b/laptop/configs/hypr/hyprland.conf new file mode 100644 index 0000000..d32c37a --- /dev/null +++ b/laptop/configs/hypr/hyprland.conf @@ -0,0 +1,54 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + + + +#----------# +# MONITORS # +#----------# + +monitor=eDP-1, 2880x1800@60, 0x0, 1.5 +# monitor=,highres highrr, auto, 1 + + +exec = swaybg -m fill -i /home/janis/Pictures/arch-bg.png + + +source=./hyprland/binds.conf +source=./hyprland/general.conf +source=./hyprland/windowrules.conf + +#--------# +# LAPTOP # +#--------# +exec = hyprctl setcursor oreo_spark_blue_cursors 36 +env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor +env = X_CURSOR_THEME, Oreo_spark_blue_cursor +env = XCURSOR_SIZE,24 + +# Volume control +bind = ,code:123, exec, pamixer -i 5 +bind = ,code:122, exec, pamixer -d 5 +bind = ,code:121, exec, pamixer -t + + +# Brightness-Control +bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%' +bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%' + + +# Monitor config binds +bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display' +bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display' + +# Internal display controls +bind = $mainMod ALT, E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && notify-send 'Set to battery optimized display settings' +bind = $mainMod ALT, P, exec, hyprctl keyword monitor eDP-1, preferred, 0x0, 1.5 && notify-send 'Set to performance optimized display settings' diff --git a/laptop/configs/hypr/hyprlock.conf b/laptop/configs/hypr/hyprlock.conf new file mode 100644 index 0000000..eb9c47f --- /dev/null +++ b/laptop/configs/hypr/hyprlock.conf @@ -0,0 +1,96 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ████ ████████ █ ██ ██████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + +general { + grace = 15 +} + +# BACKGROUND +background { + monitor = + path = /home/janis/Pictures/arch-bg.png # Or screenshot + + blur_passes = 1 +} + +# PASSWORD INPUT +input-field { + monitor = + size = 300, 40 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + outer_color = rgb(204, 92, 0) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + + position = 0, -80 + halign = center + valign = center +} + +label { + monitor = + text = $TIME + color = rgba(200, 200, 200, 1.0) + font_size = 100 + font_family = Source Code Pro + + position = 0, 80 + halign = center + valign = center +} + +label { + monitor = + text = $LAYOUT + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 0 + halign = right + valign = bottom +} + +label { + monitor = + text = $USER + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 0 + halign = left + valign = bottom + shadow_passes = 3 +} + +label { + monitor = + text = Failed attempts: $ATTEMPTS + color = rgba(200, 0, 0, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 20 + halign = center + valign = bottom + shadow_passes = 3 + shadow_size = 5 + shadow_boost = 3 + shadow_color = rgb(255,255,255) +} + diff --git a/laptop/configs/hypr/wall_4K.png b/laptop/configs/hypr/wall_4K.png new file mode 100755 index 0000000..f835a97 Binary files /dev/null and b/laptop/configs/hypr/wall_4K.png differ diff --git a/laptop/configs/hypr/xdg-portal-hyprland b/laptop/configs/hypr/xdg-portal-hyprland new file mode 100755 index 0000000..61a3648 --- /dev/null +++ b/laptop/configs/hypr/xdg-portal-hyprland @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & \ No newline at end of file diff --git a/laptop/configs/waybar/config.jsonc b/laptop/configs/waybar/config.jsonc new file mode 100755 index 0000000..b86e733 --- /dev/null +++ b/laptop/configs/waybar/config.jsonc @@ -0,0 +1,137 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": [ + "clock", + "cpu", + "memory", + "battery", + "backlight", + "hyprland/workspaces" + ], + "modules-center": ["hyprland/window"], + "modules-right": [ + "tray", + "network", + "pulseaudio", + "pulseaudio#microphone", + "custom/powerMenu" + ], + "hyprland/window": { + "format": "{}" + }, + "tray": { + "icon-size": 14, + "spacing": 8 + }, + "custom/powerMenu": { + "format": "⏻", + "on-click": "rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi" + }, + "network": { + "format-disconnected": " Net", + "format-wifi": "{icon} {essid}", + "format-ethernet": " Wired", + "tooltip-format-ethernet": "Ethernet\nInterface: {ifname}\nIP: {ipaddr}\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}", + "tooltip-format-wifi": "Wi-Fi\nSSID: {essid}\nIP: {ipaddr}\nSignal strength: {signalStrength}%\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}\nFrequency: {frequency}GHz", + "tooltip-format-disconnected": "Networking\n{ifname} disconnected", + "on-click": "terminator -x nmtui", + "format-icons": ["", "", "", ""] + }, + "battery":{ + "states": { + "95": 100, + "85": 90, + "75": 80, + "65": 70, + "55": 60, + "45": 50, + "35": 40, + "25": 30, + "15": 20, + "5": 10, + "critical": 0, + }, + "format":" {capacity}", + "format-95": " {capacity}", + "format-85": " {capacity}", + "format-75": " {capacity}", + "format-65": " {capacity}", + "format-55": " {capacity}", + "format-45": " {capacity}", + "format-35": " {capacity}", + "format-25": " {capacity}", + "format-15": " {capacity}", + "format-15": " {capacity}", + "format-critical": " {capacity}", + "format-charging":" {capacity}", + "format-plugged": " ", + "format-full": " 100", + "format-empty": " ({capacity}%)", + "tooltip-format":"Battery\nCurrently {timeTo}\nCurrently drawing: {power}W\nBattery status: {capacity}%" + }, + "backlight": { + "stages": { + "high": 50, + "low": 0, + }, + "format": "🌣 {percent}", + "format-high": " {percent}", + "format-low": " {percent}", + "tooltip-format": "Brightness\n🌣 {percent}", + "on-scroll-up": "light -A 1", + "on-scroll-down": "light -U 1" + }, + "clock": { + "format": "{:%a, %d.%m %H:%M:%S}", + "tooltip-format": "Calendar\n{calendar}", + "interval": 1 + }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "format": "{icon}" + }, + "cpu": { + "tooltip-format": "CPU\nTotal: {usage}", + "format": " {usage}", + "interval": 5 + }, + "memory": { + "format": " {percentage}", + "interval": 5 + }, + "pulseaudio": { + "format": "{icon} {volume}", + "tooltip": true, + "format-muted": " Off", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "🏎", + "default": ["", "", ""] + } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": " {volume}", + "format-source-muted": " 0", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + } +} diff --git a/laptop/configs/waybar/scripts/supower.py b/laptop/configs/waybar/scripts/supower.py new file mode 100755 index 0000000..a534143 --- /dev/null +++ b/laptop/configs/waybar/scripts/supower.py @@ -0,0 +1,196 @@ +#!/usr/bin/python +# pylint: disable=missing-module-docstring +import json +import sys +import time +import dbus +import click + +FBOOL = ('no', 'yes') +PROPERTIES = { + 'BatteryLevel': ('unknown', 'none', 'low', 'critical', 'normal', 'high', 'full'), + 'Capacity': None, + 'Energy': None, + 'EnergyEmpty': None, + 'EnergyFull': None, + 'EnergyFullDesign': None, + 'EnergyRate': None, + 'HasHistory': FBOOL, + 'HasStatistics': FBOOL, + 'IconName': None, + 'IsPresent': FBOOL, + 'IsRechargeable': FBOOL, + 'Luminosity': None, + 'Model': None, + 'NativePath': None, + 'Online': FBOOL, + 'Percentage': None, + 'PowerSupply': FBOOL, + 'Serial': None, + 'State': ('unknown', 'charging', 'discharging', 'empty', 'fully charged', + 'pending charge','pending discharge'), + 'Technology': ('unknown', 'lithium ion', 'lithium polymer', 'lithium iron phosphate', + 'lead acid', 'nickel cadmium', 'nickel metal hydride'), + 'Temperature': None, + 'TimeToEmpty': None, + 'TimeToFull': None, + 'Type': ('unknown', 'line-power', 'battery', 'ups', 'monitor', 'mouse', 'keyboard', + 'pda', 'phone', 'media-player', 'tablet', 'computer', 'gaming_input', + 'pen', 'touchpad', 'modem', 'network', 'headset', 'speakers', + 'headphones', 'video', 'other_audio', 'remote_control', 'printer', 'scanner', + 'camera', 'wearable', 'toy', 'bluetooth-generic'), + 'UpdateTime': None, + 'Vendor': None, + 'Voltage': None, + 'WarningLevel': ('unknown', 'none', 'discharging', 'low', 'critical', 'action') +} + + +def get_tooltip(_type): + #TOOLTIP_OTHER=""" luminosity: {Luminosity}""" I don't have a way to test this property + header = ('native-path: {NativePath}' + '\npower supply: {PowerSupply}' + '\nupdated: {UpdateTime}' + '\nhas history: {HasHistory}' + '\nhas statistics: {HasStatistics}') + + body = ('\n{Type}' + '\n warning-level: {WarningLevel}' + '\n icon-name: {IconName}') + + if _type == 'line-power': + body += '\n online: {Online}' + + else: + header += ('\nmodel: {Model}' + '\nserial: {Serial}') + + body += ('\n percentage: {Percentage}%' + '\n present: {IsPresent}') + + if _type == "battery": + header += ('\nvendor: {Vendor}') + body += ('\n state: {State}' + '\n rechargeable: {IsRechargeable}' + '\n energy: {Energy} Wh' + '\n energy-empty: {EnergyEmpty} Wh' + '\n energy-full: {EnergyFull} Wh' + '\n energy-full-design: {EnergyFullDesign} Wh' + '\n energy-rate: {EnergyRate} W' + '\n voltage: {Voltage} V' + '\n capacity: {Capacity}%' + '\n technology: {Technology}' + '\n temperature: {Temperature}' + '\n time-to-empty: {TimeToEmpty}' + '\n time-to-full: {TimeToFull}' + '\n battery-level: {BatteryLevel}') + + return f'{header}{body}' + + +def device_info(bus, device): + """Lookup device properties""" + result = {} + device_proxy = bus.get_object('org.freedesktop.UPower', device) + device_interface = dbus.Interface(device_proxy, 'org.freedesktop.DBus.Properties') + for _property, friendly_name in PROPERTIES.items(): + try: + data = device_interface.Get('org.freedesktop.UPower.Device', _property) + if _property == 'UpdateTime': + result[_property] = time.ctime(data) + else: + result[_property] = friendly_name[data] if friendly_name else data + except (dbus.exceptions.DBusException, IndexError): + result[_property] = 'none' + + return result + + +def get_devices(bus): + """Retrieve list of Upower devices""" + devices_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower') + devices_interface = dbus.Interface(devices_proxy, 'org.freedesktop.UPower') + devices = devices_interface.EnumerateDevices() + + return devices + + +def get_device(bus, devices, device): + """Retrieve Upower device using path or model""" + + if device in devices: + return device + + for path in devices: + inspect = device_info(bus, path) + if inspect.get('Model') == device: + return path + + raise Exception("Device Not Found") + + +def output_devices(bus, devices): + """Output device list""" + for device in devices: + print(f'{device}\t{device_info(bus, device).get("Model")}') + sys.exit(0) + +def check_device(key, info): + sys.exit(FBOOL.index(info.get(key.replace('{','').replace('}', '')))) + + +@click.command() +@click.option('--list-devices', is_flag=True, help='List devices and models') +@click.option('--check', help='Exists using boolean values for device') +@click.option('--device', '--model', help='Path or Model') +@click.option('--text', show_default=True, default="{Model}") +@click.option('--alt', show_default=True, default="{BatteryLevel}") +@click.option('--tooltip', default=None, help="Similar to upower -i ") +@click.option('--class', '_class', show_default=True, default="{BatteryLevel}") +@click.option('--percentage', show_default=True, default="{Percentage:.0f}") +def main(list_devices, check, device, text, alt, tooltip, _class, percentage): + """ + TEXT can be replaced using one or more {KEY}\n + {BatteryLevel} {Capacity} {Energy} {EnergyEmpty} {EnergyFull} + {EnergyFullDesign} {EnergyRate} {HasHistory} {HasStatistics} + {IconName} {IsPresent} {IsRechargeable} {Luminosity} + {Model} {NativePath} {Online} {Percentage} {PowerSupply} + {Serial} {State} {Technology} {Temperature} {TimeToEmpty} + {TimeToFull} {Type} {UpdateTime} {Vendor} {Voltage} + {WarningLevel} + + Example: supower.py --model 'MX Master 2S' --tooltip '{State}' + supower.py --model '/org/freedesktop/UPower/devices/line_power_AC' --check Online + + """ + exit = 0 + bus = dbus.SystemBus() + devices = get_devices(bus) + + if list_devices: + output_devices(bus, devices) + + try: + device = get_device(bus, devices, device) + info = device_info(bus, device) + if check: + check_device(check, info) + + output = { + "text": text.format(**info), + "alt": alt.format(**info), + "tooltip": (tooltip if tooltip else get_tooltip(info['Type'])).format(**info), + "class": _class.format(**info), + "percentage": float(percentage.format(**info)) + } + except Exception as error: + output = {"text": f'Error {device.split("/")[-1]} {error}', 'tooltip': f'{error}'} + exit = 2 + + print(json.dumps(output)) + sys.exit(exit) + + +if __name__ == "__main__": + # pylint: disable=no-value-for-parameter + main() \ No newline at end of file diff --git a/laptop/configs/waybar/style.css b/laptop/configs/waybar/style.css new file mode 100755 index 0000000..dc5c92d --- /dev/null +++ b/laptop/configs/waybar/style.css @@ -0,0 +1,135 @@ +* { + border: none; + border-radius: 0; + font-family: 'FluentSystemIcons-Regular,Comfortaa', monospace; + font-weight: 600; + font-size: 16px; + min-height: 0; + margin-left: 3px; + margin-right: 3px; +} + +window#waybar { + background: rgba(0, 0, 0, 0); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +#workspaces button { + padding: 3px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#workspaces { + background: #1e1e2e; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#window, +#clock, +#custom-powerMenu, +#pulseaudio, +#memory, +#battery, +#backlight, +#tray, +#network, +#workspaces, +#cpu { + background: #000024; + padding: 2px 12px; + margin: 3px 2px; + margin-top: 9px; + border: 1px solid #181825; + border-radius: 10px; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#cpu { + margin-right: 0; + border-radius: 10px 0px 0px 10px; + background-color: #222244; +} + +#memory, #battery { + color: #89b4fa; + margin-left: 0; + margin-right: 0; + border-radius: 0px; + background-color: #222244; +} + +#backlight { + color: #89b4fa; + margin-left: 0; + border-radius: 0px 10px 10px 0px; + background-color: #222244; +} + +#battery.critical { + color: orange; +} + +#battery.empty { + color: red; +} + +#window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; +} + +#clock { + color: #a6f7ad; + min-width: 145px; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #a6f7ad; + border-left: 0px; + border-right: 0px; +} diff --git a/laptop/environment b/laptop/environment new file mode 100644 index 0000000..ec041a4 --- /dev/null +++ b/laptop/environment @@ -0,0 +1,13 @@ +# +# This file is parsed by pam_env module +# +# Syntax: simple "KEY=VAL" pairs on separate lines +# + +QT_QPA_PLATFORMTHEME=qt5ct +GCM_CREDENTIAL_STORE=secretservice +VKD3D_CONFIG=dxr11,dxr +RADV_PERFTEST_RT=1 +QT_QPA_PLATFORM=wayland +GTK_THEME=Material-Black-Blueberry +QT_STYLE_OVERRIDE=kvantum diff --git a/laptop/grub b/laptop/grub new file mode 100644 index 0000000..f09a5b8 --- /dev/null +++ b/laptop/grub @@ -0,0 +1,63 @@ +# GRUB boot loader configuration + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="Arch" +GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash" +GRUB_CMDLINE_LINUX="" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +#GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'hidden' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=menu + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `videoinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +#GRUB_SAVEDEFAULT=true + +# Uncomment to disable submenus in boot menu +#GRUB_DISABLE_SUBMENU=y + +# Probing for other operating systems is disabled for security reasons. Read +# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this +# functionality install os-prober and uncomment to detect and include other +# operating systems. +GRUB_DISABLE_OS_PROBER=false +GRUB_THEME="/usr/share/grub/themes/monterey-grub-theme/theme.txt" diff --git a/laptop/installedPackages.txt b/laptop/installedPackages.txt new file mode 100644 index 0000000..241ff14 --- /dev/null +++ b/laptop/installedPackages.txt @@ -0,0 +1,1472 @@ +7zip +a52dec +aalib +abseil-cpp +accounts-qml-module +acl +acpi +adobe-source-code-pro-fonts +adwaita-cursors +adwaita-icon-theme +adwaita-icon-theme-legacy +alsa-card-profiles +alsa-lib +alsa-plugins +alsa-topology-conf +alsa-ucm-conf +aom +appstream +appstream-glib +aquamarine +archlinux-keyring +argon2 +aribb24 +ark +at-spi2-core +atkmm +attica +attr +audit +autoconf +autojump +automake +avahi +babl +baloo +base +base-devel +bash +bash-language-server +bashtop +biber +binutils +bison +blas +blas64-openblas +blueman +bluez +bluez-libs +botan2 +brave-bin +breeze-icons +bridge-utils +brotli +bubblewrap +bzip2 +c-ares +ca-certificates +ca-certificates-mozilla +ca-certificates-utils +cairo +cairomm +cairomm-1.16 +cantarell-fonts +cdparanoia +cfitsio +cheese +chromaprint +clutter +clutter-gst +clutter-gtk +cmake +cmark +cmatrix +cogl +colord +composer +containerd +convertlit +coreutils +cppdap +cpupower-gui +cracklib +cryptsetup +curl +dav1d +db5.3 +dbus +dbus-broker +dbus-broker-units +dbus-glib +dconf +debugedit +default-cursors +desktop-file-utils +device-mapper +diffutils +discount +djvulibre +dnssec-anchors +docker +double-conversion +duktape +dunst +dvisvgm +e2fsprogs +ebook-tools +eclipse-java-bin +editorconfig-core-c +efibootmgr +efivar +electron34 +elementary-icon-theme +enchant +exiv2 +exo +expat +faac +faad2 +fakeroot +fcitx5 +ffcall +ffmpeg +ffmpeg4.4 +fftw +file +filesystem +filezilla +findutils +fish +flac +flex +fluidsynth +fmt +fontconfig +freeglut +freetype2 +frei0r-plugins +fribidi +fuse-common +fuse3 +garcon +gawk +gc +gcc +gcc-libs +gcr +gcr-4 +gd +gdbm +gdk-pixbuf2 +gegl +geoclue +gettext +ghc-libs +ghex +ghostscript +giflib +gimp +girara +git +git-credential-manager-core-bin +gjs +glib-networking +glib2 +glibc +glibmm +glibmm-2.68 +glslang +glu +gmp +gnome-characters +gnome-desktop +gnome-desktop-4 +gnome-desktop-common +gnome-disk-utility +gnome-font-viewer +gnome-keyring +gnome-themes-extra +gnome-tweaks +gnome-video-effects +gnulib-l10n +gnupg +gnutls +go +gobject-introspection +gobject-introspection-runtime +gperftools +gpgme +gpm +graphene +graphite +grep +grim +grimblast-git +groff +grub +gsettings-desktop-schemas +gsettings-system-schemas +gsfonts +gsm +gssdp +gst-libav +gst-plugin-pipewire +gst-plugins-bad +gst-plugins-bad-libs +gst-plugins-base +gst-plugins-base-libs +gst-plugins-good +gstreamer +gtest +gtk-layer-shell +gtk-update-icon-cache +gtk2 +gtk3 +gtk4 +gtkmm-4.0 +gtkmm3 +gtksourceview4 +guile +gupnp +gupnp-igd +gvfs +gwenview +gzip +handbrake +harfbuzz +harfbuzz-icu +haskell-aeson +haskell-aeson-pretty +haskell-ansi-terminal +haskell-ansi-terminal-types +haskell-ansi-wl-pprint +haskell-appar +haskell-asn1-encoding +haskell-asn1-parse +haskell-asn1-types +haskell-assoc +haskell-async +haskell-attoparsec +haskell-attoparsec-aeson +haskell-attoparsec-iso8601 +haskell-auto-update +haskell-base-compat +haskell-base-compat-batteries +haskell-base-orphans +haskell-base-unicode-symbols +haskell-base16-bytestring +haskell-base64-bytestring +haskell-basement +haskell-bifunctors +haskell-bitvec +haskell-blaze-builder +haskell-blaze-html +haskell-blaze-markup +haskell-boring +haskell-bsb-http-chunked +haskell-byteorder +haskell-call-stack +haskell-case-insensitive +haskell-cassava +haskell-cereal +haskell-citeproc +haskell-cmdargs +haskell-colour +haskell-commonmark +haskell-commonmark-extensions +haskell-commonmark-pandoc +haskell-comonad +haskell-conduit +haskell-conduit-extra +haskell-constraints +haskell-contravariant +haskell-cookie +haskell-crypton +haskell-crypton-connection +haskell-crypton-x509 +haskell-crypton-x509-store +haskell-crypton-x509-system +haskell-crypton-x509-validation +haskell-data-array-byte +haskell-data-default +haskell-data-default-class +haskell-data-default-instances-containers +haskell-data-default-instances-dlist +haskell-data-default-instances-old-locale +haskell-data-fix +haskell-dec +haskell-digest +haskell-distributive +haskell-djot +haskell-dlist +haskell-doclayout +haskell-doctemplates +haskell-easy-file +haskell-emojis +haskell-erf +haskell-fast-logger +haskell-file-embed +haskell-foldable1-classes-compat +haskell-generically +haskell-ghc-bignum-orphans +haskell-glob +haskell-gridtables +haskell-haddock-library +haskell-hashable +haskell-hourglass +haskell-hslua +haskell-hslua-aeson +haskell-hslua-classes +haskell-hslua-core +haskell-hslua-list +haskell-hslua-marshalling +haskell-hslua-module-doclayout +haskell-hslua-module-path +haskell-hslua-module-system +haskell-hslua-module-text +haskell-hslua-module-version +haskell-hslua-module-zip +haskell-hslua-objectorientation +haskell-hslua-packaging +haskell-hslua-repl +haskell-hslua-typing +haskell-http-api-data +haskell-http-client +haskell-http-client-tls +haskell-http-date +haskell-http-media +haskell-http-types +haskell-http2 +haskell-hunit +haskell-indexed-traversable +haskell-indexed-traversable-instances +haskell-integer-logarithms +haskell-iproute +haskell-ipynb +haskell-isocline +haskell-jira-wiki-markup +haskell-juicypixels +haskell-lexer +haskell-libyaml +haskell-lpeg +haskell-lua +haskell-memory +haskell-mime-types +haskell-mmorph +haskell-monad-control +haskell-mono-traversable +haskell-network +haskell-network-byte-order +haskell-network-uri +haskell-old-locale +haskell-old-time +haskell-onetuple +haskell-only +haskell-optparse-applicative +haskell-ordered-containers +haskell-os-string +haskell-pandoc +haskell-pandoc-lua-engine +haskell-pandoc-lua-marshal +haskell-pandoc-server +haskell-pandoc-types +haskell-pem +haskell-pretty-show +haskell-prettyprinter +haskell-primitive +haskell-psqueues +haskell-quickcheck +haskell-random +haskell-recv +haskell-regex-base +haskell-regex-tdfa +haskell-resourcet +haskell-safe +haskell-safe-exceptions +haskell-scientific +haskell-semialign +haskell-semigroupoids +haskell-servant +haskell-servant-server +haskell-sha +haskell-simple-sendfile +haskell-singleton-bool +haskell-skylighting +haskell-skylighting-core +haskell-skylighting-format-ansi +haskell-skylighting-format-blaze-html +haskell-skylighting-format-context +haskell-skylighting-format-latex +haskell-socks +haskell-some +haskell-sop-core +haskell-split +haskell-splitmix +haskell-statevar +haskell-streaming-commons +haskell-strict +haskell-syb +haskell-tagged +haskell-tagsoup +haskell-temporary +haskell-texmath +haskell-text-conversions +haskell-text-icu +haskell-text-short +haskell-th-abstraction +haskell-th-compat +haskell-th-lift +haskell-th-lift-instances +haskell-these +haskell-time-compat +haskell-time-manager +haskell-tls +haskell-toml-parser +haskell-transformers-base +haskell-transformers-compat +haskell-type-equality +haskell-typed-process +haskell-typst +haskell-typst-symbols +haskell-unicode-collation +haskell-unicode-data +haskell-unicode-transforms +haskell-uniplate +haskell-unix-compat +haskell-unix-time +haskell-unliftio +haskell-unliftio-core +haskell-unordered-containers +haskell-utf8-string +haskell-uuid-types +haskell-vault +haskell-vector +haskell-vector-algorithms +haskell-vector-stream +haskell-wai +haskell-wai-app-static +haskell-wai-cors +haskell-wai-extra +haskell-wai-logger +haskell-warp +haskell-witherable +haskell-word8 +haskell-xml +haskell-xml-conduit +haskell-xml-types +haskell-yaml +haskell-zip-archive +haskell-zlib +hicolor-icon-theme +hidapi +highway +hslua-cli +http-parser +hugo +hunspell +hwdata +hwloc +hyphen +hyprcursor +hyprevents-git +hyprfreeze-git +hyprgraphics +hypridle +hyprland +hyprland-qt-support +hyprland-qtutils +hyprlang +hyprlock +hyprprop-git +hyprutils +hyprwayland-scanner +iana-etc +ibus +icu +ijs +imagemagick +imath +imlib2 +iproute2 +iptables +iputils +iso-codes +jansson +jasper +java-environment-common +java-runtime-common +jbig2dec +jbigkit +jdk-openjdk +jdtls +jq +js115 +js128 +json-c +json-glib +jsoncpp +julia +kaccounts-integration +karchive +karchive5 +kate +kauth +kbd +kbookmarks +kcmutils +kcodecs +kcolorpicker +kcolorscheme +kcompletion +kconfig +kconfigwidgets +kcoreaddons +kcrash +kdbusaddons +kdnssd +keyutils +kfilemetadata +kglobalaccel +kguiaddons +kguiaddons5 +ki18n +kiconthemes +kidletime +kimageannotator +kio +kirigami +kitemmodels +kitemviews +kitty +kitty-shell-integration +kitty-terminfo +kjobwidgets +kmines +kmod +knewstuff +knotifications +kpackage +kparts +kpty +krb5 +kservice +ktexteditor +ktextwidgets +kuserfeedback +kvantum +kwallet +kwidgetsaddons +kwindowsystem +kxmlgui +l-smash +lame +lapack +lcms2 +ldns +leancrypto +lensfun +less +lib32-acl +lib32-alsa-lib +lib32-alsa-plugins +lib32-brotli +lib32-bzip2 +lib32-curl +lib32-dbus +lib32-e2fsprogs +lib32-expat +lib32-fontconfig +lib32-freetype2 +lib32-gcc-libs +lib32-gettext +lib32-glib2 +lib32-glibc +lib32-harfbuzz +lib32-icu +lib32-json-c +lib32-keyutils +lib32-krb5 +lib32-libcap +lib32-libdrm +lib32-libelf +lib32-libffi +lib32-libgcrypt +lib32-libglvnd +lib32-libgpg-error +lib32-libidn2 +lib32-libldap +lib32-libnghttp2 +lib32-libnghttp3 +lib32-libnl +lib32-libnsl +lib32-libpcap +lib32-libpciaccess +lib32-libpng +lib32-libpsl +lib32-libssh2 +lib32-libtasn1 +lib32-libtirpc +lib32-libunistring +lib32-libunwind +lib32-libx11 +lib32-libxau +lib32-libxcb +lib32-libxcrypt +lib32-libxcrypt-compat +lib32-libxcursor +lib32-libxdmcp +lib32-libxext +lib32-libxfixes +lib32-libxi +lib32-libxkbcommon +lib32-libxml2 +lib32-libxrandr +lib32-libxrender +lib32-libxshmfence +lib32-libxss +lib32-libxxf86vm +lib32-llvm-libs +lib32-lm_sensors +lib32-mesa +lib32-ncurses +lib32-nspr +lib32-nss +lib32-openssl +lib32-p11-kit +lib32-pam +lib32-pcre2 +lib32-spirv-tools +lib32-sqlite +lib32-systemd +lib32-util-linux +lib32-vulkan-icd-loader +lib32-vulkan-radeon +lib32-wayland +lib32-xcb-util-keysyms +lib32-xz +lib32-zlib +lib32-zstd +libaccounts-glib +libaccounts-qt +libadwaita +libao +libappindicator-gtk3 +libarchive +libass +libassuan +libasyncns +libatasmart +libavc1394 +libavif +libavtp +libb2 +libblastrampoline +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-nvme +libblockdev-part +libblockdev-swap +libbluray +libbpf +libbs2b +libbsd +libbytesize +libcaca +libcamera +libcamera-ipa +libcanberra +libcap +libcap-ng +libcdio +libcdio-paranoia +libcheese +libcloudproviders +libcolord +libcups +libdaemon +libdatrie +libdbusmenu-glib +libdbusmenu-gtk3 +libdc1394 +libdca +libde265 +libdecor +libdeflate +libdisplay-info +libdovi +libdrm +libdv +libdvbpsi +libdvdnav +libdvdread +libebml +libedit +libei +libelf +libepoxy +libevdev +libevent +libexif +libfdk-aac +libffi +libfilezilla +libfontenc +libfreeaptx +libgcrypt +libgexiv2 +libgirepository +libgit2 +libglvnd +libgme +libgpg-error +libgtop +libgudev +libgusb +libhandy +libheif +libibus +libice +libidn +libidn2 +libiec61883 +libimobiledevice +libimobiledevice-glue +libinih +libinput +libinstpatch +libisl +libjpeg-turbo +libjxl +libkdcraw +libkdegames +libkexiv2 +libkeybinder3 +libksba +liblc3 +libldac +libldap +libliftoff +liblqr +liblrdf +libltc +libluv +libmad +libmanette +libmatroska +libmd +libmfx +libmicrodns +libmm-glib +libmng +libmnl +libmodplug +libmpc +libmpcdec +libmpdclient +libmpeg2 +libmspack +libmypaint +libmysofa +libndp +libnet +libnetfilter_conntrack +libnewt +libnfnetlink +libnftnl +libnghttp2 +libnghttp3 +libngtcp2 +libnice +libnl +libnm +libnma +libnma-common +libnotify +libnsl +libnvme +libogg +libomxil-bellagio +libopenmpt +libp11-kit +libpaper +libpcap +libpciaccess +libpgm +libpipeline +libpipewire +libplacebo +libplist +libpng +libproxy +libpsl +libpulse +libpwquality +libqalculate +libraqm +libraw +libraw1394 +librewolf-bin +librewolf-bin-debug +librsvg +librsync +libsamplerate +libsasl +libseccomp +libsecret +libshout +libsigc++ +libsigc++-3.0 +libsigsegv +libsixel +libsm +libsndfile +libsodium +libsoup +libsoup3 +libsoxr +libspectre +libspiro +libspng +libsrtp +libssh +libssh2 +libstemmer +libsynctex +libsysprof-capture +libtar +libtasn1 +libteam +libthai +libtheora +libtiff +libtirpc +libtommath +libtool +libunibreak +libunistring +libunwind +libupnp +libusb +libusbmuxd +libutempter +libutf8proc +libuv +libva +libvdpau +libverto +libvlc +libvorbis +libvpl +libvpx +libvterm +libwacom +libwebp +libwireplumber +libwmf +libwnck3 +libx11 +libxau +libxaw +libxcb +libxcomposite +libxcrypt +libxcrypt-compat +libxcursor +libxcvt +libxdamage +libxdg-basedir +libxdmcp +libxext +libxfce4ui +libxfce4util +libxfce4windowing +libxfixes +libxfont2 +libxft +libxi +libxinerama +libxkbcommon +libxkbcommon-x11 +libxkbfile +libxklavier +libxml2 +libxmlb +libxmu +libxpm +libxpresent +libxrandr +libxrender +libxres +libxshmfence +libxslt +libxss +libxt +libxtst +libxv +libxxf86vm +libyaml +libyuv +libzip +licenses +light +light-debug +lilv +linux +linux-api-headers +linux-firmware +linux-firmware-whence +lld +llhttp +llvm-julia-libs +llvm-libs +lm_sensors +lmdb +lsb-release +lsof +lua +lua-language-server +lua-lpeg +lua51-lpeg +luajit +luarocks +lv2 +lz4 +lzo +m4 +mailcap +make +man-db +mbedtls2 +md4c +mdadm +media-player-info +meld +mesa +mesa-utils +meson +minizip +mjpegtools +mkinitcpio +mkinitcpio-busybox +mobile-broadband-provider-info +mpdecimal +mpfr +mpg123 +mpv +msgpack-c +mtdev +mujs +mypaint-brushes1 +nano +ncurses +neofetch +neon +neovim +nettle +network-manager-applet +networkmanager +nextcloud-client +ninja +nm-connection-editor +nmap +node-gyp +nodejs-lts-jod +nodejs-nopt +noto-fonts +noto-fonts-emoji +npm +npth +nspr +nss +numactl +nwg-look +ocl-icd +okular +onetbb +oniguruma +openal +openblas64 +opencore-amr +openexr +openh264 +openjpeg2 +openlibm +openssh +openssl +openvr +opus +orc +p11-kit +pacman +pacman-mirrorlist +pam +pambase +pamixer +pandoc-cli +pango +pangomm +pangomm-2.48 +parted +patch +pavucontrol +pciutils +pcre +pcre2 +pcsclite +perl +perl-alien-build +perl-alien-libxml2 +perl-autovivification +perl-b-hooks-endofscope +perl-business-isbn +perl-business-isbn-data +perl-business-ismn +perl-business-issn +perl-capture-tiny +perl-class-accessor +perl-class-data-inheritable +perl-class-inspector +perl-class-load +perl-class-singleton +perl-clone +perl-data-compare +perl-data-dump +perl-data-optlist +perl-data-uniqid +perl-datetime +perl-datetime-calendar-julian +perl-datetime-format-builder +perl-datetime-format-strptime +perl-datetime-locale +perl-datetime-timezone +perl-devel-stacktrace +perl-dist-checkconflicts +perl-encode-locale +perl-error +perl-eval-closure +perl-exception-class +perl-exporter-tiny +perl-ffi-checklib +perl-file-chdir +perl-file-find-rule +perl-file-listing +perl-file-sharedir +perl-file-sharedir-install +perl-file-slurp-tiny +perl-file-slurper +perl-file-which +perl-html-parser +perl-html-tagset +perl-http-cookiejar +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-io-html +perl-io-socket-ssl +perl-io-string +perl-ipc-run3 +perl-libwww +perl-lingua-translit +perl-list-allutils +perl-list-moreutils +perl-list-moreutils-xs +perl-list-someutils +perl-list-utilsby +perl-log-log4perl +perl-lwp-mediatypes +perl-lwp-protocol-https +perl-mailtools +perl-math-round +perl-mime-charset +perl-module-implementation +perl-module-runtime +perl-mozilla-ca +perl-mro-compat +perl-namespace-autoclean +perl-namespace-clean +perl-net-http +perl-net-ssleay +perl-number-compare +perl-package-deprecationmanager +perl-package-stash +perl-package-stash-xs +perl-params-util +perl-params-validate +perl-params-validationcompiler +perl-parse-recdescent +perl-path-tiny +perl-perlio-utf8-strict +perl-regexp-common +perl-role-tiny +perl-sort-key +perl-specio +perl-sub-exporter +perl-sub-exporter-progressive +perl-sub-identify +perl-sub-install +perl-test-fatal +perl-text-bibtex +perl-text-csv +perl-text-glob +perl-text-roman +perl-tie-cycle +perl-timedate +perl-try-tiny +perl-unicode-linebreak +perl-uri +perl-variable-magic +perl-www-robotrules +perl-xml-libxml +perl-xml-libxml-simple +perl-xml-libxslt +perl-xml-namespacesupport +perl-xml-sax +perl-xml-sax-base +perl-xml-writer +phonon-qt6 +phonon-qt6-vlc +php +pinentry +pipewire +pipewire-alsa +pipewire-audio +pipewire-jack +pipewire-pulse +pipewire-session-manager +pixman +pkgconf +plasma-activities +playerctl +plymouth +polkit +polkit-gnome +polkit-kde-agent +polkit-qt6 +poppler +poppler-data +poppler-glib +poppler-qt6 +popt +portaudio +potrace +prettier +prismlauncher +procps-ng +psmisc +pugixml +purpose +pyright +python +python-attrs +python-autocommand +python-cairo +python-cffi +python-colorama +python-configobj +python-cryptography +python-dbus +python-fastjsonschema +python-filelock +python-gobject +python-inflect +python-jaraco.collections +python-jaraco.context +python-jaraco.functools +python-jaraco.text +python-mako +python-markdown +python-markupsafe +python-more-itertools +python-ordered-set +python-packaging +python-pip +python-platformdirs +python-psutil +python-pycparser +python-pygments +python-pyxdg +python-setuptools +python-shtab +python-six +python-termcolor +python-tomli +python-tqdm +python-trove-classifiers +python-typeguard +python-typing_extensions +python-validate-pyproject +python-wheel +qalculate-gtk +qca-qt6 +qqc2-desktop-style +qrencode +qt5-base +qt5-declarative +qt5-graphicaleffects +qt5-location +qt5-quickcontrols +qt5-quickcontrols2 +qt5-svg +qt5-translations +qt5-wayland +qt5-webchannel +qt5-webengine +qt5-websockets +qt5-x11extras +qt5ct +qt6-5compat +qt6-base +qt6-declarative +qt6-imageformats +qt6-multimedia +qt6-multimedia-ffmpeg +qt6-networkauth +qt6-positioning +qt6-shadertools +qt6-speech +qt6-svg +qt6-translations +qt6-wayland +qt6-webchannel +qt6-webengine +qt6-websockets +qt6ct +qtkeychain-qt5 +qtkeychain-qt6 +quazip-qt6 +raptor +rav1e +re2 +readline +reflector +rhash +ripgrep +rofi +rofi-power-menu +rtkit +rtmpdump +rubberband +ruby +rubygems +runc +rustdesk +rustup +sbc +scdoc +sdbus-cpp +sddm +sdl2 +sdl2-debug +sdl3 +seahorse +seatd +sed +semver +serd +serpl +shaderc +shadow +shairplay +shared-mime-info +shfmt +signon-kwallet-extension +signon-plugin-oauth2 +signon-ui +signond +slang +slurp +smartmontools +snappy +sndio +socat +solid +sonnet +sord +sound-theme-freedesktop +soundtouch +spandsp +spdlog +speex +speexdsp +spirv-tools +sqlite +sratom +srt +startup-notification +steam +stylua +sudo +suitesparse +svt-av1 +svt-hevc +swaybg +syndication +syntax-highlighting +systemd +systemd-libs +systemd-sysvcompat +taglib +tar +tcl +tdb +terminator +texinfo +texlab +texlive-basic +texlive-bibtexextra +texlive-bin +texlive-binextra +texlive-context +texlive-fontsextra +texlive-fontsrecommended +texlive-fontutils +texlive-formatsextra +texlive-games +texlive-humanities +texlive-langgerman +texlive-latex +texlive-latexextra +texlive-latexrecommended +texlive-luatex +texlive-mathscience +texlive-metapost +texlive-music +texlive-pictures +texlive-plaingeneric +texlive-pstricks +texlive-publishers +texlive-xetex +threadweaver +thunar +thunar-volman +thunderbird +tinysparql +tk +tldr +tomlplusplus +tpm2-tss +tree-sitter +tree-sitter-c +tree-sitter-lua +tree-sitter-markdown +tree-sitter-query +tree-sitter-vim +tree-sitter-vimdoc +tslib +ttf-comfortaa +ttf-fantasque-nerd +ttf-fluentui-system-icons +ttf-iosevka-nerd +ttf-jetbrains-mono-nerd +ttf-nerd-fonts-symbols +ttf-nerd-fonts-symbols-common +tumbler +twolame +typescript +typescript-language-server +tzdata +uchardet +udisks2 +unibilium +unzip +upower +usbutils +util-linux +util-linux-libs +uxplay +uxplay-debug +v4l-utils +vapoursynth +vesktop-bin +vid.stab +vlc +vmaf +volume_key +vscode-html-languageserver +vscodium +vte-common +vte3 +vulkan-headers +vulkan-icd-loader +vulkan-radeon +vulkan-validation-layers +wavpack +waybar +wayland +wayland-protocols +webcord-bin +webkit2gtk +webrtc-audio-processing-1 +wget +which +wildmidi +wine +wireplumber +wl-clipboard +wlogout +wlogout-debug +wlroots +woff2 +wpa_supplicant +wxwidgets-common +wxwidgets-gtk3 +x264 +x265 +xcb-imdkit +xcb-proto +xcb-util +xcb-util-cursor +xcb-util-errors +xcb-util-image +xcb-util-keysyms +xcb-util-renderutil +xcb-util-wm +xcb-util-xrm +xcur2png +xdg-dbus-proxy +xdg-desktop-portal +xdg-desktop-portal-hyprland +xdg-user-dirs +xdg-utils +xdotool +xf86-input-libinput +xfce4-appfinder +xfce4-notifyd +xfce4-panel +xfce4-power-manager +xfce4-session +xfce4-settings +xfconf +xfdesktop +xfwm4 +xfwm4-themes +xkeyboard-config +xorg-fonts-encodings +xorg-iceauth +xorg-server +xorg-server-common +xorg-setxkbmap +xorg-xauth +xorg-xinit +xorg-xinput +xorg-xkbcomp +xorg-xmodmap +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xset +xorg-xwayland +xorgproto +xvidcore +xxhash +xz +y-cruncher +yay +yazi +zathura +zbar +zenity +zeromq +zimg +zip +zix +zlib +zstd +zvbi +zxing-cpp +zziplib diff --git a/laptop/mkinitcpio.conf b/laptop/mkinitcpio.conf new file mode 100644 index 0000000..2fd80a4 --- /dev/null +++ b/laptop/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck plymouth) + +# COMPRESSION +# Use this to compress the initramfs image. By default, zstd compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" diff --git a/laptop/pacman.conf b/laptop/pacman.conf new file mode 100644 index 0000000..7d7c2fd --- /dev/null +++ b/laptop/pacman.conf @@ -0,0 +1,100 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto +ILoveCandy +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#NoProgressBar +CheckSpace +#VerbosePkgLists +ParallelDownloads = 5 + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[extra-testing] +#Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[arch4edu] +Server = https://de.arch4edu.mirror.kescher.at/$arch + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/laptop/vscode-extensions b/laptop/vscode-extensions new file mode 100644 index 0000000..f96a2b0 --- /dev/null +++ b/laptop/vscode-extensions @@ -0,0 +1,36 @@ +aaron-bond.better-comments +abusaidm.html-snippets +bungcip.better-toml +dbaeumer.vscode-eslint +dlasagno.rasi +donjayamanne.jquerysnippets +ecmel.vscode-html-css +Equinusocio.vsc-community-material-theme +Equinusocio.vsc-material-theme +equinusocio.vsc-material-theme-icons +ev3dev.ev3dev-browser +eww-yuck.yuck +fivethree.vscode-hugo-snippets +formulahendry.auto-rename-tag +golang.go +hollowtree.vue-snippets +Ionic.ionic +James-Yu.latex-workshop +lllllllqw.jsdoc +mads-hartmann.bash-ide-vscode +mathematic.vscode-latex +mechatroner.rainbow-csv +ms-python.python +ms-vscode.cpptools +NilsSoderman.sitemap-generator +quicktype.quicktype +rust-lang.rust-analyzer +Shan.code-settings-sync +spences10.robots-txt +streetsidesoftware.code-spell-checker +streetsidesoftware.code-spell-checker-german +svelte.svelte-vscode +tecosaur.latex-utilities +valentjn.vscode-ltex +Vue.volar +wayou.vscode-todo-highlight diff --git a/pc/.bash_history b/pc/.bash_history new file mode 100644 index 0000000..e691e82 --- /dev/null +++ b/pc/.bash_history @@ -0,0 +1,500 @@ +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler.spec +./imagevideoupscaler +pyinstaller imagevideoupscaler-cli.py --onefile --name imagevideoupscaler --hidden-import "bin.engines" +./imagevideoupscaler +pyinstaller imagevideoupscaler-cli.py --onefile --name imagevideoupscaler +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +pyinstaller imagevideoupscaler-cli.py --name imagevideoupscaler +cd dist/imagevideoupscaler/ +./imagevideoupscaler -i +cd ../.. +cd ~/projects/FSRImageVideoUpscalerFrontend_New/ +ls +clear +ls +clear +yay -S rpm-build +yay -S rpm-tools +yay -S dpkg +yay -S fakeroot +clear +pip3 install py2deb +py2deb -r ./ +py2deb -r ~/projects/FSRImageVideoUpscalerFrontend_New/ +pip3 install symbol +clear +yay -S symbol +clear +pip3 install pyinstaller +yay -S python-pip +py2deb +python3 imagevideoupscaler-cli.py +clear +pip3 install symbol +pip3 install setuptools +yay -R python-pip +yay -S python-pip +pip install --upgrade pip +clear +pip install setuptools +yay -S setuptools +sudo pacman -Syu "pacman>=6.0.2-7" +pip3 +yay -S python-pip +yay -S python3-pip +clear +yay -S python-pip +pip3 install +python -m pip3 +python -m pip +pip +pip3 +clear +pip3 +pip3 install +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -M c -s 2 +clear +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E fsr -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +python3 imagevideoupscaler-cli.py -i ~/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -E ss -s 2 +npm run serve +npm run serve +npm run serve +npm i +npm run serve +clear +cd ../../website/ +cd dist/ +http-server +http-server +git pull origin main +git checkout origin master +git checkout origin main +cd frontend/ +npm run electron:serve +npm i -g @vue/cli +sudo npm i -g @vue/cli +npm audit fix --force +npm audit fix --force +npm audit fix --force +npm i +npm i +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i child_process +clear +npm run electron:serve +npm run serve +npm run serve +npm run serve +cd .. +ls +clear +python3 imagevideoupscaler-cli.py -h +python3 imagevideoupscaler-cli.py -p +python3 imagevideoupscaler-cli.py -h +python3 imagevideoupscaler-cli.py -d ss +cd frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i --save-dev @electron-forge/cli +npm exec --package=@electron-forge/cli -c "electron-forge import" +npm run make +cd src/ +npm run make +clear +cd .. +npm run electron:build +npm run electron:build -- --linux deb --win nsis +clear +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +npm run electron:build -- --linux deb --win nsis +yay -S libcript +yay -S libssl +clear +npm run electron:build -- --linux deb --linux rpm --win nsis +npm run electron:build -- --linux deb rpm --win nsis +yay -S libxcrypt-compat +npm run electron:build -- --linux deb rpm --win nsis +npm run electron:build -- --linux deb rpm --win nsis +cd ../packaging/ +ls +sudo chmod +x package.sh +./package.sh +mv --help +pip3 install pyinstaller +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +./package.sh +cd packaging/ +ls +sudo chmod +x package.sh +sudo chmod +x package.sh +./package.sh +./package.sh +./package.sh +cd ../dist/imagevideoupscaler/ +cd ../../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +clear +cd ../frontend/ +npm run electron:serve +cd ../packaging/ +./package.sh +cd ../frontend/ +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +clear +cd ../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +./imagevideoupscaler +./imagevideoupscaler -i /home/janis/Downloads/test.mp4 -o ~/Downloads/test_us.mp4 -s 2 -S 0.25 +clear +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i socket.io +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i socket.io-client +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +sudo chmod +x ./prepareWindowsPackaging.sh +./prepareWindowsPackaging.sh +wine python -m pip install pyinstaller +./package.sh +./package.sh +wine python -m PyInstaller +./package.sh +cd ../frontend/dist_electron/ +wine imagevideoupscaler\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +clear +cd ../frontend/ +npm run electron:serve +cd .. +python3 imagevideoupscaler-cli.py -d ss +cd frontend/ +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./package.sh +sudo chmod +x packageWindows.sh +sudo chmod +x packageLinux.sh +./packageWindows.sh +./packageWindows.sh +cd .. +python3 imagevideoupscaler-cli.py -h +cd frontend/ +npm run serve +npm run electron:serve +npm run electron:serve +cd ../frontend/ +cd ../packaging/ +./packageWindows.sh +cd ../frontend/ +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm i electron +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +sudo chmod +x startTesting.sh +sudo chmod +x stopTesting.sh +clear +./startTesting.sh +cd ../frontend/ +npm run serve +npm run electron:serve +npm run electron:serve +cd ../packaging/ +./stopTesting.sh +./stopTesting.sh +./packageWindows.sh +cd .. +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png +python3 imagevideoupscaler-cli.py -i /home/janis/projects/FSRImageVideoUpscalerFrontend_New/logo.png -s 2 +cd ../fro +cd frontend/ +npm run serve +npm run electron:serve +cd ../packaging/ +./package.sh +./stopTesting.sh +./package.sh +./package.sh +cd ../frontend/ +npm run electron:serve +cd ../packaging/ +./packageWindows.sh +cd src/webapp/ +npm run serve +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe +cd ../packaging/ +clear +./stopTesting.sh +./packageLinux.sh +cd ../frontend/ +./smuL-cli +clear +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +wine -m pip install importlib +clear +./stopTesting.sh +./prepareWindowsPackaging.sh +clear +cd ../ +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +wine python ./smuL-cli.py +cd packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -h +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +clear +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +clear +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/ +wine ./smuL-cli.exe -i ~/Downloads/test.png -s 2 +cd ../packaging/ +./stopTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +wine ./SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +sudo chmod +x packageTesting.sh +./packageTesting.sh +cd ../frontend/dist_electron/linux-unpacked/ +ls +./simplemediascalerlite +cd ../../ +cd ../packag +cd ../packaging/ +./packageLinux.sh +./packageLinux.sh +./packageLinux.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageTesting.sh +./packageWindows.sh +cd ../frontend/dist_electron/ +wine SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +wine SimpleMediaScalerLite\ Setup\ 2.0.0-dev1.exe +clear +cd ../../packaging/ +./package.sh +cd .. +python3 smuL-cli.py -i /home/janis/Downloads/test.png -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -s 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -S 2 +python3 smuL-cli.py -i /home/janis/Downloads/test.mp4 -s 2 +clear +cd ./packaging/ +./packageWindows.sh +./packageWindows.sh +./packageWindows.sh +./packageWindows.sh +./package.sh +cd packag +cd packaging/ +./packageWindows.sh +./packageWindows.sh +cd ../../italian/ +http-server +node server.js +node server.js +node server.js +node server.js +node server.js +node server.js +node server.js +ls | grep -v jpg$ | while IFS= read -r FILENAME; do convert "${FILENAME}" "${FILENAME%.*}.jpg"; done +clear +for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "${i%.*}.mp4"; done +rm ./*.mp4 +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +for i in *.mov; do ffmpeg -i "$i" "./Transcoded/${i%.*}.mp4"; done +file="/home/janis/dotfiles/config/vscode-extensions" +while read line; do vscodium --install-extension "${line}"; done < "${file}" +yay -S vscodium +clear +cp ./dotfiles/config/.bashrc .bashrc +clear +exit +clear +sudo plymouth-set-default-theme -R bgrt +cd dotfiles/ +sudo cp ./config/environment /etc/environment +sudo cp ./config/mkinitcpio.conf /etc/mkinitcpio.conf +sudo cp ./config/pacman.conf /etc/pacman.conf +clear +yay -Syu +clear +hugo +clear +cd /tmp +git clone https://github.com/rtlewis1/GTK/tree/Material-Black-Colors-Desktop +cd Material-Black-Colors-Desktop/ +sudo cp ./Material-Black-Blueberry /usr/share/themes +ls +git clone https://github.com/rtlewis1/GTK +cd gtk +cd GTK +git checkout Material-Black-Colors-Desktop +clear +ls +sudo cp ./Material-Black-Blueberry /usr/share/themes +sudo cp -r ./Material-Black-Blueberry /usr/share/themes +cd /tmp +git clone https://github.com/varlesh/oreo-cursors +cd oreo-cursors/generator +echo "black = #424242" > ./colours.conf +ruby convert.rb +cd .. +make build +sudo make install +ls +sudo make +sudo make build +make build +clear +cat build.sh +make build +clear +yay -S librewolf-bin +exit +file="/home/janis/dotfiles/config/vscode-extensions" +while read line; do vscodium --install-extension "${line}"; done < "${file}" diff --git a/pc/.bashrc b/pc/.bashrc new file mode 100755 index 0000000..95b0a32 --- /dev/null +++ b/pc/.bashrc @@ -0,0 +1,359 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export PATH="/home/janis/.local/share/gem/ruby/3.0.0/bin: $PATH" +export PATH="/home/janis/.local/bin: $PATH" +alias editHyprlandConf='nano ~/.config/hypr/hyprland.conf' +alias ls='ls -l --color=auto' +alias ll='ls -la --color=auto' +alias sl='ls --color=auto' +alias start-httpd='sudo systemctl start httpd' +PS1='[\u@\h \W]\$ ' + +################################################################################ +## FUNCTIONS ## +################################################################################ + +## +## ARRANGE $PWD AND STORE IT IN $NEW_PWD +## * The home directory (HOME) is replaced with a ~ +## * The last pwdmaxlen characters of the PWD are displayed +## * Leading partial directory names are striped off +## /home/me/stuff -> ~/stuff (if USER=me) +## /usr/share/big_dir_name -> ../share/big_dir_name (if pwdmaxlen=20) +## +## Original source: WOLFMAN'S color bash promt +## https://wiki.chakralinux.org/index.php?title=Color_Bash_Prompt#Wolfman.27s +## +bash_prompt_command() { + # How many characters of the $PWD should be kept + local pwdmaxlen=25 + + # Indicate that there has been dir truncation + local trunc_symbol=".." + + # Store local dir + local dir=${PWD##*/} + + # Which length to use + pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen )) + + NEW_PWD=${PWD/#$HOME/\~} + + local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen )) + + # Generate name + if [ ${pwdoffset} -gt "0" ] + then + NEW_PWD=${NEW_PWD:$pwdoffset:$pwdmaxlen} + NEW_PWD=${trunc_symbol}/${NEW_PWD#*/} + fi +} + + + + +## +## GENERATE A FORMAT SEQUENCE +## +format_font() +{ + ## FIRST ARGUMENT TO RETURN FORMAT STRING + local output=$1 + + + case $# in + 2) + eval $output="'\[\033[0;${2}m\]'" + ;; + 3) + eval $output="'\[\033[0;${2};${3}m\]'" + ;; + 4) + eval $output="'\[\033[0;${2};${3};${4}m\]'" + ;; + *) + eval $output="'\[\033[0m\]'" + ;; + esac +} + + + +## +## COLORIZE BASH PROMT +## +bash_prompt() { + + ############################################################################ + ## COLOR CODES ## + ## These can be used in the configuration below ## + ############################################################################ + + ## FONT EFFECT + local NONE='0' + local BOLD='1' + local DIM='2' + local UNDERLINE='4' + local BLINK='5' + local INVERT='7' + local HIDDEN='8' + + + ## COLORS + local DEFAULT='9' + local BLACK='0' + local RED='1' + local GREEN='2' + local YELLOW='3' + local BLUE='4' + local MAGENTA='5' + local CYAN='6' + local L_GRAY='7' + local D_GRAY='60' + local L_RED='61' + local L_GREEN='62' + local L_YELLOW='63' + local L_BLUE='64' + local L_MAGENTA='65' + local L_CYAN='66' + local WHITE='67' + + + ## TYPE + local RESET='0' + local EFFECT='0' + local COLOR='30' + local BG='40' + + + ## 256 COLOR CODES + local NO_FORMAT="\[\033[0m\]" + local ORANGE_BOLD="\[\033[1;38;5;208m\]" + local TOXIC_GREEN_BOLD="\[\033[1;38;5;118m\]" + local RED_BOLD="\[\033[1;38;5;1m\]" + local CYAN_BOLD="\[\033[1;38;5;87m\]" + local BLACK_BOLD="\[\033[1;38;5;0m\]" + local WHITE_BOLD="\[\033[1;38;5;15m\]" + local GRAY_BOLD="\[\033[1;90m\]" + local BLUE_BOLD="\[\033[1;38;5;74m\]" + + + + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + ## CONFIGURE HERE ## + + + + ############################################################################ + ## CONFIGURATION ## + ## Choose your color combination here ## + ############################################################################ + local FONT_COLOR_1=$WHITE + local BACKGROUND_1=$RED + local TEXTEFFECT_1=$BOLD + + local FONT_COLOR_2=$WHITE + local BACKGROUND_2=$YELLOW + local TEXTEFFECT_2=$BOLD + + local FONT_COLOR_3=$D_GRAY + local BACKGROUND_3=$WHITE + local TEXTEFFECT_3=$BOLD + + local PROMT_FORMAT=$BLUE_BOLD + + + ############################################################################ + ## EXAMPLE CONFIGURATIONS ## + ## I use them for different hosts. Test them out ;) ## + ############################################################################ + + ## CONFIGURATION: BLUE-WHITE + if [ "$HOSTNAME" = dell ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLUE; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$D_GRAY; BACKGROUND_3=$WHITE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: BLACK-RED + if [ "$HOSTNAME" = giraff6 ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$RED; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$RED_BOLD + fi + + ## CONFIGURATION: RED-BLACK + #FONT_COLOR_1=$WHITE; BACKGROUND_1=$RED; TEXTEFFECT_1=$BOLD + #FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + #FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLACK; TEXTEFFECT_3=$BOLD + #PROMT_FORMAT=$RED_BOLD + + ## CONFIGURATION: CYAN-BLUE + if [ "$HOSTNAME" = sharkoon ]; then + FONT_COLOR_1=$BLACK; BACKGROUND_1=$L_CYAN; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$L_BLUE; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$BLUE; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + ## CONFIGURATION: GRAY-SCALE + if [ "$HOSTNAME" = giraff ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$WHITE; BACKGROUND_3=$L_GRAY; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$BLACK_BOLD + fi + + ## CONFIGURATION: GRAY-CYAN + if [ "$HOSTNAME" = light ]; then + FONT_COLOR_1=$WHITE; BACKGROUND_1=$BLACK; TEXTEFFECT_1=$BOLD + FONT_COLOR_2=$WHITE; BACKGROUND_2=$D_GRAY; TEXTEFFECT_2=$BOLD + FONT_COLOR_3=$BLACK; BACKGROUND_3=$L_CYAN; TEXTEFFECT_3=$BOLD + PROMT_FORMAT=$CYAN_BOLD + fi + + + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + + + ############################################################################ + ## TEXT FORMATING ## + ## Generate the text formating according to configuration ## + ############################################################################ + + ## CONVERT CODES: add offset + FC1=$(($FONT_COLOR_1+$COLOR)) + BG1=$(($BACKGROUND_1+$BG)) + FE1=$(($TEXTEFFECT_1+$EFFECT)) + + FC2=$(($FONT_COLOR_2+$COLOR)) + BG2=$(($BACKGROUND_2+$BG)) + FE2=$(($TEXTEFFECT_2+$EFFECT)) + + FC3=$(($FONT_COLOR_3+$COLOR)) + BG3=$(($BACKGROUND_3+$BG)) + FE3=$(($TEXTEFFECT_3+$EFFECT)) + + FC4=$(($FONT_COLOR_4+$COLOR)) + BG4=$(($BACKGROUND_4+$BG)) + FE4=$(($TEXTEFFECT_4+$EFFECT)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local TEXT_FORMAT_1 + local TEXT_FORMAT_2 + local TEXT_FORMAT_3 + local TEXT_FORMAT_4 + format_font TEXT_FORMAT_1 $FE1 $FC1 $BG1 + format_font TEXT_FORMAT_2 $FE2 $FC2 $BG2 + format_font TEXT_FORMAT_3 $FC3 $FE3 $BG3 + format_font TEXT_FORMAT_4 $FC4 $FE4 $BG4 + + + # GENERATE PROMT SECTIONS + local PROMT_USER=$"$TEXT_FORMAT_1 \u " + local PROMT_HOST=$"$TEXT_FORMAT_2 \h " + local PROMT_PWD=$"$TEXT_FORMAT_3 \${NEW_PWD} " + local PROMT_INPUT=$"$PROMT_FORMAT " + + + ############################################################################ + ## SEPARATOR FORMATING ## + ## Generate the separators between sections ## + ## Uses background colors of the sections ## + ############################################################################ + + ## CONVERT CODES + TSFC1=$(($BACKGROUND_1+$COLOR)) + TSBG1=$(($BACKGROUND_2+$BG)) + + TSFC2=$(($BACKGROUND_2+$COLOR)) + TSBG2=$(($BACKGROUND_3+$BG)) + + TSFC3=$(($BACKGROUND_3+$COLOR)) + TSBG3=$(($DEFAULT+$BG)) + + + ## CALL FORMATING HELPER FUNCTION: effect + font color + BG color + local SEPARATOR_FORMAT_1 + local SEPARATOR_FORMAT_2 + local SEPARATOR_FORMAT_3 + format_font SEPARATOR_FORMAT_1 $TSFC1 $TSBG1 + format_font SEPARATOR_FORMAT_2 $TSFC2 $TSBG2 + format_font SEPARATOR_FORMAT_3 $TSFC3 $TSBG3 + + + # GENERATE SEPARATORS WITH FANCY TRIANGLE + local TRIANGLE=$'\uE0B0' + local SEPARATOR_1=$SEPARATOR_FORMAT_1$TRIANGLE + local SEPARATOR_2=$SEPARATOR_FORMAT_2$TRIANGLE + local SEPARATOR_3=$SEPARATOR_FORMAT_3$TRIANGLE + + + + ############################################################################ + ## WINDOW TITLE ## + ## Prevent messed up terminal-window titles ## + ############################################################################ + case $TERM in + xterm*|rxvt*) + local TITLEBAR='\[\033]0;\u:${NEW_PWD}\007\]' + ;; + *) + local TITLEBAR="" + ;; + esac + + + + ############################################################################ + ## BASH PROMT ## + ## Generate promt and remove format from the rest ## + ############################################################################ + PS1="$TITLEBAR\n${PROMT_USER}${SEPARATOR_1}${PROMT_HOST}${SEPARATOR_2}${PROMT_PWD}${SEPARATOR_3}${PROMT_INPUT}" + + + + ## For terminal line coloring, leaving the rest standard + none="$(tput sgr0)" + trap 'echo -ne "${none}"' DEBUG +} + + + + +################################################################################ +## MAIN ## +################################################################################ + +## Bash provides an environment variable called PROMPT_COMMAND. +## The contents of this variable are executed as a regular Bash command +## just before Bash displays a prompt. +## We want it to call our own command to truncate PWD and store it in NEW_PWD +PROMPT_COMMAND=bash_prompt_command + +## Call bash_promnt only once, then unset it (not needed any more) +## It will set $PS1 with colors and relative to $NEW_PWD, +## which gets updated by $PROMT_COMMAND on behalf of the terminal +bash_prompt +unset bash_prompt + +### EOF ### diff --git a/pc/configs/OpenRGB/OpenRGB.json b/pc/configs/OpenRGB/OpenRGB.json new file mode 100755 index 0000000..4ee3f30 --- /dev/null +++ b/pc/configs/OpenRGB/OpenRGB.json @@ -0,0 +1,1284 @@ +{ + "AutoStart": { + "client": "localhost:6742", + "custom": "", + "enabled": false, + "host": "0.0.0.0", + "port": "6742", + "profile": "Main", + "setclient": false, + "setcustom": false, + "setminimized": false, + "setprofile": false, + "setserver": false, + "setserverhost": false, + "setserverport": false + }, + "CorsairDominatorSettings": { + "model": "CMT" + }, + "Detectors": { + "detectors": { + "AMD Wraith Prism": true, + "AOC AGON AMM700": true, + "AOC GK500": true, + "AOC GM500": true, + "ASRock Deskmini Addressable LED Strip": true, + "ASRock Motherboard SMBus Controllers": true, + "ASRock Polychrome USB": true, + "ASUS AREZ Strix RX Vega 56 O8G": true, + "ASUS Aura Addressable": true, + "ASUS Aura Core": true, + "ASUS Aura Motherboard": true, + "ASUS Aura SMBus Motherboard": true, + "ASUS Cerberus Mech": true, + "ASUS GTX 1060 Strix": true, + "ASUS GTX 1060 Strix 6G Gaming": true, + "ASUS GTX 1070 Strix Gaming": true, + "ASUS GTX 1070 Strix OC": true, + "ASUS GTX 1080 Strix OC": true, + "ASUS KO RTX 3060 O12G V2 GAMING": true, + "ASUS KO RTX 3060 OC O12G GAMING": true, + "ASUS KO RTX 3060Ti O8G GAMING": true, + "ASUS KO RTX 3060Ti O8G V2 GAMING": true, + "ASUS KO RTX 3070 O8G V2 GAMING": true, + "ASUS ROG AURA Terminal": true, + "ASUS ROG Ally": true, + "ASUS ROG Balteus": true, + "ASUS ROG Balteus Qi": true, + "ASUS ROG Chakram (Wireless)": true, + "ASUS ROG Claymore": true, + "ASUS ROG Falchion (Wired)": true, + "ASUS ROG Falchion (Wireless)": true, + "ASUS ROG GTX 1660 Ti OC 6G": true, + "ASUS ROG Gladius II": true, + "ASUS ROG Gladius II Core": true, + "ASUS ROG Gladius II Origin": true, + "ASUS ROG Gladius II Origin COD": true, + "ASUS ROG Gladius II Origin PNK LTD": true, + "ASUS ROG Gladius II Wireless": true, + "ASUS ROG Gladius III": true, + "ASUS ROG Gladius III Wireless 2.4Ghz": true, + "ASUS ROG Gladius III Wireless Bluetooth": true, + "ASUS ROG Gladius III Wireless USB": true, + "ASUS ROG Keris": true, + "ASUS ROG Keris Wireless 2.4Ghz": true, + "ASUS ROG Keris Wireless Bluetooth": true, + "ASUS ROG Keris Wireless USB": true, + "ASUS ROG PG32UQ": true, + "ASUS ROG Pugio": true, + "ASUS ROG Pugio II (Wired)": true, + "ASUS ROG Pugio II (Wireless)": true, + "ASUS ROG RTX 3080 10G GUNDAM EDITION": true, + "ASUS ROG Ryuo AIO": true, + "ASUS ROG STRIX 3060 12G GAMING": true, + "ASUS ROG STRIX 3060 O12G GAMING": true, + "ASUS ROG STRIX 3060 O12G V2 GAMING": true, + "ASUS ROG STRIX 3060Ti O8G OC": true, + "ASUS ROG STRIX 3060Ti O8G V2": true, + "ASUS ROG STRIX 3070 O8G GAMING": true, + "ASUS ROG STRIX 3070 O8G V2 GAMING": true, + "ASUS ROG STRIX 3070 O8G V2 White": true, + "ASUS ROG STRIX 3070 O8G White": true, + "ASUS ROG STRIX 3070 OC": true, + "ASUS ROG STRIX 3070Ti O8G GAMING": true, + "ASUS ROG STRIX 3080 10G GAMING": true, + "ASUS ROG STRIX 3080 10G V2 GAMING": true, + "ASUS ROG STRIX 3080 O10G GAMING": true, + "ASUS ROG STRIX 3080 O10G V2 GAMING": true, + "ASUS ROG STRIX 3080 O10G V2 WHITE": true, + "ASUS ROG STRIX 3080 O10G WHITE": true, + "ASUS ROG STRIX 3080Ti O12G GAMING": true, + "ASUS ROG STRIX 3090 24G GAMING": true, + "ASUS ROG STRIX 3090 O24G GAMING": true, + "ASUS ROG STRIX 3090 O24G GAMING White OC": true, + "ASUS ROG STRIX LC 3080Ti O12G GAMING": true, + "ASUS ROG STRIX LC RX 6800XT O16G GAMING": true, + "ASUS ROG STRIX LC RX 6900XT O16G GAMING": true, + "ASUS ROG STRIX LC RX 6900XT O16G GAMING TOP": true, + "ASUS ROG STRIX LC RX 6950XT O16G GAMING": true, + "ASUS ROG STRIX RTX 2060 EVO Gaming 6G": true, + "ASUS ROG STRIX RTX 2060 O6G EVO Gaming": true, + "ASUS ROG STRIX RTX 2060 O6G Gaming": true, + "ASUS ROG STRIX RTX 2060S 8G Gaming": true, + "ASUS ROG STRIX RTX 2060S A8G EVO Gaming": true, + "ASUS ROG STRIX RTX 2060S A8G Gaming": true, + "ASUS ROG STRIX RTX 2060S O8G Gaming": true, + "ASUS ROG STRIX RTX 2070 A8G Gaming": true, + "ASUS ROG STRIX RTX 2070 O8G Gaming": true, + "ASUS ROG STRIX RTX 2070S 8G Gaming": true, + "ASUS ROG STRIX RTX 2070S A8G Gaming": true, + "ASUS ROG STRIX RTX 2070S O8G Gaming": true, + "ASUS ROG STRIX RTX 2080 8G Gaming": true, + "ASUS ROG STRIX RTX 2080 O8G Gaming": true, + "ASUS ROG STRIX RTX 2080 O8G V2 Gaming": true, + "ASUS ROG STRIX RTX 2080 Ti 11G Gaming": true, + "ASUS ROG STRIX RTX 2080 Ti A11G Gaming": true, + "ASUS ROG STRIX RTX 2080 Ti O11G Gaming": true, + "ASUS ROG STRIX RTX 2080S A8G Gaming": true, + "ASUS ROG STRIX RTX 2080S O8G Gaming": true, + "ASUS ROG STRIX RTX 2080S O8G White": true, + "ASUS ROG STRIX RTX 3080 12G": true, + "ASUS ROG STRIX RTX 3080 O12G": true, + "ASUS ROG STRIX RTX 3080 O12G EVA EDITION": true, + "ASUS ROG STRIX RTX 4080 16G GAMING": true, + "ASUS ROG STRIX RTX 4080 O16G GAMING": true, + "ASUS ROG STRIX RTX 4090 24G GAMING": true, + "ASUS ROG STRIX RTX 4090 O24G GAMING": true, + "ASUS ROG STRIX RX 6700XT O12G GAMING": true, + "ASUS ROG STRIX RX 6750XT O12G GAMING": true, + "ASUS ROG STRIX RX 6800 O16G Gaming": true, + "ASUS ROG STRIX RX470 O4G GAMING": true, + "ASUS ROG STRIX RX470 O4G Gaming": true, + "ASUS ROG STRIX RX480 Gaming OC": true, + "ASUS ROG STRIX RX560 Gaming": true, + "ASUS ROG Strix Claw": true, + "ASUS ROG Strix Evolve": true, + "ASUS ROG Strix Flare": true, + "ASUS ROG Strix Flare CoD Black Ops 4 Edition": true, + "ASUS ROG Strix Flare PNK LTD": true, + "ASUS ROG Strix GTX 1050 O2G Gaming": true, + "ASUS ROG Strix GTX 1050 TI 4G Gaming": true, + "ASUS ROG Strix GTX 1050 TI O4G Gaming": true, + "ASUS ROG Strix GTX 1650S OC 4G": true, + "ASUS ROG Strix GTX 1660S O6G Gaming": true, + "ASUS ROG Strix GTX1070 Ti 8G Gaming": true, + "ASUS ROG Strix GTX1070 Ti A8G Gaming": true, + "ASUS ROG Strix GTX1080 A8G Gaming": true, + "ASUS ROG Strix GTX1080 O8G 11Gbps": true, + "ASUS ROG Strix GTX1080 O8G Gaming": true, + "ASUS ROG Strix GTX1080 Ti 11G Gaming": true, + "ASUS ROG Strix GTX1080 Ti Gaming": true, + "ASUS ROG Strix GTX1080 Ti O11G Gaming": true, + "ASUS ROG Strix Impact": true, + "ASUS ROG Strix Impact II": true, + "ASUS ROG Strix Impact II Electro Punk": true, + "ASUS ROG Strix Impact II Gundam": true, + "ASUS ROG Strix Impact II Moonlight White": true, + "ASUS ROG Strix Impact II Wireless 2.4 Ghz": true, + "ASUS ROG Strix Impact II Wireless USB": true, + "ASUS ROG Strix LC": true, + "ASUS ROG Strix SCAR 15": true, + "ASUS ROG Strix Scope": true, + "ASUS ROG Strix Scope RX": true, + "ASUS ROG Strix Scope RX TKL Wireless Deluxe": true, + "ASUS ROG Strix Scope TKL": true, + "ASUS ROG Strix Scope TKL PNK LTD": true, + "ASUS ROG Strix XG279Q": true, + "ASUS ROG Strix XG27AQ": true, + "ASUS ROG Strix XG27AQM": true, + "ASUS ROG Strix XG27W": true, + "ASUS ROG Throne": true, + "ASUS ROG Throne QI": true, + "ASUS ROG Throne QI GUNDAM": true, + "ASUS RX 5600XT Strix O6G Gaming": true, + "ASUS RX 570 Strix O4G Gaming OC": true, + "ASUS RX 570 Strix O8G Gaming OC": true, + "ASUS RX 5700XT Strix 08G Gaming": true, + "ASUS RX 5700XT Strix Gaming OC": true, + "ASUS RX 580 Strix Gaming OC": true, + "ASUS RX 580 Strix Gaming TOP": true, + "ASUS RX 6800 TUF Gaming OC": true, + "ASUS TUF 3060 O12G GAMING": true, + "ASUS TUF 3060 O12G V2 GAMING": true, + "ASUS TUF Gaming K1": true, + "ASUS TUF Gaming K3": true, + "ASUS TUF Gaming K5": true, + "ASUS TUF Gaming K7": true, + "ASUS TUF Gaming M3": true, + "ASUS TUF Gaming M5": true, + "ASUS TUF Laptop": true, + "ASUS TUF RTX 3060 Ti 8G Gaming OC": true, + "ASUS TUF RTX 3060Ti O8G": true, + "ASUS TUF RTX 3060Ti O8G OC": true, + "ASUS TUF RTX 3070 8G GAMING": true, + "ASUS TUF RTX 3070 O8G GAMING": true, + "ASUS TUF RTX 3070 O8G V2 GAMING": true, + "ASUS TUF RTX 3070Ti O8G GAMING": true, + "ASUS TUF RTX 3070Ti O8G V2 GAMING": true, + "ASUS TUF RTX 3080 10G GAMING": true, + "ASUS TUF RTX 3080 O10G OC": true, + "ASUS TUF RTX 3080 O10G V2 GAMING": true, + "ASUS TUF RTX 3080 O12G GAMING": true, + "ASUS TUF RTX 3080Ti 12G GAMING": true, + "ASUS TUF RTX 3080Ti O12G GAMING": true, + "ASUS TUF RTX 3090 O24G": true, + "ASUS TUF RTX 3090 O24G OC": true, + "ASUS TUF RTX 3090Ti 24G GAMING": true, + "ASUS TUF RTX 3090Ti O24G OC GAMING": true, + "ASUS TUF RTX 4070 O12G Gaming": true, + "ASUS TUF RTX 4070 Ti 12G Gaming": true, + "ASUS TUF RTX 4070 Ti O12G Gaming": true, + "ASUS TUF RTX 4080 16G GAMING": true, + "ASUS TUF RTX 4080 O16G GAMING": true, + "ASUS TUF RTX 4080 O16G OC": true, + "ASUS TUF RTX 4090 O24G": true, + "ASUS TUF RTX 4090 O24G OC": true, + "ASUS TUF RX 6700XT O12G GAMING": true, + "ASUS TUF RX 6800XT O16G GAMING": true, + "ASUS TUF RX 6900XT O16G GAMING": true, + "ASUS TUF RX 6900XT T16G GAMING": true, + "ASUS TUF RX 6950XT O16G GAMING": true, + "ASUS Vega 64 Strix": true, + "ASUS_TUF RX 6700XT O12G GAMING": true, + "Acer Predator Gaming Mouse (Rival 300)": true, + "Alienware AW510K": true, + "Anne Pro 2": true, + "Aorus CPU Coolers": true, + "Asus ROG Chakram (Wired)": true, + "Asus ROG Chakram Core": true, + "Asus ROG Chakram X 2.4GHz": true, + "Asus ROG Chakram X USB": true, + "Asus ROG Spatha X 2.4GHz": true, + "Asus ROG Spatha X USB": true, + "BlinkyTape": true, + "Bloody MP 50RS": true, + "Bloody W60 Pro": true, + "CRYORIG H7 Quad Lumi": true, + "Cherry Keyboard CCF MX 1.0 TKL BL": true, + "Cherry Keyboard CCF MX 1.0 TKL NBL": true, + "Cherry Keyboard CCF MX 8.0 TKL BL": true, + "Cherry Keyboard G80-3000 TKL NBL": true, + "Cherry Keyboard G80-3000 TKL NBL KOREAN": true, + "Cherry Keyboard G80-3000 TKL RGB": true, + "Cherry Keyboard G80-3000N FL RGB": true, + "Cherry Keyboard G80-3000N TKL RGB": true, + "Cherry Keyboard MV BOARD 3.0 FL RGB": true, + "Cherry Keyboard MX 1.0 FL BL": true, + "Cherry Keyboard MX 1.0 FL NBL": true, + "Cherry Keyboard MX 1.0 FL RGB": true, + "Cherry Keyboard MX BOARD 1.0 TKL RGB": true, + "Cherry Keyboard MX BOARD 10.0 FL RGB": true, + "Cherry Keyboard MX BOARD 10.0N FL RGB": true, + "Cherry Keyboard MX BOARD 2.0S FL NBL": true, + "Cherry Keyboard MX BOARD 2.0S FL RGB": true, + "Cherry Keyboard MX BOARD 2.0S FL RGB DE": true, + "Cherry Keyboard MX BOARD 3.0S FL NBL": true, + "Cherry Keyboard MX BOARD 3.0S FL RGB": true, + "Cherry Keyboard MX BOARD 3.0S FL RGB KOREAN": true, + "Cherry Keyboard MX BOARD 8.0 TKL RGB": true, + "Cooler Master ARGB": true, + "Cooler Master ARGB Gen 2 A1": true, + "Cooler Master ARGB Gen 2 A1 V2": true, + "Cooler Master MK750": true, + "Cooler Master MM530": true, + "Cooler Master MM711": true, + "Cooler Master MM720": true, + "Cooler Master MM730": true, + "Cooler Master MP750 Large": true, + "Cooler Master MP750 Medium": true, + "Cooler Master MP750 XL": true, + "Cooler Master MasterKeys Pro L": true, + "Cooler Master MasterKeys Pro L White": true, + "Cooler Master MasterKeys Pro S": true, + "Cooler Master RGB": true, + "Cooler Master Radeon 6000 GPU": true, + "Cooler Master Radeon 6900 GPU": true, + "Cooler Master SK630": true, + "Cooler Master SK650": true, + "Cooler Master Small ARGB": true, + "Corsair 1000D Obsidian": true, + "Corsair Commander Core": true, + "Corsair Commander Pro": true, + "Corsair Dominator Platinum": true, + "Corsair Glaive RGB": true, + "Corsair Glaive RGB PRO": true, + "Corsair H100i v2": true, + "Corsair Harpoon RGB": true, + "Corsair Harpoon RGB PRO": true, + "Corsair Hydro H100i Platinum": true, + "Corsair Hydro H100i Platinum SE": true, + "Corsair Hydro H100i Pro XT": true, + "Corsair Hydro H100i Pro XT v2": true, + "Corsair Hydro H115i Platinum": true, + "Corsair Hydro H115i Pro XT": true, + "Corsair Hydro H150i Pro XT": true, + "Corsair Hydro H60i Pro XT": true, + "Corsair Hydro Series": true, + "Corsair Ironclaw RGB": true, + "Corsair Ironclaw Wireless": true, + "Corsair Ironclaw Wireless (Wired)": true, + "Corsair K100": true, + "Corsair K55 RGB": true, + "Corsair K55 RGB PRO": true, + "Corsair K55 RGB PRO XT": true, + "Corsair K57 RGB (Wired)": true, + "Corsair K60 RGB PRO": true, + "Corsair K60 RGB PRO Low Profile": true, + "Corsair K65 LUX RGB": true, + "Corsair K65 Mini": true, + "Corsair K65 RGB": true, + "Corsair K65 RGB RAPIDFIRE": true, + "Corsair K68 RGB": true, + "Corsair K70 LUX": true, + "Corsair K70 LUX RGB": true, + "Corsair K70 RGB": true, + "Corsair K70 RGB MK.2": true, + "Corsair K70 RGB MK.2 Low Profile": true, + "Corsair K70 RGB MK.2 SE": true, + "Corsair K70 RGB RAPIDFIRE": true, + "Corsair K95 RGB": true, + "Corsair K95 RGB PLATINUM": true, + "Corsair K95 RGB PLATINUM XT": true, + "Corsair LS100 Lighting Kit": true, + "Corsair LT100": true, + "Corsair Lighting Node Core": true, + "Corsair Lighting Node Pro": true, + "Corsair M55 RGB PRO": true, + "Corsair M65": true, + "Corsair M65 PRO": true, + "Corsair M65 RGB Elite": true, + "Corsair MM700": true, + "Corsair MM800 RGB Polaris": true, + "Corsair Nightsword": true, + "Corsair SPEC OMEGA RGB": true, + "Corsair ST100 RGB": true, + "Corsair Sabre RGB": true, + "Corsair Scimitar Elite RGB": true, + "Corsair Scimitar PRO RGB": true, + "Corsair Scimitar RGB": true, + "Corsair Strafe": true, + "Corsair Strafe MK.2": true, + "Corsair Strafe Red": true, + "Corsair Vengeance": true, + "Corsair Vengeance Pro": true, + "Cougar 700K EVO Gaming Keyboard": true, + "Cougar Revenger ST": true, + "Creative SoundBlasterX G6": true, + "Crucial": true, + "DMX": true, + "Dark Project KD3B V2": true, + "Das Keyboard Q4 RGB": true, + "Das Keyboard Q5 RGB": true, + "Das Keyboard Q5S RGB": true, + "Debug Controllers": true, + "Dell G Series LED Controller": true, + "Ducky One 2 RGB TKL": true, + "Ducky Shine 7/Ducky One 2 RGB": true, + "Dygma Raise": true, + "E1.31": true, + "EK Loop Connect": true, + "ENE SMBus DRAM": true, + "EVGA GP102 GPU": true, + "EVGA GeForce RTX 2070 SUPER FTW3 Ultra": true, + "EVGA GeForce RTX 2070 SUPER FTW3 Ultra+": true, + "EVGA GeForce RTX 2070 SUPER XC Gaming": true, + "EVGA GeForce RTX 2070 SUPER XC Ultra": true, + "EVGA GeForce RTX 2070 SUPER XC Ultra+": true, + "EVGA GeForce RTX 2070 XC Black": true, + "EVGA GeForce RTX 2070 XC Gaming": true, + "EVGA GeForce RTX 2070 XC OC": true, + "EVGA GeForce RTX 2080 Black": true, + "EVGA GeForce RTX 2080 SUPER FTW3 Hybrid OC": true, + "EVGA GeForce RTX 2080 SUPER FTW3 Ultra": true, + "EVGA GeForce RTX 2080 SUPER FTW3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 2080 SUPER XC Gaming": true, + "EVGA GeForce RTX 2080 SUPER XC Ultra": true, + "EVGA GeForce RTX 2080 XC Black": true, + "EVGA GeForce RTX 2080 XC Gaming": true, + "EVGA GeForce RTX 2080 XC Ultra Gaming": true, + "EVGA GeForce RTX 2080Ti Black": true, + "EVGA GeForce RTX 2080Ti FTW3 Ultra": true, + "EVGA GeForce RTX 2080Ti XC HYBRID GAMING": true, + "EVGA GeForce RTX 2080Ti XC HYDRO COPPER": true, + "EVGA GeForce RTX 2080Ti XC Ultra": true, + "EVGA GeForce RTX 3060TI FTW3 Gaming": true, + "EVGA GeForce RTX 3060TI FTW3 Ultra": true, + "EVGA GeForce RTX 3060TI FTW3 Ultra LHR": true, + "EVGA GeForce RTX 3070 Black Gaming": true, + "EVGA GeForce RTX 3070 FTW3 Ultra": true, + "EVGA GeForce RTX 3070 FTW3 Ultra LHR": true, + "EVGA GeForce RTX 3070 XC3 Gaming": true, + "EVGA GeForce RTX 3070 XC3 Ultra": true, + "EVGA GeForce RTX 3070 XC3 Ultra LHR": true, + "EVGA GeForce RTX 3070Ti FTW3 Ultra": true, + "EVGA GeForce RTX 3070Ti FTW3 Ultra v2": true, + "EVGA GeForce RTX 3070Ti XC3 Gaming": true, + "EVGA GeForce RTX 3070Ti XC3 Ultra": true, + "EVGA GeForce RTX 3070Ti XC3 Ultra v2": true, + "EVGA GeForce RTX 3080 FTW3 Gaming": true, + "EVGA GeForce RTX 3080 FTW3 Ultra": true, + "EVGA GeForce RTX 3080 FTW3 Ultra 12GB": true, + "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid": true, + "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid Gaming LHR": true, + "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid LHR": true, + "EVGA GeForce RTX 3080 FTW3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 3080 FTW3 Ultra Hydro Copper 12G": true, + "EVGA GeForce RTX 3080 FTW3 Ultra LHR": true, + "EVGA GeForce RTX 3080 FTW3 Ultra v2 LHR": true, + "EVGA GeForce RTX 3080 XC3 Black": true, + "EVGA GeForce RTX 3080 XC3 Black LHR": true, + "EVGA GeForce RTX 3080 XC3 Gaming": true, + "EVGA GeForce RTX 3080 XC3 Gaming LHR": true, + "EVGA GeForce RTX 3080 XC3 Ultra": true, + "EVGA GeForce RTX 3080 XC3 Ultra 12G": true, + "EVGA GeForce RTX 3080 XC3 Ultra Hybrid": true, + "EVGA GeForce RTX 3080 XC3 Ultra Hybrid LHR": true, + "EVGA GeForce RTX 3080 XC3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 3080 XC3 Ultra LHR": true, + "EVGA GeForce RTX 3080Ti FTW3 Ultra": true, + "EVGA GeForce RTX 3080Ti FTW3 Ultra Hybrid": true, + "EVGA GeForce RTX 3080Ti FTW3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 3080Ti XC3 Gaming": true, + "EVGA GeForce RTX 3080Ti XC3 Gaming Hybrid": true, + "EVGA GeForce RTX 3080Ti XC3 Gaming Hydro Copper": true, + "EVGA GeForce RTX 3080Ti XC3 Ultra Gaming": true, + "EVGA GeForce RTX 3090 FTW3 Ultra": true, + "EVGA GeForce RTX 3090 FTW3 Ultra Hybrid": true, + "EVGA GeForce RTX 3090 FTW3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 3090 FTW3 Ultra v2": true, + "EVGA GeForce RTX 3090 FTW3 Ultra v3": true, + "EVGA GeForce RTX 3090 K|NGP|N Hybrid": true, + "EVGA GeForce RTX 3090 K|NGP|N Hydro Copper": true, + "EVGA GeForce RTX 3090 XC3 Black": true, + "EVGA GeForce RTX 3090 XC3 Gaming": true, + "EVGA GeForce RTX 3090 XC3 Ultra": true, + "EVGA GeForce RTX 3090 XC3 Ultra Hybrid": true, + "EVGA GeForce RTX 3090 XC3 Ultra Hydro Copper": true, + "EVGA GeForce RTX 3090Ti FTW3 Black Gaming": true, + "EVGA GeForce RTX 3090Ti FTW3 Gaming": true, + "EVGA GeForce RTX 3090Ti FTW3 Ultra Gaming": true, + "EVGA Pascal GPU": true, + "EVGA X20 Gaming Mouse": true, + "EVGA X20 USB Receiver": true, + "EVGA Z15 Keyboard": true, + "EVGA Z20 Keyboard": true, + "EVision Keyboard 0C45:5004": true, + "EVision Keyboard 0C45:5104": true, + "EVision Keyboard 0C45:5204": true, + "EVision Keyboard 0C45:652F": true, + "EVision Keyboard 0C45:7698": true, + "EVision Keyboard 0C45:8520": true, + "EVision Keyboard 320F:5000": true, + "EVision Keyboard 320F:502A": true, + "EVision Keyboard 320F:5064": true, + "ElgatoKeyLight": true, + "Epomaker TH80 Pro (USB Cable)": true, + "Epomaker TH80 Pro (USB Dongle)": true, + "Espurna": true, + "Everest GT-100 RGB": true, + "FanBus": true, + "Faustus": true, + "GALAX RTX 2070 Super EX Gamer Black": true, + "GaiZhongGai 17 PRO": true, + "GaiZhongGai 17+4+Touch PRO": true, + "GaiZhongGai 20 PRO": true, + "GaiZhongGai 42 PRO": true, + "GaiZhongGai 68+4 PRO": true, + "GaiZhongGai Dial": true, + "GaiZhongGai LightBoard": true, + "GaiZhongGai RGB HUB Blue": true, + "GaiZhongGai RGB HUB Green": true, + "Gainward GTX 1080 Phoenix": true, + "Gainward GTX 1080 Ti Phoenix": true, + "Gainward RTX 2070 Super Phantom": true, + "Gainward RTX 2080 Phoenix GS": true, + "Gainward RTX 3070 Phoenix": true, + "Gainward RTX 3070 Ti Phoenix": true, + "Gainward RTX 3080 Phoenix": true, + "Gainward RTX 3080 Ti Phoenix": true, + "Gainward RTX 3090 Phoenix": true, + "Genesis Thor 300": true, + "Gigabyte AORUS RTX2060 SUPER 8G V1": true, + "Gigabyte AORUS RTX2070 SUPER 8G": true, + "Gigabyte AORUS RTX2070 XTREME 8G": true, + "Gigabyte AORUS RTX2080 8G": true, + "Gigabyte AORUS RTX2080 SUPER 8G": true, + "Gigabyte AORUS RTX2080 SUPER 8G Rev 1.0": true, + "Gigabyte AORUS RTX2080 SUPER Waterforce WB 8G": true, + "Gigabyte AORUS RTX2080 Ti XTREME 11G": true, + "Gigabyte AORUS RTX2080 XTREME 8G": true, + "Gigabyte AORUS RTX3060 ELITE 12G": true, + "Gigabyte AORUS RTX3060 ELITE 12G LHR": true, + "Gigabyte AORUS RTX3060 ELITE 12G Rev a1": true, + "Gigabyte AORUS RTX3060 Ti ELITE 8G LHR": true, + "Gigabyte AORUS RTX3070 Ti MASTER 8G": true, + "Gigabyte AORUS RTX3080 Ti XTREME WATERFORCE 12G": true, + "Gigabyte AORUS RTX3080 XTREME WATERFORCE 10G Rev 2.0": true, + "Gigabyte AORUS RTX3080 XTREME WATERFORCE WB 10G": true, + "Gigabyte AORUS RTX3080 XTREME WATERFORCE WB 12G LHR": true, + "Gigabyte AORUS RTX3090 XTREME WATERFORCE 24G": true, + "Gigabyte AORUS RTX3090 XTREME WATERFORCE WB 24G": true, + "Gigabyte AORUS RTX4080 MASTER 16G": true, + "Gigabyte AORUS RTX4090 MASTER 24G": true, + "Gigabyte Aorus M2": true, + "Gigabyte GTX1050 Ti G1 Gaming": true, + "Gigabyte GTX1050 Ti G1 Gaming (rev A1)": true, + "Gigabyte GTX1060 G1 Gaming 6G": true, + "Gigabyte GTX1060 G1 Gaming 6G OC": true, + "Gigabyte GTX1060 Xtreme Gaming V1": true, + "Gigabyte GTX1060 Xtreme Gaming v2": true, + "Gigabyte GTX1070 G1 Gaming 8G V1": true, + "Gigabyte GTX1070 Ti 8G Gaming": true, + "Gigabyte GTX1070 Xtreme Gaming": true, + "Gigabyte GTX1080 G1 Gaming": true, + "Gigabyte GTX1080 Ti 11G": true, + "Gigabyte GTX1080 Ti Gaming OC 11G": true, + "Gigabyte GTX1080 Ti Gaming OC BLACK 11G": true, + "Gigabyte GTX1080 Ti Xtreme Edition": true, + "Gigabyte GTX1080 Ti Xtreme Waterforce Edition": true, + "Gigabyte GTX1650 Gaming OC": true, + "Gigabyte GTX1660 Gaming OC 6G": true, + "Gigabyte GTX1660 SUPER Gaming OC": true, + "Gigabyte RGB": true, + "Gigabyte RGB Fusion": true, + "Gigabyte RGB Fusion 2 DRAM": true, + "Gigabyte RGB Fusion 2 SMBus": true, + "Gigabyte RGB Fusion 2 USB": true, + "Gigabyte RTX2060 Gaming OC": true, + "Gigabyte RTX2060 Gaming OC PRO": true, + "Gigabyte RTX2060 Gaming OC PRO V2": true, + "Gigabyte RTX2060 Gaming OC PRO White": true, + "Gigabyte RTX2060 SUPER Gaming": true, + "Gigabyte RTX2060 SUPER Gaming OC": true, + "Gigabyte RTX2060 SUPER Gaming OC 3X 8G V2": true, + "Gigabyte RTX2060 SUPER Gaming OC 3X White 8G": true, + "Gigabyte RTX2070 Gaming OC 8G": true, + "Gigabyte RTX2070 Gaming OC 8GC": true, + "Gigabyte RTX2070 Windforce 8G": true, + "Gigabyte RTX2070S Gaming OC": true, + "Gigabyte RTX2070S Gaming OC 3X": true, + "Gigabyte RTX2070S Gaming OC 3X White": true, + "Gigabyte RTX2080 Gaming OC 8G": true, + "Gigabyte RTX2080 Ti GAMING OC 11G": true, + "Gigabyte RTX2080S Gaming OC 8G": true, + "Gigabyte RTX3050 Gaming OC 8G": true, + "Gigabyte RTX3060 EAGLE 12G LHR V2": true, + "Gigabyte RTX3060 EAGLE OC 12G": true, + "Gigabyte RTX3060 EAGLE OC 12G V2": true, + "Gigabyte RTX3060 Gaming OC 12G": true, + "Gigabyte RTX3060 Gaming OC 12G (rev. 2.0)": true, + "Gigabyte RTX3060 Ti EAGLE OC 8G": true, + "Gigabyte RTX3060 Ti EAGLE OC 8G V2.0 LHR": true, + "Gigabyte RTX3060 Ti GAMING OC 8G": true, + "Gigabyte RTX3060 Ti GAMING OC LHR 8G": true, + "Gigabyte RTX3060 Ti GAMING OC PRO 8G": true, + "Gigabyte RTX3060 Ti Gaming OC PRO 8G LHR": true, + "Gigabyte RTX3060 Ti Vision OC 8G": true, + "Gigabyte RTX3060 Vision OC 12G": true, + "Gigabyte RTX3060 Vision OC 12G LHR": true, + "Gigabyte RTX3060 Vision OC 12G v3.0": true, + "Gigabyte RTX3070 Eagle OC 8G": true, + "Gigabyte RTX3070 Eagle OC 8G V2.0 LHR": true, + "Gigabyte RTX3070 Gaming OC 8G": true, + "Gigabyte RTX3070 Gaming OC 8G v3.0 LHR": true, + "Gigabyte RTX3070 MASTER 8G": true, + "Gigabyte RTX3070 MASTER 8G LHR": true, + "Gigabyte RTX3070 Ti EAGLE 8G": true, + "Gigabyte RTX3070 Ti Gaming OC 8G": true, + "Gigabyte RTX3070 Ti Vision OC 8G": true, + "Gigabyte RTX3070 Vision 8G": true, + "Gigabyte RTX3070 Vision 8G V2.0 LHR": true, + "Gigabyte RTX3080 EAGLE OC 10G": true, + "Gigabyte RTX3080 Gaming OC 10G": true, + "Gigabyte RTX3080 Gaming OC 12G": true, + "Gigabyte RTX3080 Ti EAGLE 12G": true, + "Gigabyte RTX3080 Ti EAGLE OC 12G": true, + "Gigabyte RTX3080 Ti Gaming OC 12G": true, + "Gigabyte RTX3080 Ti Vision OC 12G": true, + "Gigabyte RTX3080 Vision OC 10G": true, + "Gigabyte RTX3080 Vision OC 10G (REV 2.0)": true, + "Gigabyte RTX3090 Gaming OC 24G": true, + "Gigabyte RTX3090 VISION OC 24G ": true, + "Gigabyte RTX4070Ti Gaming OC 12G": true, + "Gigabyte RTX4080 AERO OC 16G": true, + "Gigabyte RTX4080 Eagle OC 16G": true, + "Gigabyte RTX4080 Gaming OC 16G": true, + "Gigabyte RTX4090 GAMING OC 24G": true, + "Glorious Model D / D-": true, + "Glorious Model D / D- Wireless": true, + "Glorious Model O / O-": true, + "Glorious Model O / O- Wireless": true, + "HP Omen 30L": true, + "Holtek Mousemat": true, + "Holtek USB Gaming Mouse": true, + "HyperX Alloy Elite 2": true, + "HyperX Alloy Elite 2 (HP)": true, + "HyperX Alloy Elite RGB": true, + "HyperX Alloy FPS RGB": true, + "HyperX Alloy Origins": true, + "HyperX Alloy Origins (HP)": true, + "HyperX Alloy Origins 60": true, + "HyperX Alloy Origins 60 (HP)": true, + "HyperX Alloy Origins 65 (HP)": true, + "HyperX Alloy Origins Core": true, + "HyperX Alloy Origins Core (HP)": true, + "HyperX DRAM": true, + "HyperX DuoCast": true, + "HyperX Fury Ultra": true, + "HyperX Pulsefire Core": true, + "HyperX Pulsefire Dart (Wired)": true, + "HyperX Pulsefire Dart (Wireless)": true, + "HyperX Pulsefire FPS Pro": true, + "HyperX Pulsefire Haste": true, + "HyperX Pulsefire Mat": true, + "HyperX Pulsefire Mat RGB Mouse Pad XL": true, + "HyperX Pulsefire Raid": true, + "HyperX Pulsefire Surge": true, + "HyperX Quadcast S": true, + "Intel Arc A770 Limited Edition": true, + "Ionico Keyboard": true, + "Ionico Light Bar": true, + "JSAUX RGB Docking Station": true, + "KFA2 RTX 2070 EX": true, + "KFA2 RTX 2080 EX OC": true, + "KFA2 RTX 2080 Super EX OC": true, + "KFA2 RTX 2080 TI EX OC": true, + "KasaSmart": true, + "Keychron Gaming Keyboard 1": true, + "LED Strip": true, + "LIFX": true, + "Lego Dimensions Toypad Base": true, + "Lenovo": true, + "Lenovo 5 2020": true, + "Lenovo 5 2021": true, + "Lenovo 5 2022": true, + "Lenovo Ideapad 3-15ach6": true, + "Lenovo Legion 7 gen 5": true, + "Lenovo Legion 7 gen 6": true, + "Lenovo Legion 7S gen 5": true, + "Lenovo Legion 7S gen 6": true, + "Lenovo Legion Y740": true, + "Lian Li O11 Dynamic - Razer Edition": true, + "Lian Li Uni Hub": true, + "Lian Li Uni Hub - AL": true, + "Lian Li Uni Hub - SL V2": true, + "Lian Li Uni Hub - SL V2 v0.5": true, + "Linux LED": true, + "Logitech G Pro (HERO) Gaming Mouse": true, + "Logitech G Pro Gaming Mouse": true, + "Logitech G Pro RGB Mechanical Gaming Keyboard": true, + "Logitech G Pro Wireless Gaming Mouse": true, + "Logitech G Pro Wireless Gaming Mouse (wired)": true, + "Logitech G203 Lightsync": true, + "Logitech G203 Prodigy": true, + "Logitech G213": true, + "Logitech G303 Daedalus Apex": true, + "Logitech G403 Hero": true, + "Logitech G403 Prodigy Gaming Mouse": true, + "Logitech G403 Wireless Gaming Mouse": true, + "Logitech G403 Wireless Gaming Mouse (wired)": true, + "Logitech G502 Hero Gaming Mouse": true, + "Logitech G502 Proteus Spectrum Gaming Mouse": true, + "Logitech G502 Wireless Gaming Mouse": true, + "Logitech G502 Wireless Gaming Mouse (wired)": true, + "Logitech G512": true, + "Logitech G512 RGB": true, + "Logitech G560 Lightsync Speaker": true, + "Logitech G610 Orion": true, + "Logitech G633 Gaming Headset": true, + "Logitech G703 Hero Wireless Gaming Mouse": true, + "Logitech G703 Hero Wireless Gaming Mouse (wired)": true, + "Logitech G703 Wireless Gaming Mouse": true, + "Logitech G703 Wireless Gaming Mouse (wired)": true, + "Logitech G733 Gaming Headset": true, + "Logitech G810 Orion Spectrum": true, + "Logitech G813 RGB Mechanical Gaming Keyboard": true, + "Logitech G815 RGB Mechanical Gaming Keyboard": true, + "Logitech G900 Wireless Gaming Mouse": true, + "Logitech G900 Wireless Gaming Mouse (wired)": true, + "Logitech G903 Hero Wireless Gaming Mouse": true, + "Logitech G903 Hero Wireless Gaming Mouse (wired)": true, + "Logitech G903 Wireless Gaming Mouse": true, + "Logitech G903 Wireless Gaming Mouse (wired)": true, + "Logitech G910 Orion Spark": true, + "Logitech G910 Orion Spectrum": true, + "Logitech G915 Wireless RGB Mechanical Gaming Keyboard": true, + "Logitech G915 Wireless RGB Mechanical Gaming Keyboard (Wired)": true, + "Logitech G915TKL Wireless RGB Mechanical Gaming Keyboard": true, + "Logitech G915TKL Wireless RGB Mechanical Gaming Keyboard (Wired)": true, + "Logitech G933 Lightsync Headset": true, + "Logitech G935 Gaming Headset": true, + "Logitech Powerplay Mat": true, + "Logitech X56 Rhino Hotas Joystick": true, + "Logitech X56 Rhino Hotas Throttle": true, + "MSI 3-Zone Laptop": true, + "MSI GeForce GTX 1070 Gaming X": true, + "MSI GeForce GTX 1660 Gaming X 6G": true, + "MSI GeForce GTX 1660 Super Gaming 6G": true, + "MSI GeForce GTX 1660 Super Gaming X 6G": true, + "MSI GeForce GTX 1660Ti Gaming 6G": true, + "MSI GeForce GTX 1660Ti Gaming X 6G": true, + "MSI GeForce RTX 2060 Gaming Z 6G": true, + "MSI GeForce RTX 2060 Super ARMOR OC": true, + "MSI GeForce RTX 2060 Super Gaming X": true, + "MSI GeForce RTX 2070 ARMOR": true, + "MSI GeForce RTX 2070 ARMOR OC": true, + "MSI GeForce RTX 2070 Gaming": true, + "MSI GeForce RTX 2070 Gaming Z": true, + "MSI GeForce RTX 2070 SUPER ARMOR OC": true, + "MSI GeForce RTX 2070 Super Gaming": true, + "MSI GeForce RTX 2070 Super Gaming Trio": true, + "MSI GeForce RTX 2070 Super Gaming X": true, + "MSI GeForce RTX 2070 Super Gaming X Trio": true, + "MSI GeForce RTX 2070 Super Gaming Z Trio": true, + "MSI GeForce RTX 2080 Duke 8G OC": true, + "MSI GeForce RTX 2080 Gaming Trio": true, + "MSI GeForce RTX 2080 Gaming X Trio": true, + "MSI GeForce RTX 2080 Sea Hawk EK X": true, + "MSI GeForce RTX 2080 Super Gaming X Trio": true, + "MSI GeForce RTX 2080Ti 11G Gaming X Trio": true, + "MSI GeForce RTX 2080Ti Gaming X Trio": true, + "MSI GeForce RTX 2080Ti Gaming Z Trio": true, + "MSI GeForce RTX 2080Ti Sea Hawk EK X": true, + "MSI GeForce RTX 3050 Gaming X 8G": true, + "MSI GeForce RTX 3060 12G Gaming X Trio": true, + "MSI GeForce RTX 3060 12G Gaming X Trio LHR": true, + "MSI GeForce RTX 3060 12G Gaming Z Trio": true, + "MSI GeForce RTX 3060 12GB Gaming X Trio": true, + "MSI GeForce RTX 3060 Gaming X 12G": true, + "MSI GeForce RTX 3060 Gaming X 12G (GA104)": true, + "MSI GeForce RTX 3060 Gaming X 12G LHR": true, + "MSI GeForce RTX 3060 Ti 8GB Gaming X LHR": true, + "MSI GeForce RTX 3060 Ti 8GB Gaming X Trio": true, + "MSI GeForce RTX 3060 Ti 8GB Gaming X Trio LHR": true, + "MSI GeForce RTX 3070 8GB Gaming Trio": true, + "MSI GeForce RTX 3070 8GB Gaming X Trio": true, + "MSI GeForce RTX 3070 8GB Suprim": true, + "MSI GeForce RTX 3070 8GB Suprim X": true, + "MSI GeForce RTX 3070 8GB Suprim X LHR": true, + "MSI GeForce RTX 3070 Ti 8GB Gaming X Trio": true, + "MSI GeForce RTX 3070 Ti Suprim X 8G": true, + "MSI GeForce RTX 3080 10GB Gaming X Trio": true, + "MSI GeForce RTX 3080 10GB Gaming Z Trio": true, + "MSI GeForce RTX 3080 10GB Gaming Z Trio LHR": true, + "MSI GeForce RTX 3080 12GB Gaming Z Trio LHR": true, + "MSI GeForce RTX 3080 Suprim X 10G": true, + "MSI GeForce RTX 3080 Suprim X 10G LHR": true, + "MSI GeForce RTX 3080 Suprim X 12G LHR": true, + "MSI GeForce RTX 3080 Ti Gaming X Trio 12G": true, + "MSI GeForce RTX 3080 Ti Suprim X 12G": true, + "MSI GeForce RTX 3090 24GB Gaming X Trio": true, + "MSI GeForce RTX 3090 Suprim 24G": true, + "MSI GeForce RTX 3090 Suprim X 24G": true, + "MSI GeForce RTX 3090 Ti Gaming X Trio 24G": true, + "MSI GeForce RTX 3090 Ti Suprim X 24G": true, + "MSI GeForce RTX 4070 12GB Gaming X Trio": true, + "MSI GeForce RTX 4070Ti 12GB Gaming X Trio": true, + "MSI GeForce RTX 4070Ti 12GB Suprim X Trio": true, + "MSI GeForce RTX 4080 16GB Gaming X Trio": true, + "MSI GeForce RTX 4080 16GB Suprim X": true, + "MSI GeForce RTX 4090 24GB Gaming X Trio": true, + "MSI GeForce RTX 4090 24GB Suprim Liquid X": true, + "MSI GeForce RTX 4090 24GB Suprim X": true, + "MSI Mystic Light MS_1562": true, + "MSI Mystic Light MS_1563": true, + "MSI Mystic Light MS_1564": true, + "MSI Mystic Light MS_1720": true, + "MSI Mystic Light MS_7B12": true, + "MSI Mystic Light MS_7B16": true, + "MSI Mystic Light MS_7B17": true, + "MSI Mystic Light MS_7B18": true, + "MSI Mystic Light MS_7B50": true, + "MSI Mystic Light MS_7B85": true, + "MSI Mystic Light MS_7B93": true, + "MSI Mystic Light MS_7C34": true, + "MSI Mystic Light MS_7C35": true, + "MSI Mystic Light MS_7C36": true, + "MSI Mystic Light MS_7C37": true, + "MSI Mystic Light MS_7C56": true, + "MSI Mystic Light MS_7C59": true, + "MSI Mystic Light MS_7C60": true, + "MSI Mystic Light MS_7C67": true, + "MSI Mystic Light MS_7C71": true, + "MSI Mystic Light MS_7C73": true, + "MSI Mystic Light MS_7C75": true, + "MSI Mystic Light MS_7C76": true, + "MSI Mystic Light MS_7C77": true, + "MSI Mystic Light MS_7C79": true, + "MSI Mystic Light MS_7C80": true, + "MSI Mystic Light MS_7C81": true, + "MSI Mystic Light MS_7C82": true, + "MSI Mystic Light MS_7C83": true, + "MSI Mystic Light MS_7C84": true, + "MSI Mystic Light MS_7C86": true, + "MSI Mystic Light MS_7C87": true, + "MSI Mystic Light MS_7C90": true, + "MSI Mystic Light MS_7C91": true, + "MSI Mystic Light MS_7C92": true, + "MSI Mystic Light MS_7C94": true, + "MSI Mystic Light MS_7C95": true, + "MSI Mystic Light MS_7C98": true, + "MSI Mystic Light MS_7D03": true, + "MSI Mystic Light MS_7D06": true, + "MSI Mystic Light MS_7D07": true, + "MSI Mystic Light MS_7D08": true, + "MSI Mystic Light MS_7D09": true, + "MSI Mystic Light MS_7D13": true, + "MSI Mystic Light MS_7D15": true, + "MSI Mystic Light MS_7D17": true, + "MSI Mystic Light MS_7D18": true, + "MSI Mystic Light MS_7D19": true, + "MSI Mystic Light MS_7D20": true, + "MSI Mystic Light MS_7D25": true, + "MSI Mystic Light MS_7D27": true, + "MSI Mystic Light MS_7D28": true, + "MSI Mystic Light MS_7D29": true, + "MSI Mystic Light MS_7D30": true, + "MSI Mystic Light MS_7D31": true, + "MSI Mystic Light MS_7D32": true, + "MSI Mystic Light MS_7D36": true, + "MSI Mystic Light MS_7D38": true, + "MSI Mystic Light MS_7D41": true, + "MSI Mystic Light MS_7D42": true, + "MSI Mystic Light MS_7D43": true, + "MSI Mystic Light MS_7D46": true, + "MSI Mystic Light MS_7D50": true, + "MSI Mystic Light MS_7D51": true, + "MSI Mystic Light MS_7D52": true, + "MSI Mystic Light MS_7D53": true, + "MSI Mystic Light MS_7D54": true, + "MSI Mystic Light MS_7D59": true, + "MSI Mystic Light MS_7D67": true, + "MSI Mystic Light MS_7D69": true, + "MSI Mystic Light MS_7D70": true, + "MSI Mystic Light MS_7D73": true, + "MSI Mystic Light MS_7D75": true, + "MSI Mystic Light MS_7D76": true, + "MSI Mystic Light MS_7D77": true, + "MSI Mystic Light MS_7D78": true, + "MSI Mystic Light MS_7D86": true, + "MSI Mystic Light MS_7D89": true, + "MSI Mystic Light MS_7D91": true, + "MSI Mystic Light MS_7E01": true, + "MSI Mystic Light MS_7E06": true, + "MSI Mystic Light MS_7E07": true, + "MSI Mystic Light MS_B926": true, + "MSI Optix controller": true, + "MSI Radeon RX 6600 XT Gaming X": true, + "MSI Radeon RX 6700 XT Gaming X": true, + "MSI Radeon RX 6750 XT Gaming X Trio 12G": true, + "MSI Radeon RX 6800 Gaming X Trio": true, + "MSI Radeon RX 6800 Gaming Z Trio v1": true, + "MSI Radeon RX 6800 XT Gaming X Trio": true, + "MSI Radeon RX 6800 XT Gaming Z Trio": true, + "MSI Radeon RX 6900 XT Gaming X Trio": true, + "MSI Radeon RX 6900 XT Gaming Z Trio": true, + "MSI Radeon RX 6950 XT Gaming X Trio": true, + "MSI Vigor GK30 controller": true, + "MSI-RGB": true, + "Mountain Everest": true, + "N5312A USB Optical Mouse": true, + "NVIDIA RTX2060S": true, + "NVIDIA RTX2080S": true, + "NZXT Hue 2": true, + "NZXT Hue 2 Ambient": true, + "NZXT Hue 2 Motherboard": true, + "NZXT Hue+": true, + "NZXT Kraken M2": true, + "NZXT Kraken X2": true, + "NZXT Kraken X3": true, + "NZXT Kraken X3 Series": true, + "NZXT Kraken X3 Series RGB": true, + "NZXT RGB & Fan Controller": true, + "NZXT RGB Controller": true, + "NZXT Smart Device V1": true, + "NZXT Smart Device V2": true, + "Nanoleaf": true, + "Nollie 32CH": true, + "Np93 ALPHA - Gaming Mouse": true, + "Nvidia ESA - Dell XPS 730x": true, + "OKS Optical Axis RGB": true, + "OpenRazer": false, + "PNY XLR8 OC EDITION RTX 2060": true, + "PNY XLR8 Revel EPIC-X RTX 3060": true, + "PNY XLR8 Revel EPIC-X RTX 3070": true, + "PNY XLR8 Revel EPIC-X RTX 3070 LHR": true, + "PNY XLR8 Revel EPIC-X RTX 3080": true, + "PNY XLR8 Revel EPIC-X RTX 3090": true, + "Palit 1080": true, + "Palit 3060": true, + "Palit 3060 LHR": true, + "Palit 3060TI LHR": true, + "Palit 3060Ti": true, + "Palit 3070": true, + "Palit 3070 LHR": true, + "Palit 3070Ti": true, + "Palit 3070Ti GamingPro": true, + "Palit 3080": true, + "Palit 3080 Gamerock": true, + "Palit 3080 Gamerock LHR": true, + "Palit 3080 GamingPro 12G": true, + "Palit 3080 LHR": true, + "Palit 3080Ti": true, + "Palit 3080Ti Gamerock": true, + "Palit 3090": true, + "Palit 3090 Gamerock": true, + "Palit 4070Ti Gamerock": true, + "Palit 4090 Gamerock": true, + "Palit GeForce RTX 3060 Ti Dual": true, + "Patriot Viper": true, + "Patriot Viper Steel": true, + "Philips Hue": true, + "Philips Wiz": true, + "Razer Abyssus Elite D.Va Edition": true, + "Razer Abyssus Essential": true, + "Razer Base Station Chroma": true, + "Razer Base Station V2 Chroma": true, + "Razer Basilisk": true, + "Razer Basilisk Essential": true, + "Razer Basilisk Ultimate (Wired)": true, + "Razer Basilisk Ultimate (Wireless)": true, + "Razer Basilisk V2": true, + "Razer Basilisk V3": true, + "Razer Basilisk V3 Pro (Wired)": true, + "Razer Basilisk V3 Pro (Wireless)": true, + "Razer Blackwidow 2019": true, + "Razer Blackwidow Chroma": true, + "Razer Blackwidow Chroma Tournament Edition": true, + "Razer Blackwidow Chroma V2": true, + "Razer Blackwidow Elite": true, + "Razer Blackwidow Overwatch": true, + "Razer Blackwidow V3": true, + "Razer Blackwidow V3 Mini (Wired)": true, + "Razer Blackwidow V3 Mini (Wireless)": true, + "Razer Blackwidow V3 Pro (Wired)": true, + "Razer Blackwidow V3 Pro (Wireless)": true, + "Razer Blackwidow V3 TKL": true, + "Razer Blackwidow X Chroma": true, + "Razer Blackwidow X Chroma Tournament Edition": true, + "Razer Blade (2016)": true, + "Razer Blade (Late 2016)": true, + "Razer Blade 14 (2021)": true, + "Razer Blade 14 (2022)": true, + "Razer Blade 15 (2018 Advanced)": true, + "Razer Blade 15 (2018 Base)": true, + "Razer Blade 15 (2018 Mercury)": true, + "Razer Blade 15 (2019 Advanced)": true, + "Razer Blade 15 (2019 Base)": true, + "Razer Blade 15 (2019 Mercury)": true, + "Razer Blade 15 (2019 Studio)": true, + "Razer Blade 15 (2020 Advanced)": true, + "Razer Blade 15 (2020 Base)": true, + "Razer Blade 15 (2021 Advanced)": true, + "Razer Blade 15 (2021 Base)": true, + "Razer Blade 15 (2022)": true, + "Razer Blade 15 (Late 2020)": true, + "Razer Blade 15 (Late 2021 Advanced)": true, + "Razer Blade Pro (2016)": true, + "Razer Blade Pro (2017 FullHD)": true, + "Razer Blade Pro (2017)": true, + "Razer Blade Pro (2019)": true, + "Razer Blade Pro (Late 2019)": true, + "Razer Blade Pro 17 (2020)": true, + "Razer Blade Pro 17 (2021)": true, + "Razer Blade Stealth (2016)": true, + "Razer Blade Stealth (2017)": true, + "Razer Blade Stealth (2019)": true, + "Razer Blade Stealth (2020)": true, + "Razer Blade Stealth (Late 2016)": true, + "Razer Blade Stealth (Late 2017)": true, + "Razer Blade Stealth (Late 2019)": true, + "Razer Blade Stealth (Late 2020)": true, + "Razer Book 13 (2020)": true, + "Razer Charging Pad Chroma": true, + "Razer Chroma Addressable RGB Controller": true, + "Razer Chroma HDK": true, + "Razer Chroma Mug Holder": true, + "Razer Chroma PC Case Lighting Kit": true, + "Razer Core": true, + "Razer Core X": true, + "Razer Cynosa Chroma": true, + "Razer Cynosa Chroma V2": true, + "Razer Cynosa Lite": true, + "Razer Deathadder Chroma": true, + "Razer Deathadder Elite": true, + "Razer Deathadder Essential": true, + "Razer Deathadder Essential V2": true, + "Razer Deathadder Essential White Edition": true, + "Razer Deathadder V2": true, + "Razer Deathadder V2 Mini": true, + "Razer Deathadder V2 Pro (Wired)": true, + "Razer Deathadder V2 Pro (Wireless)": true, + "Razer Deathstalker Chroma": true, + "Razer Deathstalker V2": true, + "Razer Deathstalker V2 Pro (Wired)": true, + "Razer Deathstalker V2 Pro (Wireless)": true, + "Razer Diamondback": true, + "Razer Firefly": true, + "Razer Firefly Hyperflux": true, + "Razer Firefly V2": true, + "Razer Goliathus": true, + "Razer Goliathus Extended": true, + "Razer Huntsman": true, + "Razer Huntsman Elite": true, + "Razer Huntsman Mini": true, + "Razer Huntsman Tournament Edition": true, + "Razer Huntsman V2": true, + "Razer Huntsman V2 Analog": true, + "Razer Huntsman V2 TKL": true, + "Razer Kraken 7.1": true, + "Razer Kraken 7.1 Chroma": true, + "Razer Kraken 7.1 V2": true, + "Razer Kraken Kitty Black Edition": true, + "Razer Kraken Kitty Edition": true, + "Razer Kraken Ultimate": true, + "Razer Lancehead 2017 (Wired)": true, + "Razer Lancehead 2017 (Wireless)": true, + "Razer Lancehead 2019 (Wired)": true, + "Razer Lancehead 2019 (Wireless)": true, + "Razer Lancehead Tournament Edition": true, + "Razer Laptop Stand Chroma": true, + "Razer Laptop Stand Chroma V2": true, + "Razer Leviathan V2 X": true, + "Razer Mamba 2012 (Wired)": true, + "Razer Mamba 2012 (Wireless)": true, + "Razer Mamba 2015 (Wired)": true, + "Razer Mamba 2015 (Wireless)": true, + "Razer Mamba 2018 (Wired)": true, + "Razer Mamba 2018 (Wireless)": true, + "Razer Mamba Elite": true, + "Razer Mamba Tournament Edition": true, + "Razer Mouse Bungee V3 Chroma": true, + "Razer Mouse Dock Chroma": true, + "Razer Mouse Dock Pro": true, + "Razer Naga Chroma": true, + "Razer Naga Classic": true, + "Razer Naga Epic Chroma": true, + "Razer Naga Hex V2": true, + "Razer Naga Left Handed": true, + "Razer Naga Pro (Wired)": true, + "Razer Naga Pro (Wireless)": true, + "Razer Naga Trinity": true, + "Razer Nommo Chroma": true, + "Razer Nommo Pro": true, + "Razer Orbweaver Chroma": true, + "Razer Ornata Chroma": true, + "Razer Ornata Chroma V2": true, + "Razer Ornata V3": true, + "Razer Ornata V3 Rev2": true, + "Razer Ornata V3 X": true, + "Razer Seiren Emote": true, + "Razer Strider Chroma": true, + "Razer Tartarus Chroma": true, + "Razer Tartarus Pro": true, + "Razer Tartarus V2": true, + "Razer Thunderbolt 4 Dock Chroma": true, + "Razer Tiamat 7.1 V2": true, + "Razer Viper": true, + "Razer Viper 8kHz": true, + "Razer Viper Mini": true, + "Razer Viper Ultimate (Wired)": true, + "Razer Viper Ultimate (Wireless)": true, + "Red Square Keyrox TKL": true, + "Red Square Keyrox TKL Classic": true, + "Redragon M602 Griffin": true, + "Redragon M711 Cobra": true, + "Redragon M715 Dagger": true, + "Redragon M716 Inquisitor": true, + "Redragon M808 Storm": true, + "Redragon M908 Impact": true, + "Roccat Burst Core": true, + "Roccat Burst Pro": true, + "Roccat Elo 7.1": true, + "Roccat Horde Aimo": true, + "Roccat Kone Aimo": true, + "Roccat Kone Aimo 16K": true, + "Roccat Kova": true, + "Roccat Vulcan 120-Series Aimo": true, + "SRGBMods LED Controller v1": true, + "SRGBmods Pico LED Controller": true, + "Sapphire RX 470/480 Nitro+": true, + "Sapphire RX 5500 XT Nitro+": true, + "Sapphire RX 570/580/590 Nitro+": true, + "Sapphire RX 5700 (XT) Nitro+": true, + "Sapphire RX 5700 XT Nitro+": true, + "Sapphire RX 580 Nitro+ (2048SP)": true, + "Sapphire RX 6600 XT Nitro+": true, + "Sapphire RX 6700 XT Nitro+": true, + "Sapphire RX 6750 XT Nitro+": true, + "Sapphire RX 6800 Nitro+": true, + "Sapphire RX 6800 XT Nitro+ SE": true, + "Sapphire RX 6800 XT/6900 XT Nitro+": true, + "Sapphire RX 6900 XT Nitro+ SE": true, + "Sapphire RX 6900 XT Toxic": true, + "Sapphire RX 6900 XT Toxic Limited Edition": true, + "Sapphire RX 6950 XT Nitro+": true, + "Sapphire RX 7900 XTX Nitro+": true, + "Sapphire RX Vega 56/64 Nitro+": true, + "Sony DualSense": true, + "Sony DualShock 4": true, + "SteelSeries Aerox 3 Wired": true, + "SteelSeries Aerox 9 Wired": true, + "SteelSeries Apex (OG)/Apex Fnatic": true, + "SteelSeries Apex 3": true, + "SteelSeries Apex 3 TKL": true, + "SteelSeries Apex 350": true, + "SteelSeries Apex 5": true, + "SteelSeries Apex 7": true, + "SteelSeries Apex 7 TKL": true, + "SteelSeries Apex M750": true, + "SteelSeries Apex Pro": true, + "SteelSeries Apex Pro TKL": true, + "SteelSeries Arctis 5": true, + "SteelSeries QCK Prism Cloth 3XL": true, + "SteelSeries QCK Prism Cloth 4XL": true, + "SteelSeries QCK Prism Cloth Medium": true, + "SteelSeries QCK Prism Cloth XL": true, + "SteelSeries QCK Prism Cloth XL CS:GO Neon Rider Ed.": true, + "SteelSeries QCK Prism Cloth XL Destiny Ed.": true, + "SteelSeries Rival 100": true, + "SteelSeries Rival 100 DotA 2 Edition": true, + "SteelSeries Rival 105": true, + "SteelSeries Rival 106": true, + "SteelSeries Rival 110": true, + "SteelSeries Rival 3": true, + "SteelSeries Rival 3 (Old Firmware)": true, + "SteelSeries Rival 300": true, + "SteelSeries Rival 300 Black Ops Edition": true, + "SteelSeries Rival 300 CS:GO Fade Edition": true, + "SteelSeries Rival 300 CS:GO Fade Edition (stm32)": true, + "SteelSeries Rival 300 CS:GO Hyperbeast Edition": true, + "SteelSeries Rival 300 Dota 2 Edition": true, + "SteelSeries Rival 300 HP Omen Edition": true, + "SteelSeries Rival 310": true, + "SteelSeries Rival 310 CS:GO Howl Edition": true, + "SteelSeries Rival 310 PUBG Edition": true, + "SteelSeries Rival 600": true, + "SteelSeries Rival 600 Dota 2 Edition": true, + "SteelSeries Rival 650": true, + "SteelSeries Rival 650 Wireless": true, + "SteelSeries Rival 700": true, + "SteelSeries Rival 710": true, + "SteelSeries Sensei 310": true, + "SteelSeries Sensei TEN": true, + "SteelSeries Sensei TEN CS:GO Neon Rider Edition": true, + "SteelSeries Siberia 350": true, + "Strimer L Connect": true, + "Tecknet M008": true, + "Thermaltake Poseidon Z RGB": true, + "Thermaltake Riing (PID 0x1FA5)": true, + "Thermaltake Riing (PID 0x1FA6)": true, + "Thermaltake Riing (PID 0x1FA7)": true, + "Thermaltake Riing (PID 0x1FA8)": true, + "Thermaltake Riing (PID 0x1FA9)": true, + "Thermaltake Riing (PID 0x1FAA)": true, + "Thermaltake Riing (PID 0x1FAB)": true, + "Thermaltake Riing (PID 0x1FAC)": true, + "Thermaltake Riing (PID 0x1FAD)": true, + "Thermaltake Riing (PID 0x1FAE)": true, + "Thermaltake Riing (PID 0x1FAF)": true, + "Thermaltake Riing (PID 0x1FB0)": true, + "Thermaltake Riing (PID 0x1FB1)": true, + "Thermaltake Riing (PID 0x1FB2)": true, + "Thermaltake Riing (PID 0x1FB3)": true, + "Thermaltake Riing (PID 0x1FB4)": true, + "Thermaltake Riing (PID 0x1FB5)": true, + "Thermaltake Riing Quad (PID 0x2260)": true, + "Thermaltake Riing Quad (PID 0x2261)": true, + "Thermaltake Riing Quad (PID 0x2262)": true, + "Thermaltake Riing Quad (PID 0x2263)": true, + "Thermaltake Riing Quad (PID 0x2264)": true, + "Thermaltake Riing Quad (PID 0x2265)": true, + "Thermaltake Riing Quad (PID 0x2266)": true, + "Thermaltake Riing Quad (PID 0x2267)": true, + "Thermaltake Riing Quad (PID 0x2268)": true, + "Thermaltake Riing Quad (PID 0x2269)": true, + "Thermaltake Riing Quad (PID 0x226A)": true, + "Thermaltake Riing Quad (PID 0x226B)": true, + "Thermaltake Riing Quad (PID 0x226C)": true, + "Thermaltake Riing Quad (PID 0x226D)": true, + "Thermaltake Riing Quad (PID 0x226E)": true, + "Thermaltake Riing Quad (PID 0x226F)": true, + "Thermaltake Riing Quad (PID 0x2270)": true, + "ThingM blink(1) mk2": true, + "Trust GXT 114": true, + "Trust GXT 180": true, + "ViewSonic Monitor XG270QG": true, + "Wooting One (Classic)": true, + "Wooting One (Legacy)": true, + "Wooting One (None)": true, + "Wooting One (Xbox)": true, + "Wooting Two (Classic)": true, + "Wooting Two (Legacy)": true, + "Wooting Two (None)": true, + "Wooting Two (Xbox)": true, + "Wooting Two 60HE (ARM) (Classic)": true, + "Wooting Two 60HE (ARM) (None)": true, + "Wooting Two 60HE (ARM) (Xbox)": true, + "Wooting Two 60HE (Classic)": true, + "Wooting Two 60HE (None)": true, + "Wooting Two 60HE (Xbox)": true, + "Wooting Two HE (ARM) (Classic)": true, + "Wooting Two HE (ARM) (None)": true, + "Wooting Two HE (ARM) (Xbox)": true, + "Wooting Two HE (Classic)": true, + "Wooting Two HE (None)": true, + "Wooting Two HE (Xbox)": true, + "Wooting Two LE (Classic)": true, + "Wooting Two LE (None)": true, + "Wooting Two LE (Xbox)": true, + "XPG Spectrix S40G": true, + "Yeelight": true, + "ZET Blade Optical": true, + "ZET Fury Pro": true, + "ZET GAMING Edge Air Elit": true, + "ZET GAMING Edge Air Elit (Wireless)": true, + "ZET GAMING Edge Air Pro": true, + "ZET GAMING Edge Air Pro (Wireless)": true, + "ZOTAC GAMING GeForce RTX 2070 SUPER Twin Fan": true, + "ZOTAC GAMING GeForce RTX 3070 Ti Trinity OC": true, + "ZOTAC GAMING GeForce RTX 3080 Ti AMP Holo": true, + "ZOTAC GAMING GeForce RTX 3090 AMP Extreme Holo": true, + "ZOTAC GAMING GeForce RTX 4090 AMP Extreme AIRO": true, + "ZOTAC GAMING GeForce RTX 4090 Trinity OC": true, + "Zalman Z Sync": true, + "iGame GeForce RTX 2070 SUPER Advanced OC-V": true, + "iGame GeForce RTX 3060 Advanced OC 12G L-V": true, + "iGame GeForce RTX 3060 Ti Advanced OC-V": true, + "iGame GeForce RTX 3060 Ti Ultra W OC LHR-V": true, + "iGame GeForce RTX 3060 Ultra W OC 12G L-V": true, + "iGame GeForce RTX 3070 Advanced OC-V": true, + "iGame GeForce RTX 3070 Ti Advanced OC-V": true, + "iGame GeForce RTX 3070 Ti Ultra W OC LHR": true, + "iGame GeForce RTX 3070 Ultra W OC LHR": true, + "iGame GeForce RTX 3080 Ti Advanced OC-V": true, + "iGame GeForce RTX 4070 Ti Advanced OC-V": true, + "iGame GeForce RTX 4080 Ultra W OC-V": true + } + }, + "Gigabyte RGB Fusion 2 SMBus": { + "SupportedDevices": [ + "B450 AORUS ELITE", + "B450 AORUS ELITE V2", + "B450 AORUS M", + "B450 AORUS PRO WIFI-CF", + "B450 AORUS PRO-CF", + "B450 AORUS PRO-CF4", + "B450 I AORUS PRO WIFI-CF", + "B450M DS3H-CF", + "X299 DESIGNARE EX-CF", + "X399 AORUS XTREME-CF", + "X399 DESIGNARE EX-CF", + "X470 AORUS GAMING 5 WIFI", + "X470 AORUS GAMING 7 WIFI-CF", + "X470 AORUS GAMING 7 WIFI-50-CF", + "X470 AORUS ULTRA GAMING", + "X470 AORUS ULTRA GAMING-CF", + "B360M AORUS Gaming 3-CF", + "Z370 AORUS Gaming 5-CF", + "Z370 AORUS Ultra Gaming-CF" + ] + }, + "Theme": { + "theme": "dark" + }, + "UserInterface": { + "RunZoneChecks": false, + "exit_profile": { + "profile_name": "Main", + "set_on_exit": true + }, + "geometry": { + "height": 0, + "load_geometry": false, + "save_on_exit": false, + "width": 0, + "x": 0, + "y": 0 + }, + "greyscale_tray_icon": false, + "language": "default", + "minimize_on_close": true + } +} \ No newline at end of file diff --git a/pc/configs/Portmaster/Preferences b/pc/configs/Portmaster/Preferences new file mode 100755 index 0000000..1ec6df7 --- /dev/null +++ b/pc/configs/Portmaster/Preferences @@ -0,0 +1 @@ +{"spellcheck":{"dictionaries":["en-US"],"dictionary":""}} \ No newline at end of file diff --git a/pc/configs/hypr/hypridle.conf b/pc/configs/hypr/hypridle.conf new file mode 100644 index 0000000..c39dccf --- /dev/null +++ b/pc/configs/hypr/hypridle.conf @@ -0,0 +1,39 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ██ █ ██ ███ █████████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██ + +general { + lock_cmd = hyprlock --immediate + unlock_cmd = loginctl unlock-session + before_sleep_cmd = hyprlock --immediate + after_sleep_cmd = hyprlock --immediate +} + +listener { + timeout = 100 + on-timeout = notify-send "Entering idle state... (200s to screen off)" + on-resume = notify-send "Welcome back!" +} + +listener { + timeout = 200 + on-timeout = notify-send "100s to screen off" && sleep 5 && hyprlock +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = systemctl suspend + on-resume = hyprctl dispatch dpms on +} \ No newline at end of file diff --git a/pc/configs/hypr/hyprland.conf b/pc/configs/hypr/hyprland.conf new file mode 100644 index 0000000..fd9ec71 --- /dev/null +++ b/pc/configs/hypr/hyprland.conf @@ -0,0 +1,38 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + + + +#----------# +# MONITORS # +#----------# + +# monitor=DP-1, preferred, 0x0, 1, vrr, 2 +monitor=DP-1, 1920x1080@144, 0x0, 1, vrr, 2 +monitor=DP-2, 1920x1080@75, 1920x0, 1 +# monitor=,highres highrr, auto, 1 + + +# exec = swaybg -m fill -i /mnt/storage/SORTED/Pictures/Wallpapers/wallpaper/arch-bg-matterhorn.jpg +exec = swaybg -m fill -i /mnt/storage/SORTED/Pictures/Wallpapers/McLaren/main_livery_upscaled.jpg + + +source=./hyprland/binds.conf +source=./hyprland/general.conf +source=./hyprland/windowrules.conf + +#---------# +# DESKTOP # +#---------# +workspace = 1, monitor:DP-1, default:1 +workspace = 2, monitor:DP-2, default:1 +workspace = 3, monitor:DP-1 +workspace = 4, monitor:DP-2 diff --git a/pc/configs/hypr/hyprlock.conf b/pc/configs/hypr/hyprlock.conf new file mode 100644 index 0000000..57a8087 --- /dev/null +++ b/pc/configs/hypr/hyprlock.conf @@ -0,0 +1,96 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ████ ████████ █ ██ ██████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + +general { + grace = 15 +} + +# BACKGROUND +background { + monitor = + path = /mnt/storage/SORTED/Pictures/Wallpapers/McLaren/livery_3.jpg # Or screenshot + + blur_passes = 1 +} + +# PASSWORD INPUT +input-field { + monitor = + size = 300, 40 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + outer_color = rgb(204, 92, 0) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + + position = 0, -80 + halign = center + valign = center +} + +label { + monitor = + text = $TIME + color = rgba(200, 200, 200, 1.0) + font_size = 100 + font_family = Source Code Pro + + position = 0, 80 + halign = center + valign = center +} + +label { + monitor = + text = $LAYOUT + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 0 + halign = right + valign = bottom +} + +label { + monitor = + text = $USER + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 0 + halign = left + valign = bottom + shadow_passes = 3 +} + +label { + monitor = + text = Failed attempts: $ATTEMPTS + color = rgba(200, 0, 0, 1.0) + font_size = 12 + font_family = Source Code Pro + + position = 0, 20 + halign = center + valign = bottom + shadow_passes = 3 + shadow_size = 5 + shadow_boost = 3 + shadow_color = rgb(255,255,255) +} + diff --git a/pc/configs/hypr/wall_4K.png b/pc/configs/hypr/wall_4K.png new file mode 100755 index 0000000..f835a97 Binary files /dev/null and b/pc/configs/hypr/wall_4K.png differ diff --git a/pc/configs/hypr/xdg-portal-hyprland b/pc/configs/hypr/xdg-portal-hyprland new file mode 100755 index 0000000..61a3648 --- /dev/null +++ b/pc/configs/hypr/xdg-portal-hyprland @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & \ No newline at end of file diff --git a/pc/configs/waybar/config.jsonc b/pc/configs/waybar/config.jsonc new file mode 100755 index 0000000..2870ad0 --- /dev/null +++ b/pc/configs/waybar/config.jsonc @@ -0,0 +1,98 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": [ + "clock", + "cpu", + "memory", + "hyprland/workspaces" + ], + "modules-center": ["hyprland/window"], + "modules-right": [ + "tray", + "network", + "custom/dualsense", + "pulseaudio", + "pulseaudio#microphone", + "custom/powerMenu" + ], + "hyprland/window": { + "format": "{}" + }, + "tray": { + "icon-size": 14, + "spacing": 8 + }, + "custom/dualsense": { + "tooltip": false, + "return-type": "json", + "exec": "$HOME/.config/waybar/dualsense-notifier.sh", + "on-click": "dualsensectl power-off" + }, + "custom/powerMenu": { + "format": "⏻", + "on-click": "rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi" + }, + "network": { + "format-disconnected": " Net", + "format-wifi": "{icon} {essid}", + "format-ethernet": " Wired", + "tooltip-format-ethernet": "Ethernet\nInterface: {ifname}\nIP: {ipaddr}\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}", + "tooltip-format-wifi": "Wi-Fi\nSSID: {essid}\nIP: {ipaddr}\nSignal strength: {signalStrength}%\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}\nFrequency: {frequency}GHz", + "tooltip-format-disconnected": "Networking\n{ifname} disconnected", + "on-click": "terminator -x nmtui", + "format-icons": ["", "", "", ""] + }, + "clock": { + "format": "{:%a, %d.%m %H:%M:%S}", + "tooltip-format": "Calendar\n{calendar}", + "interval": 1 + }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "format": "{icon}" + }, + "cpu": { + "tooltip-format": "CPU\nTotal: {usage}", + "format": " {usage}", + "interval": 5 + }, + "memory": { + "format": " {percentage}", + "interval": 5 + }, + "pulseaudio": { + "format": "{icon} {volume}", + "tooltip": true, + "format-muted": " Off", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "🏎", + "default": ["", "", ""] + } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": " {volume}", + "format-source-muted": " 0", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + } +} diff --git a/pc/configs/waybar/default-style.css b/pc/configs/waybar/default-style.css new file mode 100644 index 0000000..23a5fc8 --- /dev/null +++ b/pc/configs/waybar/default-style.css @@ -0,0 +1,117 @@ +* { + border: none; + border-radius: 0; + font-family: Cartograph CF Nerd Font, monospace; + font-weight: bold; + font-size: 13px; + min-height: 0; + margin-left: 3px; + margin-right: 3px; +} + +window#waybar { + background: rgba(0, 0, 0, 0.8); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +#workspaces button { + padding: 3px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#workspaces { + background: #1e1e2e; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#window, +#clock, +#custom-powerMenu, +#pulseaudio, +#memory, +#tray, +#custom-dualsense, +#network, +#workspaces, +#cpu { + background: #000024; + padding: 4px 12px; + margin: 3px 2px; + margin-top: 9px; + border: 1px solid #181825; + border-radius: 10px; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#cpu { + margin-right: 0; + border-radius: 10px 0px 0px 10px; + background-color: #222244; +} + +#memory { + color: #89b4fa; + margin-left: 0; + border-radius: 0px 10px 10px 0px; + background-color: #222244; +} + +#window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; +} + +#clock { + color: #a6f7ad; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #a6f7ad; + border-left: 0px; + border-right: 0px; +} diff --git a/pc/configs/waybar/dualsense-notifier.sh b/pc/configs/waybar/dualsense-notifier.sh new file mode 100755 index 0000000..8007849 --- /dev/null +++ b/pc/configs/waybar/dualsense-notifier.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +notify_id=-1 +icon="/usr/share/icons/breeze-dark/devices/64/input-gamepad.svg" + +dev=$(echo $DS_DEV | tr '[:lower:]' '[:upper:]') + +case "$1" in +add) + notify_id=$(notify-desktop -r $notify_id -i $icon "$dev" "Controller connected") + while true; do + class="" + battery=$(dualsensectl battery 2> /dev/null) + perc=$(echo $battery | cut -d' ' -f1) + state=$(echo $perc | cut -d' ' -f2) + if [ -z "$perc" -o -z "$state" ]; then + exit; + fi + if [ $perc -lt 15 -a "$state" != "charging" ]; then + notify_id=$(notify-desktop -r $notify_id -i $icon "$dev" "Low battery ${perc}%") + fi + echo "{\"class\": \"$class\", \"text\": \" ${perc}%\"}" + sleep 5m + done + ;; +remove) + notify_id=$(notify-desktop -r $notify_id -i $icon "$dev" "Controller disconnected") + echo "{\"text\": \"\"}" + ;; +*) + echo "{\"text\": \"\"}" + exec dualsensectl monitor add "${BASH_SOURCE[0]} add" remove "${BASH_SOURCE[0]} remove" + ;; +esac \ No newline at end of file diff --git a/pc/configs/waybar/mclaren-style.css b/pc/configs/waybar/mclaren-style.css new file mode 100644 index 0000000..411c2c3 --- /dev/null +++ b/pc/configs/waybar/mclaren-style.css @@ -0,0 +1,112 @@ +* { + border: none; + border-radius: 0; + font-family: Cartograph CF Nerd Font, monospace; + font-weight: bold; + font-size: 13px; + min-height: 0; + margin-left: 3px; + margin-right: 3px; +} + +window#waybar { + background: rgba(0, 0, 0, 0); + color: #cc5c00; +} + +tooltip { + background: black; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #cc5c00; +} + +#workspaces button { + padding: 3px; + color: #a79f9d; + margin-right: 5px; +} + +#workspaces button.active { + color: white; +} + +#workspaces button.focused { + color: white; + background: #cc5c00; + border-radius: 10px; +} + +#workspaces button.urgent { + color: white; + background: #cc5c00; + border-radius: 10px; +} + +#workspaces button:hover { + background: white; + color: #cc5c00; + border-radius: 10px; +} + +#workspaces { + background: black; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#window, +#clock, +#custom-powerMenu, +#pulseaudio, +#memory, +#tray, +#custom-dualsense, +#network, +#workspaces, +#cpu { + background: black; + padding: 4px 12px; + margin: 3px 2px; + margin-top: 9px; + border: 1px solid rgb(204, 92, 0); + border-radius: 10px; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#cpu { + margin-right: 0; + border-radius: 10px 0px 0px 10px; + background-color: #010006; +} + +#memory { + margin-left: 0; + border-radius: 0px 10px 10px 0px; + background-color: #010006; +} + +#window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; +} + +#clock { + color: #009e58; +} + +#pulseaudio { + color: #9b1603; +} + +#pulseaudio.microphone { + color: rgb(167, 159, 157); +} diff --git a/pc/configs/waybar/style.css b/pc/configs/waybar/style.css new file mode 100755 index 0000000..bad3d70 --- /dev/null +++ b/pc/configs/waybar/style.css @@ -0,0 +1,113 @@ +* { + border: none; + border-radius: 0; + font-family: 'FluentSystemIcons-Regular,Comfortaa', monospace; + font-weight: bold; + font-size: 13px; + min-height: 0; + margin-left: 3px; + margin-right: 3px; +} + +window#waybar { + background: rgba(0, 0, 0, 0); + color: #cc5c00; +} + +tooltip { + background: black; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #cc5c00; +} + +#workspaces button { + padding: 3px; + color: #a79f9d; + margin-right: 5px; +} + +#workspaces button.active { + color: white; +} + +#workspaces button.focused { + color: white; + background: #cc5c00; + border-radius: 10px; +} + +#workspaces button.urgent { + color: white; + background: #cc5c00; + border-radius: 10px; +} + +#workspaces button:hover { + background: white; + color: #cc5c00; + border-radius: 10px; +} + +#workspaces { + background: black; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#window, +#clock, +#custom-powerMenu, +#pulseaudio, +#memory, +#tray, +#custom-dualsense, +#network, +#workspaces, +#cpu { + background: black; + padding: 4px 12px; + margin: 3px 2px; + margin-top: 9px; + border: 1px solid rgb(204, 92, 0); + border-radius: 10px; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#cpu { + margin-right: 0; + border-radius: 10px 0px 0px 10px; + background-color: #010006; +} + +#memory { + margin-left: 0; + border-radius: 0px 10px 10px 0px; + background-color: #010006; +} + +#window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; +} + +#clock { + color: #009e58; + min-width: 125px; +} + +#pulseaudio { + color: #9b1603; +} + +#pulseaudio.microphone { + color: rgb(167, 159, 157); +} diff --git a/pc/docker/daemon.json b/pc/docker/daemon.json new file mode 100644 index 0000000..581de36 --- /dev/null +++ b/pc/docker/daemon.json @@ -0,0 +1,3 @@ +{ + "data-root": "/mnt/storage/docker" +} diff --git a/pc/environment b/pc/environment new file mode 100644 index 0000000..23ce03f --- /dev/null +++ b/pc/environment @@ -0,0 +1,16 @@ +# +# This file is parsed by pam_env module +# +# Syntax: simple "KEY=VAL" pairs on separate lines +# + +QT_QPA_PLATFORMTHEME=qt5ct +QT_STYLE_OVERRIDE=kvantum +GCM_CREDENTIAL_STORE=secretservice +VKD3D_CONFIG=dxr11,dxr +RADV_PERFTEST_RT=1 +ANDROID_HOME=/home/janis/Android/Sdk +QT_QPA_PLATFORM=wayland +JELLYFIN_WEB_DIR=/usr/share/jellyfin-web +GTK_THEME=Material-Black-Blueberry +EDITOR=nvim diff --git a/pc/grub b/pc/grub new file mode 100644 index 0000000..25e09c8 --- /dev/null +++ b/pc/grub @@ -0,0 +1,63 @@ +# GRUB boot loader configuration + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="Arch" +GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash" +GRUB_CMDLINE_LINUX="" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +#GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'hidden' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=menu + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `videoinfo' +GRUB_GFXMODE=1920x1080 + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +#GRUB_SAVEDEFAULT=true + +# Uncomment to disable submenus in boot menu +#GRUB_DISABLE_SUBMENU=y + +# Probing for other operating systems is disabled for security reasons. Read +# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this +# functionality install os-prober and uncomment to detect and include other +# operating systems. +GRUB_DISABLE_OS_PROBER=false +GRUB_THEME="/usr/share/grub/themes/monterey-grub-theme/theme.txt" diff --git a/pc/installedPackages.txt b/pc/installedPackages.txt new file mode 100644 index 0000000..74c5508 --- /dev/null +++ b/pc/installedPackages.txt @@ -0,0 +1,2077 @@ +7zip +a52dec +aalib +abseil-cpp +accounts-qml-module +accountsservice +acl +adobe-source-code-pro-fonts +adwaita-cursors +adwaita-icon-theme +adwaita-icon-theme-legacy +alembic +alsa-card-profiles +alsa-lib +alsa-plugins +alsa-topology-conf +alsa-ucm-conf +android-studio +android-udev +aom +appmenu-glib-translator-git-debug +appstream +appstream-glib +aquamarine +archlinux-keyring +argon2 +aria2 +aribb24 +ark +at-spi2-core +atkmm +attica +attica5 +attr +audit +augeas +autoconf +autoconf-archive +autojump +automake +avahi +ayatana-ido +aylurs-gtk-shell-git-debug +babl +baloo +base +base-devel +bash +bash-language-server +bashtop +betaflight-configurator-bin +biber +bind +binutils +bison +blas +blas64-openblas +blender +blender-benchmark +blosc +blueman +bluez +bluez-libs +boost +boost-libs +botan +botan2 +brave-bin +breeze-icons +bridge-utils +brotli +btrfs-progs +bubblewrap +bzip2 +c-ares +ca-certificates +ca-certificates-mozilla +ca-certificates-utils +cairo +cairomm +cairomm-1.16 +calligra +cantarell-fonts +capstone +cauchy +cblas +cdparanoia +cfitsio +chromaprint +chrono-date +cider +cifs-utils +cjson +clamav +clang +clang15 +clang15-debug +cmake +cmark +colord +colord-sane +comgr +compiler-rt +compiler-rt15 +composer +containerd +convertlit +corectrl +coreutils +cpio +cppdap +cpupower +cpupower-gui +cracklib +cryptsetup +cups +cups-filters +curl +cython +dav1d +db +db5.3 +dbus +dbus-broker +dbus-broker-units +dbus-glib +dconf +debootstrap +debugedit +dee +default-cursors +desktop-file-utils +device-mapper +dhcpcd +diffutils +discount +distro-info +distro-info-data +djvulibre +dkms +dnsmasq +dnssec-anchors +docbook-xml +docbook-xsl +docker +docker-compose +dos2unix +dosfstools +dotnet-host +dotnet-runtime +dotnet-sdk +dotnet-targeting-pack +double-conversion +doxygen +draco +dtc +dualsensectl +dualsensectl-debug +duktape +dunst +dvisvgm +e2fsprogs +easytax-ag-2022 +easytax-ag-2023 +easytax-ag-2024 +ebook-tools +editorconfig-core-c +edk2-ovmf +efibootmgr +efivar +electron34 +elementary-icon-theme +embree +enchant +epiphany +evince +exfatprogs +exiv2 +exo +expat +extra-cmake-modules +f2fs-tools +faac +faad2 +fakeroot +fcitx5 +fd +ffcall +ffmpeg +ffmpeg4.4 +ffmpegthumbnailer +fftw +file +filesystem +filezilla +findutils +fish +flac +flex +fluidsynth +fmt +fontconfig +foomatic-db +foomatic-db-engine +foomatic-db-ppds +freeglut +freetype2 +frei0r-plugins +fribidi +fuse-common +fuse2 +fuse3 +gamemode +gamescope +garcon +gawk +gc +gcc +gcc-libs +gcr +gcr-4 +gd +gdb +gdb-common +gdbm +gdk-pixbuf2 +gegl +geoclue +geocode-glib-2 +geocode-glib-common +gettext +gflags +ghc-libs +ghex +ghostscript +giflib +gimp +girara +git +git-credential-manager-bin +gjs +glances +glew +glfw +glib-networking +glib2 +glib2-devel +glib2-docs +glibc +glibmm +glibmm-2.68 +glm +glslang +glu +gmp +gnome-characters +gnome-common +gnome-desktop +gnome-desktop-4 +gnome-desktop-common +gnome-disk-utility +gnome-font-viewer +gnome-keyring +gnome-settings-daemon +gnome-themes-extra +gnu-free-fonts +gnulib-l10n +gnupg +gnutls +go +gobject-introspection +gobject-introspection-runtime +google-glog +gparted +gperftools +gpgme +gpm +gptfdisk +gradle +graphene +graphicsmagick +graphite +graphviz +grep +grim +grimblast-git +groff +grub +gsettings-desktop-schemas +gsettings-system-schemas +gsfonts +gsl +gsm +gspell +gssdp +gst-libav +gst-plugin-pipewire +gst-plugins-bad +gst-plugins-bad-libs +gst-plugins-base +gst-plugins-base-libs +gst-plugins-good +gstreamer +gtest +gtk-doc +gtk-layer-shell +gtk-update-icon-cache +gtk-vnc +gtk2 +gtk3 +gtk4 +gtkmm-4.0 +gtkmm3 +gtksourceview4 +gts +guile +gupnp +gupnp-igd +gvfs +gwenview +gzip +handbrake +harfbuzz +harfbuzz-icu +haskell-aeson +haskell-aeson-pretty +haskell-ansi-terminal +haskell-ansi-terminal-types +haskell-ansi-wl-pprint +haskell-appar +haskell-asn1-encoding +haskell-asn1-parse +haskell-asn1-types +haskell-assoc +haskell-async +haskell-attoparsec +haskell-attoparsec-aeson +haskell-attoparsec-iso8601 +haskell-auto-update +haskell-base-compat +haskell-base-compat-batteries +haskell-base-orphans +haskell-base-unicode-symbols +haskell-base16-bytestring +haskell-base64-bytestring +haskell-basement +haskell-bifunctors +haskell-bitvec +haskell-blaze-builder +haskell-blaze-html +haskell-blaze-markup +haskell-boring +haskell-bsb-http-chunked +haskell-byteorder +haskell-call-stack +haskell-case-insensitive +haskell-cassava +haskell-cereal +haskell-citeproc +haskell-cmdargs +haskell-colour +haskell-commonmark +haskell-commonmark-extensions +haskell-commonmark-pandoc +haskell-comonad +haskell-conduit +haskell-conduit-extra +haskell-constraints +haskell-contravariant +haskell-cookie +haskell-crypton +haskell-crypton-connection +haskell-crypton-x509 +haskell-crypton-x509-store +haskell-crypton-x509-system +haskell-crypton-x509-validation +haskell-data-array-byte +haskell-data-default +haskell-data-default-class +haskell-data-default-instances-containers +haskell-data-default-instances-dlist +haskell-data-default-instances-old-locale +haskell-data-fix +haskell-dec +haskell-digest +haskell-distributive +haskell-djot +haskell-dlist +haskell-doclayout +haskell-doctemplates +haskell-easy-file +haskell-emojis +haskell-erf +haskell-fast-logger +haskell-file-embed +haskell-foldable1-classes-compat +haskell-generically +haskell-ghc-bignum-orphans +haskell-glob +haskell-gridtables +haskell-haddock-library +haskell-hashable +haskell-hourglass +haskell-hslua +haskell-hslua-aeson +haskell-hslua-classes +haskell-hslua-core +haskell-hslua-list +haskell-hslua-marshalling +haskell-hslua-module-doclayout +haskell-hslua-module-path +haskell-hslua-module-system +haskell-hslua-module-text +haskell-hslua-module-version +haskell-hslua-module-zip +haskell-hslua-objectorientation +haskell-hslua-packaging +haskell-hslua-repl +haskell-hslua-typing +haskell-http-api-data +haskell-http-client +haskell-http-client-tls +haskell-http-date +haskell-http-media +haskell-http-types +haskell-http2 +haskell-hunit +haskell-indexed-traversable +haskell-indexed-traversable-instances +haskell-integer-logarithms +haskell-iproute +haskell-ipynb +haskell-isocline +haskell-jira-wiki-markup +haskell-juicypixels +haskell-lexer +haskell-libyaml +haskell-lpeg +haskell-lua +haskell-memory +haskell-mime-types +haskell-mmorph +haskell-monad-control +haskell-mono-traversable +haskell-network +haskell-network-byte-order +haskell-network-uri +haskell-old-locale +haskell-old-time +haskell-onetuple +haskell-only +haskell-optparse-applicative +haskell-ordered-containers +haskell-os-string +haskell-pandoc +haskell-pandoc-lua-engine +haskell-pandoc-lua-marshal +haskell-pandoc-server +haskell-pandoc-types +haskell-pem +haskell-pretty-show +haskell-prettyprinter +haskell-primitive +haskell-psqueues +haskell-quickcheck +haskell-random +haskell-recv +haskell-regex-base +haskell-regex-tdfa +haskell-resourcet +haskell-safe +haskell-safe-exceptions +haskell-scientific +haskell-semialign +haskell-semigroupoids +haskell-servant +haskell-servant-server +haskell-sha +haskell-simple-sendfile +haskell-singleton-bool +haskell-skylighting +haskell-skylighting-core +haskell-skylighting-format-ansi +haskell-skylighting-format-blaze-html +haskell-skylighting-format-context +haskell-skylighting-format-latex +haskell-socks +haskell-some +haskell-sop-core +haskell-split +haskell-splitmix +haskell-statevar +haskell-streaming-commons +haskell-strict +haskell-syb +haskell-tagged +haskell-tagsoup +haskell-temporary +haskell-texmath +haskell-text-conversions +haskell-text-icu +haskell-text-short +haskell-th-abstraction +haskell-th-compat +haskell-th-lift +haskell-th-lift-instances +haskell-these +haskell-time-compat +haskell-time-manager +haskell-tls +haskell-toml-parser +haskell-transformers-base +haskell-transformers-compat +haskell-type-equality +haskell-typed-process +haskell-typst +haskell-typst-symbols +haskell-unicode-collation +haskell-unicode-data +haskell-unicode-transforms +haskell-uniplate +haskell-unix-compat +haskell-unix-time +haskell-unliftio +haskell-unliftio-core +haskell-unordered-containers +haskell-utf8-string +haskell-uuid-types +haskell-vault +haskell-vector +haskell-vector-algorithms +haskell-vector-stream +haskell-wai +haskell-wai-app-static +haskell-wai-cors +haskell-wai-extra +haskell-wai-logger +haskell-warp +haskell-witherable +haskell-word8 +haskell-xml +haskell-xml-conduit +haskell-xml-types +haskell-yaml +haskell-zip-archive +haskell-zlib +hdf5 +heroic-games-launcher-bin +hicolor-icon-theme +hidapi +highway +hip-runtime-amd +hipblas +hivex +hsa-rocr +hsakmt-roct +hslua-cli +http-parser +hugo +hunspell +hwdata +hwinfo +hwloc +hyphen +hyprcursor +hyprevents-git +hyprfreeze-git +hyprgraphics +hypridle +hyprland +hyprland-qt-support +hyprland-qtutils +hyprland-qtutils-debug +hyprlang +hyprlock +hyprprop-git +hyprutils +hyprwayland-scanner +iana-etc +ibus +icu +ifuse +ijs +imagemagick +imath +imlib2 +iniparser +inkscape +input-remapper-git +intel-oneapi-common +intel-oneapi-compiler-dpcpp-cpp-runtime-libs +intel-oneapi-compiler-shared-runtime-libs +intel-oneapi-openmp +intel-oneapi-tbb +intel-oneapi-tcm +inter-font +intltool +iproute2 +iptables-nft +iputils +iso-codes +itstool +jansson +jasper +java-environment-common +java-hamcrest +java-runtime-common +jbig2dec +jbigkit +jdk-openjdk +jdk21-openjdk +jdtls +jemalloc +jfsutils +jq +js115 +js128 +json-c +json-glib +jsoncpp +jstest-gtk-git +julia +junit +kaccounts-integration +kactivities5 +karchive +karchive5 +kate +kauth +kauth5 +kbd +kbookmarks +kbookmarks5 +kcmutils +kcmutils5 +kcodecs +kcodecs5 +kcolorpicker +kcolorpicker-qt5 +kcolorscheme +kcompletion +kcompletion5 +kconfig +kconfig5 +kconfigwidgets +kconfigwidgets5 +kcontacts5 +kcoreaddons +kcoreaddons5 +kcrash +kcrash5 +kdbusaddons +kdbusaddons5 +kdeclarative +kdeclarative5 +kded5 +kdelibs4support +kdelibs4support-debug +kdesignerplugin +kdesignerplugin-debug +kdiagram +kdiagram5 +kdoctools5 +kemoticons +kemoticons-debug +keyutils +kfilemetadata +kfilemetadata5 +kglobalaccel +kglobalaccel5 +kguiaddons +kguiaddons5 +khtml +ki18n +ki18n5 +kiconthemes +kiconthemes5 +kidletime +kidletime5 +kimageannotator +kimageannotator-qt5 +kinit +kio +kio5 +kirigami +kirigami-addons +kirigami2 +kitemmodels +kitemmodels5 +kitemviews +kitemviews5 +kitty +kitty-shell-integration +kitty-terminfo +kjobwidgets +kjobwidgets5 +kjs +kmod +knewstuff +knewstuff5 +knock-bin +knock-bin-debug +knotifications +knotifications5 +knotifyconfig +knotifyconfig5 +kotlin +kpackage +kpackage5 +kparts +kparts5 +kpty +kpty5 +kquickcharts +kquickimageeditor +kquickimageeditor5 +krb5 +kross +ksanecore +kservice +kservice5 +kstatusnotifieritem +ksvg +ksystemstats +ktexteditor +ktexteditor5 +ktextwidgets +ktextwidgets5 +ktorrent +kunitconversion5 +kuserfeedback +kvantum +kvantum-qt5 +kwallet +kwallet5 +kwidgetsaddons +kwidgetsaddons5 +kwindowsystem +kwindowsystem5 +kxmlgui +kxmlgui5 +l-smash +ladspa +lame +lapack +lcms2 +ldb +ldns +leancrypto +lensfun +leptonica +less +level-zero-loader +lib2geom +lib32-acl +lib32-alsa-lib +lib32-alsa-plugins +lib32-brotli +lib32-bzip2 +lib32-curl +lib32-dbus +lib32-e2fsprogs +lib32-expat +lib32-fontconfig +lib32-freetype2 +lib32-gcc-libs +lib32-gettext +lib32-glib2 +lib32-glibc +lib32-harfbuzz +lib32-icu +lib32-json-c +lib32-keyutils +lib32-krb5 +lib32-libcap +lib32-libdrm +lib32-libelf +lib32-libffi +lib32-libgcrypt +lib32-libglvnd +lib32-libgpg-error +lib32-libidn2 +lib32-libldap +lib32-libnghttp2 +lib32-libnghttp3 +lib32-libnl +lib32-libnsl +lib32-libpcap +lib32-libpciaccess +lib32-libpng +lib32-libpsl +lib32-libssh2 +lib32-libtasn1 +lib32-libtirpc +lib32-libunistring +lib32-libunwind +lib32-libx11 +lib32-libxau +lib32-libxcb +lib32-libxcrypt +lib32-libxcrypt-compat +lib32-libxcursor +lib32-libxdamage +lib32-libxdmcp +lib32-libxext +lib32-libxfixes +lib32-libxi +lib32-libxkbcommon +lib32-libxml2 +lib32-libxrandr +lib32-libxrender +lib32-libxshmfence +lib32-libxss +lib32-libxxf86vm +lib32-llvm-libs +lib32-lm_sensors +lib32-mesa +lib32-ncurses +lib32-nspr +lib32-nss +lib32-openssl +lib32-p11-kit +lib32-pam +lib32-pcre2 +lib32-spirv-tools +lib32-sqlite +lib32-systemd +lib32-util-linux +lib32-vulkan-icd-loader +lib32-vulkan-radeon +lib32-wayland +lib32-xcb-util-keysyms +lib32-xz +lib32-zlib +lib32-zstd +libaccounts-glib +libaccounts-qt +libadwaita +libaec +libaio +libappindicator-gtk3 +libarchive +libass +libassuan +libastal-4-git-debug +libastal-apps-git-debug +libastal-auth-git-debug +libastal-battery-git-debug +libastal-bluetooth-git-debug +libastal-cava-git-debug +libastal-git-debug +libastal-greetd-git-debug +libastal-hyprland-git-debug +libastal-io-git-debug +libastal-mpris-git-debug +libastal-network-git-debug +libastal-notifd-git-debug +libastal-powerprofiles-git-debug +libastal-river-git-debug +libastal-tray-git-debug +libastal-wireplumber-git-debug +libasyncns +libatasmart +libavc1394 +libavif +libavtp +libayatana-appindicator +libayatana-indicator +libb2 +libblastrampoline +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-nvme +libblockdev-part +libblockdev-swap +libbluray +libbpf +libbs2b +libbsd +libburn +libbytesize +libcaca +libcacard +libcamera +libcamera-ipa +libcanberra +libcap +libcap-ng +libcava-debug +libcdio +libcdio-paranoia +libcdr +libclc +libcloudproviders +libcolord +libconfig +libcups +libcupsfilters +libdaemon +libdatachannel +libdatrie +libdbusmenu-glib +libdbusmenu-gtk3 +libdbusmenu-qt5 +libdc1394 +libdca +libde265 +libdecor +libdeflate +libdiscid +libdisplay-info +libdovi +libdrm +libdv +libdvbpsi +libdvdcss +libdvdnav +libdvdread +libebml +libebur128 +libedit +libei +libelf +libepoxy +libev +libevdev +libevent +libewf +libexif +libfabric +libfdk-aac +libffi +libfilezilla +libfontenc +libfreeaptx +libgcrypt +libgexiv2 +libgirepository +libgit2 +libglvnd +libgme +libgnome-keyring +libgovirt +libgpg-error +libgphoto2 +libgtop +libgudev +libguestfs +libgusb +libgweather-4 +libgxps +libhandy +libharu +libheif +libibus +libical +libice +libidn +libidn2 +libiec61883 +libieee1284 +libimagequant +libimobiledevice +libimobiledevice-glue +libinih +libinput +libinstpatch +libisl +libisoburn +libisofs +libjpeg-turbo +libjuice +libjxl +libkdcraw +libkdcraw5 +libkexiv2 +libkeybinder3 +libksba +libksysguard +libktorrent +liblc3 +libldac +libldap +libldm +libliftoff +liblqr +liblrdf +libltc +libluv +libmad +libmanette +libmatroska +libmaxminddb +libmd +libmediainfo +libmfx +libmicrodns +libmicrohttpd +libmm-glib +libmms +libmng +libmnl +libmodplug +libmpc +libmpcdec +libmpdclient +libmpeg2 +libmspack +libmtp +libmypaint +libmysofa +libnbd +libndp +libnet +libnetfilter_conntrack +libnewt +libnfnetlink +libnftnl +libnghttp2 +libnghttp3 +libngtcp2 +libnice +libnick +libnl +libnm +libnma +libnma-common +libnotify +libnsl +libnvme +libodfgen +libogg +libomxil-bellagio +libopenmpt +libosinfo +libp11-kit +libpaper +libpcap +libpciaccess +libpgm +libpipeline +libpipewire +libplacebo +libplasma +libplist-git +libplist-git-debug +libpng +libportal +libportal-gtk4 +libppd +libproxy +libpsl +libpulse +libpwquality +libqalculate +libraqm +libraw +libraw1394 +librest +librevenge +librewolf-bin +librewolf-bin-debug +librsvg +librsync +libsamplerate +libsasl +libsass +libseccomp +libsecret +libshout +libsigc++ +libsigc++-3.0 +libsigsegv +libslirp +libsm +libsndfile +libsodium +libsoup +libsoup3 +libsoxr +libspectre +libspiro +libspnav +libspng +libsrtp +libssh +libssh2 +libstemmer +libsynctex +libsysprof-capture +libtar +libtasn1 +libtatsu-git +libtatsu-git-debug +libteam +libtermkey +libthai +libtheora +libtiff +libtirpc +libtommath +libtool +libtraceevent +libtracefs +libunibreak +libunistring +libunity +libunwind +libupnp +liburcu +liburing +libusb +libusbmuxd +libutempter +libutf8proc +libuv +libva +libvdpau +libverto +libvirt +libvirt-glib +libvirt-python +libvisio +libvlc +libvorbis +libvpl +libvpx +libvterm +libwacom +libwbclient +libwebp +libwebsockets +libwireplumber +libwmf +libwnck3 +libwpd +libwpe +libwpg +libx11 +libx86emu +libxau +libxaw +libxcb +libxcomposite +libxcrypt +libxcrypt-compat +libxcursor +libxcvt +libxdamage +libxdg-basedir +libxdmcp +libxdp +libxext +libxfce4ui +libxfce4util +libxfce4windowing +libxfixes +libxfont2 +libxft +libxi +libxinerama +libxkbcommon +libxkbcommon-x11 +libxkbfile +libxklavier +libxml++-5.0 +libxml2 +libxmlb +libxmu +libxnvctrl +libxpm +libxpresent +libxrandr +libxrender +libxres +libxshmfence +libxslt +libxss +libxt +libxtst +libxv +libxxf86vm +libyaml +libyuv +libzen +libzip +licenses +lilv +linux-api-headers +linux-firmware +linux-firmware-whence +linux-zen +linux-zen-headers +lld +llhttp +llvm +llvm-julia-libs +llvm-libs +llvm15 +llvm15-libs +lm_sensors +lmdb +log4cplus +lrzip +lsb-release +lsof +lsscsi +lua +lua-filesystem +lua-language-server +lua-lpeg +lua51-lpeg +luajit +luarocks +lv2 +lvm2 +lxappearance +lz4 +lzo +lzop +m4 +mailcap +make +mallard-ducktype +man-db +mangohud +materialx +maven +mbedtls +mbedtls2 +md4c +mdadm +media-player-info +mediainfo +mesa +meson +minecraft-launcher +minecraft-launcher-debug +minisign +minizip +minizip-ng +mjpegtools +mkinitcpio +mkinitcpio-busybox +mlt +mobile-broadband-provider-info +mosquitto +movit +mpdecimal +mpfr +mpg123 +msgpack-c +mtdev +mtools +multipath-tools +mypaint-brushes1 +nano +nasm +ncurses +ndctl +neofetch +neon +neovim +net-snmp +netpbm +netstandard-targeting-pack +nettle +network-manager-applet +networkmanager +nextcloud-client +nftables +nilfs-utils +ninja +nm-connection-editor +nmap +node-gyp +nodejs-lts-jod +nodejs-nopt +noto-fonts +noto-fonts-emoji +npm +npth +nspr +nss +ntfs-3g +numactl +nvm +nwjs-bin +nwjs-bin-debug +obs-studio +ocl-icd +okular +ollama +ollama-rocm +onetbb +oniguruma +openal +openblas64 +opencl-clover-mesa +opencl-headers +opencollada +opencolorio +opencore-amr +openexr +openh264 +openimagedenoise +openimageio +openjpeg2 +openlibm +openmp +openmpi +openpgl +openpmix +openrazer-daemon +openrazer-driver-dkms +openresolv +openrgb +openshadinglanguage +openssh +openssl +opensubdiv +openucx +openvdb +openxr +opus +orc +os-prober +osinfo-db +otf-firamono-nerd +otf-sora +p11-kit +pacman +pacman-contrib +pacman-mirrorlist +pahole +pam +pambase +pamixer +pandoc-cli +pango +pangomm +pangomm-2.48 +parabolic-debug +parabolic-gtk +parted +patch +pavucontrol +pciutils +pcre +pcre2 +pcsclite +perl +perl-alien-build +perl-alien-libxml2 +perl-autovivification +perl-b-hooks-endofscope +perl-business-isbn +perl-business-isbn-data +perl-business-ismn +perl-business-issn +perl-capture-tiny +perl-class-accessor +perl-class-data-inheritable +perl-class-inspector +perl-class-load +perl-class-singleton +perl-clone +perl-data-compare +perl-data-dump +perl-data-optlist +perl-data-uniqid +perl-datetime +perl-datetime-calendar-julian +perl-datetime-format-builder +perl-datetime-format-strptime +perl-datetime-locale +perl-datetime-timezone +perl-dbi +perl-devel-stacktrace +perl-dist-checkconflicts +perl-encode-locale +perl-error +perl-eval-closure +perl-exception-class +perl-exporter-tiny +perl-ffi-checklib +perl-file-chdir +perl-file-find-rule +perl-file-listing +perl-file-sharedir +perl-file-sharedir-install +perl-file-slurp-tiny +perl-file-slurper +perl-file-which +perl-html-parser +perl-html-tagset +perl-http-cookiejar +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-io-html +perl-io-socket-ssl +perl-io-string +perl-ipc-run3 +perl-libintl-perl +perl-libwww +perl-lingua-translit +perl-list-allutils +perl-list-moreutils +perl-list-moreutils-xs +perl-list-someutils +perl-list-utilsby +perl-log-log4perl +perl-lwp-mediatypes +perl-lwp-protocol-https +perl-mailtools +perl-math-round +perl-mime-charset +perl-module-implementation +perl-module-runtime +perl-mozilla-ca +perl-mro-compat +perl-namespace-autoclean +perl-namespace-clean +perl-net-http +perl-net-ssleay +perl-number-compare +perl-package-deprecationmanager +perl-package-stash +perl-package-stash-xs +perl-params-util +perl-params-validate +perl-params-validationcompiler +perl-parse-recdescent +perl-path-tiny +perl-perlio-utf8-strict +perl-regexp-common +perl-role-tiny +perl-sort-key +perl-specio +perl-sub-exporter +perl-sub-exporter-progressive +perl-sub-install +perl-test-fatal +perl-text-bibtex +perl-text-csv +perl-text-glob +perl-text-roman +perl-tie-cycle +perl-timedate +perl-try-tiny +perl-unicode-linebreak +perl-uri +perl-variable-magic +perl-www-robotrules +perl-xml-libxml +perl-xml-libxml-simple +perl-xml-libxslt +perl-xml-namespacesupport +perl-xml-parser +perl-xml-sax +perl-xml-sax-base +perl-xml-writer +phodav +phonon-qt5 +phonon-qt5-vlc +phonon-qt6 +phonon-qt6-vlc +php +picard +pinentry +pipewire +pipewire-alsa +pipewire-audio +pipewire-jack +pipewire-pulse +pipewire-session-manager +pixman +pkgconf +plasma-activities +plasma-systemmonitor +playerctl +plymouth +polkit +polkit-gnome +polkit-kde-agent +polkit-qt5 +polkit-qt6 +polychromatic +poppler +poppler-data +poppler-glib +poppler-qt5 +poppler-qt6 +popt +portaudio +portmaster-stub-bin +potrace +power-profiles-daemon +powertop +prettier +print-manager +prismlauncher +procps-ng +protonup-git +protonup-qt +prrte +psensor +psmisc +ptex +pugixml +purpose +purpose5 +pybind11 +pyright +pyside2 +pyside6 +pystring +python +python-annotated-types +python-anyio +python-appdirs +python-attrs +python-autocommand +python-beautifulsoup4 +python-brotli +python-build +python-cachecontrol +python-cachetools +python-cairo +python-certifi +python-cffi +python-chardet +python-charset-normalizer +python-click +python-colorama +python-colour +python-configobj +python-contourpy +python-coverage +python-cryptography +python-cssselect +python-cycler +python-daemonize +python-dateutil +python-dbus +python-defusedxml +python-discid +python-distlib +python-distro +python-distutils-extra +python-editables +python-evdev +python-fasteners +python-fastjsonschema +python-filelock +python-fonttools +python-gobject +python-greenlet +python-h11 +python-hatch +python-hatchling +python-html2text +python-httpcore +python-httpx +python-hyperlink +python-idna +python-inflect +python-iniconfig +python-inputs +python-installer +python-jaraco.classes +python-jaraco.collections +python-jaraco.context +python-jaraco.functools +python-jaraco.text +python-jeepney +python-jinja +python-keyring +python-kiwisolver +python-lark-parser +python-lockfile +python-lxml +python-mako +python-markdown +python-markdown-it-py +python-markupsafe +python-matplotlib +python-mdurl +python-mock +python-more-itertools +python-msgpack +python-mutagen +python-nose +python-numpy +python-opengl +python-openrazer +python-ordered-set +python-orjson +python-packaging +python-pathspec +python-pbr +python-pexpect +python-pillow +python-pip +python-platformdirs +python-pluggy +python-ply +python-poetry-core +python-psutil +python-ptyprocess +python-pyaml +python-pycparser +python-pycryptodomex +python-pydantic +python-pydantic-core +python-pydbus +python-pygments +python-pyjwt +python-pynvim +python-pyparsing +python-pyproject-hooks +python-pyqt5 +python-pyqt5-sip +python-pyqt5-webengine +python-pyqt6 +python-pyqt6-sip +python-pyqt6-webengine +python-pyserial +python-pytest +python-pytest-cov +python-pyudev +python-pyxattr +python-pyxdg +python-requests +python-rich +python-secretstorage +python-setproctitle +python-setuptools +python-shellingham +python-shiboken2 +python-shtab +python-six +python-sniffio +python-soupsieve +python-steam-solstice +python-termcolor +python-tomli +python-tomli-w +python-tomlkit +python-tqdm +python-trove-classifiers +python-typeguard +python-typing_extensions +python-uc-micro-py +python-ujson +python-urllib3 +python-userpath +python-uv +python-validate-pyproject +python-vdf-solstice +python-virtualenv +python-websockets +python-wheel +python-yaml +python-zstandard +qalculate-qt +qca-qt5 +qca-qt6 +qemu-base +qemu-common +qemu-img +qemu-system-x86 +qemu-system-x86-firmware +qhull +qpdf +qqc2-desktop-style +qqc2-desktop-style5 +qrencode +qt5-base +qt5-charts +qt5-declarative +qt5-doc +qt5-graphicaleffects +qt5-location +qt5-multimedia +qt5-networkauth +qt5-quickcontrols +qt5-quickcontrols2 +qt5-script +qt5-speech +qt5-svg +qt5-tools +qt5-translations +qt5-wayland +qt5-webchannel +qt5-webengine +qt5-websockets +qt5-x11extras +qt5-xmlpatterns +qt5ct +qt6-5compat +qt6-base +qt6-charts +qt6-declarative +qt6-imageformats +qt6-multimedia +qt6-multimedia-ffmpeg +qt6-networkauth +qt6-positioning +qt6-shadertools +qt6-speech +qt6-svg +qt6-tools +qt6-translations +qt6-wayland +qt6-webchannel +qt6-webengine +qt6-websockets +qt6ct +qtkeychain-qt5 +qtkeychain-qt6 +quazip-qt5 +quazip-qt6 +ragel +raptor +rav1e +re2 +readline +reflector +reiserfsprogs +rhash +ripgrep +rnnoise +rocblas +rocm-cmake +rocm-core +rocm-device-libs +rocm-hip-runtime +rocm-language-runtime +rocm-llvm +rocm-opencl-runtime +rocminfo +rocprim +rocprofiler-register +rocsolver +rocsparse +rofi +rofi-power-menu +rsync +rtkit +rtmpdump +rubberband +ruby +ruby-bundled-gems +ruby-bundler +ruby-debug +ruby-default-gems +ruby-erb +ruby-irb +ruby-matrix +ruby-minitest +ruby-net-ftp +ruby-net-imap +ruby-net-pop +ruby-net-smtp +ruby-power_assert +ruby-prime +ruby-racc +ruby-rake +ruby-rbs +ruby-rdoc +ruby-rexml +ruby-rss +ruby-stdlib +ruby-test-unit +ruby-typeprof +rubygems +runc +rustdesk +rustup +samba +sane +sassc +sbc +scdoc +scour +sdbus-cpp +sddm +sdl12-compat +sdl2-compat +sdl3 +seabios +seahorse +seatd +sed +semver +serd +serpl +shaderc +shadow +shairport-sync +shared-mime-info +shfmt +shiboken6 +shotcut +signon-kwallet-extension +signon-plugin-oauth2 +signon-ui +signond +simple-scan +skanpage +slang +sleuthkit +slurp +smartmontools +smbclient +snappy +sndio +socat +solid +solid5 +sonnet +sonnet5 +sord +sound-theme-freedesktop +soundtouch +source-highlight +spandsp +spdlog +speex +speexdsp +spice-gtk +spice-protocol +spirv-llvm-translator +spirv-tools +sqlite +squashfs-tools +sratom +srt +startup-notification +steam +strace +stripe-cli-bin +stripe-cli-bin-debug +stylua +sudo +suitesparse +supermin +supertuxkart +svt-av1 +svt-hevc +swaybg +syndication +syndication5 +syntax-highlighting +syntax-highlighting5 +sysfsutils +syslinux +systemd +systemd-libs +systemd-sysvcompat +t1lib +taglib +talloc +tar +tcl +tdb +terminator +tesseract +tesseract-data-afr +tesseract-data-osd +tevent +texinfo +texlab +texlive-basic +texlive-bibtexextra +texlive-bin +texlive-binextra +texlive-context +texlive-fontsextra +texlive-fontsrecommended +texlive-fontutils +texlive-formatsextra +texlive-games +texlive-humanities +texlive-langgerman +texlive-latex +texlive-latexextra +texlive-latexrecommended +texlive-luatex +texlive-mathscience +texlive-metapost +texlive-music +texlive-pictures +texlive-plaingeneric +texlive-pstricks +texlive-publishers +texlive-xetex +thin-provisioning-tools +threadweaver +threadweaver5 +thunar +thunderbird +tinysparql +tinyxml +tinyxml2 +tk +tldr +tomlplusplus +tpm2-tss +tree-sitter +tree-sitter-bash +tree-sitter-c +tree-sitter-cli +tree-sitter-lua +tree-sitter-markdown +tree-sitter-python +tree-sitter-query +tree-sitter-vim +tree-sitter-vimdoc +tslib +ttf-comfortaa +ttf-fantasque-nerd +ttf-fluentui-system-icons +ttf-icomoon-feather +ttf-iosevka-nerd +ttf-jetbrains-mono-nerd +ttf-liberation +ttf-nerd-fonts-symbols +ttf-nerd-fonts-symbols-common +turbostat +twolame +typescript +typescript-language-server +tzdata +udisks2 +unibilium +unzip +upower +usbmuxd +usbredir +usbutils +usd +uthash +util-linux +util-linux-libs +uv +uxplay +uxplay-debug +v4l-utils +vala +vapoursynth +vde2 +vesktop-bin +vi +vid.stab +vim +vim-runtime +virt-install +virt-manager +virt-viewer +virtiofsd +vlc +vmaf +volume_key +vscode-css-languageserver +vscode-html-languageserver +vscodium +vte-common +vte3 +vulkan-headers +vulkan-icd-loader +vulkan-radeon +vulkan-validation-layers +wavpack +waybar +wayland +wayland-protocols +webkitgtk-6.0 +webrtc-audio-processing-1 +wget +which +wildmidi +wine +wireplumber +wl-clipboard +wlogout +wlogout-debug +wlroots +woff2 +wolfssl +wpa_supplicant +wpebackend-fdo +wxwidgets-common +wxwidgets-gtk3 +x264 +x265 +xautomation +xcb-imdkit +xcb-proto +xcb-util +xcb-util-cursor +xcb-util-errors +xcb-util-image +xcb-util-keysyms +xcb-util-renderutil +xcb-util-wm +xcb-util-xrm +xclip +xdg-dbus-proxy +xdg-desktop-portal +xdg-desktop-portal-hyprland +xdg-user-dirs +xdg-utils +xdotool +xf86-input-libinput +xfce4-appfinder +xfce4-notifyd +xfce4-panel +xfce4-power-manager +xfce4-session +xfce4-settings +xfconf +xfdesktop +xfsprogs +xfwm4 +xfwm4-themes +xkeyboard-config +xorg-fonts-encodings +xorg-iceauth +xorg-server +xorg-server-common +xorg-setxkbmap +xorg-xauth +xorg-xcursorgen +xorg-xinit +xorg-xinput +xorg-xkbcomp +xorg-xmodmap +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xset +xorg-xwayland +xorgproto +xvidcore +xxhash +xz +y-cruncher +yajl +yaml-cpp +yara +yarn +yay +yazi +yelp-tools +yelp-xsl +yt-dlp +zathura +zbar +zenity +zeromq +zimg +zip +zix +zlib +zlib-ng +zstd +zvbi +zxing-cpp +zziplib diff --git a/pc/mkinitcpio.conf b/pc/mkinitcpio.conf new file mode 100644 index 0000000..2fd80a4 --- /dev/null +++ b/pc/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck plymouth) + +# COMPRESSION +# Use this to compress the initramfs image. By default, zstd compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" diff --git a/pc/mnt/mnt-janis.mount b/pc/mnt/mnt-janis.mount new file mode 100755 index 0000000..46fd799 --- /dev/null +++ b/pc/mnt/mnt-janis.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mount Share at boot + +[Mount] +What=//192.168.1.136/janis +Where=/mnt/janis +Options=_netdev,credentials=/etc/samba/credentials/janis,iocharset=utf8,rw,uid=janis,gid=janis +Type=cifs +TimeoutSec=30 +ForceUnmount=true + +[Install] +WantedBy=multi-user.target diff --git a/pc/mnt/mnt-janisShare.mount b/pc/mnt/mnt-janisShare.mount new file mode 100755 index 0000000..33dd2d4 --- /dev/null +++ b/pc/mnt/mnt-janisShare.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mount Share at boot + +[Mount] +What=//192.168.1.136/janis-share +Where=/mnt/janisShare +Options=_netdev,credentials=/etc/samba/credentials/janis,iocharset=utf8,rw,uid=janis,gid=janis +Type=cifs +TimeoutSec=30 +ForceUnmount=true + +[Install] +WantedBy=multi-user.target diff --git a/pc/mnt/mnt-shared.mount b/pc/mnt/mnt-shared.mount new file mode 100755 index 0000000..dda0d05 --- /dev/null +++ b/pc/mnt/mnt-shared.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mount Share at boot + +[Mount] +What=//192.168.1.136/shared +Where=/mnt/shared +Options=_netdev,credentials=/etc/samba/credentials/janis,iocharset=utf8,rw,uid=janis,gid=janis +Type=cifs +TimeoutSec=30 +ForceUnmount=true + +[Install] +WantedBy=multi-user.target diff --git a/pc/pacman.conf b/pc/pacman.conf new file mode 100644 index 0000000..7d7c2fd --- /dev/null +++ b/pc/pacman.conf @@ -0,0 +1,100 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto +ILoveCandy +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#NoProgressBar +CheckSpace +#VerbosePkgLists +ParallelDownloads = 5 + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[extra-testing] +#Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[arch4edu] +Server = https://de.arch4edu.mirror.kescher.at/$arch + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/pc/vscode-extensions b/pc/vscode-extensions new file mode 100644 index 0000000..e12c0f9 --- /dev/null +++ b/pc/vscode-extensions @@ -0,0 +1,48 @@ +aaron-bond.better-comments +abusaidm.html-snippets +bmewburn.vscode-intelephense-client +bungcip.better-toml +dbaeumer.vscode-eslint +dlasagno.rasi +donjayamanne.jquerysnippets +ecmel.vscode-html-css +equinusocio.vsc-community-material-theme +equinusocio.vsc-material-theme +equinusocio.vsc-material-theme-icons +eww-yuck.yuck +fivethree.vscode-hugo-snippets +formulahendry.auto-rename-tag +github.github-vscode-theme +gitlab.gitlab-workflow +golang.go +hollowtree.vue-snippets +ionic.ionic +james-yu.latex-workshop +lllllllqw.jsdoc +mads-hartmann.bash-ide-vscode +mathematic.vscode-latex +mathiasfrohlich.kotlin +mechatroner.rainbow-csv +ms-python.debugpy +ms-python.python +ms-vscode.cpptools +nadim-vscode.html-meta-tags-hero +nilssoderman.sitemap-generator +pwabuilder.pwa-studio +quicktype.quicktype +redhat.java +redhat.vscode-xml +rust-lang.rust-analyzer +sbsnippets.pytorch-snippets +spences10.robots-txt +streetsidesoftware.code-spell-checker +streetsidesoftware.code-spell-checker-german +svelte.svelte-vscode +tecosaur.latex-utilities +valentjn.vscode-ltex +vitest.explorer +vscjava.vscode-java-debug +vscjava.vscode-java-test +vue.volar +wayou.vscode-todo-highlight +xdebug.php-debug diff --git a/server/background.jpg b/server/background.jpg new file mode 100644 index 0000000..ddd3ef1 Binary files /dev/null and b/server/background.jpg differ diff --git a/server/index.html b/server/index.html new file mode 100644 index 0000000..acab0e2 --- /dev/null +++ b/server/index.html @@ -0,0 +1,95 @@ + + + + + + πCloud + + + +
+
+
+

πCloud

+

Willkommen!

+
+ +
+
+ + \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..ba9c13c --- /dev/null +++ b/setup.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +# Copy VSCodium settings + +cp -r ./general/configs/VSCodium/* ~/.config/VSCodium/ + +# copy other config files +cp -r ./pc/configs/hypr ~/.config/ +cp -r ./pc/configs/waybar ~/.config/ +cp -r ./general/configs/fish ~/.config/ +cp -r ./general/configs/dunst ~/.config/ +cp -r ./general/configs/rofi ~/.config/ +cp -r ./general/configs/wlogout ~/.config/ +cp -r ./general/configs/yazi ~/.config/ +cp -r ./general/configs/Thunar ~/.config/ +cp -r ./general/configs/terminator ~/.config/ +cp -r ./general/configs/kitty ~/.config/ +cp -r ./general/hyprland ~/.config/hypr/ diff --git a/setupLaptop.sh b/setupLaptop.sh new file mode 100755 index 0000000..ad10581 --- /dev/null +++ b/setupLaptop.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +# Copy VSCodium settings + +cp -r ./general/configs/VSCodium/* ~/.config/VSCodium/ + +# copy other config files +cp -r ./laptop/configs/hypr ~/.config/ +cp -r ./laptop/configs/waybar ~/.config/ +cp -r ./general/configs/fish ~/.config/ +cp -r ./general/configs/dunst ~/.config/ +cp -r ./general/configs/rofi ~/.config/ +cp -r ./general/configs/wlogout ~/.config/ +cp -r ./general/configs/yazi ~/.config/ +cp -r ./general/configs/Thunar ~/.config/ +cp -r ./general/configs/terminator ~/.config/ +cp -r ./general/configs/kitty ~/.config/ +cp -r ./general/hyprland ~/.config/hypr/ + +echo '=> Installed all laptop config files successfully' diff --git a/setupVSCodium.sh b/setupVSCodium.sh new file mode 100644 index 0000000..1ca8e31 --- /dev/null +++ b/setupVSCodium.sh @@ -0,0 +1,6 @@ +file="./laptopConfig/vscode-extensions" +while read line; do + vscodium --install-extension "${line}" +done < "${file}" + +echo "==> Done!" \ No newline at end of file