commit 1df22c651230a55d5835ae4ae741da1dd9a7e091 Author: Yingjie Wang Date: Sat Sep 14 10:42:47 2024 -0400 init: copy from Hacmini diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..770cc3c --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,142 @@ +# _ _ +# | |__ __ _ ___| |__ _ __ ___ +# | '_ \ / _` / __| '_ \| '__/ __| +# _| |_) | (_| \__ \ | | | | | (__ +# (_)_.__/ \__,_|___/_| |_|_| \___| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +# ~/.bashrc +# ----------------------------------------------------- + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return +PS1='[\u@\h \W]\$ ' + +# Define Editor +export EDITOR=nvim + +# ----------------------------------------------------- +# ALIASES +# ----------------------------------------------------- +alias c='clear' +alias nf='fastfetch' +alias pf='fastfetch' +alias ff='fastfetch' +alias ls='eza -a --icons' +alias ll='eza -al --icons' +alias lt='eza -a --tree --level=1 --icons' +alias shutdown='systemctl poweroff' +alias v='$EDITOR' +alias vim='$EDITOR' +alias ts='~/dotfiles/scripts/snapshot.sh' +alias matrix='cmatrix' +alias wifi='nmtui' +alias od='~/private/onedrive.sh' +alias rw='~/dotfiles/waybar/reload.sh' +alias winclass="xprop | grep 'CLASS'" +alias dot="cd ~/dotfiles" +alias cleanup='~/dotfiles/scripts/cleanup.sh' + +# ----------------------------------------------------- +# ML4W Apps +# ----------------------------------------------------- +alias ml4w='~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage' +alias ml4w-settings='~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage' +alias ml4w-sidebar='~/dotfiles/eww/ml4w-sidebar/launch.sh' +alias ml4w-hyprland='~/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage' +alias ml4w-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh' +alias ml4w-hyprland-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh' +alias ml4w-qtile-diagnosis='~/dotfiles/qtile/scripts/diagnosis.sh' + +# ----------------------------------------------------- +# Window Managers +# ----------------------------------------------------- + +alias Qtile='startx' +# Hyprland with Hyprland + +# ----------------------------------------------------- +# GIT +# ----------------------------------------------------- +alias gs="git status" +alias ga="git add" +alias gc="git commit -m" +alias gp="git push" +alias gpl="git pull" +alias gst="git stash" +alias gsp="git stash; git pull" +alias gcheck="git checkout" +alias gcredential="git config credential.helper store" + +# ----------------------------------------------------- +# SCRIPTS +# ----------------------------------------------------- +alias gr='python ~/dotfiles/scripts/growthrate.py' +alias ChatGPT='python ~/mychatgpt/mychatgpt.py' +alias chat='python ~/mychatgpt/mychatgpt.py' +alias ascii='~/dotfiles/scripts/figlet.sh' + +# ----------------------------------------------------- +# VIRTUAL MACHINE +# ----------------------------------------------------- +alias vm='~/private/launchvm.sh' +alias lg='~/dotfiles/scripts/looking-glass.sh' + +# ----------------------------------------------------- +# EDIT CONFIG FILES +# ----------------------------------------------------- +alias confq='$EDITOR ~/dotfiles/qtile/config.py' +alias confp='$EDITOR ~/dotfiles/picom/picom.conf' +alias confb='$EDITOR ~/dotfiles/.bashrc' + +# ----------------------------------------------------- +# EDIT NOTES +# ----------------------------------------------------- +alias notes='$EDITOR ~/notes.txt' + +# ----------------------------------------------------- +# SYSTEM +# ----------------------------------------------------- +alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg' +alias setkb='setxkbmap de;echo "Keyboard set back to de."' + +# ----------------------------------------------------- +# SCREEN RESOLUTINS +# ----------------------------------------------------- + +# Qtile +alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120' +alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120' + +export PATH="$HOME/.local/bin/:/usr/lib/ccache/bin/:$PATH" + +# ----------------------------------------------------- +# DEVELOPMENT +# ----------------------------------------------------- +alias dotsync="~/dotfiles-versions/dotfiles/.dev/sync.sh dotfiles" + +# ----------------------------------------------------- +# START STARSHIP +# ----------------------------------------------------- +eval "$(starship init bash)" + +# ----------------------------------------------------- +# PYWAL +# ----------------------------------------------------- +cat ~/.cache/wal/sequences + +# ----------------------------------------------------- +# Fastfetch if on wm +# ----------------------------------------------------- +if [[ $(tty) == *"pts"* ]]; then + fastfetch --config examples/13 +else + echo + if [ -f /bin/qtile ]; then + echo "Start Qtile X11 with command Qtile" + fi + if [ -f /bin/hyprctl ]; then + echo "Start Hyprland with command Hyprland" + fi +fi diff --git a/dotfiles/.settings/blur.sh b/dotfiles/.settings/blur.sh new file mode 100644 index 0000000..4ffc966 --- /dev/null +++ b/dotfiles/.settings/blur.sh @@ -0,0 +1 @@ +50x30 \ No newline at end of file diff --git a/dotfiles/.settings/browser.sh b/dotfiles/.settings/browser.sh new file mode 100755 index 0000000..b47ae2d --- /dev/null +++ b/dotfiles/.settings/browser.sh @@ -0,0 +1 @@ +google-chrome-stable --ozone-platform=wayland --enable-wayland-ime diff --git a/dotfiles/.settings/editor.sh b/dotfiles/.settings/editor.sh new file mode 100755 index 0000000..4401e48 --- /dev/null +++ b/dotfiles/.settings/editor.sh @@ -0,0 +1 @@ +mousepad \ No newline at end of file diff --git a/dotfiles/.settings/eww-monitor.sh b/dotfiles/.settings/eww-monitor.sh new file mode 100755 index 0000000..4d18c3e --- /dev/null +++ b/dotfiles/.settings/eww-monitor.sh @@ -0,0 +1 @@ +auto \ No newline at end of file diff --git a/dotfiles/.settings/filemanager.sh b/dotfiles/.settings/filemanager.sh new file mode 100755 index 0000000..af8fd0e --- /dev/null +++ b/dotfiles/.settings/filemanager.sh @@ -0,0 +1 @@ +thunar \ No newline at end of file diff --git a/dotfiles/.settings/hyprpaper.tpl b/dotfiles/.settings/hyprpaper.tpl new file mode 100644 index 0000000..3033ff3 --- /dev/null +++ b/dotfiles/.settings/hyprpaper.tpl @@ -0,0 +1,8 @@ +# Preload Wallpapers +preload = WALLPAPER + +# Set Wallpapers +wallpaper = ,WALLPAPER + +# Disable Splash +splash = false \ No newline at end of file diff --git a/dotfiles/.settings/hyprshade.sh b/dotfiles/.settings/hyprshade.sh new file mode 100644 index 0000000..65b808c --- /dev/null +++ b/dotfiles/.settings/hyprshade.sh @@ -0,0 +1 @@ +hyprshade_filter=" blue-light-filter" diff --git a/dotfiles/.settings/networkmanager.sh b/dotfiles/.settings/networkmanager.sh new file mode 100755 index 0000000..f3d8804 --- /dev/null +++ b/dotfiles/.settings/networkmanager.sh @@ -0,0 +1 @@ +nm-connection-editor \ No newline at end of file diff --git a/dotfiles/.settings/rofi-border-radius.rasi b/dotfiles/.settings/rofi-border-radius.rasi new file mode 100644 index 0000000..0f3cb00 --- /dev/null +++ b/dotfiles/.settings/rofi-border-radius.rasi @@ -0,0 +1,3 @@ +* { + border-radius: 15px; +} diff --git a/dotfiles/.settings/rofi-border.rasi b/dotfiles/.settings/rofi-border.rasi new file mode 100644 index 0000000..e533468 --- /dev/null +++ b/dotfiles/.settings/rofi-border.rasi @@ -0,0 +1 @@ +* { border-width: 3px; } \ No newline at end of file diff --git a/dotfiles/.settings/rofi-font.rasi b/dotfiles/.settings/rofi-font.rasi new file mode 100644 index 0000000..7e7bb0e --- /dev/null +++ b/dotfiles/.settings/rofi-font.rasi @@ -0,0 +1 @@ +configuration { font: "Fira Code Nerd Font Semibold 16"; } diff --git a/dotfiles/.settings/settings.json b/dotfiles/.settings/settings.json new file mode 100644 index 0000000..9f14b69 --- /dev/null +++ b/dotfiles/.settings/settings.json @@ -0,0 +1,62 @@ +[ + { + "key": "waybar_timeformat", + "value": "%H:%M" + }, + { + "key": "waybar_dateformat", + "value": "%a" + }, + { + "key": "waybar_custom_timedateformat", + "value": "" + }, + { + "key": "waybar_workspaces", + "value": 5 + }, + { + "key": "rofi_bordersize", + "value": 3 + }, + { + "key": "waybar_toggle", + "value": true + }, + { + "key": "waybar_taskbar", + "value": false + }, + { + "key": "waybar_network", + "value": true + }, + { + "key": "waybar_chatgpt", + "value": true + }, + { + "key": "waybar_systray", + "value": true + }, + { + "key": "waybar_screenlock", + "value": true + }, + { + "key": "waybar_window", + "value": true + }, + { + "key": "hypridle_hyprlock_timeout", + "value": 600 + }, + { + "key": "hypridle_dpms_timeout", + "value": 660 + }, + { + "key": "hypridle_suspend_timeout", + "value": 1800 + } +] \ No newline at end of file diff --git a/dotfiles/.settings/software.sh b/dotfiles/.settings/software.sh new file mode 100755 index 0000000..61bd6e1 --- /dev/null +++ b/dotfiles/.settings/software.sh @@ -0,0 +1 @@ +alacritty -e pacseek \ No newline at end of file diff --git a/dotfiles/.settings/terminal.sh b/dotfiles/.settings/terminal.sh new file mode 100755 index 0000000..e6feb0f --- /dev/null +++ b/dotfiles/.settings/terminal.sh @@ -0,0 +1 @@ +kitty diff --git a/dotfiles/.settings/wallpaper-effect.sh b/dotfiles/.settings/wallpaper-effect.sh new file mode 100644 index 0000000..cfb931e --- /dev/null +++ b/dotfiles/.settings/wallpaper-effect.sh @@ -0,0 +1 @@ +off diff --git a/dotfiles/.settings/wallpaper-engine.sh b/dotfiles/.settings/wallpaper-engine.sh new file mode 100644 index 0000000..b6923b6 --- /dev/null +++ b/dotfiles/.settings/wallpaper-engine.sh @@ -0,0 +1 @@ +hyprpaper \ No newline at end of file diff --git a/dotfiles/.settings/wallpaper-folder.sh b/dotfiles/.settings/wallpaper-folder.sh new file mode 100644 index 0000000..8d138d1 --- /dev/null +++ b/dotfiles/.settings/wallpaper-folder.sh @@ -0,0 +1,2 @@ +# Enter the path to the folder that includes your wallpapers +wallpaper_folder=$HOME/wallpaper \ No newline at end of file diff --git a/dotfiles/.version/name b/dotfiles/.version/name new file mode 100644 index 0000000..a46b5cb --- /dev/null +++ b/dotfiles/.version/name @@ -0,0 +1 @@ +2.9.1.1 \ No newline at end of file diff --git a/dotfiles/.version/update.sh b/dotfiles/.version/update.sh new file mode 100755 index 0000000..df21db7 --- /dev/null +++ b/dotfiles/.version/update.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Check for internet connection +if ping -q -c 1 -W 1 google.com >/dev/null; then + version=$(cat ~/dotfiles/.version/version) + online=$(curl -s https://gitlab.com/stephan-raabe/dotfiles/-/raw/main/.version/version?ref_type=heads) + if [ "$version" -lt "$online" ]; then + # Update available + echo "0" + else + # No update available + echo "1" + fi +else + # Network is down + echo "1" +fi \ No newline at end of file diff --git a/dotfiles/.version/version b/dotfiles/.version/version new file mode 100644 index 0000000..f8cc4c9 --- /dev/null +++ b/dotfiles/.version/version @@ -0,0 +1 @@ +2911 \ No newline at end of file diff --git a/dotfiles/.version/version.sh b/dotfiles/.version/version.sh new file mode 100755 index 0000000..750b1f5 --- /dev/null +++ b/dotfiles/.version/version.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo $(cat ~/dotfiles/.version/name) $(cat ~/dotfiles/.version/version) diff --git a/dotfiles/.zshrc_ohmyzsh b/dotfiles/.zshrc_ohmyzsh new file mode 100644 index 0000000..c558bf7 --- /dev/null +++ b/dotfiles/.zshrc_ohmyzsh @@ -0,0 +1,80 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# ----------------------------------------------------- +# Oh my zsh settings +# ----------------------------------------------------- + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# ZSH_THEME="robbyrussell" +ZSH_THEME="powerlevel10k/powerlevel10k" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +zstyle ':omz:update' mode auto + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +COMPLETION_WAITING_DOTS="true" + +# ----------------------------------------------------- +# Plugins +# ----------------------------------------------------- +plugins=(git colored-man-pages eza z sudo zsh-autosuggestions fast-syntax-highlighting) + +source $ZSH/oh-my-zsh.sh + +# ----------------------------------------------------- +# Variables +# ----------------------------------------------------- +export PATH=$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/bin:$PATH +# export MANPATH="/usr/local/man:$MANPATH" + +export LANG=en_US.UTF-8 + +export EDITOR='vim' + +export MAKEFLAGS='-j$(nproc)' +export CFLAGS='-march=native -O2 -pipe' + +# ----------------------------------------------------- +# Alias +# ----------------------------------------------------- +alias sshkoko="TERM=xterm-256color ssh ywang2020@koko-login.hpc.fau.edu" +alias wakemac="wakeonlan 18:C0:4D:8D:56:0E" +alias ls="eza --icons=auto" +alias githashselector="git log --oneline | gum filter | cut -d' ' -f1" +alias bat="bat --paging=never" +# fix ssh if in kitty +[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" + +# ----------------------------------------------------- +# evals +# ----------------------------------------------------- +eval $(thefuck --alias) +eval "$(fzf --zsh)" + +# ----------------------------------------------------- +# PYWAL +# ----------------------------------------------------- +cat ~/.cache/wal/sequences + +# ----------------------------------------------------- +# Custom +# ----------------------------------------------------- +[[ ! -f ~/.custom.zsh ]] || source ~/.custom.zsh + +# ----------------------------------------------------- +# miscs +# ----------------------------------------------------- +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/dotfiles/.zshrc_zinit b/dotfiles/.zshrc_zinit new file mode 100644 index 0000000..70f73a4 --- /dev/null +++ b/dotfiles/.zshrc_zinit @@ -0,0 +1,62 @@ +# --------------------------------------------------- +# Zinit and plugins +# --------------------------------------------------- +source /usr/share/zinit/zinit.zsh + +# Load powerlevel10k theme +zinit ice depth"1" # git clone depth +zinit light romkatv/powerlevel10k + +# Load plugins +zinit light zsh-users/zsh-autosuggestions +zinit light zdharma-continuum/fast-syntax-highlighting +# oh-my-zsh plugins +zi snippet OMZL::git.zsh +zi snippet OMZP::git +zi snippet OMZP::sudo +zi snippet OMZP::colored-man-pages +zi snippet OMZP::eza +zi snippet OMZP::z +# others +zplugin ice as"program" pick"bin/git-dsf" +zplugin light zdharma-continuum/zsh-diff-so-fancy + +# ---------------------------------------------------- +# Variables +# ---------------------------------------------------- +export PATH=$HOME/bin:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/bin:$PATH +export EDITOR=vim + +# ---------------------------------------------------- +# Alias +# ---------------------------------------------------- +alias sshkoko="TERM=xterm-256color ssh ywang2020@koko-login.hpc.fau.edu" +alias wakemac="wakeonlan 18:C0:4D:8D:56:0E" +alias eza="eza --icons=auto" +alias githashselector="git log --oneline | gum filter | cut -d' ' -f1" +alias bat="bat --paging=never" + +# ----------------------------------------------------- +# evals +# ----------------------------------------------------- +eval $(thefuck --alias) +eval "$(fzf --zsh)" + +# ----------------------------------------------------- +# Miscs +# ----------------------------------------------------- +# fix ssh if in kitty +[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# ----------------------------------------------------- +# PYWAL +# ----------------------------------------------------- +cat ~/.cache/wal/sequences + +# ----------------------------------------------------- +# Custom +# ----------------------------------------------------- +[[ ! -f ~/.custom.zsh ]] || source ~/.custom.zsh diff --git a/dotfiles/CHANGELOG.md b/dotfiles/CHANGELOG.md new file mode 100644 index 0000000..2cb6682 --- /dev/null +++ b/dotfiles/CHANGELOG.md @@ -0,0 +1,311 @@ +Version 2.9.1.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9.1.1 +-------------------------------------------------------- +- New installation method for sddm sugar candy theme. Instead of using yay, the installer will download the ZIP from the repository, extract it to the Downloads folder and copy the files to the destination folder. +- A gamemode can be toggled with SUPER+ALT+G. The gaming mode will disable the animations and blur. +- Added a black ML4W Icon for black waybar themes + +Version 2.9.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9.1 +-------------------------------------------------------- +- Hyprpaper is the default wallpaper engine. swww will not be installed by the installer anymore. You can still switch to swww in the Dotfiles Settings App (System tab) but you need to install swww manually with yay -S swww +- pfetch has been replaced with fastfetch (requires an update of the .bashrc) https://gitlab.com/stephan-raabe/dotfiles/-/issues/315 +- Directory for wallpapers can be customized with new .settings/wallpaper-folder.sh https://gitlab.com/stephan-raabe/dotfiles/-/issues/325 +- Screen shading possible with hyprshade. SUPER+SHIFT+S to toggle hyprshade. The shader can be defined with the shader module in waybar or in ~/dotfiles/.settings/hyprshade.sh +For auto-activation at a dedicated time please set the filter to off and follow the instructions here https://github.com/loqusion/hyprshade. https://gitlab.com/stephan-raabe/dotfiles/-/issues/329 +- Nautilus defined as the new default file manager. Thunar is still available. +- Waybar can be toggles with SUPER+CTRL+B https://gitlab.com/stephan-raabe/dotfiles/-/issues/299 +- Installation script optimized for new gum +- During the installation of the keyboard, it can be selected between a desktop and laptop optimized configuration https://gitlab.com/stephan-raabe/dotfiles/-/issues/319. +- RDP launch script updated https://gitlab.com/stephan-raabe/dotfiles/-/issues/336 +- Nvidia environment configuration updated https://gitlab.com/stephan-raabe/dotfiles/-/issues/327 +- Pacman can be configured for parallel downloads, colors and more during the installation and with the ML4W Settings app https://gitlab.com/stephan-raabe/dotfiles/-/issues/316 +- Image conversions with imagemagick can be enabled for wallpapers. Right click on wallpaper module in waybar. You can add more effects in ~/dotfiles/hypr/effects/wallpaper +- ChatGPT Window opens on the left screen side in floating mode +- New default wallpaper +- Added hypridle inhibitor waybar module to toggle screen locking with hyprlock +- Tooltips added to all waybar modules + +Version 2.9 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 +-------------------------------------------------------- +- New Hyprland Settings App. Can be launched from the App Launcher, the ML4W Welcome App or the new ML4W logo context menu (right click) +- Added sidebar menu. Start with click on ML4W Logo in Waybar. Right click starts the welcome app +- Updated hyprlock screen showing the wallpaper in a circle. hyprlock 3 required +- Waybar Taskbar Module hidden by default. Can be enabled again in the ML4W Settings App +- Hyprpaper is now the default wallpaper engine. swww can be activiated +- Animations can be disabled in the Dotfiles Settings app +- Animations can be toggled (enabled/disabled) temporarily with SUPER + SHIFT + A +- Keyboard layout is part of the system information module of waybar +- nm-applet can be started from the ML4W Welcome App menu Settings/System +- New diagnosis features checks that essential command are available. Enter ml4w-diagnosis in a terminal or from the ML4W Welcome App + +Version 2.8.4 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.4 +-------------------------------------------------------- +- In the ML4W Dotfiles Settings App you can now switch between the wallpaper applications swww or hyprpaper. In case of issues with the default application swww you can select hyprpaper. The wallpaper application can also be disabled but background images for wlogout, hyprlock and rofi will be generated with the selected wallpaper. +PLEASE NOTE: Logout & Login is required after a change. +- New folder structure for backups: dotfiles-versions/backup holds the latest backup, dotfiles-versions/archive stores archived backups +- Installer can now backup configurations in .config before overwriting by dotfiles +- You can uninstall the ML4W dotfiles with the new uninstaller script starting from the ML4W dotfiles or by executing ~/dotfiles/uninstall.sh +- Using the hypridle.conf suggested by https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/ + +Version 2.8.3.4 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.3.4 +-------------------------------------------------------- +- Fix swww gray background issue. New command on autostart.conf is +exec-once = swww init || swww-daemon --format xrgb +- Using blurred version of background image for wlogout +- Add progress bar to dunst notification for wallpaper change and processing + +Version 2.8.3.2 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.3.2 +-------------------------------------------------------- +- Replace rofi with rofi-lbonn-wayland to get rofi wayland support +- Several modifications in the ML4W Welcome App +- ML4W Settings App allows to set between 1 and 10 Hyprland workspaces + +Version 2.8.3.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.3.1 +-------------------------------------------------------- +- Add compatibility with Hyprland 0.37.1 + +Version 2.8.3 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.3 +-------------------------------------------------------- +- New ML4W Dotfiles Settings App based on GTK4 with many new customization options +- Hyprlock with blurred version of the current wallpaper as background. Blur strength can be adjusted in the ML4W Dotfiles Settings app +- Hyprlock now showing the current time and username + +Version 2.8.2.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.2 +-------------------------------------------------------- +- ML4W Welcome app includes more settings for hypridle. Incl. recommendation from Hyprland Wiki + +Version 2.8.2 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.2 +-------------------------------------------------------- +General: +- Force installation of sddm to fix theme issue with sddm-sugar-candy theme. sddm-git doesn't work with themes at the moment +- snapshot.sh script check now for required timeshift and (optional) grub-btrfs packages +- Waybar Bluetooth module now hides automatically if no bluetooth device is detected. Please check that "bluetooth" is not commented out in ~/dotfiles/waybar/modules.json +- Replace hypridle-git with hypridle and hyprlock-git with hyprlock +- Desktop file for ML4W Welcome App to be listed in application launcher + icon + +Version 2.8.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.1 +-------------------------------------------------------- +General: +- Swayidle replaced with hypridle (config in dotfiles/hypr/hypridle.conf) +- Swaylock replaced with hyprlock (config in dotfiles/hypr/hyprlock.conf) +- New default wallpaper in Hyprland style +- xarchiver and zip added for thunar +- Rofi border width can be adjusted in dotfiles/.settings/rofi-border.rasi +- emote added to select Emojis (SUPER+.) + +ML4W Welcome App: +- Opens Hyprland systeminfo from the about menu +- Timeshift can be installed from the settings menu +- Terminal for Thunar can be set from the settings menu + +Hyprland: +- Bugfix timeshift detection in installupdates.sh + +Qtile: +- Polybar removed from the dotfiles + +Version 2.8 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8 +-------------------------------------------------------- +Hyprland: +- New Welcome app based on GTK4. Can be launched with the icon on waybar or with the command ml4w +- nwg-look-bin to define a custom GTK Theme +- Updated waybar starter theme +- New waybar idle-inhibator icon +- New waybar theme ml4w-minimal +- New window animation variation animation-moving.conf +- New AI icon to open ChatGPT +- Hyprland installation with hyprland package only. hyprland-git removed from the installer + +Version 2.7.2 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.7.2 +-------------------------------------------------------- +Hyprland: +- New waybar icon to enable/disable swaylock. Left mouse click to toggle swaylock, right mouse click to start swaylock +- Show/Hide idle_inhibitor module (swaylock) in Settings script +- Start of swayidle can be deactivated in the settings script +- New animation variation animation-moving.conf + +General: +- Installation script bug fixing +- Alias cleanup added to .bashrc for Arch Linux maintenance +- New Hyprland configuration variation script to roll back to default variations via tty + +Version 2.7.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.7.1 +-------------------------------------------------------- +Hyprland: +- Add optional network-manager applet support. Can be activated in Settings script System/nm-applet +- Show/Hide network module in Settings script +- New Settings for keyboard (incl. natural_scroll for touchpads) +- Add ChatGPT Icon to Waybar. Can be disabled in settings + +Qtile: +- Removed polybar from the installation for stability reasons. + +Version 2.7 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.7 +-------------------------------------------------------- +Installation: +- Display Manager SDDM and sugar-candy theme will be installed. +- Optional display manager disablement possible +- Select between hyprland or hyprland-git +- Arco Linux is now supported. Please choose hyprland-git and reinstall/force the installation of all packages during the installation/update script. + +General: +- Adding icons to eza. Adding ls, ll, lt +- New alacritty.toml configuration file + +Hyprland: +- New Waybar Module Idle Inhibitor to deactivate the automatic start of swaylock e.g. to watch videos or for online meetings +- Create own customization of ML4W waybar themes: https://gitlab.com/stephan-raabe/dotfiles/-/tree/main/waybar?ref_type=heads#define-your-own-config-and-stylecss-for-a-ml4w-theme +- Wallpaper selector now with preview thumbnails +- Settings script reworked completely. Implementation of custom modules are now possible. +- Waybar settings module to edit some ML4W waybar themes settings on the fly +- Waybar with Systray (can be hidden in settings script) +- SDDM settings module to update the SDDM background with current wallpaper +- All image formats are now supported for setting a wallpaper (jpg,jpeg,png,...) + +Qtile: +- Removed wayland support due to many limitations. Installation script will rename /usr/share/wayland-sessions/qtile-wayland.session to qtile-wayland.bak to hide in sddm + + +Version 2.6.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.1 +-------------------------------------------------------- +Installation: +- Add hook.sh to modify the installation files just before the copy procedure into ~/dotfiles. Please check the README.md for more information + +Settings Script: +- Added custom.conf which is included at the bottom of the hyprland.conf and can hold you personal configurations. Editable in the section Custom + +Hyprland: +- Add foldable module for hardware information +- Add keyboard layout to hardware information +- Add waybar starter theme to waybar + +Version 2.6 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6 +-------------------------------------------------------- +Installation: +- Script ensures with the start that rsync and gum is installed +- All dialogues implemented with gum to increase usability +- New .dev folder with sync scripts added to sync from dotfiles-version/* to ~/dotfiles (Please check before executing) +- exa replaced with eza (exa not maintained anymore) + +Hyprland: +- New settings cli app to change configuration variations on the fly. SUPER+CTRL+S or wheel icon in waybar. +- New variations for decoration and window +- Variations for monitor settings introduced (can be used to define a custom multi-monitor setup. Please see the Hyprland Wiki) +- More keybindings for function keys added +- New ML4W black and white Waybar Theme (+ bottom and blur version) + +Known issues Qtile Wayland: +- GTK dark theme not always working +- Screen recording issues with OBS Studio and other applications + +Version 2.5.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5.1 +-------------------------------------------------------- +Installation: +- Changed from cp to rsync to sync files between folders +- Stability improvements +- New default wallpapers + +Version 2.5 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5 +-------------------------------------------------------- +Installation: +- Completely reworked script +- Can install Hyprland and/or Qtile +- Backup of existing dotfiles possible +- New optimized download of wallpapers from the repository + +General: +- Script folder cleaned up and window manager scripts moved to related wm scripts folder + +Hyprland: +- Show key bindings defined in ~/dotfiles/hypr/conf/keybindings.conf rofi menu. Opens with SUPER+CTRL+H or right click on Apps +- Added keybinding to toggle all windows to float and back to tiling (Doesn't work with web apps) +- Add brightness control for FN Brightness keys +- swww loading wallpaper from last session +- New Waybar Theme with blurred background +- Latest Waybar supports now persistent workspaces (set to 5 by default) + +Qtile: +- Add wayland support +- New Qtile status bar theme (Qtile status bar is default theme) +- Status bar can be switch on X11 with SUPER + SHIFT + S between Qtile bar and Polybar +- swww/wal loading wallpaper from last session +- Add brightness control for FN Brightness keys + +Known issues Qtile Wayland: +- GTK dark theme is not always working +- Screen recording issues with OBS Studio and other applications + +Version 2.4 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.4 +-------------------------------------------------------- +- Now using sddm as Display Manager +- sddm theme sddm-sugar-dark available +- Add Waybar theme switcher (SUPER + CTRL + T) +- Add Waybar theme engine ~/dotfiles/waybar/themes +- Switch to chromium as default browser (SUPER + B) +- Brave is alternative browser (SUPER + CTRL + B) +- Default animations back to standard ~/dotfiles/conf/animations-low.conf due to compatibility reasons. Enhanced animations available in ~/dotfiles/conf/animations-high.conf +- Thunar is default file manager now due to compatibility reasons +- Default icons set to Papirus icon theme +- GTK files updated and cleaned up. gtk-4.0 added (please check the ~/dotfiles/3-dotfile.sh for required symlinks) +- Default cursor set to Bibata Modern Ice +- 1-install.sh checks if base-devel is installed. Required to install and compile yay + +Version 2.3 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.3 +-------------------------------------------------------- +- Add clipboard manager cliphist +- Waybar: Add numbers to workspaces +- Waybar: Add icon for wallpaper selection +- Waybar: Add cliphist icon (click = open, right-click = delete item, middle-click = clear data) +- Screenshots: Add swappy +- Icons: Changed to Kora Icon Theme +- Rofi: New Layout featuring current wallpaper as a background for launcher, cliphist and wallpaper selection +- Update Wallpaper: Add random transition effects +- Hyprland: Exclude configurations files into dedicated files in hypr/conf/ directory +- Hyprland: New window animations (in hypr/conf/) + +Version 2.2 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.2 +-------------------------------------------------------- +- Bugfix: /gtk/gtk-3.0/bookmarks removed from repository +- Bugfix: Added cursor definition to hyprland.conf +- + more smaller fixes + +- Login: Move issue into login directory +- Hyprland: Prefer dark theme for gtk3 applications e.g., nautilus +- Hyprland: Add keybinding for filemanager.sh SUPER, CTRL, F to start nautilus (if installed) or thunar +- Installation: Add nautilus package to become new default file manager +- Hyprland install script: Add swayidle to 2-install-hyprland.sh +- Waybar: Add quickstart icon for filemanager.sh +- Waybar: Style improvements +- Dunst: Add white border around notifications +- wlogout: Add new white icons and optimized style with pywal +- Hyprland: Add keybind to passthrough SUPERKEY to Virtual Machine +- Grim: Removed first option in the script for selected window + +Version 2.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.1 +-------------------------------------------------------- +- Several bugfixes +- Updates custom waybar module to check available packages for updates (pacman and aur) plus color theme for number of available packages (waybar/modules.json) +- New installupdates script with Timeshift integration. Ask for name for the Timeshift before starting the updates (scripts/installupdates.sh) +- Waybar: Pywal colors for waybar now with relative link into ./cache/wal/ (waybar/style.css) diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/alias.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/alias.hlc new file mode 100644 index 0000000..57284db Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/alias.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/all-scroll.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/all-scroll.hlc new file mode 100644 index 0000000..4c592a6 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/all-scroll.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_left_corner.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_left_corner.hlc new file mode 100644 index 0000000..22df3ee Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_left_corner.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_right_corner.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_right_corner.hlc new file mode 100644 index 0000000..324d2ef Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_right_corner.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_side.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_side.hlc new file mode 100644 index 0000000..fd09725 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/bottom_side.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/cell.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/cell.hlc new file mode 100644 index 0000000..6d5afbc Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/cell.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/center_ptr.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/center_ptr.hlc new file mode 100644 index 0000000..4a0c020 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/center_ptr.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/col-resize.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/col-resize.hlc new file mode 100644 index 0000000..888ec0f Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/col-resize.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/color-picker.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/color-picker.hlc new file mode 100644 index 0000000..5631c76 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/color-picker.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/context-menu.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/context-menu.hlc new file mode 100644 index 0000000..600c84d Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/context-menu.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/copy.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/copy.hlc new file mode 100644 index 0000000..dcdba11 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/copy.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/crosshair.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/crosshair.hlc new file mode 100644 index 0000000..e4a0113 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/crosshair.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/default.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/default.hlc new file mode 100644 index 0000000..00b18f4 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/default.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-move.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-move.hlc new file mode 100644 index 0000000..58e7ef4 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-move.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-no-drop.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-no-drop.hlc new file mode 100644 index 0000000..fba6657 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/dnd-no-drop.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/down-arrow.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/down-arrow.hlc new file mode 100644 index 0000000..082d2f0 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/down-arrow.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/draft.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/draft.hlc new file mode 100644 index 0000000..bbeb545 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/draft.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/fleur.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/fleur.hlc new file mode 100644 index 0000000..fea1f30 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/fleur.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/help.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/help.hlc new file mode 100644 index 0000000..65adacc Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/help.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/left-arrow.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/left-arrow.hlc new file mode 100644 index 0000000..6f2c2ec Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/left-arrow.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/left_side.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/left_side.hlc new file mode 100644 index 0000000..78234ef Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/left_side.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/no-drop.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/no-drop.hlc new file mode 100644 index 0000000..5429b48 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/no-drop.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/not-allowed.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/not-allowed.hlc new file mode 100644 index 0000000..3a05688 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/not-allowed.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/openhand.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/openhand.hlc new file mode 100644 index 0000000..b9c9b98 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/openhand.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/pencil.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/pencil.hlc new file mode 100644 index 0000000..a052ea1 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/pencil.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/pirate.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/pirate.hlc new file mode 100644 index 0000000..e9ab8d9 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/pirate.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/pointer.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/pointer.hlc new file mode 100644 index 0000000..6562f8e Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/pointer.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/progress.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/progress.hlc new file mode 100644 index 0000000..5818a37 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/progress.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/right-arrow.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/right-arrow.hlc new file mode 100644 index 0000000..c998086 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/right-arrow.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/right_ptr.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/right_ptr.hlc new file mode 100644 index 0000000..d24ae29 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/right_ptr.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/right_side.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/right_side.hlc new file mode 100644 index 0000000..904cd5e Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/right_side.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/row-resize.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/row-resize.hlc new file mode 100644 index 0000000..2c6be18 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/row-resize.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/size_bdiag.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/size_bdiag.hlc new file mode 100644 index 0000000..aec8bff Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/size_bdiag.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/size_fdiag.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/size_fdiag.hlc new file mode 100644 index 0000000..291f2a0 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/size_fdiag.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/size_hor.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/size_hor.hlc new file mode 100644 index 0000000..8224cc7 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/size_hor.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/size_ver.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/size_ver.hlc new file mode 100644 index 0000000..6804b53 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/size_ver.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/text.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/text.hlc new file mode 100644 index 0000000..8dea530 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/text.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/top_left_corner.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/top_left_corner.hlc new file mode 100644 index 0000000..bc845a7 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/top_left_corner.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/top_right_corner.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/top_right_corner.hlc new file mode 100644 index 0000000..4d61184 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/top_right_corner.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/top_side.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/top_side.hlc new file mode 100644 index 0000000..4fb8fae Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/top_side.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/up-arrow.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/up-arrow.hlc new file mode 100644 index 0000000..1883dc5 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/up-arrow.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/vertical-text.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/vertical-text.hlc new file mode 100644 index 0000000..32a0af7 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/vertical-text.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/wait.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/wait.hlc new file mode 100644 index 0000000..c3fdb69 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/wait.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/wayland-cursor.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/wayland-cursor.hlc new file mode 100644 index 0000000..c899bef Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/wayland-cursor.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/x-cursor.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/x-cursor.hlc new file mode 100644 index 0000000..fb7f925 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/x-cursor.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-in.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-in.hlc new file mode 100644 index 0000000..d2f0f65 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-in.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-out.hlc b/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-out.hlc new file mode 100644 index 0000000..e35a516 Binary files /dev/null and b/dotfiles/Vimix-hyprcursors/hyprcursors/zoom-out.hlc differ diff --git a/dotfiles/Vimix-hyprcursors/manifest.hl b/dotfiles/Vimix-hyprcursors/manifest.hl new file mode 100644 index 0000000..cfcc906 --- /dev/null +++ b/dotfiles/Vimix-hyprcursors/manifest.hl @@ -0,0 +1,4 @@ +name = Extracted Theme +description = Automatically extracted with hyprcursor-util +version = 0.1 +cursors_directory = hyprcursors diff --git a/dotfiles/alacritty/alacritty.toml b/dotfiles/alacritty/alacritty.toml new file mode 100644 index 0000000..72402d3 --- /dev/null +++ b/dotfiles/alacritty/alacritty.toml @@ -0,0 +1,16 @@ +[font] +size = 16 + +[font.normal] +family = "FiraCode Nerd Font" +style = "Regular" + +[window] +opacity = 0.7 + +[window.padding] +x = 15 +y = 15 + +[selection] +save_to_clipboard = true diff --git a/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage b/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage new file mode 100755 index 0000000..eb87906 Binary files /dev/null and b/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage differ diff --git a/dotfiles/apps/ML4W_Dotfiles_Uninstaller.AppImage b/dotfiles/apps/ML4W_Dotfiles_Uninstaller.AppImage new file mode 100755 index 0000000..299c164 Binary files /dev/null and b/dotfiles/apps/ML4W_Dotfiles_Uninstaller.AppImage differ diff --git a/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage b/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage new file mode 100755 index 0000000..f8e23e3 Binary files /dev/null and b/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage differ diff --git a/dotfiles/apps/ML4W_Welcome-x86_64.AppImage b/dotfiles/apps/ML4W_Welcome-x86_64.AppImage new file mode 100755 index 0000000..5bd9c4f Binary files /dev/null and b/dotfiles/apps/ML4W_Welcome-x86_64.AppImage differ diff --git a/dotfiles/apps/installer.AppImage b/dotfiles/apps/installer.AppImage new file mode 100755 index 0000000..40e33fc Binary files /dev/null and b/dotfiles/apps/installer.AppImage differ diff --git a/dotfiles/apps/ml4w-dotfiles-settings.desktop b/dotfiles/apps/ml4w-dotfiles-settings.desktop new file mode 100755 index 0000000..5f6a12e --- /dev/null +++ b/dotfiles/apps/ml4w-dotfiles-settings.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=ML4W Dotfiles Settings App +Exec=/home/wyj/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage +Icon=/home/wyj/dotfiles/apps/ml4w-dotfiles-settings.png +Terminal=false +Categories=Utility \ No newline at end of file diff --git a/dotfiles/apps/ml4w-dotfiles-settings.png b/dotfiles/apps/ml4w-dotfiles-settings.png new file mode 100644 index 0000000..938b6f7 Binary files /dev/null and b/dotfiles/apps/ml4w-dotfiles-settings.png differ diff --git a/dotfiles/apps/ml4w-hyprland-settings.desktop b/dotfiles/apps/ml4w-hyprland-settings.desktop new file mode 100755 index 0000000..cf5e708 --- /dev/null +++ b/dotfiles/apps/ml4w-hyprland-settings.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=ML4W Hyprland Settings App +Exec=/home/wyj/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage +Icon=/home/wyj/dotfiles/apps/ml4w-hyprland-settings.png +Terminal=false +Categories=Utility \ No newline at end of file diff --git a/dotfiles/apps/ml4w-hyprland-settings.png b/dotfiles/apps/ml4w-hyprland-settings.png new file mode 100644 index 0000000..c7e8e29 Binary files /dev/null and b/dotfiles/apps/ml4w-hyprland-settings.png differ diff --git a/dotfiles/apps/ml4w-icon.png b/dotfiles/apps/ml4w-icon.png new file mode 100644 index 0000000..7d4efe7 Binary files /dev/null and b/dotfiles/apps/ml4w-icon.png differ diff --git a/dotfiles/apps/ml4w-welcome.desktop b/dotfiles/apps/ml4w-welcome.desktop new file mode 100755 index 0000000..138d511 --- /dev/null +++ b/dotfiles/apps/ml4w-welcome.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=ML4W Welcome App +Exec=/home/wyj/dotfiles/apps/ML4W_Welcome-x86_64.AppImage +Icon=/home/wyj/dotfiles/apps/ml4w-icon.png +Terminal=false +Categories=Utility \ No newline at end of file diff --git a/dotfiles/apps/ml4w-welcome.png b/dotfiles/apps/ml4w-welcome.png new file mode 100644 index 0000000..7d4efe7 Binary files /dev/null and b/dotfiles/apps/ml4w-welcome.png differ diff --git a/dotfiles/chrome-flags.conf b/dotfiles/chrome-flags.conf new file mode 100644 index 0000000..9f715ed --- /dev/null +++ b/dotfiles/chrome-flags.conf @@ -0,0 +1 @@ +--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime diff --git a/dotfiles/dunst/dunstrc b/dotfiles/dunst/dunstrc new file mode 100644 index 0000000..64646d9 --- /dev/null +++ b/dotfiles/dunst/dunstrc @@ -0,0 +1,469 @@ +# _ _ +# __| |_ _ _ __ ___| |_ +# / _` | | | | '_ \/ __| __| +# | (_| | |_| | | | \__ \ |_ +# \__,_|\__,_|_| |_|___/\__| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# See dunst(5) for all configuration options + +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = none + + ### Geometry ### + + # dynamic width from 0 to 300 + # width = (0, 300) + # constant width of 300 + width = 300 + + # The maximum height of a single notification, excluding the frame. + height = (0,300) + + # Position the notification in the top right corner + origin = top-center + + # Offset from the origin + offset = 0x30 + + # Scale factor. It is auto-detected if value is 0. + scale = 0 + + # Maximum number of notification (0 means no limit) + notification_limit = 20 + + ### Progress bar ### + + # Turn on the progess bar. It appears when a progress hint is passed with + # for example dunstify -h int:value:12 + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + # Corner radius for the progress bar. 0 disables rounded corners. + progress_bar_corner_radius = 10 + + # Corner radius for the icon image. + icon_corner_radius = 0 + + # Show how many messages are currently hidden (because of + # notification_limit). + indicate_hidden = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). (X11 only) + transparency = 30 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + # If gap_size is greater than 0, this setting will be ignored. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 0 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 1 + + # Defines color of the frame around the notification window. + frame_color = "#ffffff" + + # Size of gap to display between notifications - requires a compositor. + # If value is greater than 0, separator_height will be ignored and a border + # of size frame_width will be drawn around each notification instead. + # Click events on gaps do not currently propagate to applications below. + gap_size = 0 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + # idle_threshold = 120 + + ### Text ### + + font = "Fira Sans Semibold" 9 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 1 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Recursive icon lookup. You can set a single theme, instead of having to + # define all lookup paths. + enable_recursive_icon_lookup = true + + # Set icon theme (only used for recursive icon lookup) + icon_theme = "Papirus-Dark,Adwaita" + # You can also set multiple icon themes, with the leftmost one being used first. + # icon_theme = "Adwaita, breeze" + + # Align icons left/right/top/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 32 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 128 + + # Paths to default icons (only neccesary when not using recursive icon lookup) + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 10 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#000000CC" + foreground = "#888888" + timeout = 6 + # Icon for notifications with low urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_normal] + background = "#000000CC" + foreground = "#ffffff" + timeout = 6 + # Icon for notifications with normal urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_critical] + background = "#900000CC" + foreground = "#ffffff" + frame_color = "#ffffff" + timeout = 6 + # Icon for notifications with critical urgency, uncomment to enable + #default_icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# set_category +# timeout +# urgency +# icon_position +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# hide_text +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# skip_display = true + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/dotfiles/eww/assets/application-exit-symbolic-rtl.svg b/dotfiles/eww/assets/application-exit-symbolic-rtl.svg new file mode 100644 index 0000000..89f0825 --- /dev/null +++ b/dotfiles/eww/assets/application-exit-symbolic-rtl.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dotfiles/eww/assets/media-playback-pause-symbolic.svg b/dotfiles/eww/assets/media-playback-pause-symbolic.svg new file mode 100644 index 0000000..39383da --- /dev/null +++ b/dotfiles/eww/assets/media-playback-pause-symbolic.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dotfiles/eww/assets/system-lock-screen-symbolic.svg b/dotfiles/eww/assets/system-lock-screen-symbolic.svg new file mode 100644 index 0000000..78a410a --- /dev/null +++ b/dotfiles/eww/assets/system-lock-screen-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dotfiles/eww/assets/system-reboot-symbolic.svg b/dotfiles/eww/assets/system-reboot-symbolic.svg new file mode 100644 index 0000000..15171f5 --- /dev/null +++ b/dotfiles/eww/assets/system-reboot-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dotfiles/eww/assets/system-shutdown-symbolic.svg b/dotfiles/eww/assets/system-shutdown-symbolic.svg new file mode 100644 index 0000000..cfd4996 --- /dev/null +++ b/dotfiles/eww/assets/system-shutdown-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dotfiles/eww/assets/window-close-symbolic.svg b/dotfiles/eww/assets/window-close-symbolic.svg new file mode 100644 index 0000000..4cd28cd --- /dev/null +++ b/dotfiles/eww/assets/window-close-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dotfiles/eww/eww.yuck b/dotfiles/eww/eww.yuck new file mode 100644 index 0000000..e69de29 diff --git a/dotfiles/eww/ml4w-sidebar/eww.scss b/dotfiles/eww/ml4w-sidebar/eww.scss new file mode 100644 index 0000000..45c6c82 --- /dev/null +++ b/dotfiles/eww/ml4w-sidebar/eww.scss @@ -0,0 +1,78 @@ +*{ + all: unset; + font-family: "Fira Sans"; + color: #FFFFFF; +} + +.winbox { + background-color: #242424; + opacity: 0.85; + border: 1px solid #444444; + border-radius: 12px; + box-shadow: 0 0 4px 2px #000000; + margin: 10px; +} + +.res_box { + background-color: #242424; + border-radius: 12px; + padding: 14px 18px 14px 18px; +} + +.res_circle { + background-color: #FFFFFF; + border: 0px solid #161616; + color:#FFFFFF; + border-radius: 100%; + padding: 0px; +} + +.ml4w_icon { + background-repeat: no-repeat; + background-size: 48px; + min-height: 48px; + min-width: 48px; +} + +.res_circle_small { + background-color: #242424; + border: 0px solid #161616; + border-radius: 100%; + padding: 40px; + color:#FFFFFF; +} + +.res_text { + border-radius: 16px; + color: #FFFFFF; + font-size : 16px; + padding: 0px 8px 0px 8px; + margin: 0px 0px 0px 0px; + font-weight : bold; +} + +.res_cpu { + color: #19cddb; +} + +.res_mem { + color: #a5deb7; +} + +.res_disk { + color: #cfb3ff; +} + +.powericons { + background-repeat: no-repeat; + background-size: 30px; + min-height: 30px; + min-width: 30px; +} + +.closeicon { + background-repeat: no-repeat; + background-size: 16px; + min-height: 16px; + min-width: 16px; +} diff --git a/dotfiles/eww/ml4w-sidebar/eww.yuck b/dotfiles/eww/ml4w-sidebar/eww.yuck new file mode 100644 index 0000000..afa0a3f --- /dev/null +++ b/dotfiles/eww/ml4w-sidebar/eww.yuck @@ -0,0 +1,184 @@ +;; Icons: https://github.com/GNOME/adwaita-icon-theme/tree/master/Adwaita + +;; Variables + +;; System vars +(defpoll HOST :interval "5s" `hostname`) +(defpoll CPU_USAGE :interval "1s" `../scripts/sys_info.sh --cpu`) +(defpoll MEM_USAGE :interval "1s" `../scripts/sys_info.sh --mem`) +(defpoll DISK_USAGE :interval "1s" `../scripts/sys_info.sh --disk`) + +;; Widgets + +;; resources +(defwidget ml4wlauncher [] + (box :class "winbox" + (centerbox :orientation "h" + (box :class "ml4w-welcome" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-welcome.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --welcome") + (label :class "res_text" :valign "end" :halign "center" :text "Welcome App") + ) + (box :class "ml4w-dotfiles" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-dotfiles-settings.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --dotfiles") + (label :class "res_text" :valign "end" :halign "center" :text "Dotfiles App") + ) + (box :class "ml4w-hyprland" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-hyprland-settings.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --hyprland") + (label :class "res_text" :valign "end" :halign "center" :text "Hyprland App") + ) + ) + ) +) + +(defwidget resources [] + (box :class "winbox" + (centerbox :orientation "h" + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_cpu" :value CPU_USAGE :thickness 15 + (label :class "res_circle_small" :text "CPU" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${CPU_USAGE}%") + ) + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_mem" :value MEM_USAGE :thickness 15 + (label :class "res_circle_small" :text "MEMORY" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${MEM_USAGE}%") + ) + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_disk" :value DISK_USAGE :thickness 15 + (label :class "res_circle_small" :text "DISK" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${DISK_USAGE}%") + ) + ) + ) +) + +(defwidget close [] + (box :class "winbox" + (button :tooltip "Close" :style "background-image: url('../assets/window-close-symbolic.svg');" :class "closeicon" :valign "center" :halign "center" :onclick "../scripts/eww.sh &") + ) +) + +;; powermenus +(defwidget logout [] + (box :class "winbox" + (button :tooltip "Logout" :style "background-image: url('../assets/application-exit-symbolic-rtl.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh exit &") + ) +) + +(defwidget suspend [] + (box :class "winbox" + (button :tooltip "Suspend" :style "background-image: url('../assets/media-playback-pause-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh suspend &") + ) +) + +(defwidget lock [] + (box :class "winbox" + (button :tooltip "Lock" :style "background-image: url('../assets/system-lock-screen-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh lock &") + ) +) + +(defwidget reboot [] + (box :class "winbox" + (button :tooltip "Reboot" :style "background-image: url('../assets/system-reboot-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh reboot &") + ) +) + +(defwidget shutdown [] + (box :class "winbox" + (button :tooltip "Shutdown" :style "background-image: url('../assets/system-shutdown-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh shutdown &") + ) +) + +;; ** Windows ************************************************************************* + +(defwindow close + :geometry (geometry :x "455px" + :y "-7px" + :width "44px" + :height "44px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(close)) + +(defwindow ml4wlauncher + :geometry (geometry :x "5px" + :y "5px" + :width "480px" + :height "140px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(ml4wlauncher)) + +;; resources +(defwindow resources + :geometry (geometry :x "5px" + :y "140px" + :width "480px" + :height "180px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(resources)) + +;; powermenu +(defwindow logout + :geometry (geometry :x "5px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(logout)) + +(defwindow suspend + :geometry (geometry :x "102px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(suspend)) + +(defwindow lock + :geometry (geometry :x "204px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(lock)) + +(defwindow reboot + :geometry (geometry :x "305px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(reboot)) + +(defwindow shutdown + :geometry (geometry :x "405px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(shutdown)) + diff --git a/dotfiles/eww/ml4w-sidebar/launch.sh b/dotfiles/eww/ml4w-sidebar/launch.sh new file mode 100755 index 0000000..d144e52 --- /dev/null +++ b/dotfiles/eww/ml4w-sidebar/launch.sh @@ -0,0 +1,33 @@ +#!/bin/bash +FILE="$HOME/.cache/ml4w_sidebar" +CFG="$HOME/dotfiles/eww/ml4w-sidebar" +EWW=`which eww` + +if [[ ! `pidof eww` ]]; then + ${EWW} daemon + sleep 0.5 +fi + +if [ -f $HOME/dotfiles/.settings/eww-monitor.sh ] && [ $(cat $HOME/dotfiles/.settings/eww-monitor.sh) != "auto" ] ;then + echo ":: Using monitor id from $HOME/dotfiles/.settings/eww-monitor.sh" + sc=$(cat $HOME/dotfiles/.settings/eww-monitor.sh) +else + echo ":: Autodetect current focused monitor." + sc=$(python $HOME/dotfiles/hypr/scripts/active-monitor.py) +fi +if [[ ! -f "$FILE" ]]; then + touch "$FILE" + echo ":: Opening on Monitor $sc" + ${EWW} --config "$CFG" open ml4wlauncher --screen $sc + ${EWW} --config "$CFG" open resources --screen $sc + ${EWW} --config "$CFG" open logout --screen $sc + ${EWW} --config "$CFG" open suspend --screen $sc + ${EWW} --config "$CFG" open lock --screen $sc + ${EWW} --config "$CFG" open reboot --screen $sc + ${EWW} --config "$CFG" open shutdown --screen $sc + ${EWW} --config "$CFG" open close --screen $sc +else + ${EWW} --config "$CFG" close resources ml4wlauncher logout suspend lock reboot shutdown close + echo ":: Closing widgets" + rm "$FILE" +fi \ No newline at end of file diff --git a/dotfiles/eww/scripts/eww.sh b/dotfiles/eww/scripts/eww.sh new file mode 100755 index 0000000..a13b895 --- /dev/null +++ b/dotfiles/eww/scripts/eww.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.3 +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh \ No newline at end of file diff --git a/dotfiles/eww/scripts/launch_app.sh b/dotfiles/eww/scripts/launch_app.sh new file mode 100755 index 0000000..5929e1a --- /dev/null +++ b/dotfiles/eww/scripts/launch_app.sh @@ -0,0 +1,12 @@ +#!/bin/bash +if [[ "$1" == "--welcome" ]]; then + $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage & +elif [[ "$1" == "--dotfiles" ]]; then + $HOME/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage & +elif [[ "$1" == "--hyprland" ]]; then + $HOME/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage & +else + echo "ERROR: $1 not found" +fi + +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh & \ No newline at end of file diff --git a/dotfiles/eww/scripts/sys_info.sh b/dotfiles/eww/scripts/sys_info.sh new file mode 100755 index 0000000..27a589a --- /dev/null +++ b/dotfiles/eww/scripts/sys_info.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +## Files and Data +PREV_TOTAL=0 +PREV_IDLE=0 +cpuFile="/tmp/.cpu_usage" + +## Get CPU usage +get_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" + echo "${DIFF_USAGE}" + else + echo "?" + fi + + # Remember the total and idle CPU times for the next check. + echo "${TOTAL}" > "${cpuFile}" + echo "${IDLE}" >> "${cpuFile}" +} + +## Get Used memory +get_mem() { + printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') +} + +## Get Brightness +get_blight() { + CARD=`ls /sys/class/backlight | head -n 1` + + if [[ "$CARD" == *"intel_"* ]]; then + BNESS=`xbacklight -get` + LIGHT=${BNESS%.*} + else + BNESS=`blight -d $CARD get brightness` + PERC="$(($BNESS*100/255))" + LIGHT=${PERC%.*} + fi + + echo "$LIGHT" +} + +## Get Battery +get_battery() { + BAT=`ls /sys/class/power_supply | grep BAT | head -n 1` + cat /sys/class/power_supply/${BAT}/capacity +} + +## Get Disk Usage +get_disk() { + df -h / | awk '{print $5}' | tail -n1 | sed 's/%//g' +} + +## Execute accordingly +if [[ "$1" == "--cpu" ]]; then + get_cpu +elif [[ "$1" == "--mem" ]]; then + get_mem +elif [[ "$1" == "--blight" ]]; then + get_blight +elif [[ "$1" == "--bat" ]]; then + get_battery +elif [[ "$1" == "--disk" ]]; then + get_disk +fi diff --git a/dotfiles/eww/scripts/system.sh b/dotfiles/eww/scripts/system.sh new file mode 100755 index 0000000..d10441d --- /dev/null +++ b/dotfiles/eww/scripts/system.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +sleep 0.3 +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh + +if [[ "$1" == "reboot" ]]; then + $HOME/dotfiles/hypr/scripts/reboot.sh +elif [[ "$1" == "shutdown" ]]; then + $HOME/dotfiles/hypr/scripts/shutdown.sh +elif [[ "$1" == "lock" ]]; then + $HOME/dotfiles/hypr/scripts/lock.sh +elif [[ "$1" == "suspend" ]]; then + $HOME/dotfiles/hypr/scripts/suspend.sh +elif [[ "$1" == "logout" ]]; then + $HOME/dotfiles/hypr/scripts/exit.sh +fi diff --git a/dotfiles/fastfetch/config.jsonc b/dotfiles/fastfetch/config.jsonc new file mode 100644 index 0000000..f14d45f --- /dev/null +++ b/dotfiles/fastfetch/config.jsonc @@ -0,0 +1,181 @@ +// Note that you must replace the image path to an existing image to display it. +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + // "logo": { + // "type": "iterm", + // "source": "/Users/carter/Desktop/apple1.png", + // "width": 28, + // "height": 12 + // }, + "display": { + // "separator": "  " + "separator": " " + }, + "modules": [ + { + "type": "host", + "key": "╭─󰌢", + "keyColor": "green" + }, + { + "type": "cpu", + "key": "├─󰻠", + "keyColor": "green" + }, + { + "type": "gpu", + "key": "├─󰍛", + "keyColor": "green" + }, + { + "type": "disk", + "key": "├─", + "keyColor": "green" + }, + { + "type": "memory", + "key": "├─󰑭", + "keyColor": "green" + }, + { + "type": "swap", + "key": "├─󰓡", + "keyColor": "green" + }, + { + "type": "display", + "key": "├─󰍹", + "keyColor": "green" + }, + { + "type": "battery", + "key": "├─", + "keyColor": "green" + }, + { + "type": "poweradapter", + "key": "├─", + "keyColor": "green" + }, + { + "type": "gamepad", + "key": "├─", + "keyColor": "green" + }, + { + "type": "bluetooth", + "key": "├─", + "keyColor": "green" + }, + { + "type": "sound", + "key": "╰─", + "keyColor": "green" + }, + "break", + { + "type": "shell", + "key": "╭─", + "keyColor": "yellow" + }, + { + "type": "terminal", + "key": "├─", + "keyColor": "yellow" + }, + { + "type": "editor", + "key": "├─", + "keyColor": "yellow" + }, + { + "type": "terminalfont", + "key": "├─", + "keyColor": "yellow" + }, + { + "type": "lm", + "key": "├─󰧨", + "keyColor": "yellow" + }, + { + "type": "de", + "key": "├─", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": "├─", + "keyColor": "yellow" + }, + { + "type": "theme", + "key": "├─󰉼", + "keyColor": "yellow" + }, + { + "type": "icons", + "key": "╰─󰀻", + "keyColor": "yellow" + }, + "break", + { + "type": "title", + "key": "╭─", + "format": "{1}@{2}", + "keyColor": "blue" + }, + { + "type": "os", + "key": "├─", // Just get your distro's logo off nerdfonts.com + "keyColor": "blue" + }, + { + "type": "kernel", + "key": "├─", + "format": "{1} {2}", + "keyColor": "blue" + }, + { + "type": "packages", + "key": "├─󰏖", + "keyColor": "blue" + }, + { + "type": "uptime", + "key": "├─󰅐", + "keyColor": "blue" + }, + { + "type": "media", + "key": "├─󰝚", + "keyColor": "blue" + }, + { + "type": "cpuusage", + "key": "├─", + "keyColor": "blue" + }, + { + "type": "loadavg", + "key": "├─", + "keyColor": "blue" + }, + { + "type": "processes", + "key": "├─", + "keyColor": "blue" + }, + { + "type": "localip", + "key": "╰─󰩟", + "compact": true, + "keyColor": "blue" + }, + "break", + { + "type": "custom", + "format": " \u001b[90m󱓻 \u001b[31m󱓻 \u001b[32m󱓻 \u001b[33m󱓻 \u001b[34m󱓻 \u001b[35m󱓻 \u001b[36m󱓻 \u001b[37m󱓻 \u001b[38m󱓻 \u001b[39m󱓻 " + } + ] +} diff --git a/dotfiles/fastfetch/logo.txt b/dotfiles/fastfetch/logo.txt new file mode 100644 index 0000000..8826e22 --- /dev/null +++ b/dotfiles/fastfetch/logo.txt @@ -0,0 +1,9 @@ + .vir. + .d$$$$$$b. + $$$$( )$$$b + Q$$$$$$$$$$B + "$$$$$$$P + d$$$$$$P" + $$$$$$$P + `Q$$P" + diff --git a/dotfiles/fastfetch/pfetch.jsonc b/dotfiles/fastfetch/pfetch.jsonc new file mode 100644 index 0000000..89b0a00 --- /dev/null +++ b/dotfiles/fastfetch/pfetch.jsonc @@ -0,0 +1,83 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "small", + "padding": { + "top": 1, + "right": 2 + } + }, + "display": { + "separator": " ", + "color": { + "separator": "red" + } + }, + "modules": [ + { + "format": "{#1}{#keys}╭────────────────────────────────────────────────────╮\u001b[53D {6}{7}{8} 󰇄 ", + "type": "title" + }, + { + "key": "│\u001b[52C│\u001b[52D{#31} ", + "type": "kernel" + }, + { + "key": "│\u001b[52C│\u001b[52D{#32}󰅐 ", + "type": "uptime" + }, + { + "key": "│\u001b[52C│\u001b[52D{#33}󰟾 ", + "type": "os" + }, + { + "key": "│\u001b[52C│\u001b[52D{#34}󰇄 ", + "type": "de" + }, + { + "key": "│\u001b[52C│\u001b[52D{#35} ", + "type": "terminal" + }, + { + "key": "│\u001b[52C│\u001b[52D{#36} ", + "type": "shell" + }, + { + "key": "│\u001b[52C│\u001b[52D{#35}󰍛 ", + "type": "cpu", + "showPeCoreCount": true, + "temp": true + }, + { + "key": "│\u001b[52C│\u001b[52D{#34}󰍛 ", + "type": "gpu" + }, + { + "key": "│\u001b[52C│\u001b[52D{#33}󰉉 ", + "type": "disk", + "folders": "/" + }, + { + "key": "│\u001b[52C│\u001b[52D{#32} ", + "type": "memory" + }, + { + "key": "│\u001b[52C│\u001b[52D{#31}󰩟 ", + "type": "localip", + "format": "{1} ({4})" + }, + { + "format": "{#1}{#keys}├────────────────────────────────────────────────────┤", + "type": "custom" + }, + { + "key": "│\u001b[52C│\u001b[52D{#39} ", + "type": "colors", + "symbol": "circle" + }, + { + "format": "{#1}{#keys}╰────────────────────────────────────────────────────╯", + "type": "custom" + } + ] +} diff --git a/dotfiles/hypr/conf/animation.conf b/dotfiles/hypr/conf/animation.conf new file mode 100644 index 0000000..3259ada --- /dev/null +++ b/dotfiles/hypr/conf/animation.conf @@ -0,0 +1 @@ +source = ~/dotfiles/hypr/conf/animations/animations-high.conf diff --git a/dotfiles/hypr/conf/animations/animation-moving.conf b/dotfiles/hypr/conf/animations/animation-moving.conf new file mode 100644 index 0000000..7c43e04 --- /dev/null +++ b/dotfiles/hypr/conf/animations/animation-moving.conf @@ -0,0 +1,18 @@ +# ----------------------------------------------------- +# Animations +# name "Moving" +# ----------------------------------------------------- +animations { + enabled = true + bezier = overshot, 0.05, 0.9, 0.1, 1.05 + bezier = smoothOut, 0.5, 0, 0.99, 0.99 + bezier = smoothIn, 0.5, -0.5, 0.68, 1.5 + animation = windows, 1, 5, overshot, slide + animation = windowsOut, 1, 3, smoothOut + animation = windowsIn, 1, 3, smoothOut + animation = windowsMove, 1, 4, smoothIn, slide + animation = border, 1, 5, default + animation = fade, 1, 5, smoothIn + animation = fadeDim, 1, 5, smoothIn + animation = workspaces, 1, 6, default +} diff --git a/dotfiles/hypr/conf/animations/animations-fast.conf b/dotfiles/hypr/conf/animations/animations-fast.conf new file mode 100644 index 0000000..a74f411 --- /dev/null +++ b/dotfiles/hypr/conf/animations/animations-fast.conf @@ -0,0 +1,23 @@ +# ----------------------------------------------------- +# Animations +# name "Fast" +# ----------------------------------------------------- +animations { + enabled = true + bezier = linear, 0, 0, 1, 1 + bezier = md3_standard, 0.2, 0, 0, 1 + bezier = md3_decel, 0.05, 0.7, 0.1, 1 + bezier = md3_accel, 0.3, 0, 0.8, 0.15 + bezier = overshot, 0.05, 0.9, 0.1, 1.1 + bezier = crazyshot, 0.1, 1.5, 0.76, 0.92 + bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0 + bezier = fluent_decel, 0.1, 1, 0, 1 + bezier = easeInOutCirc, 0.85, 0, 0.15, 1 + bezier = easeOutCirc, 0, 0.55, 0.45, 1 + bezier = easeOutExpo, 0.16, 1, 0.3, 1 + animation = windows, 1, 3, md3_decel, popin 60% + animation = border, 1, 10, default + animation = fade, 1, 2.5, md3_decel + animation = workspaces, 1, 3.5, easeOutExpo, slide + animation = specialWorkspace, 1, 3, md3_decel, slidevert +} \ No newline at end of file diff --git a/dotfiles/hypr/conf/animations/animations-high.conf b/dotfiles/hypr/conf/animations/animations-high.conf new file mode 100644 index 0000000..2fc765f --- /dev/null +++ b/dotfiles/hypr/conf/animations/animations-high.conf @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# Animations +# name: "High" +# ----------------------------------------------------- +animations { + enabled = true + bezier = wind, 0.05, 0.9, 0.1, 1.05 + bezier = winIn, 0.1, 1.1, 0.1, 1.1 + bezier = winOut, 0.3, -0.3, 0, 1 + bezier = liner, 1, 1, 1, 1 + animation = windows, 1, 6, wind, slide + animation = windowsIn, 1, 6, winIn, slide + animation = windowsOut, 1, 5, winOut, slide + animation = windowsMove, 1, 5, wind, slide + animation = border, 1, 1, liner + animation = borderangle, 1, 30, liner, loop + animation = fade, 1, 10, default + animation = workspaces, 1, 5, wind +} diff --git a/dotfiles/hypr/conf/animations/default.conf b/dotfiles/hypr/conf/animations/default.conf new file mode 100644 index 0000000..ba78c65 --- /dev/null +++ b/dotfiles/hypr/conf/animations/default.conf @@ -0,0 +1,14 @@ +# ----------------------------------------------------- +# Animations +# name "Default" +# ----------------------------------------------------- +animations { + enabled = true + 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 = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} diff --git a/dotfiles/hypr/conf/animations/disabled.conf b/dotfiles/hypr/conf/animations/disabled.conf new file mode 100644 index 0000000..c9e31c4 --- /dev/null +++ b/dotfiles/hypr/conf/animations/disabled.conf @@ -0,0 +1,7 @@ +# ----------------------------------------------------- +# Animations +# name "Default" +# ----------------------------------------------------- +animations { + enabled = false +} diff --git a/dotfiles/hypr/conf/autostart.conf b/dotfiles/hypr/conf/autostart.conf new file mode 100644 index 0000000..e5bc02a --- /dev/null +++ b/dotfiles/hypr/conf/autostart.conf @@ -0,0 +1,36 @@ +# ----------------------------------------------------- +# Autostart +# ----------------------------------------------------- + +# Setup XDG for screen sharing +exec-once = ../scripts/xdg.sh + +# Start Polkit +# exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + +# Load Dunst Notification Manager +exec-once = dunst + +# Load GTK settings +# exec-once = ~/dotfiles/hypr/scripts/gtk.sh + +# Using hypridle to start hyprlock +# exec-once = hypridle + +# Load cliphist history +exec-once = wl-paste --watch cliphist store + +# Initialize Wallpaper Engine +exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh + +# Autostart ML4W App +# exec-once = ~/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh + +# Start ewww daemon +# exec-once = ~/dotfiles/hypr/scripts/eww.sh + +exec-once = pypr + + +# Start autostart cleanup +# exec-once = ~/dotfiles/hypr/scripts/cleanup.sh diff --git a/dotfiles/hypr/conf/cursor.conf b/dotfiles/hypr/conf/cursor.conf new file mode 100644 index 0000000..519d384 --- /dev/null +++ b/dotfiles/hypr/conf/cursor.conf @@ -0,0 +1,2 @@ +exec-once = hyprctl setcursor Vimix-hyprcursors 32 +env = HYPRCURSOR_THEME,Vimix-hyprcursors diff --git a/dotfiles/hypr/conf/custom.conf b/dotfiles/hypr/conf/custom.conf new file mode 100644 index 0000000..1d025d7 --- /dev/null +++ b/dotfiles/hypr/conf/custom.conf @@ -0,0 +1,2 @@ +exec-once = sleep 1 && pw-play ~/.local/share/startupsounds/start-computeraif-14572.mp3 & + diff --git a/dotfiles/hypr/conf/decoration.conf b/dotfiles/hypr/conf/decoration.conf new file mode 100644 index 0000000..e9490b4 --- /dev/null +++ b/dotfiles/hypr/conf/decoration.conf @@ -0,0 +1 @@ +source = ~/dotfiles/hypr/conf/decorations/custom.conf diff --git a/dotfiles/hypr/conf/decorations/custom.conf b/dotfiles/hypr/conf/decorations/custom.conf new file mode 100644 index 0000000..bb4f1fd --- /dev/null +++ b/dotfiles/hypr/conf/decorations/custom.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Default" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 10 + passes = 3 + new_optimizations = on + ignore_opacity = true + xray = false + blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.8 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/default.conf b/dotfiles/hypr/conf/decorations/default.conf new file mode 100644 index 0000000..ab5bc81 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/default.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Default" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 6 + passes = 2 + new_optimizations = on + ignore_opacity = true + xray = true + # blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.8 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/no-rounding-more-blur.conf b/dotfiles/hypr/conf/decorations/no-rounding-more-blur.conf new file mode 100644 index 0000000..b83b4cf --- /dev/null +++ b/dotfiles/hypr/conf/decorations/no-rounding-more-blur.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "No Rounding More Blur" +# ----------------------------------------------------- + +decoration { + rounding = 0 + blur { + enabled = true + size = 12 + passes = 6 + new_optimizations = on + ignore_opacity = true + xray = true + # blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.6 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/no-rounding.conf b/dotfiles/hypr/conf/decorations/no-rounding.conf new file mode 100644 index 0000000..d19e7c7 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/no-rounding.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "No Rounding" +# ----------------------------------------------------- + +decoration { + rounding = 0 + blur { + enabled = true + size = 6 + passes = 2 + new_optimizations = on + ignore_opacity = true + xray = true + # blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.8 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/rounding-all-blur-no-shadows.conf b/dotfiles/hypr/conf/decorations/rounding-all-blur-no-shadows.conf new file mode 100644 index 0000000..00131b6 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/rounding-all-blur-no-shadows.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Rounding All Blur No Shadows" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 12 + passes = 4 + new_optimizations = on + ignore_opacity = true + xray = true + blurls = waybar + } + active_opacity = 0.9 + inactive_opacity = 0.6 + fullscreen_opacity = 0.9 + + drop_shadow = false + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/rounding-all-blur.conf b/dotfiles/hypr/conf/decorations/rounding-all-blur.conf new file mode 100644 index 0000000..d8ead80 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/rounding-all-blur.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Rounding All Blur" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 12 + passes = 4 + new_optimizations = on + ignore_opacity = true + xray = true + blurls = waybar + } + active_opacity = 0.9 + inactive_opacity = 0.6 + fullscreen_opacity = 0.9 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/rounding-more-blur.conf b/dotfiles/hypr/conf/decorations/rounding-more-blur.conf new file mode 100644 index 0000000..a2a9b21 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/rounding-more-blur.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Rounding More Blur" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 12 + passes = 6 + new_optimizations = on + ignore_opacity = true + xray = true + # blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.6 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/decorations/rounding.conf b/dotfiles/hypr/conf/decorations/rounding.conf new file mode 100644 index 0000000..ab5bc81 --- /dev/null +++ b/dotfiles/hypr/conf/decorations/rounding.conf @@ -0,0 +1,25 @@ +# ----------------------------------------------------- +# General window decoration +# name: "Default" +# ----------------------------------------------------- + +decoration { + rounding = 10 + blur { + enabled = true + size = 6 + passes = 2 + new_optimizations = on + ignore_opacity = true + xray = true + # blurls = waybar + } + active_opacity = 1.0 + inactive_opacity = 0.8 + fullscreen_opacity = 1.0 + + drop_shadow = true + shadow_range = 30 + shadow_render_power = 3 + col.shadow = 0x66000000 +} diff --git a/dotfiles/hypr/conf/environment.conf b/dotfiles/hypr/conf/environment.conf new file mode 100644 index 0000000..f163e1a --- /dev/null +++ b/dotfiles/hypr/conf/environment.conf @@ -0,0 +1 @@ +source = environments/default.conf diff --git a/dotfiles/hypr/conf/environments/default.conf b/dotfiles/hypr/conf/environments/default.conf new file mode 100644 index 0000000..56b1685 --- /dev/null +++ b/dotfiles/hypr/conf/environments/default.conf @@ -0,0 +1,14 @@ +# ----------------------------------------------------- +# Environment Variables +# name: "Default" +# ----------------------------------------------------- + +env = XDG_CURRENT_DESKTOP, Hyprland +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland +env = QT_QPA_PLATFORM,wayland +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = MOZ_ENABLE_WAYLAND,1 + +env = LANG,zh_CN.UTF-8 diff --git a/dotfiles/hypr/conf/environments/kvm.conf b/dotfiles/hypr/conf/environments/kvm.conf new file mode 100644 index 0000000..11c5870 --- /dev/null +++ b/dotfiles/hypr/conf/environments/kvm.conf @@ -0,0 +1,14 @@ +# ----------------------------------------------------- +# Environment Variables +# name: "KVM" +# ----------------------------------------------------- + +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland +env = QT_QPA_PLATFORM,wayland +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = MOZ_ENABLE_WAYLAND,1 +env = GDK_SCALE,1 +env = WLR_RENDERER_ALLOW_SOFTWARE, 1 +env = WLR_NO_HARDWARE_CURSORS, 1 \ No newline at end of file diff --git a/dotfiles/hypr/conf/environments/nvidia.conf b/dotfiles/hypr/conf/environments/nvidia.conf new file mode 100644 index 0000000..34b823d --- /dev/null +++ b/dotfiles/hypr/conf/environments/nvidia.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# Environment Variables +# name: "Nvidia" +# ----------------------------------------------------- +# https://wiki.hyprland.org/Nvidia/ + +env = LIBVA_DRIVER_NAME,nvidia +env = XDG_SESSION_TYPE,wayland +env = GBM_BACKEND,nvidia-drm +env = __GLX_VENDOR_LIBRARY_NAME,nvidia + +# env = __GL_VRR_ALLOWED,1 +# env = WLR_DRM_NO_ATOMIC,1 \ No newline at end of file diff --git a/dotfiles/hypr/conf/fcitx5.conf b/dotfiles/hypr/conf/fcitx5.conf new file mode 100644 index 0000000..714f04c --- /dev/null +++ b/dotfiles/hypr/conf/fcitx5.conf @@ -0,0 +1,9 @@ +exec-once = fcitx5-remote -r +exec-once = fcitx5 -d --replace +exec-once = fcitx5-remote -r + +bind=$mainMod CTRL, E, exec, pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r + +env=XMODIFIERS,'@im=fcitx' +#env=GTK_IM_MODULE,fcitx +env=QT_IM_MODULE,fcitx diff --git a/dotfiles/hypr/conf/hidpi.conf b/dotfiles/hypr/conf/hidpi.conf new file mode 100644 index 0000000..e5368f5 --- /dev/null +++ b/dotfiles/hypr/conf/hidpi.conf @@ -0,0 +1,6 @@ +xwayland { + force_zero_scaling = true +} + +env = GDK_SCALE,2 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 diff --git a/dotfiles/hypr/conf/keybinding.conf b/dotfiles/hypr/conf/keybinding.conf new file mode 100644 index 0000000..ca16b09 --- /dev/null +++ b/dotfiles/hypr/conf/keybinding.conf @@ -0,0 +1 @@ +source = keybindings/custom.conf diff --git a/dotfiles/hypr/conf/keybindings/custom.conf b/dotfiles/hypr/conf/keybindings/custom.conf new file mode 100644 index 0000000..b658659 --- /dev/null +++ b/dotfiles/hypr/conf/keybindings/custom.conf @@ -0,0 +1,104 @@ +# ----------------------------------------------------- +# Key bindings +# name: "Default" +# ----------------------------------------------------- + +# SUPER KEY +$mainMod = SUPER + +# Applications +bind = $mainMod, RETURN, exec, ~/dotfiles/.settings/terminal.sh +bind = $mainMod, B, exec, ~/dotfiles/.settings/browser.sh +bind = $mainMod SHIFT, E, exec, emote + +# Windows +bind = $mainMod, Q, killactive +bind = $mainMod, F, fullscreen +bind = $mainMod SHIFT, F, fullscreen, 1 +bind = $mainMod CTRL SHIFT, F, fullscreen, 2 +#bind = $mainMod ALT, F, fakefullscreen +bind = $mainMod, E, exec, ~/dotfiles/.settings/filemanager.sh +bind = $mainMod, T, togglefloating +bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh +bind = $mainMod, J, togglesplit +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow +bind = $mainMod SHIFT, right, resizeactive, 100 0 +bind = $mainMod SHIFT, left, resizeactive, -100 0 +bind = $mainMod SHIFT, up, resizeactive, 0 -100 +bind = $mainMod SHIFT, down, resizeactive, 0 100 +bind = $mainMod, G, togglegroup +bind = $mainMod CTRL, Tab, changegroupactive, f + +# Actions +bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh +bind = $mainMod CTRL, Q, exec, wlogout +bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh +bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select +bind = $mainMod, SPACE, exec, rofi -show drun -replace -i +bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh +bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh +bind = $mainMod CTRL, B, exec, ~/dotfiles/waybar/toggle.sh +bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh +bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh +bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh +bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh +bind = $mainMod CTRL, S, exec, ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage +bind = $mainMod CTRL, P, exec, hyprpicker -a +bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/hyprshade.sh +bind = $mainMod ALT, G, exec, ~/dotfiles/hypr/scripts/gamemode.sh + +# Workspaces +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 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, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 +bind = $mainMod CTRL, down, workspace, empty +bind = $mainMod CTRL, left, workspace, e-1 +bind = $mainMod CTRL, right, workspace, e+1 + +# Fn keys +bind = , XF86MonBrightnessUp, exec, brightnessctl -q s +10% +bind = , XF86MonBrightnessDown, exec, brightnessctl -q s 10%- +bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send -t 400 "Volume: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '/front-left/ {print $5}')" +bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send -t 400 "Volume: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '/front-left/ {print $5}')" +bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bind = , XF86AudioPlay, exec, playerctl play-pause +bind = , XF86AudioPause, exec, playerctl pause +bind = , XF86AudioNext, exec, playerctl next +bind = , XF86AudioPrev, exec, playerctl previous +bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle +bind = , XF86Calculator, exec, qalculate-gtk +bind = , XF86Lock, exec, hyprlock +bind = , XF86Tools, exec, alacritty --class dotfiles-floating -e ~/dotfiles/hypr/settings/settings.sh + +# Passthrough SUPER KEY to Virtual Machine +bind = $mainMod, P, submap, passthru +submap = passthru +bind = SUPER, Escape, submap, reset +submap = reset + +# Pyprland +bind = $mainMod SHIFT, RETURN, exec, pypr toggle term diff --git a/dotfiles/hypr/conf/keybindings/default.conf b/dotfiles/hypr/conf/keybindings/default.conf new file mode 100644 index 0000000..638118c --- /dev/null +++ b/dotfiles/hypr/conf/keybindings/default.conf @@ -0,0 +1,94 @@ +# ----------------------------------------------------- +# Key bindings +# name: "Default" +# ----------------------------------------------------- + +# SUPER KEY +$mainMod = SUPER + +# Applications +bind = $mainMod, RETURN, exec, ~/dotfiles/.settings/terminal.sh # Open the terminal +bind = $mainMod, B, exec, ~/dotfiles/.settings/browser.sh # Open the browser +bind = $mainMod, E, exec, ~/dotfiles/.settings/filemanager.sh # Open the filemanager + +# Windows +bind = $mainMod, Q, killactive # Kill active window +bind = $mainMod, F, fullscreen # Set active window to fullscreen +bind = $mainMod, T, togglefloating # Toggle active windows into floating mode +bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh # Toggle all windows into floating mode +bind = $mainMod, J, togglesplit # Toggle split +bind = $mainMod, left, movefocus, l # Move focus left +bind = $mainMod, right, movefocus, r # Move focus right +bind = $mainMod, up, movefocus, u # Move focus up +bind = $mainMod, down, movefocus, d # Move focus down +bindm = $mainMod, mouse:272, movewindow # Move window with the mouse +bindm = $mainMod, mouse:273, resizewindow # Resize window with the mouse +bind = $mainMod SHIFT, right, resizeactive, 100 0 # Increase window width with keyboard +bind = $mainMod SHIFT, left, resizeactive, -100 0 # Reduce window width with keyboard +bind = $mainMod SHIFT, down, resizeactive, 0 100 # Increase window height with keyboard +bind = $mainMod SHIFT, up, resizeactive, 0 -100 # Reduce window height with keyboard +bind = $mainMod, G, togglegroup # Toggle window group + +# Actions +bind = $mainMod SHIFT, A, exec, ~/dotfiles/hypr/scripts/toggle-animations.sh # Toggle animations +bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh # Take a screenshot +bind = $mainMod CTRL, Q, exec, wlogout # Start wlogout +bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh # Change the wallpaper +bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select # Open wallpaper selector +bind = $mainMod CTRL, RETURN, exec, rofi -show drun -replace -i # Open application launcher +bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh # Show keybindings +bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh # Reload waybar +bind = $mainMod CTRL, B, exec, ~/dotfiles/waybar/toggle.sh # Toggle waybar +bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh # Reload hyprland config +bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh # Open clipboard manager +bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh # Open waybar theme switcher +bind = $mainMod CTRL, S, exec, ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage # Open ML4W Dotfiles Settings app +bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/hyprshade.sh # Toggle screenshader +bind = $mainMod ALT, G, exec, ~/dotfiles/hypr/scripts/gamemode.sh # Toggle game mode + +# Workspaces +bind = $mainMod, 1, workspace, 1 # Open workspace 1 +bind = $mainMod, 2, workspace, 2 # Open workspace 2 +bind = $mainMod, 3, workspace, 3 # Open workspace 3 +bind = $mainMod, 4, workspace, 4 # Open workspace 4 +bind = $mainMod, 5, workspace, 5 # Open workspace 5 +bind = $mainMod, 6, workspace, 6 # Open workspace 6 +bind = $mainMod, 7, workspace, 7 # Open workspace 7 +bind = $mainMod, 8, workspace, 8 # Open workspace 8 +bind = $mainMod, 9, workspace, 9 # Open workspace 9 +bind = $mainMod, 0, workspace, 10 # Open workspace 10 +bind = $mainMod SHIFT, 1, movetoworkspace, 1 # Move active window to workspace 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 # Move active window to workspace 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 # Move active window to workspace 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 # Move active window to workspace 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 # Move active window to workspace 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 # Move active window to workspace 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 # Move active window to workspace 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 # Move active window to workspace 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 # Move active window to workspace 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Move active window to workspace 10 +bind = $mainMod, mouse_down, workspace, e+1 # Open next workspace +bind = $mainMod, mouse_up, workspace, e-1 # Open previous workspace +bind = $mainMod CTRL, down, workspace, empty # Open the next empty workspace + +# Passthrough SUPER KEY to Virtual Machine +bind = $mainMod, P, submap, passthru # Passthrough SUPER key to virtual machine +submap = passthru +bind = SUPER, Escape, submap, reset # Get SUPER key back from virtual machine +submap = reset + +# Fn keys +bind = , XF86MonBrightnessUp, exec, brightnessctl -q s +10% # Increase brightness by 10% +bind = , XF86MonBrightnessDown, exec, brightnessctl -q s 10%- # Reduce brightness by 10% +bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% # Increase volume by 5% +bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% # Reduce volume by 5% +bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Toggle mute +bind = , XF86AudioPlay, exec, playerctl play-pause # Audio play pause +bind = , XF86AudioPause, exec, playerctl pause # Audio pause +bind = , XF86AudioNext, exec, playerctl next # Audio next +bind = , XF86AudioPrev, exec, playerctl previous # Audio previous +bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle # Toggle microphone +bind = , XF86Calculator, exec, qalculate-gtk # Open calculator +bind = , XF86Lock, exec, hyprlock # Open screenlock +bind = , XF86Tools, exec, alacritty --class dotfiles-floating -e ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage # Open ML4W Dotfiles Settings app + diff --git a/dotfiles/hypr/conf/misc.conf b/dotfiles/hypr/conf/misc.conf new file mode 100644 index 0000000..9bebf30 --- /dev/null +++ b/dotfiles/hypr/conf/misc.conf @@ -0,0 +1,11 @@ +# ----------------------------------------------------- +# Misc settings +# ----------------------------------------------------- + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true + enable_swallow = true + swallow_regex = ^(Alacritty|kitty|thunar)$ + font_family = FiraCode Nerd Font +} diff --git a/dotfiles/hypr/conf/monitor.conf b/dotfiles/hypr/conf/monitor.conf new file mode 100644 index 0000000..2957925 --- /dev/null +++ b/dotfiles/hypr/conf/monitor.conf @@ -0,0 +1 @@ +source=monitors/hacmini.conf diff --git a/dotfiles/hypr/conf/monitors/hacmini.conf b/dotfiles/hypr/conf/monitors/hacmini.conf new file mode 100644 index 0000000..adcef39 --- /dev/null +++ b/dotfiles/hypr/conf/monitors/hacmini.conf @@ -0,0 +1,5 @@ +monitor=DP-1,preferred,0x0,2 +monitor=HDMI-A-1,3840x2160@30,1920x-275,2,transform,1 + +workspace=1,monitor:DP-1 +exec-once=hyprctl dispatch workspace 1 diff --git a/dotfiles/hypr/conf/window.conf b/dotfiles/hypr/conf/window.conf new file mode 100644 index 0000000..c8c0e50 --- /dev/null +++ b/dotfiles/hypr/conf/window.conf @@ -0,0 +1 @@ +source = ~/dotfiles/hypr/conf/windows/default.conf diff --git a/dotfiles/hypr/conf/windowrule.conf b/dotfiles/hypr/conf/windowrule.conf new file mode 100644 index 0000000..b964d4c --- /dev/null +++ b/dotfiles/hypr/conf/windowrule.conf @@ -0,0 +1 @@ +source = ~/dotfiles/hypr/conf/windowrules/custom.conf diff --git a/dotfiles/hypr/conf/windowrules/custom.conf b/dotfiles/hypr/conf/windowrules/custom.conf new file mode 100644 index 0000000..c6d38fb --- /dev/null +++ b/dotfiles/hypr/conf/windowrules/custom.conf @@ -0,0 +1,27 @@ +# ----------------------------------------------------- +# Window rules +# ----------------------------------------------------- + +windowrule = float,^(Rofi)$ + +windowrule = tile,^(Microsoft-edge)$ +windowrule = tile,^(Brave-browser)$ +windowrule = tile,^(Chromium)$ +windowrule = float,^(pavucontrol)$ +windowrule = float,^(blueman-manager)$ +windowrule = float,^(nm-connection-editor)$ +windowrule = float,^(qalculate-gtk)$ +windowrule = float,^(showmethekey-gtk)$ +windowrule = pin,^(showmethekey-gtk)$ +layerrule = blur, gtk-layer-shell +layerrule = blur, logout_dialog + +windowrule = float,title:^(Mathematica)$ +windowrule = opacity 0.8, ^(Code)$ +windowrule = opacity 0.8, ^(code-oss)$ +windowrule = opacity 0.8, ^(code-url-handler)$ +windowrule = float,^(QQ)$ +windowrule = float,^(wechat)$ +windowrule = float,^(fdm)$ +windowrule = float,^(Uget-gtk)$ +windowrule = float,^(xdg-desktop-portal-gtk)$ diff --git a/dotfiles/hypr/conf/windowrules/default.conf b/dotfiles/hypr/conf/windowrules/default.conf new file mode 100644 index 0000000..86b137f --- /dev/null +++ b/dotfiles/hypr/conf/windowrules/default.conf @@ -0,0 +1,11 @@ +# ----------------------------------------------------- +# Window rules +# ----------------------------------------------------- + +windowrule = tile,^(Microsoft-edge)$ +windowrule = tile,^(Brave-browser)$ +windowrule = tile,^(Chromium)$ +windowrule = float,^(pavucontrol)$ +windowrule = float,^(blueman-manager)$ +windowrule = float,^(nm-connection-editor)$ +windowrule = float,^(qalculate-gtk)$ diff --git a/dotfiles/hypr/conf/windows/border-1-reverse.conf b/dotfiles/hypr/conf/windows/border-1-reverse.conf new file mode 100644 index 0000000..671957c --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-1-reverse.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 1 + col.active_border = rgba(ffffffff) + col.inactive_border = $color11 + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-1.conf b/dotfiles/hypr/conf/windows/border-1.conf new file mode 100644 index 0000000..cd09761 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-1.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 1 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-2-reverse.conf b/dotfiles/hypr/conf/windows/border-2-reverse.conf new file mode 100644 index 0000000..4124390 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-2-reverse.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 2 + col.active_border = rgba(ffffffff) + col.inactive_border = $color11 + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-2.conf b/dotfiles/hypr/conf/windows/border-2.conf new file mode 100644 index 0000000..b880c5d --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-2.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 2 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-3-reverse.conf b/dotfiles/hypr/conf/windows/border-3-reverse.conf new file mode 100644 index 0000000..afe2c99 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-3-reverse.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 3 + col.active_border = rgba(ffffffff) + col.inactive_border = $color11 + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-3.conf b/dotfiles/hypr/conf/windows/border-3.conf new file mode 100644 index 0000000..9ac7993 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-3.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 3 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-4-reverse.conf b/dotfiles/hypr/conf/windows/border-4-reverse.conf new file mode 100644 index 0000000..4af6c24 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-4-reverse.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 4 + col.active_border = rgba(ffffffff) + col.inactive_border = $color11 + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/border-4.conf b/dotfiles/hypr/conf/windows/border-4.conf new file mode 100644 index 0000000..dcc1d04 --- /dev/null +++ b/dotfiles/hypr/conf/windows/border-4.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 4 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/default.conf b/dotfiles/hypr/conf/windows/default.conf new file mode 100644 index 0000000..2ae9a3e --- /dev/null +++ b/dotfiles/hypr/conf/windows/default.conf @@ -0,0 +1,22 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "Default" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 2 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} + +group { + col.border_active = $color11 + col.border_inactive = rgba(ffffffff) + groupbar { + col.active = $color11 + col.inactive = $color13 + } +} diff --git a/dotfiles/hypr/conf/windows/no-border-more-gaps.conf b/dotfiles/hypr/conf/windows/no-border-more-gaps.conf new file mode 100644 index 0000000..14df4cd --- /dev/null +++ b/dotfiles/hypr/conf/windows/no-border-more-gaps.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "No Border More Gaps" +# ----------------------------------------------------- + +general { + gaps_in = 20 + gaps_out = 40 + border_size = 0 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/conf/windows/no-border.conf b/dotfiles/hypr/conf/windows/no-border.conf new file mode 100644 index 0000000..1563908 --- /dev/null +++ b/dotfiles/hypr/conf/windows/no-border.conf @@ -0,0 +1,13 @@ +# ----------------------------------------------------- +# General window layout and colors +# name: "No Border" +# ----------------------------------------------------- + +general { + gaps_in = 10 + gaps_out = 14 + border_size = 0 + col.active_border = $color11 + col.inactive_border = rgba(ffffffff) + layout = dwindle +} diff --git a/dotfiles/hypr/hyprland.conf b/dotfiles/hypr/hyprland.conf new file mode 100644 index 0000000..5a51a80 --- /dev/null +++ b/dotfiles/hypr/hyprland.conf @@ -0,0 +1,144 @@ + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# autogenerated = 1 # remove this line to remove the warning + +# ----------------------------------------------------------------------------- +# wal color +# ----------------------------------------------------------------------------- +source = ~/.cache/wal/colors-hyprland.conf + +# ----------------------------------------------------------------------------- +# Monitors +# ----------------------------------------------------------------------------- +source = conf/monitor.conf + +# ----------------------------------------------------------------------------- +# Autostart +# ----------------------------------------------------------------------------- +source = conf/autostart.conf + +# ----------------------------------------------------------------------------- +# Cursor +# ----------------------------------------------------------------------------- +source = conf/cursor.conf + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Set programs that you use +$terminal = kitty +$fileManager = dolphin +$menu = wofi --show drun + +# ----------------------------------------------------------------------------- +# Environment +# ----------------------------------------------------------------------------- +source = conf/environment.conf + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 to 1.0, 0 means no modification. +} + +# ----------------------------------------------------------------------------- +# Window +# ----------------------------------------------------------------------------- +source = conf/window.conf + +# ----------------------------------------------------------------------------- +# Decoration +# ----------------------------------------------------------------------------- +source = conf/decoration.conf + +# ----------------------------------------------------------------------------- +# Animation +# ----------------------------------------------------------------------------- +source = conf/animation.conf + +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 + #new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + +# ----------------------------------------------------------------------------- +# Window Rules +# ----------------------------------------------------------------------------- +source = conf/windowrule.conf + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + +# ----------------------------------------------------------------------------- +# Environment for xdg-desktop-portal-hyprland +# ----------------------------------------------------------------------------- +exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + +# ----------------------------------------------------------------------------- +# Load configurations +# ----------------------------------------------------------------------------- +source = conf/keybinding.conf +source = conf/misc.conf + +# ----------------------------------------------------------------------------- +# Hidpi +# ----------------------------------------------------------------------------- +source = conf/hidpi.conf + +# ----------------------------------------------------------------------------- +# Fcitx5 +# ----------------------------------------------------------------------------- +source = conf/fcitx5.conf + +# ----------------------------------------------------------------------------- +# Custom +# ----------------------------------------------------------------------------- +source = conf/custom.conf diff --git a/dotfiles/hypr/hyprpaper.conf b/dotfiles/hypr/hyprpaper.conf new file mode 100644 index 0000000..fa1912c --- /dev/null +++ b/dotfiles/hypr/hyprpaper.conf @@ -0,0 +1,8 @@ +# Preload Wallpapers +preload = /home/wyj/.cache/used_wallpaper + +# Set Wallpapers +wallpaper = ,/home/wyj/.cache/used_wallpaper + +# Disable Splash +splash = false diff --git a/dotfiles/hypr/pyprland.toml b/dotfiles/hypr/pyprland.toml new file mode 100644 index 0000000..b342481 --- /dev/null +++ b/dotfiles/hypr/pyprland.toml @@ -0,0 +1,12 @@ +[pyprland] + +plugins = [ + "scratchpads", + "magnify", +] + +[scratchpads.term] +animation = "fromTop" +command = "alacritty --class alacritty-dropterm" +class = "alacritty-dropterm" +size = "75% 60%" diff --git a/dotfiles/hypr/scripts/active-monitor.py b/dotfiles/hypr/scripts/active-monitor.py new file mode 100644 index 0000000..9aad2ae --- /dev/null +++ b/dotfiles/hypr/scripts/active-monitor.py @@ -0,0 +1,18 @@ +import sys +import subprocess +import os +import json +import pathlib +import shutil + +# Get script path +pathname = os.path.dirname(sys.argv[0]) +homeFolder = os.path.expanduser('~') # Path to home folder +dotfiles = homeFolder + "/dotfiles/" + +result = subprocess.run(["bash", dotfiles + "hypr/scripts/monitors.sh"], capture_output=True, text=True) +monitors_json = result.stdout.strip() +monitors_arr = json.loads(monitors_json) +for row in monitors_arr: + if row["focused"]: + print(row["id"]) diff --git a/dotfiles/hypr/scripts/cleanup.sh b/dotfiles/hypr/scripts/cleanup.sh new file mode 100755 index 0000000..51589da --- /dev/null +++ b/dotfiles/hypr/scripts/cleanup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Remove gamemode flag +if [ -f ~/.cache/gamemode ] ;then + rm ~/.cache/gamemode + echo ":: ~/.cache/gamemode removed" +fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/diagnosis.sh b/dotfiles/hypr/scripts/diagnosis.sh new file mode 100755 index 0000000..a91a668 --- /dev/null +++ b/dotfiles/hypr/scripts/diagnosis.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# ____ _ _ +# | _ \(_) __ _ __ _ _ __ ___ ___(_)___ +# | | | | |/ _` |/ _` | '_ \ / _ \/ __| / __| +# | |_| | | (_| | (_| | | | | (_) \__ \ \__ \ +# |____/|_|\__,_|\__, |_| |_|\___/|___/_|___/ +# |___/ +# + +clear +sleep 0.5 +figlet "Diagnosis" +echo +echo "This script will check that essential packages and " +echo "execution commands are available on your system." +echo + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists." + else + echo ":: OK: $folder found." + fi +} + +_commandExists "rofi" "rofi-wayland" +_commandExists "dunst" "dunst" +_commandExists "waybar" "waybar" +_commandExists "hyprpaper" "hyprpaper" +_commandExists "hyprlock" "hyprpaper" +_commandExists "hypridle" "hyprpaper" +_commandExists "wal" "python-pywal" +_commandExists "gum" "gum" +_commandExists "wlogout" "wlogout" +_commandExists "swww" "swww" +_commandExists "eww" "eww" +_commandExists "magick" "imagemagick" +_commandExists "figlet" "figlet" + +echo +echo "Press return to exit" +read \ No newline at end of file diff --git a/dotfiles/hypr/scripts/disabledm.sh b/dotfiles/hypr/scripts/disabledm.sh new file mode 100755 index 0000000..02b6718 --- /dev/null +++ b/dotfiles/hypr/scripts/disabledm.sh @@ -0,0 +1,32 @@ +#!/bin/bash +clear +cat <<"EOF" + ____ _ _ _ ____ __ __ +| _ \(_)___ __ _| |__ | | ___| _ \| \/ | +| | | | / __|/ _` | '_ \| |/ _ \ | | | |\/| | +| |_| | \__ \ (_| | |_) | | __/ |_| | | | | +|____/|_|___/\__,_|_.__/|_|\___|____/|_| |_| + +EOF + +echo "Hyprland recommends the start with the tty login." +echo "You can deactivate the current display manager (if exists)." +echo "" +echo "-> Do you really want to deactivate the display manager?" +while true; do + read -p "Do you want to enable the sddm display manager and setup theme? (Yy/Nn): " yn + case $yn in + [Yy]* ) + if [ -f /etc/systemd/system/display-manager.service ]; then + sudo rm /etc/systemd/system/display-manager.service + echo "Current display manager removed." + else + echo "No active display manager found." + fi + break;; + [Nn]* ) + exit + break;; + * ) echo "Please answer yes or no.";; + esac +done \ No newline at end of file diff --git a/dotfiles/hypr/scripts/eww.sh b/dotfiles/hypr/scripts/eww.sh new file mode 100755 index 0000000..7df4512 --- /dev/null +++ b/dotfiles/hypr/scripts/eww.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# _____ ____ __ +# / _ \ \ /\ / /\ \ /\ / / +# | __/\ V V / \ V V / +# \___| \_/\_/ \_/\_/ +# +EWW=`which eww` +if [[ ! `pidof eww` ]]; then + ${EWW} daemon + sleep 0.5 +fi diff --git a/dotfiles/hypr/scripts/exit.sh b/dotfiles/hypr/scripts/exit.sh new file mode 100755 index 0000000..c3e8a7a --- /dev/null +++ b/dotfiles/hypr/scripts/exit.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.5 +killall -9 Hyprland sleep 2 \ No newline at end of file diff --git a/dotfiles/hypr/scripts/gamemode.sh b/dotfiles/hypr/scripts/gamemode.sh new file mode 100755 index 0000000..815a780 --- /dev/null +++ b/dotfiles/hypr/scripts/gamemode.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# ____ _ +# / ___| __ _ _ __ ___ ___ _ __ ___ ___ __| | ___ +# | | _ / _` | '_ ` _ \ / _ \ '_ ` _ \ / _ \ / _` |/ _ \ +# | |_| | (_| | | | | | | __/ | | | | | (_) | (_| | __/ +# \____|\__,_|_| |_| |_|\___|_| |_| |_|\___/ \__,_|\___| +# + +if [ -f ~/.cache/gamemode ] ;then + hyprctl reload + rm ~/.cache/gamemode + notify-send "Gamemode deactivated" "Animations and blur enabled" +else + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:drop_shadow 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0" + touch ~/.cache/gamemode + notify-send "Gamemode activated" "Animations and blur disabled" +fi diff --git a/dotfiles/hypr/scripts/gtk.sh b/dotfiles/hypr/scripts/gtk.sh new file mode 100755 index 0000000..4e56ba7 --- /dev/null +++ b/dotfiles/hypr/scripts/gtk.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# ____ _____ _ __ +# / ___|_ _| |/ / +# | | _ | | | ' / +# | |_| | | | | . \ +# \____| |_| |_|\_\ +# +# Source: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland + +config="$HOME/.config/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_size="$(grep 'gtk-cursor-theme-size' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" + +echo $gtk_theme +echo $icon_theme +echo $cursor_theme +echo $cursor_size +echo $font_name + +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" +gsettings set "$gnome_schema" color-scheme "prefer-dark" + +# if [ -f ~/dotfiles/hypr/conf/cursor.conf ] ;then +# echo "exec-once = hyprctl setcursor $cursor_theme $cursor_size" > ~/dotfiles/hypr/conf/cursor.conf +# hyprctl setcursor $cursor_theme $cursor_size +# fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/hypridle.sh b/dotfiles/hypr/scripts/hypridle.sh new file mode 100755 index 0000000..e710b41 --- /dev/null +++ b/dotfiles/hypr/scripts/hypridle.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# _ _ _ _ _ +# | | | |_ _ _ __ _ __(_) __| | | ___ +# | |_| | | | | '_ \| '__| |/ _` | |/ _ \ +# | _ | |_| | |_) | | | | (_| | | __/ +# |_| |_|\__, | .__/|_| |_|\__,_|_|\___| +# |___/|_| +# + +SERVICE="hypridle" +if [[ "$1" == "status" ]]; then + sleep 1 + if pgrep -x "$SERVICE" >/dev/null ;then + echo '{"text": "RUNNING", "class": "active", "tooltip": "Screen locking active"}' + else + echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "Screen locking deactivated"}' + fi +fi +if [[ "$1" == "toggle" ]]; then + if pgrep -x "$SERVICE" >/dev/null ;then + killall hypridle + else + hypridle + fi +fi diff --git a/dotfiles/hypr/scripts/hyprshade.sh b/dotfiles/hypr/scripts/hyprshade.sh new file mode 100755 index 0000000..ccb9b7f --- /dev/null +++ b/dotfiles/hypr/scripts/hyprshade.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# _ _ _ _ +# | | | |_ _ _ __ _ __ ___| |__ __ _ __| | ___ +# | |_| | | | | '_ \| '__/ __| '_ \ / _` |/ _` |/ _ \ +# | _ | |_| | |_) | | \__ \ | | | (_| | (_| | __/ +# |_| |_|\__, | .__/|_| |___/_| |_|\__,_|\__,_|\___| +# |___/|_| +# + +if [[ "$1" == "rofi" ]]; then + + # Open rofi to select the Hyprshade filter for toggle + options="$(hyprshade ls)\noff" + + # Open rofi + choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-hyprshade.rasi -i -no-show-icons -l 4 -width 30 -p "Hyprshade") + if [ ! -z $choice ] ;then + echo "hyprshade_filter=\"$choice\"" > ~/dotfiles/.settings/hyprshade.sh + dunstify "Changing Hyprshade to $choice" "Toggle shader with SUPER+SHIFT+S" + fi + +else + + # Toggle Hyprshade based on the selected filter + hyprshade_filter="blue-light-filter" + + # Check if hyprshade.sh settings file exists and load + if [ -f ~/dotfiles/.settings/hyprshade.sh ] ;then + source ~/dotfiles/.settings/hyprshade.sh + fi + + # Toggle Hyprshade + if [ "$hyprshade_filter" != "off" ] ;then + if [ -z $(hyprshade current) ] ;then + echo ":: hyprshade is not running" + hyprshade on $hyprshade_filter + notify-send "Hyprshade activated" "with $(hyprshade current)" + echo ":: hyprshade started with $(hyprshade current)" + else + notify-send "Hyprshade deactivated" + echo ":: Current hyprshade $(hyprshade current)" + echo ":: Switching hyprshade off" + hyprshade off + fi + else + if [ -z $(hyprshade current) ] ;then + hyprshade off + fi + echo ":: hyprshade turned off" + fi + +fi diff --git a/dotfiles/hypr/scripts/init-wallpaper-engine.sh b/dotfiles/hypr/scripts/init-wallpaper-engine.sh new file mode 100755 index 0000000..afedd12 --- /dev/null +++ b/dotfiles/hypr/scripts/init-wallpaper-engine.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# __ ______ _____ _ +# \ \ / / _ \ | ____|_ __ __ _(_)_ __ ___ +# \ \ /\ / /| |_) | | _| | '_ \ / _` | | '_ \ / _ \ +# \ V V / | __/ | |___| | | | (_| | | | | | __/ +# \_/\_/ |_| |_____|_| |_|\__, |_|_| |_|\___| +# |___/ +# + +wallpaper_engine=$(cat $HOME/dotfiles/.settings/wallpaper-engine.sh) +if [ "$wallpaper_engine" == "swww" ] ;then + # swww + echo ":: Using swww" + swww init + swww-daemon --format xrgb + sleep 0.5 + ~/dotfiles/hypr/scripts/wallpaper.sh init +elif [ "$wallpaper_engine" == "hyprpaper" ] ;then + # hyprpaper + echo ":: Using hyprpaper" + sleep 0.5 + ~/dotfiles/hypr/scripts/wallpaper.sh init +else + echo ":: Wallpaper Engine disabled" + ~/dotfiles/hypr/scripts/wallpaper.sh init +fi + diff --git a/dotfiles/hypr/scripts/keybindings.sh b/dotfiles/hypr/scripts/keybindings.sh new file mode 100755 index 0000000..d4edd07 --- /dev/null +++ b/dotfiles/hypr/scripts/keybindings.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# _ _ _ _ _ +# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___ +# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __| +# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \ +# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/ +# |___/ |___/ +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# ----------------------------------------------------- +# Get keybindings location based on variation +# ----------------------------------------------------- +config_file=$(cat ~/dotfiles/hypr/conf/keybinding.conf) +config_file=${config_file/source = ~/} +config_file=${config_file/source=~/} + +# ----------------------------------------------------- +# Path to keybindings config file +# ----------------------------------------------------- +config_file="/home/$USER$config_file" +echo "Reading from: $config_file" + +keybinds="" + +# Detect Start String +while read -r line +do + if [[ "$line" == "bind"* ]]; then + + line="$(echo "$line" | sed 's/$mainMod/SUPER/g')" + line="$(echo "$line" | sed 's/bind = //g')" + line="$(echo "$line" | sed 's/bindm = //g')" + + IFS='#' + read -a strarr <<<"$line" + kb_str=${strarr[0]} + cm_str=${strarr[1]} + + IFS=',' + read -a kbarr <<<"$kb_str" + + item="${kbarr[0]} + ${kbarr[1]}"$'\r'"${cm_str:1}" + keybinds=$keybinds$item$'\n' + fi +done < "$config_file" + +sleep 0.2 +rofi -dmenu -i -markup -eh 2 -replace -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds" \ No newline at end of file diff --git a/dotfiles/hypr/scripts/loadconfig.sh b/dotfiles/hypr/scripts/loadconfig.sh new file mode 100755 index 0000000..a51ce6d --- /dev/null +++ b/dotfiles/hypr/scripts/loadconfig.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hyprctl reload \ No newline at end of file diff --git a/dotfiles/hypr/scripts/lock.sh b/dotfiles/hypr/scripts/lock.sh new file mode 100755 index 0000000..bc13b07 --- /dev/null +++ b/dotfiles/hypr/scripts/lock.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.5 +hyprlock \ No newline at end of file diff --git a/dotfiles/hypr/scripts/ml4w-launcher.sh b/dotfiles/hypr/scripts/ml4w-launcher.sh new file mode 100755 index 0000000..4ae1a57 --- /dev/null +++ b/dotfiles/hypr/scripts/ml4w-launcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# __ __ _ _ ___ __ _ _ +# | \/ | | | || \ \ / / | | __ _ _ _ _ __ ___| |__ ___ _ __ +# | |\/| | | | || |\ \ /\ / / | | / _` | | | | '_ \ / __| '_ \ / _ \ '__| +# | | | | |__|__ _\ V V / | |__| (_| | |_| | | | | (__| | | | __/ | +# |_| |_|_____| |_| \_/\_/ |_____\__,_|\__,_|_| |_|\___|_| |_|\___|_| +# + +option1="ML4W Dotfiles Settings" +option2="Hyprland Settings" +option3="Change Wallpaper" +option4="Change Waybar Theme" +option5="ML4W Welcome App" + +options="$option1\n" +options="$options$option2\n" +options="$options$option3\n" +options="$options$option4\n$option5" + +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-ml4w-launcher.rasi -l 5) + +case $choice in + $option1) + $HOME/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage ;; + $option2) + $HOME/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage ;; + $option3) + $HOME/dotfiles/hypr/scripts/wallpaper.sh select ;; + $option4) + $HOME/dotfiles/waybar/themeswitcher.sh ;; + $option5) + $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage ;; +esac \ No newline at end of file diff --git a/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh b/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh new file mode 100755 index 0000000..4856cee --- /dev/null +++ b/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh @@ -0,0 +1,14 @@ +#!/bin/bash +if [ ! -f $HOME/.cache/ml4w-welcome-autostart ] ;then + echo ":: Autostart of ML4W Welcome App enabled." + if [ -f $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage ] ;then + echo ":: Starting ML4W Welcome App ..." + sleep 2 + $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage + else + echo ":: ML4W Welcome App not found." + fi + +else + echo ":: Autostart of ML4W Welcome App disabled." +fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/monitors.sh b/dotfiles/hypr/scripts/monitors.sh new file mode 100755 index 0000000..14ea2ea --- /dev/null +++ b/dotfiles/hypr/scripts/monitors.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hyprctl -j monitors \ No newline at end of file diff --git a/dotfiles/hypr/scripts/power.sh b/dotfiles/hypr/scripts/power.sh new file mode 100755 index 0000000..7b9e6e4 --- /dev/null +++ b/dotfiles/hypr/scripts/power.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# ____ +# | _ \ _____ _____ _ __ +# | |_) / _ \ \ /\ / / _ \ '__| +# | __/ (_) \ V V / __/ | +# |_| \___/ \_/\_/ \___|_| +# + +if [[ "$1" == "exit" ]]; then + echo ":: Exit" + sleep 0.5 + killall -9 Hyprland sleep 2 +fi + +if [[ "$1" == "lock" ]]; then + echo ":: Lock" + sleep 0.5 + hyprlock +fi + +if [[ "$1" == "reboot" ]]; then + echo ":: Reboot" + sleep 0.5 + systemctl reboot +fi + +if [[ "$1" == "shutdown" ]]; then + echo ":: Shutdown" + sleep 0.5 + systemctl poweroff +fi + +if [[ "$1" == "suspend" ]]; then + echo ":: Suspend" + sleep 0.5 + systemctl suspend +fi + +if [[ "$1" == "hibernate" ]]; then + echo ":: Hibernate" + sleep 1; + systemctl hibernate +fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/reboot.sh b/dotfiles/hypr/scripts/reboot.sh new file mode 100755 index 0000000..2ddff75 --- /dev/null +++ b/dotfiles/hypr/scripts/reboot.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.5 +systemctl reboot diff --git a/dotfiles/hypr/scripts/restart-hypridle.sh b/dotfiles/hypr/scripts/restart-hypridle.sh new file mode 100755 index 0000000..fe29461 --- /dev/null +++ b/dotfiles/hypr/scripts/restart-hypridle.sh @@ -0,0 +1,5 @@ +#!/bin/bash +killall hypridle +sleep 1 +hypridle & +notify-send "hypridle has been restarted." \ No newline at end of file diff --git a/dotfiles/hypr/scripts/screenshot.sh b/dotfiles/hypr/scripts/screenshot.sh new file mode 100755 index 0000000..fb7ec04 --- /dev/null +++ b/dotfiles/hypr/scripts/screenshot.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# ____ _ _ +# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_ +# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __| +# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_ +# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +DIR="$HOME/Pictures/screenshots/" +NAME="screenshot_$(date +%d%m%Y_%H%M%S).png" + +option2="Selected area" +option3="Fullscreen (delay 3 sec)" +option4="Current display (delay 3 sec)" + +options="$option2\n$option3\n$option4" + +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 3 -width 30 -p "Take Screenshot") + +case $choice in + $option2) + grim -g "$(slurp)" "$DIR$NAME" + xclip -selection clipboard -t image/png -i "$DIR$NAME" + notify-send "Screenshot created and copied to clipboard" "Mode: Selected area" + swappy -f "$DIR$NAME" + ;; + $option3) + sleep 3 + grim "$DIR$NAME" + xclip -selection clipboard -t image/png -i "$DIR$NAME" + notify-send "Screenshot created and copied to clipboard" "Mode: Fullscreen" + swappy -f "$DIR$NAME" + ;; + $option4) + sleep 3 + monitor="$(hyprctl monitors | awk '/Monitor/{monitor=$2} /focused: yes/{print monitor; exit}')" + grim -o "$monitor" "$DIR$NAME" + xclip -selection clipboard -t image/png -i "$DIR$NAME" + notify-send "Screenshot created and copied to clipboard" "Mode: Fullscreen" + swappy -f "$DIR$NAME" + ;; +esac diff --git a/dotfiles/hypr/scripts/shutdown.sh b/dotfiles/hypr/scripts/shutdown.sh new file mode 100755 index 0000000..48c8296 --- /dev/null +++ b/dotfiles/hypr/scripts/shutdown.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.5 +systemctl poweroff diff --git a/dotfiles/hypr/scripts/suspend.sh b/dotfiles/hypr/scripts/suspend.sh new file mode 100755 index 0000000..440d34b --- /dev/null +++ b/dotfiles/hypr/scripts/suspend.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.5 +systemctl suspend \ No newline at end of file diff --git a/dotfiles/hypr/scripts/toggle-animations.sh b/dotfiles/hypr/scripts/toggle-animations.sh new file mode 100755 index 0000000..867ecf4 --- /dev/null +++ b/dotfiles/hypr/scripts/toggle-animations.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cache_file="$HOME/.cache/toggle_animation" +if [[ $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then + echo ":: Toggle blocked by disabled.conf variation." +else + if [ -f $cache_file ] ;then + hyprctl keyword animations:enabled true + rm $cache_file + else + hyprctl keyword animations:enabled false + touch $cache_file + fi +fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/toggleallfloat.sh b/dotfiles/hypr/scripts/toggleallfloat.sh new file mode 100755 index 0000000..fb6737c --- /dev/null +++ b/dotfiles/hypr/scripts/toggleallfloat.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# _ _ _ __ _ _ +# / \ | | |/ _| | ___ __ _| |_ +# / _ \ | | | |_| |/ _ \ / _` | __| +# / ___ \| | | _| | (_) | (_| | |_ +# /_/ \_\_|_|_| |_|\___/ \__,_|\__| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +hyprctl dispatch workspaceopt allfloat diff --git a/dotfiles/hypr/scripts/wallpaper-effects.sh b/dotfiles/hypr/scripts/wallpaper-effects.sh new file mode 100755 index 0000000..fb1d020 --- /dev/null +++ b/dotfiles/hypr/scripts/wallpaper-effects.sh @@ -0,0 +1,12 @@ + #!/bin/bash + + # Open rofi to select the Hyprshade filter for toggle + options="$(ls ~/dotfiles/hypr/effects/wallpaper/)\noff" + + # Open rofi + choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-themes.rasi -i -no-show-icons -l 5 -width 30 -p "Hyprshade") + if [ ! -z $choice ] ;then + echo "$choice" > ~/dotfiles/.settings/wallpaper-effect.sh + dunstify "Changing Wallpaper Effect to " "$choice" + ~/dotfiles/hypr/scripts/wallpaper.sh init + fi \ No newline at end of file diff --git a/dotfiles/hypr/scripts/wallpaper.sh b/dotfiles/hypr/scripts/wallpaper.sh new file mode 100755 index 0000000..bdfa2bf --- /dev/null +++ b/dotfiles/hypr/scripts/wallpaper.sh @@ -0,0 +1,185 @@ +#!/bin/bash +# _ _ +# __ ____ _| | |_ __ __ _ _ __ ___ _ __ +# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__| +# \ V V / (_| | | | |_) | (_| | |_) | __/ | +# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| +# |_| |_| +# +# by Stephan Raabe (2024) +# ----------------------------------------------------- + +# Cache file for holding the current wallpaper +wallpaper_folder="$HOME/wallpaper" +if [ -f ~/dotfiles/.settings/wallpaper-folder.sh ] ;then + source ~/dotfiles/.settings/wallpaper-folder.sh +fi +used_wallpaper="$HOME/.cache/used_wallpaper" +cache_file="$HOME/.cache/current_wallpaper" +blurred="$HOME/.cache/blurred_wallpaper.png" +square="$HOME/.cache/square_wallpaper.png" +rasi_file="$HOME/.cache/current_wallpaper.rasi" +blur_file="$HOME/dotfiles/.settings/blur.sh" + +blur="50x30" +blur=$(cat $blur_file) + +# Create cache file if not exists +if [ ! -f $cache_file ] ;then + touch $cache_file + echo "$wallpaper_folder/default.jpg" > "$cache_file" +fi + +# Create rasi file if not exists +if [ ! -f $rasi_file ] ;then + touch $rasi_file + echo "* { current-image: url(\"$wallpaper_folder/default.jpg\", height); }" > "$rasi_file" +fi + +current_wallpaper=$(cat "$cache_file") + +case $1 in + + # Load wallpaper from .cache of last session + "init") + sleep 1 + if [ -f $cache_file ]; then + wal -q -i $current_wallpaper + else + wal -q -i $wallpaper_folder/ + fi + ;; + + # Select wallpaper with rofi + "select") + sleep 0.2 + selected=$( find "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile + do + echo -en "$rfile\x00icon\x1f$wallpaper_folder/${rfile}\n" + done | rofi -dmenu -i -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) + if [ ! "$selected" ]; then + echo "No wallpaper selected" + exit + fi + wal -q -i $wallpaper_folder/$selected + ;; + + # Randomly select wallpaper + *) + wal -q -i $wallpaper_folder/ + ;; + +esac + +# ----------------------------------------------------- +# Load current pywal color scheme +# ----------------------------------------------------- +source "$HOME/.cache/wal/colors.sh" + +# ----------------------------------------------------- +# get wallpaper image name +# ----------------------------------------------------- +newwall=$(echo $wallpaper | sed "s|$wallpaper_folder/||g") + +# ----------------------------------------------------- +# Reload waybar with new colors +# ----------------------------------------------------- +~/dotfiles/waybar/launch.sh + +# ----------------------------------------------------- +# Set the new wallpaper +# ----------------------------------------------------- +transition_type="wipe" +# transition_type="outer" +# transition_type="random" + +cp $wallpaper $HOME/.cache/ +mv $HOME/.cache/$newwall $used_wallpaper + +# Load Wallpaper Effect +if [ -f $HOME/dotfiles/.settings/wallpaper-effect.sh ] ;then + effect=$(cat $HOME/dotfiles/.settings/wallpaper-effect.sh) + if [ ! "$effect" == "off" ] ;then + if [ "$1" == "init" ] ;then + echo ":: Init" + else + dunstify "Using wallpaper effect $effect..." "with image $newwall" -h int:value:10 -h string:x-dunst-stack-tag:wallpaper + fi + source $HOME/dotfiles/hypr/effects/wallpaper/$effect + fi +fi + +wallpaper_engine=$(cat $HOME/dotfiles/.settings/wallpaper-engine.sh) +if [ "$wallpaper_engine" == "swww" ] ;then + # swww + echo ":: Using swww" + swww img $used_wallpaper \ + --transition-bezier .43,1.19,1,.4 \ + --transition-fps=60 \ + --transition-type=$transition_type \ + --transition-duration=0.7 \ + --transition-pos "$( hyprctl cursorpos )" +elif [ "$wallpaper_engine" == "hyprpaper" ] ;then + # hyprpaper + echo ":: Using hyprpaper" + killall hyprpaper + wal_tpl=$(cat $HOME/dotfiles/.settings/hyprpaper.tpl) + output=${wal_tpl//WALLPAPER/$used_wallpaper} + echo "$output" > $HOME/dotfiles/hypr/hyprpaper.conf + hyprpaper & +else + echo ":: Wallpaper Engine disabled" +fi + +if [ "$1" == "init" ] ;then + echo ":: Init" +else + sleep 1 + dunstify "Changing wallpaper ..." "with image $newwall" -h int:value:25 -h string:x-dunst-stack-tag:wallpaper + +fi + +# ----------------------------------------------------- +# Created blurred wallpaper +# ----------------------------------------------------- +if [ "$1" == "init" ] ;then + echo ":: Init" +else + dunstify "Creating blurred version ..." "with image $newwall" -h int:value:50 -h string:x-dunst-stack-tag:wallpaper +fi + +magick $used_wallpaper -resize 75% $blurred +echo ":: Resized to 75%" +if [ ! "$blur" == "0x0" ] ;then + magick $blurred -blur $blur $blurred + echo ":: Blurred" +fi + +# ----------------------------------------------------- +# Created quare wallpaper +# ----------------------------------------------------- +if [ "$1" == "init" ] ;then + echo ":: Init" +else + dunstify "Creating square version ..." "with image $newwall" -h int:value:75 -h string:x-dunst-stack-tag:wallpaper +fi +magick $wallpaper -gravity Center -extent 1:1 $square +echo ":: Square version created" + +# ----------------------------------------------------- +# Write selected wallpaper into .cache files +# ----------------------------------------------------- +echo "$wallpaper" > "$cache_file" +echo "* { current-image: url(\"$blurred\", height); }" > "$rasi_file" + +# ----------------------------------------------------- +# Send notification +# ----------------------------------------------------- + +if [ "$1" == "init" ] ;then + echo ":: Init" +else + dunstify "Wallpaper procedure complete!" "with image $newwall" -h int:value:100 -h string:x-dunst-stack-tag:wallpaper +fi + +echo "DONE!" diff --git a/dotfiles/hypr/scripts/xdg.sh b/dotfiles/hypr/scripts/xdg.sh new file mode 100755 index 0000000..b125cb2 --- /dev/null +++ b/dotfiles/hypr/scripts/xdg.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# __ ______ ____ +# \ \/ / _ \ / ___| +# \ /| | | | | _ +# / \| |_| | |_| | +# /_/\_\____/ \____| +# +# ----------------------------------------------------- +sleep 1 + +# kill all possible running xdg-desktop-portals +killall -e xdg-desktop-portal-hyprland +killall -e xdg-desktop-portal-gnome +killall -e xdg-desktop-portal-kde +killall -e xdg-desktop-portal-lxqt +killall -e xdg-desktop-portal-wlr +killall -e xdg-desktop-portal-gtk +killall xdg-desktop-portal +sleep 1 + +# start xdg-desktop-portal-hyprland +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 + +# start xdg-desktop-portal +/usr/libexec/xdg-desktop-portal & +sleep 1 diff --git a/dotfiles/kitty/kitty.conf b/dotfiles/kitty/kitty.conf new file mode 100644 index 0000000..f39c1d0 --- /dev/null +++ b/dotfiles/kitty/kitty.conf @@ -0,0 +1,24 @@ +font_family Fira Code Nerd Font +font_size 16.0 +bold_font auto +italic_font auto +bold_italic_font auto + +background_opacity 0.7 + +confirm_os_window_close 0 + +include ~/.cache/wal/colors-kitty.conf + +detect_urls yes +copy_on_select clipboard +strip_trailing_spaces smart +rectangle_select_modifiers ctrl+alt +terminal_select_modifiers shift + +enable_audio_bell no + +remember_window_size no +window_padding_width 5 + +map ctrl+super+enter launch --cwd=current diff --git a/dotfiles/login/issue b/dotfiles/login/issue new file mode 100644 index 0000000..d3f99f3 --- /dev/null +++ b/dotfiles/login/issue @@ -0,0 +1,11 @@ + _ _ + | | ___ __ _(_)_ __ + | | / _ \\ / _' | | '_ \\ + | |__| (_) | (_| | | | | | + |_____\\___/ \\__, |_|_| |_| + |___/ + +Today is \d \t @ \n +-------------------------------------------------------------- +\r (\l) + diff --git a/dotfiles/nvim/init.vim b/dotfiles/nvim/init.vim new file mode 100644 index 0000000..79c22b5 --- /dev/null +++ b/dotfiles/nvim/init.vim @@ -0,0 +1,33 @@ +" _ _ _ +" | \ | | ___ _____ _(_)_ __ ___ +" | \| |/ _ \/ _ \ \ / / | '_ ` _ \ +" | |\ | __/ (_) \ V /| | | | | | | +" |_| \_|\___|\___/ \_/ |_|_| |_| |_| +" +" by Stephan Raabe (2023) +" ----------------------------------------------------- + +set nocompatible " disable compatibility to old-time vi +set showmatch " show matching +set ignorecase " case insensitive +set mouse=v " middle-click paste with +set hlsearch " highlight search +set incsearch " incremental search +set tabstop=4 " number of columns occupied by a tab +set softtabstop=4 " see multiple spaces as tabstops so does the right thing +set expandtab " converts tabs to white space +set shiftwidth=4 " width for autoindents +set autoindent " indent a new line the same amount as the line just typed +set number " add line numbers +set wildmode=longest,list " get bash-like tab completions +" set cc=80 " set an 80 column border for good coding style +filetype plugin indent on "allow auto-indenting depending on file type +syntax on " syntax highlighting +set mouse=a " enable mouse click +set clipboard=unnamedplus " using system clipboard +filetype plugin on +" set cursorline " highlight current cursorline +set ttyfast " Speed up scrolling in Vim +" set spell " enable spell check (may need to download language package) +" set noswapfile " disable creating swap file +" set backupdir=~/.cache/vim " Directory to store backup files. diff --git a/dotfiles/picom/picom.conf b/dotfiles/picom/picom.conf new file mode 100644 index 0000000..7970c7d --- /dev/null +++ b/dotfiles/picom/picom.conf @@ -0,0 +1,333 @@ +# ____ _ +# | _ \(_) ___ ___ _ __ ___ +# | |_) | |/ __/ _ \| '_ ` _ \ +# | __/| | (_| (_) | | | | | | +# |_| |_|\___\___/|_| |_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +################################# +# General Settings # +################################# + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. `xrender` is the default one. +backend = "glx" + +# Enable/disable VSync. +vsync = true; + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +detect-rounded-corners = true; + +# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. +detect-client-opacity = true; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. This usually means windows from the same application +# will be considered focused or unfocused at the same time. +# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. +detect-client-leader = false + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = false; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +transparent-clipping = false + +log-level = "warn"; + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls wether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 1.0; shadow = false; } + dropdown_menu = { opacity = 0.8; shadow = false; } +}; + + +################################# +# Shadows # +################################# + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +shadow = false; + +# The blur radius for shadows, in pixels. (defaults to 12) +shadow-radius = 12; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +shadow-offset-x = -15; + +# The top offset for shadows, in pixels. (defaults to -15) +shadow-offset-y = -15; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +shadow-blue = 0 + +# Specify a list of conditions of windows that should have no shadow. +shadow-exclude = [ +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +fade-in-step = 0.04; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +fade-out-step = 0.04; + + +################################# +# Transparency / Opacity # +################################# + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +inactive-opacity = 0.95; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +frame-opacity = 0.9; + +# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +inactive-dim = 0.0 + +# Specify a list of conditions of windows that should never be considered focused. +focus-exclude = []; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +opacity-rule = [ + "90:class_g = 'Alacritty' && focused", + "70:class_g = 'Alacritty' && !focused", + "70:class_g = 'Rofi'" +] + + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with `transparent-clipping`. +corner-radius = 15 + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + # "class_g = 'Dunst'", + # "class_g = 'Rofi'", + "QTILE_INTERNAL:32c = 1" +]; + + +################################# +# Background-Blurring # +################################# + +# Parameters for background blurring, see the *BLUR* section for more information. +blur-method = "dual_kawase" +blur-size = 12 + +# blur-deviation = false + +blur-strength = 4 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = "" +# blur-kern = "3x3box"; + +# # Exclude conditions for background blur. +# # blur-background-exclude = [] +# blur-background-exclude = [ +# "window_type = 'dock'", +# "window_type = 'desktop'", +# "_GTK_FRAME_EXTENTS@:c" +# ]; diff --git a/dotfiles/qtile/.xinitrc b/dotfiles/qtile/.xinitrc new file mode 100644 index 0000000..ea26936 --- /dev/null +++ b/dotfiles/qtile/.xinitrc @@ -0,0 +1,7 @@ +#!/bin/bash + +# ------------------------------- +# Start Qtile +# ------------------------------- + +exec qtile start diff --git a/dotfiles/qtile/autostart.sh b/dotfiles/qtile/autostart.sh new file mode 100755 index 0000000..e658cc5 --- /dev/null +++ b/dotfiles/qtile/autostart.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# ___ _____ ___ _ _____ ____ _ _ +# / _ \_ _|_ _| | | ____| / ___|| |_ __ _ _ __| |_ +# | | | || | | || | | _| \___ \| __/ _` | '__| __| +# | |_| || | | || |___| |___ ___) | || (_| | | | |_ +# \__\_\|_| |___|_____|_____| |____/ \__\__,_|_| \__| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# My screen resolution +# xrandr --rate 120 + +# For Virtual Machine +# xrandr --output Virtual-1 --mode 1920x1080 + +# Keyboard layout +setxkbmap us + +# Load picom +# picom & + +# Load power manager +xfce4-power-manager & + +# Load notification service +dunst & + +# Setup Wallpaper and update colors +~/dotfiles/qtile/scripts/wallpaper.sh init diff --git a/dotfiles/qtile/config.py b/dotfiles/qtile/config.py new file mode 100644 index 0000000..23d4ad5 --- /dev/null +++ b/dotfiles/qtile/config.py @@ -0,0 +1,456 @@ +# ___ _____ ___ _ _____ ____ __ _ +# / _ \_ _|_ _| | | ____| / ___|___ _ __ / _(_) __ _ +# | | | || | | || | | _| | | / _ \| '_ \| |_| |/ _` | +# | |_| || | | || |___| |___ | |__| (_) | | | | _| | (_| | +# \__\_\|_| |___|_____|_____| \____\___/|_| |_|_| |_|\__, | +# |___/ + +# Icons: https://fontawesome.com/search?o=r&m=free + +import os +import re +import socket +import subprocess +import psutil +import json +from libqtile import hook +from libqtile import qtile +from typing import List +from libqtile import bar, layout, widget +from libqtile.config import Click, Drag, Group, Key, Match, Screen, ScratchPad, DropDown, KeyChord +from libqtile.lazy import lazy +from libqtile.utils import guess_terminal +from libqtile.widget import Spacer, Backlight +from libqtile.widget.image import Image +from libqtile.dgroups import simple_key_binder +from pathlib import Path +from libqtile.log_utils import logger + +from qtile_extras import widget +from qtile_extras.widget.decorations import RectDecoration +from qtile_extras.widget.decorations import PowerLineDecoration + +# -------------------------------------------------------- +# Your configuration +# -------------------------------------------------------- + +# Keyboard layout in autostart.sh + +# Show wlan status bar widget (set to False if wired network) +# show_wlan = True +show_wlan = False + +# Show bluetooth status bar widget +# show_bluetooth = True +show_bluetooth = False + +# -------------------------------------------------------- +# General Variables +# -------------------------------------------------------- + +# Get home path +home = str(Path.home()) + +# -------------------------------------------------------- +# Check for Desktop/Laptop +# -------------------------------------------------------- + +# 3 = Desktop +platform = int(os.popen("cat /sys/class/dmi/id/chassis_type").read()) + +# -------------------------------------------------------- +# Set default apps +# -------------------------------------------------------- + +terminal = "alacritty" + +# -------------------------------------------------------- +# Keybindings +# -------------------------------------------------------- + +mod = "mod4" # SUPER KEY + +keys = [ + + # Focus + Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), + Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), + Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), + Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), + Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window around"), + + # Move + Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window to the left"), + Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window to the right"), + Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down"), + Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up"), + + # Swap + Key([mod, "shift"], "h", lazy.layout.swap_left()), + Key([mod, "shift"], "l", lazy.layout.swap_right()), + + Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/screenshot.sh")), + + # Size + Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"), + Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"), + Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), + + # Floating + Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'), + + # Split + Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), + + # Toggle Layouts + Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), + + # Fullscreen + Key([mod], "f", lazy.window.toggle_fullscreen()), + + #System + Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), + Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"), + Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"), + + # Apps + Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), + Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"), + Key([mod], "b", lazy.spawn("sh " + home + "/dotfiles/.settings/browser.sh"), desc="Launch Browser"), + Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wallpaper.sh"), desc="Update Theme and Wallpaper"), + Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wallpaper.sh select"), desc="Select Theme and Wallpaper"), + + Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")), + Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-")) +] + +# -------------------------------------------------------- +# Groups +# -------------------------------------------------------- + +groups = [ + Group("1", layout='monadtall'), + Group("2", layout='monadtall'), + Group("3", layout='monadtall'), + Group("4", layout='monadtall'), + Group("5", layout='monadtall'), +] + +dgroups_key_binder = simple_key_binder(mod) + +# -------------------------------------------------------- +# Scratchpads +# -------------------------------------------------------- + +groups.append(ScratchPad("6", [ + DropDown("chatgpt", "chromium --app=https://chat.openai.com", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ), + DropDown("mousepad", "mousepad", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ), + DropDown("terminal", "alacritty", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ), + DropDown("scrcpy", "scrcpy -d", x=0.8, y=0.05, width=0.15, height=0.6, on_focus_lost_hide=False ) +])) + +keys.extend([ + Key([mod], 'F10', lazy.group["6"].dropdown_toggle("chatgpt")), + Key([mod], 'F11', lazy.group["6"].dropdown_toggle("mousepad")), + Key([mod], 'F12', lazy.group["6"].dropdown_toggle("terminal")), + Key([mod], 'F9', lazy.group["6"].dropdown_toggle("scrcpy")) +]) + +# -------------------------------------------------------- +# Pywal Colors +# -------------------------------------------------------- + +colors = os.path.expanduser('~/.cache/wal/colors.json') +colordict = json.load(open(colors)) +Color0=(colordict['colors']['color0']) +Color1=(colordict['colors']['color1']) +Color2=(colordict['colors']['color2']) +Color3=(colordict['colors']['color3']) +Color4=(colordict['colors']['color4']) +Color5=(colordict['colors']['color5']) +Color6=(colordict['colors']['color6']) +Color7=(colordict['colors']['color7']) +Color8=(colordict['colors']['color8']) +Color9=(colordict['colors']['color9']) +Color10=(colordict['colors']['color10']) +Color11=(colordict['colors']['color11']) +Color12=(colordict['colors']['color12']) +Color13=(colordict['colors']['color13']) +Color14=(colordict['colors']['color14']) +Color15=(colordict['colors']['color15']) + +# -------------------------------------------------------- +# Setup Layout Theme +# -------------------------------------------------------- + +layout_theme = { + "border_width": 3, + "margin": 15, + "border_focus": Color2, + "border_normal": "FFFFFF", + "single_border_width": 3 +} + +# -------------------------------------------------------- +# Layouts +# -------------------------------------------------------- + +layouts = [ + layout.Max(**layout_theme), + layout.MonadTall(**layout_theme), + layout.MonadWide(**layout_theme), + layout.RatioTile(**layout_theme), + layout.Floating() +] + +# -------------------------------------------------------- +# Setup Widget Defaults +# -------------------------------------------------------- + +widget_defaults = dict( + font="Fira Sans SemiBold", + fontsize=14, + padding=3 +) +extension_defaults = widget_defaults.copy() + +# -------------------------------------------------------- +# Decorations +# https://qtile-extras.readthedocs.io/en/stable/manual/how_to/decorations.html +# -------------------------------------------------------- + +decor_left = { + "decorations": [ + PowerLineDecoration( + path="arrow_left" + # path="rounded_left" + # path="forward_slash" + # path="back_slash" + ) + ], +} + +decor_right = { + "decorations": [ + PowerLineDecoration( + path="arrow_right" + # path="rounded_right" + # path="forward_slash" + # path="back_slash" + ) + ], +} + +# -------------------------------------------------------- +# Widgets +# -------------------------------------------------------- + +widget_list = [ + widget.TextBox( + **decor_left, + background=Color1+".4", + text='Apps', + foreground='ffffff', + desc='', + padding=10, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("rofi -show drun")}, + ), + widget.TextBox( + **decor_left, + background="#ffffff.4", + text="  ", + foreground="000000.6", + fontsize=18, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(home + "/dotfiles/qtile/scripts/wallpaper.sh select")}, + ), + widget.GroupBox( + **decor_left, + background="#ffffff.7", + highlight_method='block', + highlight='ffffff', + block_border='ffffff', + highlight_color=['ffffff','ffffff'], + block_highlight_text_color='000000', + foreground='ffffff', + rounded=False, + this_current_screen_border='ffffff', + active='ffffff' + ), + widget.TextBox( + **decor_left, + background="#ffffff.4", + text=" ", + foreground="000000.6", + fontsize=18, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("bash " + home + "/dotfiles/.settings/browser.sh")}, + ), + widget.TextBox( + **decor_left, + background="#ffffff.4", + text=" ", + foreground="000000.6", + fontsize=18, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("bash " + home + "/dotfiles/.settings/filemanager.sh")} + ), + + widget.WindowName( + **decor_left, + max_chars=50, + background=Color2+".4", + width=400, + padding=10 + ), + widget.Spacer(), + widget.Spacer( + length=30 + ), + widget.TextBox( + **decor_right, + background="#000000.3" + ), + widget.Memory( + **decor_right, + background=Color10+".4", + padding=10, + measure_mem='G', + format="{MemUsed:.0f}{mm} ({MemTotal:.0f}{mm})" + ), + widget.Volume( + **decor_right, + background=Color12+".4", + padding=10, + fmt='Vol: {}', + ), + widget.DF( + **decor_right, + padding=10, + background=Color8+".4", + visible_on_warn=False, + format="{p} {uf}{m} ({r:.0f}%)" + ), + widget.Bluetooth( + **decor_right, + background=Color2+".4", + padding=10, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("blueman-manager")}, + ), + widget.Wlan( + **decor_right, + background=Color2+".4", + padding=10, + format='{essid} {percent:2.0%}', + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("alacritty -e nmtui")}, + ), + widget.Clock( + **decor_right, + background=Color4+".4", + padding=10, + format="%Y-%m-%d / %I:%M %p", + ), + widget.TextBox( + **decor_right, + background=Color2+".4", + padding=5, + text=" ", + fontsize=20, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(home + "/dotfiles/qtile/scripts/powermenu.sh")}, + ), +] + +# Hide Modules if not on laptop +if (show_wlan == False): + del widget_list[13:14] + +if (show_bluetooth == False): + del widget_list[12:13] + +# -------------------------------------------------------- +# Screens +# -------------------------------------------------------- + +screens = [ + Screen( + top=bar.Bar( + widget_list, + 30, + padding=20, + opacity=0.7, + border_width=[0, 0, 0, 0], + margin=[0,0,0,0], + background="#000000.3" + ), + ), +] + +# -------------------------------------------------------- +# Drag floating layouts +# -------------------------------------------------------- + +mouse = [ + Drag([mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()), + Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()), + Click([mod], "Button2", lazy.window.bring_to_front()), +] + +# -------------------------------------------------------- +# Define floating layouts +# -------------------------------------------------------- + +floating_layout = layout.Floating( + border_width=3, + border_focus=Color2, + border_normal="FFFFFF", + float_rules=[ + # Run the utility of `xprop` to see the wm class and name of an X client. + *layout.Floating.default_float_rules, + Match(wm_class="confirmreset"), # gitk + Match(wm_class="makebranch"), # gitk + Match(wm_class="maketag"), # gitk + Match(wm_class="ssh-askpass"), # ssh-askpass + Match(title="branchdialog"), # gitk + Match(title="pinentry"), # GPG key password entry + ] +) + +# -------------------------------------------------------- +# General Setup +# -------------------------------------------------------- + +dgroups_app_rules = [] # type: list +follow_mouse_focus = True +bring_front_click = False +cursor_warp = False +auto_fullscreen = True +focus_on_window_activation = "smart" +reconfigure_screens = True + +# If things like steam games want to auto-minimize themselves when losing +# focus, should we respect this or not? +auto_minimize = True + +# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this +# string besides java UI toolkits; you can see several discussions on the +# mailing lists, GitHub issues, and other WM documentation that suggest setting +# this string if your java app doesn't work correctly. We may as well just lie +# and say that we're a working one by default. +# +# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in +# java that happens to be on java's whitelist. + +# -------------------------------------------------------- +# Windows Manager Name +# -------------------------------------------------------- + +wmname = "QTILE" + +# -------------------------------------------------------- +# Hooks +# -------------------------------------------------------- + +# HOOK startup +@hook.subscribe.startup_once +def autostart(): + autostartscript = "~/.config/qtile/autostart.sh" + home = os.path.expanduser(autostartscript) + subprocess.Popen([home]) + diff --git a/dotfiles/qtile/scripts/diagnosis.sh b/dotfiles/qtile/scripts/diagnosis.sh new file mode 100755 index 0000000..65f5ec7 --- /dev/null +++ b/dotfiles/qtile/scripts/diagnosis.sh @@ -0,0 +1,37 @@ +#!/bin/bash +clear +sleep 0.5 +figlet "Diagnosis" +echo +echo "This script will check that essential packages and " +echo "execution commands are available on your system." +echo + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists." + else + echo ":: OK: $folder found." + fi +} + +_commandExists "rofi" "rofi-wayland" +_commandExists "dunst" "dunst" +_commandExists "wal" "python-pywal" +_commandExists "gum" "gum" +_commandExists "magick" "imagemagick" +_commandExists "figlet" "figlet" + +echo +echo "Press return to exit" +read \ No newline at end of file diff --git a/dotfiles/qtile/scripts/loadbar.sh b/dotfiles/qtile/scripts/loadbar.sh new file mode 100755 index 0000000..310ae1e --- /dev/null +++ b/dotfiles/qtile/scripts/loadbar.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# _ _ _ +# | | ___ __ _ __| | |__ __ _ _ __ +# | |/ _ \ / _` |/ _` | '_ \ / _` | '__| +# | | (_) | (_| | (_| | |_) | (_| | | +# |_|\___/ \__,_|\__,_|_.__/ \__,_|_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +echo "Loading Qtile status bar..." \ No newline at end of file diff --git a/dotfiles/qtile/scripts/powermenu.sh b/dotfiles/qtile/scripts/powermenu.sh new file mode 100755 index 0000000..dcfcf07 --- /dev/null +++ b/dotfiles/qtile/scripts/powermenu.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ____ +# | _ \ _____ _____ _ __ _ __ ___ ___ _ __ _ _ +# | |_) / _ \ \ /\ / / _ \ '__| '_ ` _ \ / _ \ '_ \| | | | +# | __/ (_) \ V V / __/ | | | | | | | __/ | | | |_| | +# |_| \___/ \_/\_/ \___|_| |_| |_| |_|\___|_| |_|\__,_| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +echo $XDG_SESSION_TYPE +lockapp=slock +echo "Using $lockapp to lock the screen." + +option1=" lock" +option2=" logout" +option3=" reboot" +option4=" power off" + +options="$option1\n" +options="$options$option2\n" +options="$options$option3\n$option4" + +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-power.rasi -i -no-show-icons -l 4 -width 30 -p "Powermenu") + +case $choice in + $option1) + $lockapp ;; + $option2) + qtile cmd-obj -o cmd -f shutdown ;; + $option3) + systemctl reboot ;; + $option4) + systemctl poweroff ;; +esac + diff --git a/dotfiles/qtile/scripts/screenshot.sh b/dotfiles/qtile/scripts/screenshot.sh new file mode 100755 index 0000000..71bc9bb --- /dev/null +++ b/dotfiles/qtile/scripts/screenshot.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ____ _ _ +# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_ +# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __| +# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_ +# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +DIR="$HOME/Pictures/screenshots/" +NAME="screenshot_$(date +%d%m%Y_%H%M%S).png" + +option1="Selected window (delay 3 sec)" +option2="Selected area" +option3="Fullscreen (delay 3 sec)" + +options="$option2\n$option3\n$option1" + +choice=$(echo -e "$options" | rofi -i -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -l 3 -p "Take Screenshot") + +case $choice in + $option1) + scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f' -c -z -u + notify-send "Screenshot created" "Mode: Selected window" + ;; + $option2) + scrot $DIR$NAME -s -e 'xclip -selection clipboard -t image/png -i $f' + notify-send "Screenshot created" "Mode: Selected area" + ;; + $option3) + scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f' + notify-send "Screenshot created" "Mode: Fullscreen" + ;; +esac diff --git a/dotfiles/qtile/scripts/wallpaper.sh b/dotfiles/qtile/scripts/wallpaper.sh new file mode 100755 index 0000000..69bea1a --- /dev/null +++ b/dotfiles/qtile/scripts/wallpaper.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# ____ _ _____ _ +# / ___| |__ __ _ _ __ __ _ ___ |_ _| |__ ___ _ __ ___ ___ +# | | | '_ \ / _` | '_ \ / _` |/ _ \ | | | '_ \ / _ \ '_ ` _ \ / _ \ +# | |___| | | | (_| | | | | (_| | __/ | | | | | | __/ | | | | | __/ +# \____|_| |_|\__,_|_| |_|\__, |\___| |_| |_| |_|\___|_| |_| |_|\___| +# |___/ +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# Cache file for holding the current wallpaper +wallpaper_folder="$HOME/wallpaper" +if [ -f ~/dotfiles/.settings/wallpaper-folder.sh ] ;then + source ~/dotfiles/.settings/wallpaper-folder.sh +fi +cache_file="$HOME/.cache/current_wallpaper" +blurred="$HOME/.cache/blurred_wallpaper.png" +rasi_file="$HOME/.cache/current_wallpaper.rasi" + +# Create cache file if not exists +if [ ! -f $cache_file ] ;then + touch $cache_file + echo "$wallpaper_folder/default.jpg" > "$cache_file" +fi + +# Create rasi file if not exists +if [ ! -f $rasi_file ] ;then + touch $rasi_file + echo "* { current-image: url(\"$wallpaper_folder/default.jpg\", height); }" > "$rasi_file" +fi + +current_wallpaper=$(cat "$cache_file") + +case $1 in + + # Load wallpaper from .cache of last session + "init") + if [ -f $cache_file ]; then + wal -q -i $current_wallpaper + else + wal -q -i $wallpaper_folder + fi + ;; + + # Select wallpaper with rofi + "select") + selected=$( find "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile + do + echo -en "$rfile\x00icon\x1f$wallpaper_folder/${rfile}\n" + done | rofi -dmenu -replace -l 6 -config ~/dotfiles/rofi/config-wallpaper.rasi) + if [ ! "$selected" ]; then + echo "No wallpaper selected" + exit + fi + wal -q -i $wallpaper_folder/$selected + ;; + + # Randomly select wallpaper + *) + wal -q -i $wallpaper_folder/ + ;; + +esac + +# ----------------------------------------------------- +# Reload qtile to color bar +# ----------------------------------------------------- +qtile cmd-obj -o cmd -f reload_config + +# ----------------------------------------------------- +# Get new theme +# ----------------------------------------------------- +source "$HOME/.cache/wal/colors.sh" +echo "Wallpaper: $wallpaper" +newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") + +# ----------------------------------------------------- +# Created blurred wallpaper +# ----------------------------------------------------- +magick $wallpaper -resize 50% $blurred +echo ":: Resized to 50%" +magick $blurred -blur 50x30 $blurred +echo ":: Blurred" +# ----------------------------------------------------- +# Write selected wallpaper into .cache files +# ----------------------------------------------------- +echo "$wallpaper" > "$cache_file" +echo "* { current-image: url(\"$blurred\", height); }" > "$rasi_file" + +sleep 1 + +# ----------------------------------------------------- +# Send notification +# ----------------------------------------------------- +notify-send "Colors and Wallpaper updated" "with image $newwall" +echo "Done." diff --git a/dotfiles/ranger/commands.py b/dotfiles/ranger/commands.py new file mode 100644 index 0000000..97b7909 --- /dev/null +++ b/dotfiles/ranger/commands.py @@ -0,0 +1,62 @@ +# This is a sample commands.py. You can add your own commands here. +# +# Please refer to commands_full.py for all the default commands and a complete +# documentation. Do NOT add them all here, or you may end up with defunct +# commands when upgrading ranger. + +# A simple command for demonstration purposes follows. +# ----------------------------------------------------------------------------- + +from __future__ import (absolute_import, division, print_function) + +# You can import any python module as needed. +import os + +# You always need to import ranger.api.commands here to get the Command class: +from ranger.api.commands import Command + + +# Any class that is a subclass of "Command" will be integrated into ranger as a +# command. Try typing ":my_edit" in ranger! +class my_edit(Command): + # The so-called doc-string of the class will be visible in the built-in + # help that is accessible by typing "?c" inside ranger. + """:my_edit + + A sample command for demonstration purposes that opens a file in an editor. + """ + + # The execute method is called when you run this command in ranger. + def execute(self): + # self.arg(1) is the first (space-separated) argument to the function. + # This way you can write ":my_edit somefilename". + if self.arg(1): + # self.rest(1) contains self.arg(1) and everything that follows + target_filename = self.rest(1) + else: + # self.fm is a ranger.core.filemanager.FileManager object and gives + # you access to internals of ranger. + # self.fm.thisfile is a ranger.container.file.File object and is a + # reference to the currently selected file. + target_filename = self.fm.thisfile.path + + # This is a generic function to print text in ranger. + self.fm.notify("Let's edit the file " + target_filename + "!") + + # Using bad=True in fm.notify allows you to print error messages: + if not os.path.exists(target_filename): + self.fm.notify("The given file does not exist!", bad=True) + return + + # This executes a function from ranger.core.acitons, a module with a + # variety of subroutines that can help you construct commands. + # Check out the source, or run "pydoc ranger.core.actions" for a list. + self.fm.edit_file(target_filename) + + # The tab method is called when you press tab, and should return a list of + # suggestions that the user will tab through. + # tabnum is 1 for and -1 for by default + def tab(self, tabnum): + # This is a generic tab-completion function that iterates through the + # content of the current directory. + return self._tab_directory_content() diff --git a/dotfiles/ranger/commands_full.py b/dotfiles/ranger/commands_full.py new file mode 100644 index 0000000..5defa67 --- /dev/null +++ b/dotfiles/ranger/commands_full.py @@ -0,0 +1,1993 @@ +# -*- coding: utf-8 -*- +# This file is part of ranger, the console file manager. +# This configuration file is licensed under the same terms as ranger. +# =================================================================== +# +# NOTE: If you copied this file to /etc/ranger/commands_full.py or +# ~/.config/ranger/commands_full.py, then it will NOT be loaded by ranger, +# and only serve as a reference. +# +# =================================================================== +# This file contains ranger's commands. +# It's all in python; lines beginning with # are comments. +# +# Note that additional commands are automatically generated from the methods +# of the class ranger.core.actions.Actions. +# +# You can customize commands in the files /etc/ranger/commands.py (system-wide) +# and ~/.config/ranger/commands.py (per user). +# They have the same syntax as this file. In fact, you can just copy this +# file to ~/.config/ranger/commands_full.py with +# `ranger --copy-config=commands_full' and make your modifications, don't +# forget to rename it to commands.py. You can also use +# `ranger --copy-config=commands' to copy a short sample commands.py that +# has everything you need to get started. +# But make sure you update your configs when you update ranger. +# +# =================================================================== +# Every class defined here which is a subclass of `Command' will be used as a +# command in ranger. Several methods are defined to interface with ranger: +# execute(): called when the command is executed. +# cancel(): called when closing the console. +# tab(tabnum): called when is pressed. +# quick(): called after each keypress. +# +# tab() argument tabnum is 1 for and -1 for by default +# +# The return values for tab() can be either: +# None: There is no tab completion +# A string: Change the console to this string +# A list/tuple/generator: cycle through every item in it +# +# The return value for quick() can be: +# False: Nothing happens +# True: Execute the command afterwards +# +# The return value for execute() and cancel() doesn't matter. +# +# =================================================================== +# Commands have certain attributes and methods that facilitate parsing of +# the arguments: +# +# self.line: The whole line that was written in the console. +# self.args: A list of all (space-separated) arguments to the command. +# self.quantifier: If this command was mapped to the key "X" and +# the user pressed 6X, self.quantifier will be 6. +# self.arg(n): The n-th argument, or an empty string if it doesn't exist. +# self.rest(n): The n-th argument plus everything that followed. For example, +# if the command was "search foo bar a b c", rest(2) will be "bar a b c" +# self.start(n): Anything before the n-th argument. For example, if the +# command was "search foo bar a b c", start(2) will be "search foo" +# +# =================================================================== +# And this is a little reference for common ranger functions and objects: +# +# self.fm: A reference to the "fm" object which contains most information +# about ranger. +# self.fm.notify(string): Print the given string on the screen. +# self.fm.notify(string, bad=True): Print the given string in RED. +# self.fm.reload_cwd(): Reload the current working directory. +# self.fm.thisdir: The current working directory. (A File object.) +# self.fm.thisfile: The current file. (A File object too.) +# self.fm.thistab.get_selection(): A list of all selected files. +# self.fm.execute_console(string): Execute the string as a ranger command. +# self.fm.open_console(string): Open the console with the given string +# already typed in for you. +# self.fm.move(direction): Moves the cursor in the given direction, which +# can be something like down=3, up=5, right=1, left=1, to=6, ... +# +# File objects (for example self.fm.thisfile) have these useful attributes and +# methods: +# +# tfile.path: The path to the file. +# tfile.basename: The base name only. +# tfile.load_content(): Force a loading of the directories content (which +# obviously works with directories only) +# tfile.is_directory: True/False depending on whether it's a directory. +# +# For advanced commands it is unavoidable to dive a bit into the source code +# of ranger. +# =================================================================== + +from __future__ import (absolute_import, division, print_function) + +from collections import deque +import os +import re + +from ranger.api.commands import Command + + +class alias(Command): + """:alias + + Copies the oldcommand as newcommand. + """ + + context = 'browser' + resolve_macros = False + + def execute(self): + if not self.arg(1) or not self.arg(2): + self.fm.notify('Syntax: alias ', bad=True) + return + + self.fm.commands.alias(self.arg(1), self.rest(2)) + + +class echo(Command): + """:echo + + Display the text in the statusbar. + """ + + def execute(self): + self.fm.notify(self.rest(1)) + + +class cd(Command): + """:cd [-r] + + The cd command changes the directory. + If the path is a file, selects that file. + The command 'cd -' is equivalent to typing ``. + Using the option "-r" will get you to the real path. + """ + + def execute(self): + if self.arg(1) == '-r': + self.shift() + destination = os.path.realpath(self.rest(1)) + if os.path.isfile(destination): + self.fm.select_file(destination) + return + else: + destination = self.rest(1) + + if not destination: + destination = '~' + + if destination == '-': + self.fm.enter_bookmark('`') + else: + self.fm.cd(destination) + + def _tab_args(self): + # dest must be rest because path could contain spaces + if self.arg(1) == '-r': + start = self.start(2) + dest = self.rest(2) + else: + start = self.start(1) + dest = self.rest(1) + + if dest: + head, tail = os.path.split(os.path.expanduser(dest)) + if head: + dest_exp = os.path.join(os.path.normpath(head), tail) + else: + dest_exp = tail + else: + dest_exp = '' + return (start, dest_exp, os.path.join(self.fm.thisdir.path, dest_exp), + dest.endswith(os.path.sep)) + + @staticmethod + def _tab_paths(dest, dest_abs, ends_with_sep): + if not dest: + try: + return next(os.walk(dest_abs))[1], dest_abs + except (OSError, StopIteration): + return [], '' + + if ends_with_sep: + try: + return [os.path.join(dest, path) for path in next(os.walk(dest_abs))[1]], '' + except (OSError, StopIteration): + return [], '' + + return None, None + + def _tab_match(self, path_user, path_file): + if self.fm.settings.cd_tab_case == 'insensitive': + path_user = path_user.lower() + path_file = path_file.lower() + elif self.fm.settings.cd_tab_case == 'smart' and path_user.islower(): + path_file = path_file.lower() + return path_file.startswith(path_user) + + def _tab_normal(self, dest, dest_abs): + dest_dir = os.path.dirname(dest) + dest_base = os.path.basename(dest) + + try: + dirnames = next(os.walk(os.path.dirname(dest_abs)))[1] + except (OSError, StopIteration): + return [], '' + + return [os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d)], '' + + def _tab_fuzzy_match(self, basepath, tokens): + """ Find directories matching tokens recursively """ + if not tokens: + tokens = [''] + paths = [basepath] + while True: + token = tokens.pop() + matches = [] + for path in paths: + try: + directories = next(os.walk(path))[1] + except (OSError, StopIteration): + continue + matches += [os.path.join(path, d) for d in directories + if self._tab_match(token, d)] + if not tokens or not matches: + return matches + paths = matches + + return None + + def _tab_fuzzy(self, dest, dest_abs): + tokens = [] + basepath = dest_abs + while True: + basepath_old = basepath + basepath, token = os.path.split(basepath) + if basepath == basepath_old: + break + if os.path.isdir(basepath_old) and not token.startswith('.'): + basepath = basepath_old + break + tokens.append(token) + + paths = self._tab_fuzzy_match(basepath, tokens) + if not os.path.isabs(dest): + paths_rel = self.fm.thisdir.path + paths = [os.path.relpath(os.path.join(basepath, path), paths_rel) + for path in paths] + else: + paths_rel = '' + return paths, paths_rel + + def tab(self, tabnum): + from os.path import sep + + start, dest, dest_abs, ends_with_sep = self._tab_args() + + paths, paths_rel = self._tab_paths(dest, dest_abs, ends_with_sep) + if paths is None: + if self.fm.settings.cd_tab_fuzzy: + paths, paths_rel = self._tab_fuzzy(dest, dest_abs) + else: + paths, paths_rel = self._tab_normal(dest, dest_abs) + + paths.sort() + + if self.fm.settings.cd_bookmarks: + paths[0:0] = [ + os.path.relpath(v.path, paths_rel) if paths_rel else v.path + for v in self.fm.bookmarks.dct.values() for path in paths + if v.path.startswith(os.path.join(paths_rel, path) + sep) + ] + + if not paths: + return None + if len(paths) == 1: + return start + paths[0] + sep + return [start + dirname + sep for dirname in paths] + + +class chain(Command): + """:chain ; ; ... + + Calls multiple commands at once, separated by semicolons. + """ + resolve_macros = False + + def execute(self): + if not self.rest(1).strip(): + self.fm.notify('Syntax: chain ; ; ...', bad=True) + return + for command in [s.strip() for s in self.rest(1).split(";")]: + self.fm.execute_console(command) + + +class shell(Command): + escape_macros_for_shell = True + + def execute(self): + if self.arg(1) and self.arg(1)[0] == '-': + flags = self.arg(1)[1:] + command = self.rest(2) + else: + flags = '' + command = self.rest(1) + + if command: + self.fm.execute_command(command, flags=flags) + + def tab(self, tabnum): + from ranger.ext.get_executables import get_executables + if self.arg(1) and self.arg(1)[0] == '-': + command = self.rest(2) + else: + command = self.rest(1) + start = self.line[0:len(self.line) - len(command)] + + try: + position_of_last_space = command.rindex(" ") + except ValueError: + return (start + program + ' ' for program + in get_executables() if program.startswith(command)) + if position_of_last_space == len(command) - 1: + selection = self.fm.thistab.get_selection() + if len(selection) == 1: + return self.line + selection[0].shell_escaped_basename + ' ' + return self.line + '%s ' + + before_word, start_of_word = self.line.rsplit(' ', 1) + return (before_word + ' ' + file.shell_escaped_basename + for file in self.fm.thisdir.files or [] + if file.shell_escaped_basename.startswith(start_of_word)) + + +class open_with(Command): + + def execute(self): + app, flags, mode = self._get_app_flags_mode(self.rest(1)) + self.fm.execute_file( + files=[f for f in self.fm.thistab.get_selection()], + app=app, + flags=flags, + mode=mode) + + def tab(self, tabnum): + return self._tab_through_executables() + + def _get_app_flags_mode(self, string): # pylint: disable=too-many-branches,too-many-statements + """Extracts the application, flags and mode from a string. + + examples: + "mplayer f 1" => ("mplayer", "f", 1) + "atool 4" => ("atool", "", 4) + "p" => ("", "p", 0) + "" => None + """ + + app = '' + flags = '' + mode = 0 + split = string.split() + + if len(split) == 1: + part = split[0] + if self._is_app(part): + app = part + elif self._is_flags(part): + flags = part + elif self._is_mode(part): + mode = part + + elif len(split) == 2: + part0 = split[0] + part1 = split[1] + + if self._is_app(part0): + app = part0 + if self._is_flags(part1): + flags = part1 + elif self._is_mode(part1): + mode = part1 + elif self._is_flags(part0): + flags = part0 + if self._is_mode(part1): + mode = part1 + elif self._is_mode(part0): + mode = part0 + if self._is_flags(part1): + flags = part1 + + elif len(split) >= 3: + part0 = split[0] + part1 = split[1] + part2 = split[2] + + if self._is_app(part0): + app = part0 + if self._is_flags(part1): + flags = part1 + if self._is_mode(part2): + mode = part2 + elif self._is_mode(part1): + mode = part1 + if self._is_flags(part2): + flags = part2 + elif self._is_flags(part0): + flags = part0 + if self._is_mode(part1): + mode = part1 + elif self._is_mode(part0): + mode = part0 + if self._is_flags(part1): + flags = part1 + + return app, flags, int(mode) + + def _is_app(self, arg): + return not self._is_flags(arg) and not arg.isdigit() + + @staticmethod + def _is_flags(arg): + from ranger.core.runner import ALLOWED_FLAGS + return all(x in ALLOWED_FLAGS for x in arg) + + @staticmethod + def _is_mode(arg): + return all(x in '0123456789' for x in arg) + + +class set_(Command): + """:set