├── configs ├── .config │ ├── zsh │ │ ├── env │ │ │ ├── misc.zsh │ │ │ ├── bookmarks.zsh │ │ │ └── path.zsh │ │ ├── plugins │ │ │ └── README.md │ │ ├── .zshenv │ │ ├── files │ │ │ ├── bookmarks │ │ │ └── abbreviations │ │ ├── .zprofile │ │ ├── rc │ │ │ ├── hooks.zsh │ │ │ ├── opts.zsh │ │ │ ├── command_not_found_handler.zsh │ │ │ ├── misc.zsh │ │ │ ├── completions.zsh │ │ │ └── keys.zsh │ │ └── .zshrc │ ├── qtile │ │ ├── modules │ │ │ ├── hooks │ │ │ │ ├── swallow.py │ │ │ │ ├── __init__.py │ │ │ │ ├── misc.py │ │ │ │ └── apps.py │ │ │ ├── widgets │ │ │ │ ├── touchpad.py │ │ │ │ ├── systray.py │ │ │ │ ├── arch_logo.py │ │ │ │ ├── chord.py │ │ │ │ ├── battery_icon.py │ │ │ │ ├── bt.py │ │ │ │ ├── data.py │ │ │ │ ├── cpu_temp.py │ │ │ │ ├── maximize.py │ │ │ │ ├── powermenu.py │ │ │ │ ├── uptime.py │ │ │ │ ├── kbd_layout.py │ │ │ │ ├── battery.py │ │ │ │ ├── kbd_layout_icon.py │ │ │ │ ├── bt_bat.py │ │ │ │ ├── os_logo.py │ │ │ │ ├── check_updates.py │ │ │ │ ├── mouse_over_clock.py │ │ │ │ ├── group_box.py │ │ │ │ ├── current_layout_icon.py │ │ │ │ ├── weather.py │ │ │ │ ├── github_notif.py │ │ │ │ ├── separators.py │ │ │ │ ├── music.py │ │ │ │ ├── wallpaper.py │ │ │ │ └── task_list.py │ │ │ ├── popups │ │ │ │ └── __init__.py │ │ │ ├── matches.py │ │ │ ├── path.py │ │ │ ├── __init__.py │ │ │ ├── keys │ │ │ │ ├── __init__.py │ │ │ │ ├── window_managing.py │ │ │ │ ├── layout_managing.py │ │ │ │ └── layouts.py │ │ │ ├── theme.py │ │ │ ├── screens.py │ │ │ ├── mouse.py │ │ │ └── settings.py │ │ ├── json │ │ │ ├── themes.json │ │ │ ├── config.json │ │ │ ├── window_rules.json │ │ │ └── matches.json │ │ ├── pyproject.toml │ │ ├── extras │ │ │ ├── __init__.py │ │ │ └── widgets │ │ │ │ ├── __init__.py │ │ │ │ ├── mouseoverclock.py │ │ │ │ ├── cputemp.py │ │ │ │ ├── battery.py │ │ │ │ ├── uptime.py │ │ │ │ ├── bt_bat.py │ │ │ │ ├── checkupdates.py │ │ │ │ ├── battery_icon.py │ │ │ │ ├── widgetbox.py │ │ │ │ ├── weather.py │ │ │ │ └── launchbar.py │ │ ├── tox.ini │ │ ├── battery-icons │ │ │ ├── battery-full.svg │ │ │ ├── battery-full-charged.svg │ │ │ ├── battery-full-charging.svg │ │ │ ├── battery-good.svg │ │ │ ├── battery-low.svg │ │ │ ├── battery-caution.svg │ │ │ ├── battery-caution-charging.svg │ │ │ ├── battery-low-charging.svg │ │ │ ├── battery-good-charging.svg │ │ │ └── battery-missing.svg │ │ ├── scripts │ │ │ ├── set_spotify_size.py │ │ │ ├── autohide.py │ │ │ └── rofi_layout.py │ │ ├── themes │ │ │ ├── nord.json │ │ │ └── catppuccin.json │ │ ├── config.py │ │ └── firefox_themes │ │ │ ├── themes │ │ │ ├── nord.json │ │ │ └── catppuccin.json │ │ │ └── firefox_theme.json │ ├── tmux │ │ └── tmux.conf │ ├── qtile-wl │ │ ├── modules │ │ │ ├── hooks │ │ │ │ ├── swallow.py │ │ │ │ ├── __init__.py │ │ │ │ ├── misc.py │ │ │ │ └── apps.py │ │ │ ├── widgets │ │ │ │ ├── sway_nc.py │ │ │ │ ├── touchpad.py │ │ │ │ ├── arch_logo.py │ │ │ │ ├── chord.py │ │ │ │ ├── battery_icon.py │ │ │ │ ├── bt.py │ │ │ │ ├── data.py │ │ │ │ ├── cpu_temp.py │ │ │ │ ├── maximize.py │ │ │ │ ├── uptime.py │ │ │ │ ├── kbd_layout.py │ │ │ │ ├── powermenu.py │ │ │ │ ├── kbd_layout_icon.py │ │ │ │ ├── battery.py │ │ │ │ ├── bt_bat.py │ │ │ │ ├── os_logo.py │ │ │ │ ├── check_updates.py │ │ │ │ ├── systray.py │ │ │ │ ├── current_layout_icon.py │ │ │ │ ├── group_box.py │ │ │ │ ├── github_notif.py │ │ │ │ ├── weather.py │ │ │ │ ├── mouse_over_clock.py │ │ │ │ ├── separators.py │ │ │ │ ├── task_list.py │ │ │ │ ├── music.py │ │ │ │ └── wallpaper.py │ │ │ ├── popups │ │ │ │ └── __init__.py │ │ │ ├── path.py │ │ │ ├── matches.py │ │ │ ├── __init__.py │ │ │ ├── theme.py │ │ │ ├── keys │ │ │ │ ├── window_managing.py │ │ │ │ ├── __init__.py │ │ │ │ ├── layout_managing.py │ │ │ │ └── layouts.py │ │ │ └── mouse.py │ │ ├── symlinks │ │ │ ├── qtile.log │ │ │ └── qtile_extras │ │ ├── json │ │ │ ├── themes.json │ │ │ ├── config.json │ │ │ └── matches.json │ │ ├── pyproject.toml │ │ ├── extras │ │ │ ├── __init__.py │ │ │ └── widgets │ │ │ │ ├── systray.py │ │ │ │ ├── __init__.py │ │ │ │ ├── cputemp.py │ │ │ │ ├── tasklist.py │ │ │ │ ├── battery.py │ │ │ │ ├── uptime.py │ │ │ │ ├── mouseoverclock.py │ │ │ │ ├── battery_icon.py │ │ │ │ ├── checkupdates.py │ │ │ │ ├── widgetbox.py │ │ │ │ ├── weather.py │ │ │ │ └── launchbar.py │ │ ├── tox.ini │ │ ├── battery-icons │ │ │ ├── battery-full.svg │ │ │ ├── battery-full-charged.svg │ │ │ ├── battery-full-charging.svg │ │ │ ├── battery-good.svg │ │ │ ├── battery-low.svg │ │ │ ├── battery-caution.svg │ │ │ ├── battery-caution-charging.svg │ │ │ ├── battery-low-charging.svg │ │ │ ├── battery-good-charging.svg │ │ │ └── battery-missing.svg │ │ ├── scripts │ │ │ ├── set_spotify_size.py │ │ │ ├── xrandr_daemon.py │ │ │ ├── autohide.py │ │ │ ├── listen_for_alt_release.py │ │ │ └── rofi_layout.py │ │ ├── themes │ │ │ ├── nord.json │ │ │ └── catppuccin.json │ │ ├── config.py │ │ ├── firefox_themes │ │ │ ├── themes │ │ │ │ ├── nord.json │ │ │ │ └── catppuccin.json │ │ │ └── firefox_theme.json │ │ └── wephyr.py │ ├── nwg-launchers │ │ ├── nwggrid │ │ │ ├── terminal │ │ │ └── style.css │ │ ├── nwgdmenu │ │ │ └── style.css │ │ └── nwgbar │ │ │ ├── style.css │ │ │ ├── system-shutdown.svg │ │ │ ├── system-log-out.svg │ │ │ ├── system-reboot.svg │ │ │ ├── system-lock-screen.svg │ │ │ ├── system-suspend.svg │ │ │ └── bar.json │ ├── nvim │ │ ├── stylua.toml │ │ ├── .luarc.json │ │ ├── init.lua │ │ ├── .gitignore │ │ ├── lua │ │ │ ├── plugins │ │ │ │ ├── colorscheme.lua │ │ │ │ ├── core.lua │ │ │ │ └── disabled.lua │ │ │ └── config │ │ │ │ └── keymaps.lua │ │ ├── README.md │ │ ├── lazyvim.json │ │ └── .neoconf.json │ ├── X11 │ │ ├── xprofile │ │ ├── xinitrc │ │ └── Xresources │ ├── spicetify │ │ ├── Themes │ │ │ └── catppuccin-mocha │ │ ├── config-xpui.ini │ │ └── Extensions │ │ │ └── catppuccin-mocha.js │ ├── lf │ │ └── cleaner │ ├── rofi │ │ └── powermenu.sh │ ├── conky │ │ ├── start_qtile.sh │ │ ├── start_budgie.sh │ │ └── local.conf │ ├── git │ │ ├── allowed_signers │ │ └── config │ ├── libinput-gestures.conf │ ├── zathura │ │ ├── zathurarc │ │ ├── catppuccin │ │ ├── dark │ │ └── nord │ └── pythonrc ├── etc │ ├── zsh │ │ ├── zprofile │ │ └── zshenv │ └── xdg │ │ └── reflector.conf ├── bin │ ├── alacritty-nemo │ ├── pkglist-backup.sh │ ├── tsize.sh │ ├── chkup.sh │ ├── alert.sh │ ├── transmission-open │ ├── hide-show-bar.sh │ ├── search_phone.sh │ ├── filesizes.sh │ ├── change_wallpaper.sh │ ├── pachist.sh │ ├── reboot-to-win.sh │ ├── print_center.sh │ ├── second_display.sh │ ├── change-ip-address-server.sh │ ├── switch_windows_in_group.py │ ├── birthday-notification.sh │ ├── run_wall.sh │ ├── all_disk_usage.sh │ ├── ssd-usage.sh │ ├── read_each_file.sh │ ├── pkgs_size.sh │ ├── network-text.sh │ ├── pkgs_required.sh │ ├── hdd-usage.sh │ ├── mutevol.sh │ ├── memory.sh │ ├── netspeed.sh │ ├── dots-dir-tree.sh │ ├── git-update-all │ ├── suspend-toggle │ ├── volctl.sh │ ├── libinput-gestures-start.sh │ ├── markdown_table.py │ ├── bookmarks.py │ ├── dw-playground.sh │ ├── bt-bat.sh │ ├── check-qtile-version.sh │ ├── start-spotify.py │ ├── x64ver.awk │ ├── sort_json.py │ ├── find-hardlink.sh │ ├── greek-letters.sh │ ├── bt-archnet.sh │ ├── autostart-wl.sh │ ├── bookmarkthis.py │ ├── change_theme.py │ ├── wttr.sh │ ├── dot-backup.sh │ ├── brightnessctl.sh │ ├── battery-notification.py │ ├── location.py │ ├── rofi-wallpaper │ ├── autostart.sh │ ├── workdays.sh │ ├── git-status │ └── md-preview.py ├── usr │ └── lib │ │ └── python3.11 │ │ └── site-packages │ │ └── custom_logging │ │ └── __init__.py ├── .jq └── lfub ├── .gitignore ├── .pre-commit-config.yaml ├── README.md └── markdown ├── archinstall.md └── features.md /configs/.config/zsh/env/misc.zsh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/hooks/swallow.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/.config/tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | tmux.conf.mine -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/hooks/swallow.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /configs/etc/zsh/zprofile: -------------------------------------------------------------------------------- 1 | emulate sh -c 'source /etc/profile' 2 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwggrid/terminal: -------------------------------------------------------------------------------- 1 | alacritty --hold -e 2 | -------------------------------------------------------------------------------- /configs/bin/alacritty-nemo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | alacritty --class='nemo-terminal' 3 | -------------------------------------------------------------------------------- /configs/bin/pkglist-backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | yay -Qqe > ./configs/pkgs 4 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/symlinks/qtile.log: -------------------------------------------------------------------------------- 1 | /home/ervin/.local/share/qtile/qtile.log -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/__pycache__/ 2 | **/lazy-lock.json 3 | **/.vscode/ 4 | **/keys.json 5 | -------------------------------------------------------------------------------- /configs/bin/tsize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | tput cols lines | tr "\n" " " | sed 's/ /x/' 4 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/symlinks/qtile_extras: -------------------------------------------------------------------------------- 1 | /usr/lib/python3.12/site-packages/qtile_extras/ -------------------------------------------------------------------------------- /configs/.config/nvim/stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 -------------------------------------------------------------------------------- /configs/.config/qtile/json/themes.json: -------------------------------------------------------------------------------- 1 | { 2 | "night": "catppuccin", 3 | "day": "nord" 4 | } -------------------------------------------------------------------------------- /configs/bin/chkup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | number=$(checkupdates | wc -l) 4 | printf "%s" "$number" -------------------------------------------------------------------------------- /configs/.config/nvim/.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "diagnostics.globals": [ 3 | "Util" 4 | ] 5 | } -------------------------------------------------------------------------------- /configs/.config/qtile-wl/json/themes.json: -------------------------------------------------------------------------------- 1 | { 2 | "night": "catppuccin", 3 | "day": "nord" 4 | } -------------------------------------------------------------------------------- /configs/bin/alert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | paplay /usr/share/sounds/freedesktop/stereo/message.oga 4 | -------------------------------------------------------------------------------- /configs/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- bootstrap lazy.nvim, LazyVim and your plugins 2 | require("config.lazy") 3 | -------------------------------------------------------------------------------- /configs/.config/X11/xprofile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export XDG_SESSION_TYPE=x11 4 | export XDG_SESSION_DESKTOP=qtile 5 | -------------------------------------------------------------------------------- /configs/.config/nvim/.gitignore: -------------------------------------------------------------------------------- 1 | tt.* 2 | .tests 3 | doc/tags 4 | debug 5 | .repro 6 | foo.* 7 | *.log 8 | data 9 | -------------------------------------------------------------------------------- /configs/.config/nvim/lua/plugins/colorscheme.lua: -------------------------------------------------------------------------------- 1 | return { "LazyVim/LazyVim", opts = { colorscheme = "catppuccin"} } -------------------------------------------------------------------------------- /configs/.config/spicetify/Themes/catppuccin-mocha: -------------------------------------------------------------------------------- 1 | /home/ervin/src/cloned/github/catppuccin/spicetify/catppuccin-mocha -------------------------------------------------------------------------------- /configs/bin/transmission-open: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | xdg-open "http://$(getent hosts home | awk '{print $1}'):9091" 4 | -------------------------------------------------------------------------------- /configs/.config/zsh/plugins/README.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | - [git-prompt.zsh](https://github.com/woefe/git-prompt.zsh) 4 | -------------------------------------------------------------------------------- /configs/bin/hide-show-bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | qtile cmd-obj -o cmd -f hide_show_bar 4 | xdotool mousemove 1440 40 5 | -------------------------------------------------------------------------------- /configs/usr/lib/python3.11/site-packages/custom_logging/__init__.py: -------------------------------------------------------------------------------- 1 | from .logger import init_log 2 | 3 | __all__ = ["init_log"] 4 | -------------------------------------------------------------------------------- /configs/bin/search_phone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while true 4 | do 5 | teriyaki.sh scan &>/dev/null 6 | sleep 1800 7 | done 8 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/sway_nc.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget import SwayNC 2 | 3 | 4 | def sway_nc(): 5 | return SwayNC() 6 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/touchpad.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | 4 | def touchpad(): 5 | return widget.Touchpad() 6 | -------------------------------------------------------------------------------- /configs/.config/nvim/lua/plugins/core.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "folke/lazy.nvim", version = false }, 3 | { "LazyVim/LazyVim", version = false }, 4 | } 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/touchpad.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | 4 | def touchpad(): 5 | return widget.Touchpad() 6 | -------------------------------------------------------------------------------- /configs/.config/lf/cleaner: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -n "$FIFO_UEBERZUG" ]; then 3 | printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG" 4 | fi 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 98 3 | [tool.isort] 4 | profile = "black" 5 | [tool.pyright] 6 | reportGeneralTypeIssues = false 7 | -------------------------------------------------------------------------------- /configs/bin/filesizes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # @option -f Path 4 | eval "$(argc --argc-eval "$0" "$@")" 5 | du -ahd1 "$argc_path" 2>/dev/null | sort -h 6 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 98 3 | [tool.isort] 4 | profile = "black" 5 | [tool.pyright] 6 | reportGeneralTypeIssues = false 7 | -------------------------------------------------------------------------------- /configs/bin/change_wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pkill -KILL change_wallpaper 4 | pkill -KILL wallpaper 5 | pkill -KILL sleep 6 | /home/ervin/bin/wallpaper.sh "$@" & 7 | -------------------------------------------------------------------------------- /configs/bin/pachist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | history="$(grep -i "installed\|removed\|upgraded" /var/log/pacman.log | sed 's/\[ALPM\] //')" 4 | 5 | printf '%s\n' "$history" 6 | -------------------------------------------------------------------------------- /configs/bin/reboot-to-win.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | number=$(efibootmgr | grep Windows | sed 's/Boot//;s/\*//' | cut -d" " -f1) 4 | sudo efibootmgr -n "$number" 5 | systemctl reboot -------------------------------------------------------------------------------- /configs/bin/print_center.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | columns="$(tput cols)" 4 | while IFS= read -r line; do 5 | printf "%*s\n" $(( (${#line} + columns) / 2)) "$line" 6 | done < "$1" -------------------------------------------------------------------------------- /configs/.jq: -------------------------------------------------------------------------------- 1 | def round(precision):.*pow(10;precision)|round/pow(10;precision); 2 | 3 | def e2t(epoch): (epoch | tostring | .[:10] | strptime("%s") | strftime("%Y-%m-%d %H:%M:%S")) ; 4 | -------------------------------------------------------------------------------- /configs/bin/second_display.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | xrandr --output eDP --scale 1x1 --mode 2880x1800 --pos 1120x2160 --output HDMI-A-0 --scale 1.9999x1.9999 --mode 2560x1080 --pos 0x0 4 | -------------------------------------------------------------------------------- /configs/bin/change-ip-address-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | line="$(dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"') home" 4 | sed -i "s/.* home/$line/" /etc/hosts 5 | -------------------------------------------------------------------------------- /configs/bin/switch_windows_in_group.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | from libqtile.command.client import InteractiveCommandClient 4 | 5 | c = InteractiveCommandClient() 6 | c.group.focus_back() 7 | -------------------------------------------------------------------------------- /configs/.config/nvim/lua/plugins/disabled.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- disable trouble 3 | { "folke/flash.nvim", enabled = false }, 4 | { "nvim-neo-tree/neo-tree.nvim", enabled = false }, 5 | } 6 | -------------------------------------------------------------------------------- /configs/etc/xdg/reflector.conf: -------------------------------------------------------------------------------- 1 | --save /etc/pacman.d/mirrorlist 2 | --threads 240 3 | --latest 10 4 | --score 10 5 | --fastest 10 6 | --sort score 7 | # --country RO 8 | --protocol http,https 9 | -------------------------------------------------------------------------------- /configs/bin/birthday-notification.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dunstify\ 4 | -a "birthdayNotification"\ 5 | -u normal\ 6 | -r "635325"\ 7 | "$(birthday -W 0 -f ~/.local/share/birthdays)" 8 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/__init__.py: -------------------------------------------------------------------------------- 1 | from .floating_window_snapping import move_snap_window 2 | from .mutablescratch import MutableScratch 3 | 4 | __all__ = ["MutableScratch", "move_snap_window"] 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/__init__.py: -------------------------------------------------------------------------------- 1 | from .floating_window_snapping import move_snap_window 2 | from .mutablescratch import MutableScratch 3 | 4 | __all__ = ["MutableScratch", "move_snap_window"] 5 | -------------------------------------------------------------------------------- /configs/.config/nvim/README.md: -------------------------------------------------------------------------------- 1 | # 💤 LazyVim 2 | 3 | A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). 4 | Refer to the [documentation](https://lazyvim.github.io/installation) to get started. 5 | -------------------------------------------------------------------------------- /configs/.config/zsh/.zshenv: -------------------------------------------------------------------------------- 1 | source "$ZDOTDIR"/env/vars.zsh 2 | source "$ZDOTDIR"/env/aliases.zsh 3 | source "$ZDOTDIR"/env/functions.zsh 4 | source "$ZDOTDIR"/env/bookmarks.zsh 5 | source "$ZDOTDIR"/env/path.zsh 6 | -------------------------------------------------------------------------------- /configs/bin/run_wall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pids=($(pgrep wallpaper.sh | sort -r)) 4 | n_pids=${#pids[@]} 5 | for i in $(seq 0 $((n_pids - 1))); do 6 | kill -9 "${pids[$i]}" 7 | done 8 | 9 | wallpaper.sh "$@" & 10 | -------------------------------------------------------------------------------- /configs/.config/nvim/lazyvim.json: -------------------------------------------------------------------------------- 1 | { 2 | "extras": [ 3 | "lazyvim.plugins.extras.formatting.black", 4 | "lazyvim.plugins.extras.lang.rust" 5 | ], 6 | "news": { 7 | "NEWS.md": "2123" 8 | }, 9 | "version": 3 10 | } 11 | -------------------------------------------------------------------------------- /configs/.config/qtile/tox.ini: -------------------------------------------------------------------------------- 1 | [pycodestyle] 2 | count = False 3 | ignore = E226,E302,E41 4 | max-line-length = 160 5 | statistics = True 6 | [flake8] 7 | count = False 8 | ignore = E226,E302,E41 9 | max-line-length = 160 10 | statistics = True 11 | -------------------------------------------------------------------------------- /configs/.config/zsh/env/bookmarks.zsh: -------------------------------------------------------------------------------- 1 | # bookmarks 2 | while IFS= read -r line; do 3 | x="$(cut -d" " -f 1 <<< $line)" 4 | y="$(cut -d" " -f 2 <<< $line)" 5 | alias $x="$HOME/$y" 6 | export $x="$HOME/$y" 7 | done < $ZDOTDIR/files/bookmarks 8 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/tox.ini: -------------------------------------------------------------------------------- 1 | [pycodestyle] 2 | count = False 3 | ignore = E226,E302,E41 4 | max-line-length = 160 5 | statistics = True 6 | [flake8] 7 | count = False 8 | ignore = E226,E302,E41 9 | max-line-length = 160 10 | statistics = True 11 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-full.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-full.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/rofi/powermenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | rofi -show power-menu \ 4 | -modi "power-menu:/home/ervin/.local/bin/rofi-power-menu --choices=suspend/logout/reboot/shutdown --confirm=reboot/shutdown" \ 5 | -config /home/ervin/.config/rofi/powermenu.rasi -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/systray.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | 4 | class Systray(widget.StatusNotifier): 5 | def __init__(self, **config) -> None: 6 | super().__init__(**config) 7 | self.add_callbacks({"Button1": self.show_menu}) 8 | -------------------------------------------------------------------------------- /configs/.config/zsh/files/bookmarks: -------------------------------------------------------------------------------- 1 | b bin/ 2 | c .config 3 | cq .config/qtile 4 | cqw .config/qtile-wl 5 | sc src/cloned 6 | scg src/cloned/github 7 | scgm src/cloned/github/misc 8 | scr src/cloned/repos 9 | sm src/mine 10 | smd src/mine/dots 11 | smq src/mine/qtile 12 | -------------------------------------------------------------------------------- /configs/.config/nvim/.neoconf.json: -------------------------------------------------------------------------------- 1 | { 2 | "neodev": { 3 | "library": { 4 | "enabled": true, 5 | "plugins": true 6 | } 7 | }, 8 | "neoconf": { 9 | "plugins": { 10 | "lua_ls": { 11 | "enabled": true 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /configs/bin/all_disk_usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | used="$(df -k | tr -s " " | cut -d" " -f3 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 4 | total="$(df -k | tr -s " " | cut -d" " -f2 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 5 | 6 | printf "%s" "$used / $total" 7 | -------------------------------------------------------------------------------- /configs/bin/ssd-usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | used="$(df -k /dev/nvme0n1p* | tr -s " " | cut -d" " -f3 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 4 | total="$(df -k /dev/nvme0n1p* | tr -s " " | cut -d" " -f2 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 5 | 6 | printf "%s" "$used / $total" -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-full-charged.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-full-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-full-charged.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-full-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/systray.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.decorations import decorations 4 | 5 | 6 | def systray(): 7 | return widget.Systray( 8 | icon_size=32, 9 | padding=20, 10 | # **decorations["systray_decor"], 11 | ) 12 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/popups/__init__.py: -------------------------------------------------------------------------------- 1 | from modules.popups.kill_window_popup import close_app_with_warning_window 2 | from modules.popups.music_popup import music_layout 3 | from modules.popups.weather import weather_popup 4 | 5 | __all__ = ["weather_popup", "music_layout", "close_app_with_warning_window"] 6 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/popups/__init__.py: -------------------------------------------------------------------------------- 1 | from modules.popups.kill_window_popup import close_app_with_warning_window 2 | from modules.popups.music_popup import music_layout 3 | from modules.popups.weather import weather_popup 4 | 5 | __all__ = ["weather_popup", "music_layout", "close_app_with_warning_window"] 6 | -------------------------------------------------------------------------------- /configs/bin/read_each_file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RED='\033[0;31m' 4 | NC='\033[0m' 5 | 6 | for each in "$@" 7 | do 8 | if [ ! -d "${each}" ] 9 | then 10 | printf "%b" "${NC}${RED}--------------------------\n${each}\n--------------------------${NC}\n\n" 11 | head -13 "$each" 12 | fi 13 | done | less -r 14 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgdmenu/style.css: -------------------------------------------------------------------------------- 1 | 2 | #box { 3 | background-color: rgba(255, 255, 255, 0.1); 4 | } 5 | 6 | #searchbox { 7 | background-color: rgba(255, 255, 255, 0.1); 8 | } 9 | 10 | /* Menu items */ 11 | #commands { 12 | background-color: rgba(255, 255, 255, 0.1); 13 | padding-left: 5px; 14 | } 15 | -------------------------------------------------------------------------------- /configs/.config/qtile/json/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "auto_fullscreen": true, 3 | "auto_minimize": true, 4 | "bring_front_click": "floating_only", 5 | "cursor_warp": true, 6 | "floats_kept_above": true, 7 | "follow_mouse_focus": true, 8 | "theme": "catppuccin", 9 | "wmname": "LG3D", 10 | "x11_fake_transparency": true 11 | } 12 | -------------------------------------------------------------------------------- /configs/bin/pkgs_size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | table="$(LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Required By/{if($NF=="None") {required_by=0} else {required_by=NF-3}} /^Installed Size/{print $4$5, name, required_by""}' | sort -hr | column -N "Installed Size,Name,Required By" -J| jq '.table')" 4 | 5 | printf '%s\n' "$table" | markdown_table.py 6 | -------------------------------------------------------------------------------- /configs/bin/network-text.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # SSID="$(iwgetid -r)" 4 | # short="$(ip route get 8.8.8.8 | cut -d" " -f5 | head -1)" 5 | # short="${short:0:2}" 6 | # if [[ "$short" = "wl" ]] 7 | # then 8 | # printf "%s %s" "" "$SSID" 9 | # elif [[ "$short" = "en" ]] 10 | # then 11 | # printf "%s %s" "" "$SSID" 12 | # fi 13 | 14 | netspeed.sh -------------------------------------------------------------------------------- /configs/bin/pkgs_required.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | table="$(LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Required By/{if($NF=="None") {required_by=0} else {required_by=NF-3}} /^Installed Size/{print $4$5, name, required_by""}' | sort -hk 3 | column -N "Installed Size,Name,Required By" -J| jq '.table')" 4 | 5 | printf '%s\n' "$table" | markdown_table.py 6 | -------------------------------------------------------------------------------- /configs/.config/zsh/files/abbreviations: -------------------------------------------------------------------------------- 1 | abbr "gck"="git checkout" 2 | abbr "gcl"="git clone" 3 | abbr "gd"="git diff" 4 | abbr "gl1"="git log -1" 5 | abbr "gsf"="git fetch upstream; git checkout master; git merge upstream/master; git push -f" 6 | abbr "gst"="git status" 7 | abbr "lg"="lazygit" 8 | abbr "p"="sudo pacman" 9 | abbr "SS"="sudo systemctl" 10 | -------------------------------------------------------------------------------- /configs/bin/hdd-usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -f /dev/sda ] || { printf "No HDD found"; exit 1; } 4 | used="$(df -k /dev/sda* | tr -s " " | cut -d" " -f3 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 5 | total="$(df -k /dev/sda* | tr -s " " | cut -d" " -f2 | sed 1d | awk '{sum+=$1}END{print sum/1048576 "G";}')" 6 | 7 | printf "%.2f" "$used / $total" 8 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/arch_logo.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import settings 5 | 6 | arch_logo = widget.Image( 7 | filename="/usr/share/pixmaps/archlinux-logo.svg", 8 | margin=7, 9 | mouse_callbacks={"Button1": lazy.spawn(settings["cmds"]["menu"])}, 10 | ) 11 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/arch_logo.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import settings 5 | 6 | arch_logo = widget.Image( 7 | filename="/usr/share/pixmaps/archlinux-logo.svg", 8 | margin=7, 9 | mouse_callbacks={"Button1": lazy.spawn(settings["cmds"]["menu"])}, 10 | ) 11 | -------------------------------------------------------------------------------- /configs/.config/conky/start_qtile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # vim: ft=sh:ts=4:sw=4:et:ai:cin 3 | 4 | cd "$(dirname "$0")" || exit 5 | killall conky 2>/dev/null 6 | if [ "$1" = "-n" ]; then 7 | pause_flag="" 8 | else 9 | pause_flag="--pause=5" 10 | echo "Conky waiting 5 seconds to start..." 11 | fi 12 | conky --daemonize --quiet "$pause_flag" --config=./conky_qtile.conf -------------------------------------------------------------------------------- /configs/bin/mutevol.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$(pamixer --get-mute)" == "false" ]] 4 | then 5 | pamixer -m 6 | dunstify -a "changeVolume" -u low -I "$XDG_DATA_HOME/assets/volume-muted.svg" -r "991049" "Volume muted" 7 | else 8 | pamixer -u 9 | dunstify -a "changeVolume" -u low -I "$XDG_DATA_HOME/assets/volume.svg" -r "991049" "Volume unmuted" 10 | fi 11 | -------------------------------------------------------------------------------- /configs/.config/qtile/scripts/set_spotify_size.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | from time import sleep 3 | 4 | from libqtile.command.client import InteractiveCommandClient 5 | 6 | sleep(5) 7 | c = InteractiveCommandClient() 8 | wins = c.windows() 9 | for i in range(len(wins)): 10 | if "spotify" in wins[i]["wm_class"][0]: 11 | c.group["media"].layout.set_ratio(0.85) 12 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v4.5.0 6 | hooks: 7 | - id: trailing-whitespace 8 | - id: end-of-file-fixer 9 | - id: check-yaml 10 | - id: check-added-large-files 11 | -------------------------------------------------------------------------------- /configs/.config/git/allowed_signers: -------------------------------------------------------------------------------- 1 | ChromeOS ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICN2fq1dG4mJF+j68hFwpogqxBGDkmBDfXgV0phxKaw5 ervin.popescu10@gmail.com 2 | Cloudtop ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIESxwVZVv0QnyErabHIsS6PuDKbXb9OoyAzyzYQL/bvB ervin.popescu10@gmail.com 3 | Arch ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdrIBF+pd9JtmHnJokedu1Ip06g1nAAE9Q7X/fEdje/ ervin.popescu10@gmail.com 4 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/scripts/set_spotify_size.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | from time import sleep 3 | 4 | from libqtile.command.client import InteractiveCommandClient 5 | 6 | sleep(5) 7 | c = InteractiveCommandClient() 8 | wins = c.windows() 9 | for i in range(len(wins)): 10 | if "spotify" in wins[i]["wm_class"][0]: 11 | c.group["media"].layout.set_ratio(0.85) 12 | -------------------------------------------------------------------------------- /configs/.config/zsh/.zprofile: -------------------------------------------------------------------------------- 1 | if [ -z "$WAYLAND_DISPLAY" ] && [ "${XDG_VTNR}" -eq 1 ]; then 2 | exec start-cosmic & 3 | disown 4 | fi 5 | 6 | # if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 2 ]; then 7 | # exec startx 8 | # fi 9 | 10 | if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 3 ]; then 11 | exec qtile start -b wayland -c ~/.config/qtile-wl/config.py 12 | fi 13 | -------------------------------------------------------------------------------- /configs/bin/memory.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mem=$(free -h | grep Mem | tr -s " " | cut -d" " -f3 | grep Mi) 4 | 5 | if [ -z "${mem}" ] 6 | then 7 | Mem=$( free -h | grep Mem | tr -s " " | cut -d" " -f3 | sed 's/Gi/ Gi/') 8 | printf '%s\n' "$Mem" 9 | else 10 | Mem=$(free -h | grep Mem | tr -s " " | cut -d" " -f3 | sed 's/Mi/ Mi/') 11 | printf '%s\n' "$Mem" 12 | fi 13 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-good.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-low.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/chord.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def chord(): 7 | return widget.Chord( 8 | font=settings["text_font"], 9 | fontsize=settings["font_size"], 10 | foreground=colors["darkblue"], 11 | fmt="chord {}", 12 | padding=10, 13 | ) 14 | -------------------------------------------------------------------------------- /configs/bin/netspeed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | interface="$(route | awk '{print $NF}' | tail -1)" 4 | 5 | awk '{ if (l1) {\ 6 | printf("↓%.2fMB/s ↑%.2fMB/s" \ 7 | , ($2 - l1) / 1024 / 1024, ($10 - l2) / 1024 / 1024) 8 | } else {\ 9 | l1=$2; l2=$10;\ 10 | }\ 11 | }' <(grep "$interface" /proc/net/dev) <(sleep 1; grep "$interface" /proc/net/dev) 12 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-good.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-low.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/chord.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def chord(): 7 | return widget.Chord( 8 | font=settings["text_font"], 9 | fontsize=settings["font_size"], 10 | foreground=colors["darkblue"], 11 | fmt="chord {}", 12 | padding=10, 13 | ) 14 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/json/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "auto_fullscreen": true, 3 | "auto_minimize": true, 4 | "bring_front_click": "floating_only", 5 | "cursor_warp": true, 6 | "floats_kept_above": true, 7 | "follow_mouse_focus": "click_or_drag_only", 8 | "theme": "catppuccin", 9 | "wmname": "LG3D", 10 | "wl_xcursor_theme": "Bibata-Modern-Ice", 11 | "wl_xcursor_size": 30 12 | } 13 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-caution.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/matches.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import json5 4 | 5 | from modules.settings import config_path, settings 6 | 7 | with open(os.path.join(config_path, "json", "matches.json"), "r") as f: 8 | data = json5.loads(f.read()) 9 | 10 | matches = { 11 | settings["groups"]["names"][i]: data[str(i)] 12 | for i in range(len(settings["groups"]["names"])) 13 | } 14 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-caution.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/path.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | from libqtile import qtile 4 | from libqtile.core.manager import Qtile 5 | 6 | qtile: Qtile 7 | 8 | qtile_info = qtile.qtile_info() 9 | if len(qtile_info) != 0: 10 | config_path = str(pathlib.Path(qtile_info["config_path"]).parent.resolve()) 11 | else: 12 | config_path = str(pathlib.Path(__file__).parent.parent.resolve()) 13 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/path.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | from libqtile import qtile 4 | from libqtile.core.manager import Qtile 5 | 6 | qtile: Qtile 7 | 8 | qtile_info = qtile.qtile_info() 9 | if len(qtile_info) != 0: 10 | config_path = str(pathlib.Path(qtile_info["config_path"]).parent.resolve()) 11 | else: 12 | config_path = str(pathlib.Path(__file__).parent.parent.resolve()) 13 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/matches.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import json5 4 | 5 | from modules.settings import config_path, settings 6 | 7 | with open(os.path.join(config_path, "json", "matches.json"), "r") as f: 8 | data = json5.loads(f.read()) 9 | 10 | matches = { 11 | list(settings["groups"].keys())[i]: data[str(i)] # type: ignore 12 | for i in range(len(settings["groups"])) 13 | } 14 | -------------------------------------------------------------------------------- /configs/.config/zsh/env/path.zsh: -------------------------------------------------------------------------------- 1 | typeset -U path PATH 2 | path=( 3 | $XDG_DATA_HOME/dw/bin 4 | $XDG_DATA_HOME/go/bin 5 | $XDG_DATA_HOME/spicetify 6 | $XDG_DATA_HOME/cargo/bin 7 | $CARGO_HOME/target/release 8 | $CARGO_HOME/target/debug 9 | $HOME/bin 10 | $HOME/.local/bin 11 | $HOME/.config/qtile/scripts 12 | $HOME/.nimble/bin 13 | $path 14 | ) 15 | export PATH 16 | -------------------------------------------------------------------------------- /configs/.config/zsh/rc/hooks.zsh: -------------------------------------------------------------------------------- 1 | autoload -Uz add-zsh-hook 2 | 3 | add-zsh-hook -Uz precmd () { 4 | printf '%b' '\e[0m\e(B\e)0\017\e[?5l\e7\e[0;0r\e8' 5 | } 6 | 7 | add-zsh-hook -Uz chpwd (){ lla;} 8 | 9 | if [[ -d "$TMUX_PLUGIN_MANAGER_PATH" ]]; then 10 | add-zsh-hook chpwd tmux-window-name () { 11 | ($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &) 12 | } 13 | fi 14 | -------------------------------------------------------------------------------- /configs/bin/dots-dir-tree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$1" || exit 1 4 | 5 | sed -i '//,/<\/html>/d' tree.md 6 | tree -aH "" -I __pycache__ -I .git >>tree.md 7 | sed -i '//,/<\/head>/d' tree.md 8 | sed -i 's/h1/h2/g' tree.md 9 | sed -i '/

/,/<\/p>/d' tree.md 10 | sed -i '/\/d' tree.md 11 | sed -i '/

/d' tree.md 12 | sed -i '/<\/a>
/d' tree.md -------------------------------------------------------------------------------- /configs/bin/git-update-all: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | current=$(git branch | grep '*' | awk '{print $2}') 5 | all_branches=($(git branch | sed 's/*//' | awk '{print $1}' | xargs)) 6 | for b in ${all_branches[@]}; do 7 | echo Checkin\' out branch $b... 8 | git checkout $b 9 | echo Fetchin\' branch $b... 10 | git fetch 11 | echo Pullin\' branch $b... 12 | git pull 13 | echo 14 | done 15 | git checkout $current 16 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/battery_icon.py: -------------------------------------------------------------------------------- 1 | from extras.widgets import BatteryIcon 2 | from modules.settings import colors, config_path 3 | 4 | 5 | def battery_icon(): 6 | return BatteryIcon( 7 | name="battery_icon", 8 | foreground=colors["darkblue"], 9 | scale=1.6, 10 | theme_path=f"{config_path}/battery-icons/", 11 | usemask=True, 12 | update_interval=1, 13 | ) 14 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/battery_icon.py: -------------------------------------------------------------------------------- 1 | from extras.widgets import BatteryIcon 2 | from modules.settings import colors, config_path 3 | 4 | 5 | def battery_icon(): 6 | return BatteryIcon( 7 | name="battery_icon", 8 | foreground=colors["darkblue"], 9 | scale=1.6, 10 | theme_path=f"{config_path}/battery-icons/", 11 | usemask=True, 12 | update_interval=5, 13 | ) 14 | -------------------------------------------------------------------------------- /configs/.config/conky/start_budgie.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # vim: ft=sh:ts=4:sw=4:et:ai:cin 3 | 4 | cd "$(dirname "$0")" 5 | killall conky 2>/dev/null 6 | font/install 7 | if [ "$1" = "-n" ]; then 8 | pause_flag="" 9 | else 10 | pause_flag="--pause=5" 11 | echo "Conky waiting 5 seconds to start..." 12 | fi 13 | if conky --daemonize --quiet "$pause_flag" --config=./conky_budgie.conf ; then 14 | echo "Started" 15 | else 16 | echo "Failed" 17 | fi 18 | -------------------------------------------------------------------------------- /configs/bin/suspend-toggle: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | targets="sleep.target suspend.target hibernate.target hybrid-sleep.target" 4 | status="$(systemctl status $targets | grep Loaded | tr -d " " | awk -F':' '{print $2}' | sed 's/(.*//' | uniq)" 5 | if [[ "$status" == "loaded" ]]; then 6 | systemctl mask $targets &>/dev/null && echo "Disabled suspend" 7 | elif [[ "$status" == "masked" ]]; then 8 | systemctl unmask $targets &>/dev/null && echo "Enabled suspend" 9 | fi 10 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/bt.py: -------------------------------------------------------------------------------- 1 | from libqtile import widget 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def bt(): 8 | return widget.Bluetooth( 9 | fontsize=settings["font_size"] + 4, 10 | foreground=colors["fg2"], 11 | # mouse_callbacks={ 12 | # "Button1": lazy.group["scratchpad"].dropdown_toggle("blueman"), 13 | # }, 14 | padding=5, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/bin/volctl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | msgId="991049" 4 | 5 | if [[ "${1:0:1}" == "-" ]];then 6 | pamixer --allow-boost -d "${1:1:1}" >/dev/null 7 | else 8 | pamixer --allow-boost -i "${1:1:1}" >/dev/null 9 | fi 10 | 11 | volume="$(pamixer --get-volume-human)" 12 | dunstify\ 13 | -a "changeVolume"\ 14 | -u low\ 15 | -I "$HOME/.local/share/assets/volume.svg"\ 16 | -r "$msgId"\ 17 | -h int:value:"$volume" "${volume}" 18 | 19 | # alert.sh 20 | -------------------------------------------------------------------------------- /configs/etc/zsh/zshenv: -------------------------------------------------------------------------------- 1 | export ZDOTDIR=$HOME/.config/zsh 2 | # XDG Base Directory specification 3 | export XDG_CACHE_HOME="$HOME"/.cache 4 | export XDG_CONFIG_HOME="$HOME"/.config 5 | export XDG_DATA_HOME="$HOME"/.local/share 6 | export XDG_STATE_HOME="$HOME"/.local/state 7 | export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java 8 | export MATLAB_LOG_DIR="$XDG_CACHE_HOME/matlab" 9 | # export MATLAB_SHELL="/bin/zsh --aliases /etc/zsh/matlab_aliases.zsh" 10 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/bt.py: -------------------------------------------------------------------------------- 1 | from libqtile import widget 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def bt(): 8 | return widget.Bluetooth( 9 | fontsize=settings["font_size"] + 4, 10 | foreground=colors["fg2"], 11 | # mouse_callbacks={ 12 | # "Button1": lazy.group["scratchpad"].dropdown_toggle("blueman"), 13 | # }, 14 | padding=5, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-caution-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-caution-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-low-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-low-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/data.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras import Uptime 4 | from modules.settings import settings 5 | 6 | 7 | def uptime(): 8 | return Uptime( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | mouse_callbacks={ 12 | "Button1": lazy.group["scratchpad"].dropdown_toggle("htop"), 13 | }, 14 | padding=10, 15 | update_interval=3600, 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/data.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras import Uptime 4 | from modules.settings import settings 5 | 6 | 7 | def uptime(): 8 | return Uptime( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | mouse_callbacks={ 12 | "Button1": lazy.group["scratchpad"].dropdown_toggle("htop"), 13 | }, 14 | padding=10, 15 | update_interval=3600, 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-good-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/cpu_temp.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import CPUTemp 4 | from modules.settings import settings 5 | 6 | 7 | def cpu_temp(): 8 | return CPUTemp( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | fmt="🌡️{}", 12 | mouse_callbacks={"Button1": lazy.group["scratchpad"].dropdown_toggle("htop")}, 13 | padding=10, 14 | update_interval=5, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/maximize.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.functions import set_layout_all 4 | from modules.settings import colors, settings 5 | 6 | 7 | def maximize(): 8 | return widget.TextBox( 9 | font=settings["icon_font"], 10 | fontsize=settings["font_size"], 11 | foreground=colors["darkblue"], 12 | mouse_callbacks={"Button1": set_layout_all()}, 13 | padding=15, 14 | text="", 15 | ) 16 | -------------------------------------------------------------------------------- /configs/bin/libinput-gestures-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$XDG_SESSION_DESKTOP" = "qtile" ]] 4 | then 5 | rm "$HOME"/.config/libinput-gestures.conf 6 | ln -s "$HOME"/.config/libinput-gestures-qtile.conf "$HOME"/.config/libinput-gestures.conf 7 | libinput-gestures-setup restart 8 | else 9 | rm "$HOME"/.config/libinput-gestures.conf 10 | ln -s "$HOME"/.config/libinput-gestures-budgie.conf "$HOME"/.config/libinput-gestures.conf 11 | libinput-gestures-setup restart 12 | fi 13 | -------------------------------------------------------------------------------- /configs/.config/nvim/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | -- Keymaps are automatically loaded on the VeryLazy event 2 | -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua 3 | -- Add any additional keymaps here 4 | vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) 5 | vim.keymap.set({ "n", "i" }, "", "ggVG", { desc = "Select all text" }) 6 | vim.keymap.set("n", "z", "ZenMode", { desc = "Toggle Zen Mode" }) 7 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-good-charging.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/cpu_temp.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import CPUTemp 4 | from modules.settings import settings 5 | 6 | 7 | def cpu_temp(): 8 | return CPUTemp( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | fmt="🌡️{}", 12 | mouse_callbacks={"Button1": lazy.group["scratchpad"].dropdown_toggle("htop")}, 13 | padding=10, 14 | update_interval=60, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/maximize.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.functions import set_layout_all 4 | from modules.settings import colors, settings 5 | 6 | 7 | def maximize(): 8 | return widget.TextBox( 9 | font=settings["icon_font"], 10 | fontsize=settings["font_size"], 11 | foreground=colors["darkblue"], 12 | mouse_callbacks={"Button1": set_layout_all()}, 13 | padding=15, 14 | text="", 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/uptime.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Uptime 4 | from modules.settings import settings 5 | 6 | 7 | def uptime(): 8 | return Uptime( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | mouse_callbacks={ 12 | "Button1": lazy.group["scratchpad"].dropdown_toggle("htop"), 13 | }, 14 | padding=10, 15 | update_interval=3600, 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/powermenu.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def powermenu(): 8 | return widget.TextBox( 9 | name="powermenu", 10 | font=settings["icon_font"], 11 | fontsize=30, 12 | foreground=colors["yellow"], 13 | mouse_callbacks={"Button1": lazy.spawn("nwgbar")}, 14 | padding=10, 15 | text="", 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/uptime.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Uptime 4 | from modules.settings import settings 5 | 6 | 7 | def uptime(): 8 | return Uptime( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | mouse_callbacks={ 12 | "Button1": lazy.group["scratchpad"].dropdown_toggle("htop"), 13 | }, 14 | padding=10, 15 | update_interval=3600, 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/themes/nord.json: -------------------------------------------------------------------------------- 1 | { 2 | "bg0": "#2e3440", 3 | "bg1": "#3b4252", 4 | "bg2": "#434c5e", 5 | "bg3": "#4c566a", 6 | "fg0": "#d8dee9", 7 | "fg1": "#e5e9f0", 8 | "fg2": "#eceff4", 9 | "lightgreen": "#8fbcbb", 10 | "turquoise": "#88c0d0", 11 | "lightblue": "#81a1c1", 12 | "darkblue": "#5e81ac", 13 | "red": "#bf616a", 14 | "orange": "#d08770", 15 | "yellow": "#ebcb8b", 16 | "green": "#a3be8c", 17 | "purple": "#b48ead" 18 | } -------------------------------------------------------------------------------- /configs/.config/qtile-wl/themes/nord.json: -------------------------------------------------------------------------------- 1 | { 2 | "bg0": "#2e3440", 3 | "bg1": "#3b4252", 4 | "bg2": "#434c5e", 5 | "bg3": "#4c566a", 6 | "fg0": "#d8dee9", 7 | "fg1": "#e5e9f0", 8 | "fg2": "#eceff4", 9 | "lightgreen": "#8fbcbb", 10 | "turquoise": "#88c0d0", 11 | "lightblue": "#81a1c1", 12 | "darkblue": "#5e81ac", 13 | "red": "#bf616a", 14 | "orange": "#d08770", 15 | "yellow": "#ebcb8b", 16 | "green": "#a3be8c", 17 | "purple": "#b48ead" 18 | } -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/kbd_layout.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def kbd_layout(): 7 | return widget.KeyboardLayout( 8 | configured_keyboards=["us", "ro std"], 9 | display_map={"us": "us", "ro std": "ro"}, 10 | fmt="{}", 11 | font=settings["text_font"], 12 | fontsize=settings["font_size"], 13 | foreground=colors["darkblue"], 14 | padding=10, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/kbd_layout.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def kbd_layout(): 7 | return widget.KeyboardLayout( 8 | configured_keyboards=["us", "ro std"], 9 | display_map={"us": "us", "ro std": "ro"}, 10 | fmt="{}", 11 | font=settings["text_font"], 12 | fontsize=settings["font_size"], 13 | foreground=colors["darkblue"], 14 | padding=10, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/themes/catppuccin.json: -------------------------------------------------------------------------------- 1 | { 2 | "bg0": "#1E1E2E", 3 | "bg1": "#302D41", 4 | "bg2": "#575268", 5 | "bg3": "#988BA2", 6 | "fg0": "#F5E0DC", 7 | "fg1": "#C9CBFF", 8 | "fg2": "#D9E0EE", 9 | "green": "#B5E8E0", 10 | "turquoise": "#89DCEB", 11 | "lightblue": "#96CDFB", 12 | "darkblue": "#81a1c1", 13 | "red": "#F28FAD", 14 | "orange": "#F8BD96", 15 | "yellow": "#FAE3B0", 16 | "lightgreen": "#ABE9B3", 17 | "purple": "#DDB6F2" 18 | } -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/battery.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Battery 4 | from modules.settings import colors, settings 5 | 6 | 7 | def battery(): 8 | return Battery( 9 | name="battery", 10 | font=settings["text_font"], 11 | fontsize=settings["font_size"], 12 | foreground=colors["fg2"], 13 | mouse_callbacks={"Button1": lazy.group["scratchpad"].dropdown_toggle("htop")}, 14 | padding=5, 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile/themes/catppuccin.json: -------------------------------------------------------------------------------- 1 | { 2 | "bg0": "#1E1E2E", 3 | "bg1": "#302D41", 4 | "bg2": "#575268", 5 | "bg3": "#988BA2", 6 | "fg0": "#F5E0DC", 7 | "fg1": "#C9CBFF", 8 | "fg2": "#D9E0EE", 9 | "green": "#B5E8E0", 10 | "turquoise": "#89DCEB", 11 | "lightblue": "#96CDFB", 12 | "darkblue": "#81a1c1", 13 | "red": "#F28FAD", 14 | "orange": "#F8BD96", 15 | "yellow": "#FAE3B0", 16 | "lightgreen": "#ABE9B3", 17 | "purple": "#DDB6F2" 18 | } -------------------------------------------------------------------------------- /configs/.config/libinput-gestures.conf: -------------------------------------------------------------------------------- 1 | gesture swipe left 3 xdotool key super+Right 2 | gesture swipe right 3 xdotool key super+Left 3 | gesture swipe left 4 playerctl next 4 | gesture swipe right 4 playerctl previous 5 | gesture swipe up 3 xdotool key super+Up 6 | gesture swipe down 3 xdotool key super+Up 7 | gesture pinch in 2 xdotool key ctrl+minus 8 | gesture pinch out 2 xdotool key ctrl+equal 9 | gesture pinch in 4 xdotool key super+d 10 | gesture pinch out 4 xdotool key super+d 11 | swipe_threshold 0 12 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/powermenu.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def powermenu(): 8 | return widget.TextBox( 9 | name="powermenu", 10 | font=settings["icon_font"], 11 | fontsize=settings["icon_fontsize"], 12 | foreground=colors["yellow"], 13 | mouse_callbacks={"Button1": lazy.spawn("nwgbar")}, 14 | padding=10, 15 | text="", 16 | ) 17 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/kbd_layout_icon.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def kbd_layout_icon(): 8 | return widget.TextBox( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"] + 30, 11 | foreground=colors["darkblue"], 12 | mouse_callbacks={"Button1": lazy.widget["keyboardlayout"].next_keyboard()}, 13 | padding=10, 14 | text="", 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/kbd_layout_icon.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def kbd_layout_icon(): 8 | return widget.TextBox( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"] + 30, 11 | foreground=colors["darkblue"], 12 | mouse_callbacks={"Button1": lazy.widget["keyboardlayout"].next_keyboard()}, 13 | padding=10, 14 | text="", 15 | ) 16 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/battery.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Battery 4 | from modules.settings import colors, settings 5 | 6 | 7 | def battery(): 8 | return Battery( 9 | name="battery", 10 | font=settings["text_font"], 11 | fontsize=settings["font_size"], 12 | foreground=colors["fg2"], 13 | mouse_callbacks={"Button1": lazy.group["scratchpad"].dropdown_toggle("htop")}, 14 | padding=5, 15 | update_interval=5, 16 | ) 17 | -------------------------------------------------------------------------------- /configs/bin/markdown_table.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import json 4 | import sys 5 | 6 | from markdownTable import markdownTable 7 | 8 | 9 | def main(): 10 | l = json.load(sys.stdin) 11 | table = ( 12 | markdownTable(l) 13 | .setParams( 14 | row_sep="markdown", 15 | quote=False, 16 | padding_weight="center", 17 | # multiline=True, 18 | ) 19 | .getMarkdown() 20 | ) 21 | print(table) 22 | 23 | 24 | if __name__ == "__main__": 25 | main() 26 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/bt_bat.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import BtBattery 4 | from modules.settings import colors, settings 5 | 6 | 7 | def bt_bat(): 8 | return BtBattery( 9 | name="bt_battery", 10 | font=settings["text_font"], 11 | fontsize=settings["font_size"] + 4, 12 | foreground=colors["fg2"], 13 | mouse_callbacks={ 14 | "Button1": lazy.group["scratchpad"].dropdown_toggle("blueman"), 15 | }, 16 | padding=5, 17 | ) 18 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/os_logo.py: -------------------------------------------------------------------------------- 1 | import distro 2 | from libqtile.lazy import lazy 3 | from qtile_extras import widget 4 | 5 | from modules.settings import settings 6 | 7 | if distro.id() == "debian": 8 | filename = "/usr/share/pixmaps/debian-logo.png" 9 | else: 10 | filename = "/usr/share/pixmaps/archlinux-logo.svg" 11 | 12 | 13 | def os_logo(): 14 | return widget.Image( 15 | filename=filename, 16 | margin=7, 17 | mouse_callbacks={"Button1": lazy.spawn(settings["cmds"]["menu"])}, 18 | ) 19 | -------------------------------------------------------------------------------- /configs/bin/bookmarks.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import os 4 | import subprocess 5 | 6 | import rofi 7 | 8 | file = os.path.join(os.path.expanduser("~"), ".local", "share", "bookmarks") 9 | 10 | with open(file, "r") as f: 11 | bookmarks = f.readlines() 12 | 13 | r = rofi.Rofi(lines=len(bookmarks)) 14 | index, key = r.select("Select bookmark", bookmarks) 15 | if key == 0: 16 | subprocess.Popen( 17 | ["xdotool", "type", bookmarks[index]], 18 | stdout=subprocess.DEVNULL, 19 | stderr=subprocess.DEVNULL, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/style.css: -------------------------------------------------------------------------------- 1 | #bar { 2 | margin-top: 0px; 3 | /* margin-top: 500px; */ 4 | } 5 | 6 | image { 7 | background: #1e1e2e; 8 | border-style: double; 9 | border-radius: 22px; 10 | opacity: 0.8; 11 | } 12 | 13 | button { 14 | background: #1e1e2e; 15 | padding-left: 20px; 16 | padding-right: 20px; 17 | margin: 20px; 18 | border-color: #DDb9f2; 19 | border-radius: 10px; 20 | } 21 | 22 | button:focus { 23 | box-shadow: 0 0 20px 15px #DDb9f2; 24 | border-color: #DDb9f2; 25 | } -------------------------------------------------------------------------------- /configs/bin/dw-playground.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export DW_BIN="/home/ervin/.local/share/dw/bin/dw" 4 | DW_DIR="$HOME/dw-playground/" 5 | 6 | [ -d "$DW_DIR" ] || mkdir "$DW_DIR" 7 | cd "$DW_DIR" || exit 1 8 | 9 | run-dw(){ 10 | "$DW_BIN" -i payload payload.json "$(cat ./script.dwl)" 11 | } 12 | export -f run-dw 13 | 14 | alacritty -e lvim ./script.dwl & 15 | alacritty -e lvim ./payload.json & 16 | alacritty -e watch -c -n 1 -t "bash -c run-dw" 17 | 18 | # sleep 1 19 | # xdotool key super+shift+Up 20 | sleep 1 21 | xdotool key super+shift+Down 22 | -------------------------------------------------------------------------------- /configs/.config/qtile/battery-icons/battery-missing.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/battery-icons/battery-missing.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/bin/bt-bat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # IFS=$'\n' 4 | readarray -t macs < <(bluetoothctl devices | awk '{print $2}') 5 | # readarray -t names < <(bluetoothctl devices | awk '{$1=$2=""; print $0}' | sed 's/^[ \t]*//') 6 | num_devices=${#macs[@]} 7 | for ((i = 0; i < num_devices; i++)); do 8 | is_connected="$(bluetoothctl info "${macs[$i]}" | grep Connected | awk '{print $2}')" 9 | if [[ "$is_connected" != "no" ]]; then 10 | battery="$(bluetoothctl info "${macs[$i]}" | grep Battery | sed 's/.*(\(.*\))/\1/')" 11 | printf "%s" "$battery" 12 | fi 13 | done 14 | -------------------------------------------------------------------------------- /configs/bin/check-qtile-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | local_running="$(qtile cmd-obj -o cmd -f qtile_info | zsh -c 'qtile_to_json' | jq -r '.version' | sed 's/.*git\.//')" 4 | local_installed="$(qtile --version | sed -r 's/.*git\.//')" 5 | git="$(git -C /home/ervin/src/mine/qtile rev-parse --short master)" 6 | if [[ "$git" != "$local_installed" ]]; then 7 | echo Please upgrade qtile 8 | exit 0 9 | else 10 | if [[ "$local_installed" != "$local_running" ]]; then 11 | echo Please restart qtile 12 | exit 0 13 | else 14 | echo No need to upgrade 15 | fi 16 | fi 17 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/bt_bat.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import BtBattery 4 | from modules.settings import colors, settings 5 | 6 | 7 | def bt_bat(): 8 | return BtBattery( 9 | name="bt_battery", 10 | font=settings["text_font"], 11 | fontsize=settings["font_size"], 12 | foreground=colors["fg2"], 13 | mouse_callbacks={ 14 | "Button1": lazy.group["scratchpad"].dropdown_toggle("blueman"), 15 | }, 16 | padding=2, 17 | update_interval=30, 18 | ) 19 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/os_logo.py: -------------------------------------------------------------------------------- 1 | import distro 2 | from libqtile.lazy import lazy 3 | from qtile_extras import widget 4 | 5 | from modules.settings import settings 6 | 7 | if distro.id() == "debian": 8 | filename = "/usr/share/pixmaps/debian-logo.png" 9 | else: 10 | filename = "/usr/share/pixmaps/archlinux-logo.svg" 11 | 12 | 13 | def os_logo(): 14 | return widget.Image( 15 | name="arch_logo", 16 | filename=filename, 17 | margin=7, 18 | mouse_callbacks={"Button1": lazy.spawn(settings["cmds"]["menu"])}, 19 | ) 20 | -------------------------------------------------------------------------------- /configs/bin/start-spotify.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import subprocess 4 | 5 | # from time import sleep 6 | from libqtile.command.client import InteractiveCommandClient 7 | 8 | c = InteractiveCommandClient() 9 | current_group = c.group.info()["name"] 10 | 11 | if current_group != "media": 12 | c.screen.toggle_group("media") 13 | # c.group["media"].layout.set_ratio(0.8) 14 | # c.spawn("glava -r 'mod bars-left'") 15 | # c.spawn("glava -r 'mod bars-right'") 16 | subprocess.call("dex /usr/share/applications/spotify.desktop", shell=True) 17 | # c.group["media"].layout.set_ratio(0.8) 18 | -------------------------------------------------------------------------------- /configs/bin/x64ver.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | BEGIN { 4 | while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1 5 | if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1 6 | if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2 7 | if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3 8 | if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4 9 | if (level > 0) { print "CPU supports x86-64-v" level; exit level + 1 } 10 | exit 1 11 | } -------------------------------------------------------------------------------- /configs/bin/sort_json.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import argparse 4 | import json5 5 | import os 6 | 7 | parser = argparse.ArgumentParser( 8 | prog="sort_json.py", 9 | description="Sorts json file given as input", 10 | epilog="", 11 | ) 12 | parser.add_argument("filename") 13 | args = parser.parse_args() 14 | 15 | with open(os.path.abspath(args.filename), "r") as file: 16 | data = json5.load(file) 17 | 18 | with open(os.path.abspath(args.filename), "w") as file: 19 | json5.dump( 20 | data, file, indent=2, quote_keys=True, sort_keys=True, trailing_commas=False 21 | ) 22 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/check_updates.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import CheckUpdates 4 | from modules.settings import settings 5 | 6 | def check_updates(): 7 | return CheckUpdates( 8 | font=settings["icon_font"], 9 | fontsize=settings["font_size"], 10 | fmt="{}", 11 | mouse_callbacks={ 12 | "Button1": lazy.group["scratchpad"].dropdown_toggle("update"), 13 | "Button3": lazy.widget["checkupdates"].force_update(), 14 | }, 15 | padding=10, 16 | update_interval=60, 17 | ) 18 | -------------------------------------------------------------------------------- /configs/bin/find-hardlink.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2154 3 | # @arg directory! Directory to search hardlinks in 4 | # @arg target-directory+

Target directory 5 | 6 | eval "$(argc --argc-eval "$0" "$@")" 7 | files="$(find "$argc_target_directory" -type f | sort)" 8 | for file in $files; do 9 | for i in $(exa -aghl -i "$file" | sed 1d | awk '{print $1}'); do 10 | printf '\033[0mFor the file \033[0;33m%s\033[0m we have inode \033[0;33m%s\033[0m and the following hardlinks:\n' "$file" "$i" 11 | find "$argc_directory" -inum "$i" 2>/dev/null 12 | printf "\n" 13 | done 14 | done 15 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/check_updates.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import CheckUpdates 4 | from modules.settings import settings 5 | 6 | 7 | def check_updates(): 8 | return CheckUpdates( 9 | font=settings["icon_font"], 10 | fontsize=settings["font_size"], 11 | fmt="{}", 12 | mouse_callbacks={ 13 | "Button1": lazy.group["scratchpad"].dropdown_toggle("update"), 14 | "Button3": lazy.widget["checkupdates"].force_update(), 15 | }, 16 | padding=10, 17 | update_interval=60, 18 | ) 19 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from modules import hooks 2 | from modules.groups import groups 3 | from modules.keys import keys 4 | from modules.layouts import floating_layout, layouts 5 | from modules.mouse import mouse 6 | from modules.screens import screens 7 | from modules.settings import extension_defaults, widget_defaults 8 | from modules.theme import colors 9 | 10 | __all__ = [ 11 | "colors", 12 | "extension_defaults", 13 | "floating_layout", 14 | "groups", 15 | "hooks", 16 | "keys", 17 | "layouts", 18 | "mouse", 19 | "screens", 20 | "widget_defaults", 21 | ] 22 | -------------------------------------------------------------------------------- /configs/.config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | set database "sqlite" 2 | set first-page-column 1:1 3 | set font "CodeNewRoman Nerd Font Mono Bold 22" 4 | set guioptions none 5 | set page-padding 0 6 | set selection-clipboard clipboard 7 | set statusbar-h-padding 0 8 | set statusbar-v-padding 0 9 | set window-height 900 10 | set window-width 1440 11 | map u scroll full-up 12 | map d scroll full-down 13 | map D toggle_page_mode 14 | map r reload 15 | map R rotate 16 | map i recolor 17 | map p print 18 | map recolor 19 | unmap Left 20 | unmap Right 21 | map Left navigate previous 22 | map Right navigate next 23 | 24 | include dark 25 | -------------------------------------------------------------------------------- /configs/bin/greek-letters.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | printf '%s\n' "Alpha Α α Ά ά Omega Ω ω Ώ ώ 3 | Beta Β β Omicron Ο ο Ό ό 4 | Chi Χ χ Phi Φ φ 5 | Delta Δ δ Pi Π π 6 | Epsilon Ε ε Έ έ Psi Ψ ψ 7 | Eta Η η Ή ή Rho Ρ ρ 8 | Gamma Γ γ Sigma Σ σ ς 9 | Iota Ι ι Ϊ ϊ ΐ Ί ί Tau Τ τ 10 | Kappa Κ κ Theta Θ θ 11 | Lambda Λ λ Upsilon Υ υ ΰ Ϋ ϋ Ύ ύ 12 | Mu Μ μ Xi Ξ ξ 13 | Nu Ν ν Zeta Ζ ζ" 14 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/keys/__init__.py: -------------------------------------------------------------------------------- 1 | from .apps import apps_keys 2 | from .de import de_keys 3 | from .layout_managing import layout_managing_keys 4 | from .layouts import layouts_keys 5 | from .qtile_stuff import qtile_keys 6 | from .window_managing import window_managing_keys 7 | from .windows_and_groups import windows_and_groups_keys 8 | 9 | keys = [] 10 | keys.extend(windows_and_groups_keys) 11 | keys.extend(layouts_keys) 12 | keys.extend(layout_managing_keys) 13 | keys.extend(window_managing_keys) 14 | keys.extend(qtile_keys) 15 | keys.extend(apps_keys) 16 | keys.extend(de_keys) 17 | 18 | 19 | __all__ = ["keys"] 20 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/system-shutdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/mouse_over_clock.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import MouseOverClock 4 | from modules.settings import colors, settings 5 | 6 | 7 | def mouse_over_clock(): 8 | return MouseOverClock( 9 | font=settings["text_font"], 10 | fontsize=settings["font_size"], 11 | foreground=colors["darkblue"], 12 | format="%H:%M", 13 | # long_format="%H:%M:%S", 14 | long_format="%a %d/%m/%y %H:%M:%S", 15 | mouse_callbacks={"Button1": lazy.spawn("gsimplecal")}, 16 | padding=10, 17 | name="mouse_over_clock", 18 | ) 19 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/systray.py: -------------------------------------------------------------------------------- 1 | from extras.widgets import Systray 2 | from modules.decorations import decorations 3 | from modules.settings import colors, settings 4 | 5 | 6 | def systray(): 7 | return Systray( 8 | highlight_colour=colors["bg1"], 9 | icon_size=24, 10 | icon_theme="Papirus-Dark", 11 | menu_background=colors["bg0"], 12 | menu_font=settings["text_font"], 13 | menu_fontsize=15, 14 | menu_icon_size=15, 15 | menu_width=500, 16 | opacity=0.95, 17 | padding=10, 18 | **decorations["systray_decor"], # type: ignore 19 | ) 20 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/current_layout_icon.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from libqtile.lazy import lazy 4 | from qtile_extras import widget 5 | 6 | from modules.functions import set_layout_all 7 | from modules.settings import colors, config_path 8 | 9 | 10 | def current_layout_icon(): 11 | return widget.CurrentLayoutIcon( 12 | padding=13, 13 | scale=0.8, 14 | mouse_callbacks={ 15 | "Button2": set_layout_all(), 16 | "Button3": lazy.spawn(os.path.join(config_path, "scripts", "rofi_layout.py")), 17 | }, 18 | use_mask=True, 19 | foreground=colors["darkblue"], 20 | ) 21 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/group_box.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def group_box(): 7 | return widget.GroupBox( 8 | active=colors["darkblue"], 9 | disable_drag=True, 10 | font=settings["icon_font"], 11 | fontsize=settings["font_size"], 12 | hide_unused=True, 13 | inactive=colors["bg3"], 14 | margin_x=14, 15 | other_screen_border=colors["turquoise"], 16 | # padding_x=3, 17 | # padding_y=3, 18 | # rounded="true", 19 | this_current_screen_border=colors["darkblue"], 20 | ) 21 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/scripts/xrandr_daemon.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import pyrandr as randr 4 | 5 | # get connected screens 6 | cs = randr.connected_screens() 7 | es = randr.enabled_screens() 8 | 9 | for enabled, connected in zip(cs, es): 10 | # available resolutions as a tuple in the form of (width, height) 11 | reslist = enabled.available_resolutions() 12 | print(type(enabled)) 13 | print(max(reslist)) 14 | 15 | # cs.set_resolution((1024, 768)) 16 | # cs.set_as_primary(True) 17 | # 18 | # # rotate output contents by 90 degrees in the clockwise direction 19 | # cs.rotate(randr.RotateDirection.Right) 20 | # 21 | # cs.apply_settings() 22 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/group_box.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def group_box(): 7 | return widget.GroupBox( 8 | # active=colors["darkblue"], 9 | disable_drag=True, 10 | font=settings["icon_font"], 11 | fontsize=settings["font_size"] - 5, 12 | hide_unused=True, 13 | inactive=colors["bg3"], 14 | margin_x=14, 15 | # other_screen_border=colors["turquoise"], 16 | # padding_x=3, 17 | # padding_y=3, 18 | # rounded=True, 19 | this_current_screen_border=colors["darkblue"], 20 | ) 21 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/system-log-out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /configs/bin/bt-archnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ping 192.168.1.13 -c 3 -W 5 &>/dev/null 4 | then 5 | printf '%s\n' Starting bluetooth connection to '`archnet`'... 6 | ssh -i "$HOME/.ssh/id_rsa_hp" -p 5922 ervin@ervinpopescu.ddns.net sudo -S start_music.sh 7 | sleep 2 8 | if ! bluetoothctl info | grep 'Device 74:40:BB:B8:15:50' &>/dev/null 9 | then 10 | bluetoothctl connect 74:40:BB:B8:15:50 &>/dev/null 11 | printf '%s\n' 'Connected!' 12 | else 13 | printf '%s\n' 'Already connected!' 14 | fi 15 | else 16 | printf '%s\n' Stopping bluetooth connection to '`archnet`'... 17 | ssh -i "$HOME/.ssh/id_rsa_hp" -p 5922 ervin@ervinpopescu.ddns.net sudo -S stop_music.sh 18 | fi 19 | -------------------------------------------------------------------------------- /configs/lfub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is a wrapper script for lb that allows it to create image previews with 4 | # ueberzug. This works in concert with the lf configuration file and the 5 | # lf-cleaner script. 6 | 7 | set -e 8 | 9 | cleanup() { 10 | exec 3>&- 11 | rm "$FIFO_UEBERZUG" 12 | } 13 | 14 | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then 15 | lf "$@" 16 | else 17 | [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf" 18 | export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" 19 | mkfifo "$FIFO_UEBERZUG" 20 | ueberzug layer -s <"$FIFO_UEBERZUG" -p json & 21 | exec 3>"$FIFO_UEBERZUG" 22 | trap cleanup HUP INT QUIT TERM PWR EXIT 23 | lf "$@" 3>&- 24 | fi 25 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/current_layout_icon.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from libqtile.lazy import lazy 4 | from qtile_extras import widget 5 | 6 | from modules.functions import set_layout_all 7 | from modules.settings import colors, config_path 8 | 9 | 10 | def current_layout_icon(): 11 | return widget.CurrentLayoutIcon( 12 | padding=13, 13 | scale=0.8, 14 | mouse_callbacks={ 15 | "Button2": set_layout_all(), 16 | "Button3": lazy.spawn( 17 | os.path.join(config_path, "scripts", "rofi_layout.py") 18 | ), 19 | }, 20 | use_mask=True, 21 | foreground=colors["darkblue"], 22 | ) 23 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from modules.groups import groups 2 | from modules.hooks import alt_tab as alt_tab_hooks 3 | from modules.hooks import apps as apps_hooks 4 | from modules.hooks import misc as misc_hooks 5 | from modules.hooks import window_rules as window_rules_hooks 6 | from modules.keys import keys 7 | from modules.layouts import floating_layout, layouts 8 | from modules.mouse import mouse 9 | from modules.screens import screens 10 | 11 | __all__ = [ 12 | "apps_hooks", 13 | "alt_tab_hooks", 14 | "window_rules_hooks", 15 | "misc_hooks", 16 | "groups", 17 | "keys", 18 | "screens", 19 | "layouts", 20 | "floating_layout", 21 | "mouse", 22 | ] 23 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/__init__.py: -------------------------------------------------------------------------------- 1 | from .battery import Battery 2 | from .battery_icon import BatteryIcon 3 | from .bt_bat import BtBattery 4 | from .checkupdates import CheckUpdates 5 | from .cputemp import CPUTemp 6 | from .launchbar import LaunchBar 7 | from .mouseoverclock import MouseOverClock 8 | from .tasklist import TaskList 9 | from .uptime import Uptime 10 | from .weather import Weather 11 | from .widgetbox import WidgetBox 12 | 13 | __all__ = [ 14 | "CPUTemp", 15 | "MouseOverClock", 16 | "BtBattery", 17 | "BatteryIcon", 18 | "Battery", 19 | "CheckUpdates", 20 | "Uptime", 21 | "LaunchBar", 22 | "TaskList", 23 | "Weather", 24 | "WidgetBox", 25 | ] 26 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/mouseoverclock.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | 4 | class MouseOverClock(widget.Clock): 5 | defaults = [ 6 | ( 7 | "long_format", 8 | "%d/%m/%y %H:%M", 9 | "Format to show when mouse is over widget.", 10 | ), 11 | ] 12 | 13 | def __init__(self, **config): 14 | widget.Clock.__init__(self, **config) 15 | self.add_defaults(MouseOverClock.defaults) 16 | self.short_format = self.format 17 | 18 | def mouse_enter(self, *args): 19 | self.format = self.long_format 20 | self.bar.draw() 21 | 22 | def mouse_leave(self, *args): 23 | self.format = self.short_format 24 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/weather.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Weather 4 | from modules.functions import location 5 | from modules.popups import weather_popup 6 | from modules.settings import settings 7 | 8 | 9 | def weather(): 10 | return Weather( 11 | font=settings["text_font"], 12 | fontsize=settings["font_size"], 13 | appkey="ce4579dd88a8d4877a8c23f2a10d61cc", 14 | format="{icon} {temp:.0f}°{units_temperature}", 15 | location=location(), 16 | mouse_callbacks={ 17 | "Button1": weather_popup(), 18 | "Button3": lazy.widget["weather"].force_update(), 19 | }, 20 | padding=10, 21 | ) 22 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/github_notif.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras.widget import GithubNotifications 3 | 4 | from modules.settings import colors, config_path, settings 5 | 6 | 7 | def github_notif(): 8 | return GithubNotifications( 9 | active_colour=colors["red"], 10 | icon_size=settings["bar_height"] - 15, 11 | inactive_colour=colors["darkblue"], 12 | mouse_callbacks={ 13 | "Button1": lazy.spawn( 14 | ["xdg-open", "https://github.com/notifications"], 15 | ), 16 | "Button3": lazy.widget["githubnotifications"].update(), 17 | }, 18 | padding=10, 19 | token_file=f"{config_path}/github_token", 20 | ) 21 | -------------------------------------------------------------------------------- /configs/bin/autostart-wl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## "daemons" 4 | gnome-keyring-daemon --start & 5 | /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & 6 | /home/ervin/bin/battery-notification.sh & 7 | dunst & 8 | # /usr/lib/kdeconnectd & 9 | 10 | ## wallpaper 11 | swaybg -i "$(xdg-user-dir PICTURES)"/wallpapers/rand/valley.png & 12 | 13 | ## various apps 14 | # /home/ervin/.config/conky/start_qtile.sh -n & 15 | yes | /home/ervin/bin/rmshit.py & 16 | # firefox & 17 | # alacritty & 18 | 19 | ## systray 20 | # nm-applet & 21 | nm-tray & 22 | pa-applet --disable-key-grabbing --disable-notifications & 23 | blueman-tray & 24 | # blueman-applet & 25 | # flameshot & 26 | # waybar & 27 | # kdeconnect-indicator & 28 | 29 | ## compositor 30 | picom & 31 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/github_notif.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras.widget import GithubNotifications 3 | 4 | from modules.settings import colors, config_path, settings 5 | 6 | 7 | def github_notif(): 8 | return GithubNotifications( 9 | active_colour=colors["red"], 10 | icon_size=settings["bar_height"] - 15, 11 | inactive_colour=colors["darkblue"], 12 | mouse_callbacks={ 13 | "Button1": lazy.spawn( 14 | ["xdg-open", "https://github.com/notifications"], 15 | ), 16 | "Button3": lazy.widget["githubnotifications"].update(), 17 | }, 18 | padding=10, 19 | token_file=f"{config_path}/github_token", 20 | ) 21 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/weather.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import Weather 4 | from modules.functions import location 5 | from modules.popups import weather_popup 6 | from modules.settings import settings 7 | 8 | 9 | def weather(): 10 | return Weather( 11 | font=settings["text_font"], 12 | fontsize=settings["font_size"], 13 | appkey="ce4579dd88a8d4877a8c23f2a10d61cc", 14 | format="{icon} {temp:.0f}°{units_temperature}", 15 | location=location(), 16 | mouse_callbacks={ 17 | "Button1": weather_popup(), 18 | "Button3": lazy.widget["weather"].force_update(), 19 | }, 20 | padding=10, 21 | update_interval=60, 22 | ) 23 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/__init__.py: -------------------------------------------------------------------------------- 1 | from .battery import Battery 2 | from .battery_icon import BatteryIcon 3 | from .bt_bat import BtBattery 4 | from .checkupdates import CheckUpdates 5 | from .cputemp import CPUTemp 6 | from .launchbar import LaunchBar 7 | from .mouseoverclock import MouseOverClock 8 | from .systray import Systray 9 | from .tasklist import TaskList 10 | from .uptime import Uptime 11 | from .weather import Weather 12 | from .widgetbox import WidgetBox 13 | 14 | __all__ = [ 15 | "Battery", 16 | "BatteryIcon", 17 | "BtBattery", 18 | "CPUTemp", 19 | "CheckUpdates", 20 | "LaunchBar", 21 | "MouseOverClock", 22 | "Systray", 23 | "TaskList", 24 | "Uptime", 25 | "Weather", 26 | "WidgetBox", 27 | ] 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Home, sweet home! 2 | 3 | ``` 4 | ██ ██ 5 | ▄███▄██ ▄████▄ ███████ ▄▄█████▄ 6 | ██▀ ▀██ ██▀ ▀██ ██ ██▄▄▄▄ ▀ 7 | ██ ██ ██ ██ ██ ▀▀▀▀██▄ 8 | ▀██▄▄███ ▀██▄▄██▀ ██▄▄▄ █▄▄▄▄▄██ 9 | ▀▀▀ ▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀ 10 | ``` 11 | 12 | 13 | ## [Features](./markdown/features.md) 14 | 15 | ## Install ([+Arch](./markdown/archinstall.md)) 16 | 17 | ```console 18 | sudo cp -alf configs/etc/* /etc 19 | cp -alf configs/.config/* $HOME/.config 20 | mkdir $HOME/bin 21 | cp -alf configs/bin/* $HOME/bin 22 | fc-cache -fv 23 | exec zsh 24 | ``` 25 | 26 | ## [Keybindings](./markdown/keybinds.md) 27 | 28 | ## [Directory tree](./markdown/tree.md) 29 | -------------------------------------------------------------------------------- /configs/.config/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # source /usr/share/zsh/plugins/zsh-defer/zsh-defer.plugin.zsh 2 | # plugins 3 | source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh 4 | source /usr/share/zsh/plugins/zsh-z/zsh-z.plugin.zsh 5 | source /usr/share/nvm/init-nvm.sh 6 | 7 | # modules 8 | source "$ZDOTDIR/rc/keys.zsh" 9 | source "$ZDOTDIR/rc/opts.zsh" 10 | source "$ZDOTDIR/rc/completions.zsh" 11 | source "$ZDOTDIR/rc/prompt.zsh" 12 | source "$ZDOTDIR/rc/command_not_found_handler.zsh" 13 | source "$ZDOTDIR/rc/misc.zsh" 14 | source "$ZDOTDIR/rc/hooks.zsh" 15 | 16 | # zsh-abbr is special, needs to be at the end 17 | ABBR_TMPDIR=/tmp/zsh-abbr-user/ 18 | ABBR_USER_ABBREVIATIONS_FILE="$ZDOTDIR"/files/abbreviations 19 | source /usr/share/zsh/plugins/zsh-abbr/zsh-abbr.zsh 20 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/scripts/autohide.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import os 4 | import sys 5 | from time import sleep 6 | 7 | from libqtile.command.client import InteractiveCommandClient 8 | from xdo import Xdo 9 | 10 | from modules.settings import bar_height, margin_size 11 | 12 | c = InteractiveCommandClient() 13 | 14 | while True: 15 | xdo = Xdo() 16 | xm = xdo.get_mouse_location().x 17 | ym = xdo.get_mouse_location().y 18 | bar = c.screen.bar["top"].info() 19 | size = bar["size"] 20 | if size == bar_height + margin_size: 21 | visible = True 22 | elif size == 0: 23 | visible = False 24 | if ym == 0 and xm == 0: 25 | x = 100 26 | y = 100 27 | c.hide_show_bar("top") 28 | xdo.move_mouse(x, y) 29 | sleep(0.05) 30 | -------------------------------------------------------------------------------- /configs/.config/qtile/scripts/autohide.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import os 4 | import sys 5 | from time import sleep 6 | 7 | from libqtile.command.client import InteractiveCommandClient 8 | from xdo import Xdo 9 | 10 | from modules.settings import bar_height, margin_size 11 | 12 | c = InteractiveCommandClient() 13 | 14 | while True: 15 | xdo = Xdo() 16 | xm = xdo.get_mouse_location().x 17 | ym = xdo.get_mouse_location().y 18 | bar = c.screen.bar["top"].info() 19 | size = bar["size"] 20 | if size == bar_height + margin_size: 21 | visible = True 22 | elif size == 0: 23 | visible = False 24 | if ym == 0 and xm == 0: 25 | x = 100 26 | y = 100 27 | c.hide_show_bar("top") 28 | xdo.move_mouse(x, y) 29 | sleep(0.05) 30 | -------------------------------------------------------------------------------- /configs/.config/conky/local.conf: -------------------------------------------------------------------------------- 1 | -- vim: ft=lua:ts=4:sw=4:et:ai:cin 2 | 3 | -- override `conky.config` here 4 | local_config = { 5 | color0 = "#88c0d0", -- clock color 6 | color1 = "#88c0d0", -- heading 1 color 7 | color2 = "#88c0d0", -- heading 2 color 8 | color3 = "#a3be8c", -- chart color 9 | color4 = "white", -- fortune color 10 | default_color = "white" -- text color 11 | -- color0 = "#000000", -- clock color 12 | -- color1 = "#000000", -- heading 1 color 13 | -- color2 = "#000000", -- heading 2 color 14 | -- color3 = "#000000", -- chart color 15 | -- color4 = "#000000", 16 | -- default_color = "#000000" -- text color 17 | } 18 | 19 | -- override `conky.fonts` here 20 | local_fonts = { 21 | date = "CaskaydiaCove Nerd Font Mono:size=28" 22 | } 23 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwggrid/style.css: -------------------------------------------------------------------------------- 1 | button, label, image { 2 | background: none; 3 | border-style: none; 4 | box-shadow: none; 5 | color: #999; 6 | } 7 | 8 | button { 9 | padding: 5px; 10 | margin: 5px 11 | } 12 | 13 | button:hover { 14 | background-color: rgba(255, 255, 255, 0.1); 15 | } 16 | 17 | button:focus { 18 | box-shadow: 0 0 2px; 19 | } 20 | 21 | #searchbox { 22 | background: none; 23 | border-color: #999; 24 | color: #ccc; 25 | margin-top: 20px; 26 | margin-bottom: 20px 27 | } 28 | 29 | #separator { 30 | background-color: rgba(200, 200, 200, 0.5); 31 | margin-left: 500px; 32 | margin-right: 500px; 33 | margin-top: 10px; 34 | margin-bottom: 10px 35 | } 36 | 37 | #description { 38 | margin-bottom: 20px 39 | } 40 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/theme.py: -------------------------------------------------------------------------------- 1 | import json 2 | from os import path 3 | 4 | from modules.settings import config_path 5 | 6 | 7 | def load_theme(): 8 | theme = "catppuccin" 9 | 10 | config = path.join(config_path, "json", "config.json") 11 | if path.isfile(config): 12 | with open(config) as f: 13 | theme = json.load(f)["theme"] 14 | else: 15 | with open(config, "w") as f: 16 | f.write(f'{{"theme": "{theme}"}}\n') 17 | 18 | theme_file = path.join(config_path, "themes", f"{theme}.json") 19 | if not path.isfile(theme_file): 20 | raise FileNotFoundError(f'"{theme_file}" does not exist') 21 | 22 | with open(path.join(theme_file)) as f: 23 | return json.load(f) 24 | 25 | 26 | if __name__ == "modules.theme": 27 | colors = load_theme() 28 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/theme.py: -------------------------------------------------------------------------------- 1 | import json 2 | from os import path 3 | 4 | from modules.settings import config_path 5 | 6 | 7 | def load_theme(): 8 | theme = "catppuccin" 9 | 10 | config = path.join(config_path, "json", "config.json") 11 | if path.isfile(config): 12 | with open(config) as f: 13 | theme = json.load(f)["theme"] 14 | else: 15 | with open(config, "w") as f: 16 | f.write(f'{{"theme": "{theme}"}}\n') 17 | 18 | theme_file = path.join(config_path, "themes", f"{theme}.json") 19 | if not path.isfile(theme_file): 20 | raise FileNotFoundError(f'"{theme_file}" does not exist') 21 | 22 | with open(path.join(theme_file)) as f: 23 | return json.load(f) 24 | 25 | 26 | if __name__ == "modules.theme": 27 | colors = load_theme() 28 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/mouse_over_clock.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | 3 | from extras.widgets import MouseOverClock 4 | from modules.settings import colors, settings 5 | 6 | 7 | def mouse_over_clock(): 8 | # return widget.Clock( 9 | # font=settings["text_font"], 10 | # fontsize=settings["font_size"], 11 | # foreground=colors["darkblue"], 12 | # format="%H:%M", 13 | # ) 14 | return MouseOverClock( 15 | font=settings["text_font"], 16 | fontsize=settings["font_size"], 17 | foreground=colors["darkblue"], 18 | long_format="%a %d/%m/%y %H:%M:%S", 19 | format="%H:%M", 20 | mouse_callbacks={"Button1": lazy.spawn("gsimplecal")}, 21 | padding=10, 22 | name="mouse_over_clock", 23 | update_interval=1, 24 | ) 25 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/separators.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import colors, settings 4 | 5 | 6 | def small_spacer(**config): 7 | return widget.Spacer(**config) 8 | 9 | 10 | def stretch_spacer(): 11 | return widget.Spacer() 12 | 13 | 14 | def pipe(**config): 15 | return widget.Sep( 16 | padding=10, 17 | linewidth=5, 18 | size_percent=100, 19 | **config, 20 | ) 21 | 22 | 23 | def slash_left(**config): 24 | return widget.TextBox( 25 | "/", font=settings["icon_font"], fontsize=65, padding=5, **config 26 | ) 27 | 28 | 29 | def slash_right(**config): 30 | return widget.TextBox( 31 | "\\", 32 | font=settings["icon_font"], 33 | fontsize=65, 34 | padding=5, 35 | **config, 36 | ) 37 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/system-reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/separators.py: -------------------------------------------------------------------------------- 1 | from qtile_extras import widget 2 | 3 | from modules.settings import settings 4 | 5 | 6 | def small_spacer(**config): 7 | return widget.Spacer(**config) 8 | 9 | 10 | def stretch_spacer(**config): 11 | return widget.Spacer(**config) 12 | 13 | 14 | def pipe(**config): 15 | return widget.Sep( 16 | padding=10, 17 | linewidth=5, 18 | size_percent=100, 19 | **config, 20 | ) 21 | 22 | 23 | def slash_left(**config): 24 | return widget.TextBox( 25 | "/", font=settings["icon_font"], fontsize=65, padding=5, **config 26 | ) 27 | 28 | 29 | def slash_right(**config): 30 | return widget.TextBox( 31 | "\\", 32 | font=settings["icon_font"], 33 | fontsize=65, 34 | padding=5, 35 | **config, 36 | ) 37 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/system-lock-screen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /configs/.config/zsh/rc/opts.zsh: -------------------------------------------------------------------------------- 1 | setopt autocd # change directory just by typing its name 2 | setopt correct # auto correct mistakes 3 | setopt interactivecomments # allow comments in interactive mode 4 | setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ 5 | setopt nonomatch # hide error message if there is no match for the pattern 6 | setopt notify # report the status of background jobs immediately 7 | setopt numericglobsort # sort filenames numerically when it makes sense 8 | setopt promptsubst # enable command substitution in prompt 9 | setopt globdots # lets files beginning with a . be matched without explicitly specifying the dot 10 | # setopt noclobber # prevents you from accidentally overwriting an existing file 11 | setopt shwordsplit -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/cputemp.py: -------------------------------------------------------------------------------- 1 | from psutil import sensors_temperatures 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def cpu_temp(): 8 | return sensors_temperatures()["k10temp"][0].current 9 | 10 | 11 | class CPUTemp(widget.GenPollText): 12 | defaults = [ 13 | ("update_interval", 5, ""), 14 | ("padding", 10, ""), 15 | ("font", settings["text_font"], ""), 16 | ("fontsize", 34, ""), 17 | ("foreground", colors["darkblue"], ""), 18 | ] 19 | 20 | def __init__(self, **config): 21 | widget.GenPollText.__init__(self, **config) 22 | self.add_defaults(CPUTemp.defaults) 23 | 24 | def poll(self): 25 | data = int(cpu_temp()) 26 | self.foreground = colors["red"] if data > 65 else colors["lightgreen"] 27 | return f"{data}°C" 28 | -------------------------------------------------------------------------------- /configs/bin/bookmarkthis.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import os 4 | import subprocess 5 | 6 | bookmark = subprocess.check_output(["xclip", "-o"]).decode("utf-8") 7 | print(bookmark) 8 | file = os.path.join(os.path.expanduser("~"), ".local", "share", "bookmarks") 9 | 10 | 11 | def dunstify(title, string): 12 | subprocess.run( 13 | ["dunstify", "-a", "bookmark", "-u", "normal", "-r", "42523", title, string] 14 | ) 15 | 16 | 17 | with open(file, "r") as f: 18 | bookmarks = f.readlines() 19 | 20 | already_added = False 21 | for i in range(len(bookmarks)): 22 | if bookmark in bookmarks[i]: 23 | dunstify("Oops", "Already bookmarked!") 24 | already_added = True 25 | 26 | if not already_added: 27 | dunstify("Bookmark added", bookmark) 28 | bookmarks.append(bookmark + "\n") 29 | 30 | with open(file, "w") as f: 31 | f.writelines(bookmarks) 32 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/system-suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/cputemp.py: -------------------------------------------------------------------------------- 1 | from psutil import sensors_temperatures 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors, settings 5 | 6 | 7 | def cpu_temp(): 8 | return sensors_temperatures()["k10temp"][0].current 9 | 10 | 11 | class CPUTemp(widget.GenPollText): 12 | defaults = [ 13 | ("update_interval", 60, ""), 14 | ("padding", 10, ""), 15 | ("font", settings["text_font"], ""), 16 | ("fontsize", 34, ""), 17 | ("foreground", colors["darkblue"], ""), 18 | ] 19 | 20 | def __init__(self, **config): 21 | widget.GenPollText.__init__(self, **config) 22 | self.add_defaults(CPUTemp.defaults) 23 | 24 | def poll(self): 25 | data = int(cpu_temp()) 26 | self.foreground = colors["red"] if data > 65 else colors["lightgreen"] 27 | return f"{data}°C" 28 | -------------------------------------------------------------------------------- /configs/bin/change_theme.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import json 4 | import subprocess 5 | from datetime import datetime 6 | from time import sleep 7 | 8 | while True: 9 | with open("/tmp/sunrise", "r") as f: 10 | sunrise = f.read().strip() 11 | with open("/tmp/sunset", "r") as f: 12 | sunset = f.read().strip() 13 | with open("/home/ervin/.config/qtile/config.json") as f: 14 | config = json.load(f) 15 | with open("/home/ervin/.config/qtile/themes.json") as f: 16 | themes = json.load(f) 17 | now = datetime.now().strftime("%H:%M:%S") 18 | if now > sunset or now < sunrise: 19 | if config["theme"] != themes["night"]: 20 | subprocess.call(f'qchanger.py -t {themes["night"]}'.split()) 21 | elif config["theme"] != themes["day"]: 22 | subprocess.call(f'qchanger.py -t {themes["day"]}'.split()) 23 | sleep(60) 24 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/tasklist.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Match 2 | from qtile_extras import widget 3 | 4 | 5 | class TaskList(widget.TaskList): 6 | defaults = [] 7 | 8 | def __init__(self, **config): 9 | widget.TaskList.__init__(self, **config) 10 | self.add_defaults(TaskList.defaults) 11 | self.add_callbacks({"Button2": self.close_window}) 12 | 13 | def close_window(self): 14 | if self.clicked: 15 | window = self.clicked 16 | window.kill() 17 | 18 | @property 19 | def windows(self): 20 | if self.qtile.core.name == "wayland": 21 | windows = [ 22 | w 23 | for w in self.bar.screen.group.windows 24 | if w.match(~Match(title="qalttab")) 25 | ] 26 | return windows 27 | return self.bar.screen.group.windows 28 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/task_list.py: -------------------------------------------------------------------------------- 1 | from extras.widgets import TaskList 2 | from modules.settings import colors, settings 3 | 4 | margin_y = -1 5 | margin_x = 5 6 | 7 | 8 | def parse_text(title): 9 | for string in [ 10 | " - Firefox", 11 | " - Chromium", 12 | " - Google Chrome", 13 | " — Firefox Developer Edition", 14 | ]: 15 | title = title.replace(string, "") 16 | return title 17 | 18 | 19 | def task_list(): 20 | return TaskList( 21 | border=colors["bg2"], 22 | highlight_method="block", 23 | margin_x=margin_x, 24 | margin_y=margin_y, 25 | font=settings["text_font"], 26 | fontsize=settings["font_size"] - 3, 27 | stretch=True, 28 | parse_text=parse_text, 29 | txt_floating="🗗 ", 30 | txt_maximized="🗖 ", 31 | txt_minimized="🗕 ", 32 | ) 33 | -------------------------------------------------------------------------------- /configs/.config/spicetify/config-xpui.ini: -------------------------------------------------------------------------------- 1 | [Setting] 2 | check_spicetify_upgrade = 0 3 | spotify_path = /opt/spotify 4 | prefs_path = /home/ervin/.config/spotify/prefs 5 | color_scheme = blue 6 | spotify_launch_flags = 7 | current_theme = catppuccin-mocha 8 | inject_css = 1 9 | replace_colors = 1 10 | overwrite_assets = 1 11 | inject_theme_js = 1 12 | 13 | [Preprocesses] 14 | disable_sentry = 1 15 | disable_ui_logging = 1 16 | remove_rtl_rule = 1 17 | expose_apis = 1 18 | disable_upgrade_check = 1 19 | 20 | [AdditionalOptions] 21 | extensions = autoSkipVideo.js|catppuccin-mocha.js|adblock.js 22 | custom_apps = marketplace 23 | sidebar_config = 1 24 | home_config = 1 25 | experimental_features = 1 26 | 27 | [Patch] 28 | 29 | ; DO NOT CHANGE! 30 | [Backup] 31 | version = 1.1.84.716.gc5f8b819 32 | with = Dev 33 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/battery.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget import base 2 | from psutil import sensors_battery 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | class Battery(widget.GenPollText): 9 | defaults = [ 10 | ("update_interval", 1, "Update interval in seconds"), 11 | ("fontsize", 34, ""), 12 | ("foreground", colors["fg2"], ""), 13 | ] 14 | 15 | def __init__(self, **config): 16 | widget.GenPollText.__init__(self, **config) 17 | self.add_defaults(Battery.defaults) 18 | self.add_defaults(base.MarginMixin.defaults) 19 | 20 | def func(self): 21 | return int(sensors_battery().percent) 22 | 23 | def poll(self): 24 | if not self.func: 25 | return "You need a poll function" 26 | data = self.func() 27 | self.foreground = colors["lightgreen"] if data > 10 else colors["red"] 28 | return f"{data}%" 29 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/battery.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget import base 2 | from psutil import sensors_battery 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | class Battery(widget.GenPollText): 9 | defaults = [ 10 | ("update_interval", 60, "Update interval in seconds"), 11 | ("fontsize", 34, ""), 12 | ("foreground", colors["fg2"], ""), 13 | ] 14 | 15 | def __init__(self, **config): 16 | widget.GenPollText.__init__(self, **config) 17 | self.add_defaults(Battery.defaults) 18 | self.add_defaults(base.MarginMixin.defaults) 19 | 20 | def func(self): 21 | return int(sensors_battery().percent) 22 | 23 | def poll(self): 24 | if not self.func: 25 | return "You need a poll function" 26 | data = self.func() 27 | self.foreground = colors["lightgreen"] if data > 10 else colors["red"] 28 | return f"{data}%" 29 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/uptime.py: -------------------------------------------------------------------------------- 1 | from operator import mod 2 | 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | def get_uptime(): 9 | with open("/proc/uptime", "r") as f: 10 | seconds = int(float(f.readline().split()[0])) 11 | days = seconds // 86400 12 | hours = mod(seconds, 86400) // 3600 13 | if days == 0: 14 | return f"up {hours}h" 15 | return f"up {days}d" if hours == 24 else f"up {days}d,{hours}h" 16 | 17 | 18 | class Uptime(widget.GenPollText): 19 | defaults = [ 20 | ("update_interval", 3600, "Update interval in seconds"), 21 | ("padding", 5, ""), 22 | ("fontsize", 13, ""), 23 | ("foreground", colors["fg2"], ""), 24 | ( 25 | "func", 26 | lambda: str(get_uptime()), 27 | ), 28 | ] 29 | 30 | def __init__(self, **config): 31 | widget.GenPollText.__init__(self, **config) 32 | self.add_defaults(Uptime.defaults) 33 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/uptime.py: -------------------------------------------------------------------------------- 1 | from operator import mod 2 | 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | def get_uptime(): 9 | with open("/proc/uptime", "r") as f: 10 | seconds = int(float(f.readline().split()[0])) 11 | days = seconds // 86400 12 | hours = mod(seconds, 86400) // 3600 13 | if days == 0: 14 | return f"up {hours}h" 15 | return f"up {days}d" if hours == 24 else f"up {days}d,{hours}h" 16 | 17 | 18 | class Uptime(widget.GenPollText): 19 | defaults = [ 20 | ("update_interval", 3600, "Update interval in seconds"), 21 | ("padding", 5, ""), 22 | ("fontsize", 13, ""), 23 | ("foreground", colors["fg2"], ""), 24 | ( 25 | "func", 26 | lambda: str(get_uptime()), 27 | ), 28 | ] 29 | 30 | def __init__(self, **config): 31 | widget.GenPollText.__init__(self, **config) 32 | self.add_defaults(Uptime.defaults) 33 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/music.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.popups import music_layout 5 | from modules.settings import colors, settings 6 | 7 | 8 | def music(): 9 | return widget.Mpris2( 10 | font=settings["text_font"], 11 | foreground=colors["darkblue"], 12 | format="{xesam:title} - {xesam:artist}", 13 | mouse_callbacks={ 14 | "Button1": lazy.widget["mpris2"].show_popup(), 15 | "Button3": lazy.widget["mpris2"].force_update(), 16 | }, 17 | popup_layout=music_layout(), 18 | popup_show_args={ 19 | "relative_to": 1, 20 | "x": settings["margin_size"], 21 | "y": settings["bar_height"] + 2 * settings["margin_size"], 22 | # "centered": True, 23 | "warp_pointer": True, 24 | }, 25 | scroll_delay=10, 26 | scroll_interval=0.01, 27 | scroll=True, 28 | width=300, 29 | ) 30 | -------------------------------------------------------------------------------- /configs/bin/wttr.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # If you source this file, it will set WTTR_PARAMS as well as show weather. 3 | 4 | # WTTR_PARAMS is space-separated URL parameters, many of which are single characters that can be 5 | # lumped together. For example, "F q m" behaves the same as "Fqm". 6 | if [[ -z "$WTTR_PARAMS" ]]; then 7 | # Form localized URL parameters for curl 8 | if [[ -t 1 ]] && [[ "$(tput cols)" -lt 125 ]]; then 9 | WTTR_PARAMS+='n' 10 | fi 2> /dev/null 11 | for _token in $( locale LC_MEASUREMENT ); do 12 | case $_token in 13 | 1) WTTR_PARAMS+='m' ;; 14 | 2) WTTR_PARAMS+='u' ;; 15 | esac 16 | done 2> /dev/null 17 | unset _token 18 | export WTTR_PARAMS 19 | fi 20 | 21 | wttr() { 22 | local location="${1// /+}" 23 | command shift 24 | local args="" 25 | for p in $WTTR_PARAMS "$@"; do 26 | args+=" --data-urlencode $p " 27 | done 28 | curl -fGsS -H "Accept-Language: ${LANG%_*}" $args --compressed "wttr.in/${location}" 29 | } 30 | 31 | wttr "$@" 32 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/music.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | from modules.popups import music_layout 5 | from modules.settings import colors, settings 6 | 7 | 8 | def music(): 9 | return widget.Mpris2( 10 | font=settings["text_font"], 11 | foreground=colors["darkblue"], 12 | format="{xesam:title} - {xesam:artist}", 13 | mouse_callbacks={ 14 | "Button1": lazy.widget["mpris2"].show_popup(), 15 | "Button3": lazy.widget["mpris2"].force_update(), 16 | }, 17 | popup_layout=music_layout(), 18 | popup_show_args={ 19 | "relative_to": 1, 20 | "x": settings["margin_size"], 21 | "y": settings["bar_height"] + 2 * settings["margin_size"], 22 | # "centered": True, 23 | "warp_pointer": True, 24 | }, 25 | scroll_delay=10, 26 | scroll_interval=0.01, 27 | scroll=True, 28 | width=300, 29 | ) 30 | -------------------------------------------------------------------------------- /configs/.config/qtile/config.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | from modules import ( 4 | extension_defaults, 5 | floating_layout, 6 | groups, 7 | keys, 8 | layouts, 9 | mouse, 10 | screens, 11 | widget_defaults, 12 | ) 13 | from modules.hooks import apps as apps_hooks 14 | from modules.hooks import layout as layout_hooks 15 | from modules.hooks import misc as misc_hooks 16 | from modules.settings import config_path 17 | 18 | assert floating_layout 19 | assert groups 20 | assert keys 21 | assert layouts 22 | assert mouse 23 | assert screens 24 | assert widget_defaults 25 | assert extension_defaults 26 | 27 | assert apps_hooks 28 | assert layout_hooks 29 | assert misc_hooks 30 | 31 | with open(os.path.join(config_path, "json", "config.json")) as f: 32 | config = json.load(f) 33 | for key, val in config.items(): 34 | if key != "theme": 35 | exec(f"{key}=val") 36 | 37 | def focus_on_window_activation(win): 38 | return "feh_thumbnail" not in win.get_wm_class() 39 | -------------------------------------------------------------------------------- /configs/bin/dot-backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOTS_FOLDER="/home/ervin/www/src/mine/dots" 4 | 5 | cd "$DOTS_FOLDER" || exit 1 6 | 7 | dots-dir-tree.sh "$DOTS_FOLDER" 8 | pkglist-backup.sh "$DOTS_FOLDER" 9 | printf '%s\n\n' "# Keybindings" > keybinds.md 10 | qtilekeys.py md >> keybinds.md 11 | sed -i -e '/--------/a | |\n|**WINDOWS & GROUPS**|\n| |' keybinds.md 12 | sed -i -e '/Minimize all windows in all groups/a | |\n|**LAYOUTS**|\n| |' keybinds.md 13 | sed -i -e '/Grow down (bsp&col)/a | |\n| **LAYOUT MANAGING** |\n| |' keybinds.md 14 | sed -i -e '/Shuffle down/a | |\n| **WINDOW MANAGING** |\n| |' keybinds.md 15 | sed -i -e '/Kill window/a | |\n| **QTILE** |\n| |' keybinds.md 16 | sed -i -e '/layout on all groups/a | |\n| **APPS** |\n| |' keybinds.md 17 | sed -i -e '/Open flameshot/a | |\n| **DE KEYS** |\n| |' keybinds.md 18 | sed -i -e 's/||/\\|\\|/g' keybinds.md 19 | git -C "$DOTS_FOLDER" add . 20 | git -C "$DOTS_FOLDER" commit -m "$(curl -sk https://whatthecommit.com/index.txt)" 21 | git -C "$DOTS_FOLDER" push 22 | -------------------------------------------------------------------------------- /configs/bin/brightnessctl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh 4 | # https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a 5 | 6 | function get_brightness { 7 | printf "%.0f" " $(($(brightnessctl g)*100/$(brightnessctl m)))" 8 | } 9 | 10 | function send_notification { 11 | icon="/usr/share/icons/Papirus-Dark/symbolic/status/display-brightness-symbolic.svg" 12 | # Send the notification 13 | dunstify -I "$icon" -a "brightness" -r 5555 -u low \ 14 | -h int:value:"$brightness" "${brightness}%" 15 | } 16 | 17 | case $1 in 18 | up) 19 | # increase the backlight by 10% 20 | brightnessctl s 10%+ 21 | brightness=$(get_brightness) 22 | send_notification 23 | ;; 24 | down) 25 | # decrease the backlight by 10% 26 | brightness=$(get_brightness) 27 | if [ "$brightness" -gt 12 ] 28 | then 29 | brightnessctl s 10%- 30 | fi 31 | brightness=$(get_brightness) 32 | send_notification 33 | ;; 34 | esac 35 | -------------------------------------------------------------------------------- /configs/.config/X11/xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck disable=all 3 | 4 | userresources=$HOME/.config/X11/Xresources 5 | usermodmap=$HOME/.config/X11/Xmodmap 6 | userprofile=$HOME/.config/X11/xprofile 7 | sysresources=/etc/X11/xinit/.Xresources 8 | sysmodmap=/etc/X11/xinit/.Xmodmap 9 | sysprofile=/etc/xprofile 10 | 11 | # merge in defaults and keymaps 12 | 13 | [ -f "$sysresources" ] && xrdb -merge $sysresources 14 | [ -f "$sysmodmap" ] && xmodmap $sysmodmap 15 | [ -f "$sysprofile" ] && . "$sysprofile" 16 | [ -f "$userresources" ] && xrdb -merge "$userresources" 17 | [ -f "$usermodmap" ] && xmodmap "$usermodmap" 18 | [ -f "$userprofile" ] && . "$userprofile" 19 | # start some nice programs 20 | 21 | if [ -d /etc/X11/xinit/xinitrc.d ]; then 22 | for f in /etc/X11/xinit/xinitrc.d/?*.sh; do 23 | [ -x "$f" ] && . "$f" 24 | done 25 | unset f 26 | fi 27 | 28 | xsetroot -solid "#1e1e2e" 29 | xsetroot -cursor_name left_ptr 30 | exec qtile start 31 | # exec i3 32 | # exec qtile start -c /usr/lib/python3.11/site-packages/libqtile/resources/default_config.py 33 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/mouseoverclock.py: -------------------------------------------------------------------------------- 1 | from libqtile.command.base import expose_command 2 | from qtile_extras import widget 3 | 4 | 5 | class MouseOverClock(widget.Clock): 6 | defaults = [ 7 | ( 8 | "long_format", 9 | "%d/%m/%y %H:%M", 10 | "Format to show when mouse is over widget.", 11 | ), 12 | ] 13 | 14 | def __init__(self, **config): 15 | widget.Clock.__init__(self, **config) 16 | self.add_defaults(MouseOverClock.defaults) 17 | self.short_format = self.format 18 | 19 | def mouse_enter(self, *args): 20 | self.format = self.long_format 21 | self.bar.draw() 22 | 23 | def mouse_leave(self, *args): 24 | self.format = self.short_format 25 | self.bar.draw() 26 | 27 | @expose_command() 28 | def toggle_format(self): 29 | if self.format == self.long_format: 30 | self.format = self.short_format 31 | if self.format == self.short_format: 32 | self.format = self.long_format 33 | -------------------------------------------------------------------------------- /configs/bin/battery-notification.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | import subprocess 3 | import time 4 | 5 | ac_power_online_filename = "/sys/class/power_supply/ACAD/online" 6 | battery_percentage_filename = "/sys/class/power_supply/BAT1/capacity" 7 | 8 | 9 | def dunstify(notification, urgency, id): 10 | subprocess.run( 11 | f"dunstify -a batteryNotification -I /usr/share/icons/Papirus/24x24/panel/battery-low.svg -u {urgency} -r {id}".split() 12 | + [notification] 13 | ) 14 | 15 | 16 | notification_id = "636223" 17 | 18 | while True: 19 | with open(ac_power_online_filename, "r") as f: 20 | AC_online = int(f.read()) == 1 21 | with open(battery_percentage_filename, "r") as f: 22 | percentage = int(f.read()) 23 | if percentage < 10: 24 | if AC_online: 25 | subprocess.run(f"dunstify -C {notification_id}".split()) 26 | else: 27 | dunstify( 28 | notification="charge your laptop!", 29 | urgency="critical", 30 | id=notification_id, 31 | ) 32 | time.sleep(10) 33 | -------------------------------------------------------------------------------- /configs/bin/location.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import json 4 | 5 | import requests 6 | 7 | API_KEY = "AIzaSyCPtv9xFgnklV8vZj9lP6WhWXxRDx5TLP4" 8 | post_data = {"considerIp": "true"} 9 | geolocate_response = requests.post( 10 | url=f"https://www.googleapis.com/geolocation/v1/geolocate?key={API_KEY}" 11 | ).json()["location"] 12 | lat = geolocate_response["lat"] 13 | lng = geolocate_response["lng"] 14 | geocode_response = requests.post( 15 | url=f"https://maps.googleapis.com/maps/api/geocode/json?latlng={lat},{lng}&key={API_KEY}", 16 | data=post_data, 17 | ).json() 18 | locality: str = None 19 | country_code: str = None 20 | for component in geocode_response["results"][0]["address_components"]: 21 | if "locality" in component["types"]: 22 | locality = component["long_name"] 23 | if "country" in component["types"]: 24 | country_code = component["short_name"] 25 | location = dict(location=f"{locality},{country_code}") 26 | with open("/home/ervin/.local/share/location.json", "w") as f: 27 | json.dump( 28 | obj=location, 29 | fp=f, 30 | ensure_ascii=True, 31 | ) 32 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/bt_bat.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | 4 | from libqtile.widget import base 5 | from qtile_extras import widget 6 | 7 | from modules.settings import colors 8 | 9 | 10 | class BtBattery(widget.GenPollText): 11 | defaults = [ 12 | ("update_interval", 1, "Update interval in seconds"), 13 | ("fontsize", 34, ""), 14 | ("foreground", colors["fg2"], ""), 15 | ] 16 | 17 | def __init__(self, **config): 18 | widget.GenPollText.__init__(self, **config) 19 | self.add_defaults(BtBattery.defaults) 20 | self.add_defaults(base.MarginMixin.defaults) 21 | self.add_callbacks({"Button3": self.force_update}) 22 | 23 | def poll(self): 24 | data = ( 25 | subprocess.check_output( 26 | os.path.join(os.environ["HOME"], "bin", "bt-bat.sh") 27 | ) 28 | .decode("utf-8") 29 | .strip("\n") 30 | ) 31 | if data == "": 32 | return "" 33 | self.foreground = colors["lightgreen"] if int(data) > 10 else colors["red"] 34 | return f" {data}%" 35 | -------------------------------------------------------------------------------- /configs/.config/nwg-launchers/nwgbar/bar.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name": "Lock screen", 3 | "exec": "betterlockscreen -l dimblur", 4 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/system-lock-screen.svg" 5 | }, 6 | { 7 | "name": "Sleep", 8 | "exec": "systemctl -i suspend", 9 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/system-suspend.svg" 10 | }, 11 | { 12 | "name": "Logout", 13 | "exec": "loginctl terminate-session self", 14 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/system-log-out.svg" 15 | }, 16 | { 17 | "name": "Reboot", 18 | "exec": "systemctl -i reboot", 19 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/system-reboot.svg" 20 | }, 21 | { 22 | "name": "Reboot to Windows", 23 | "exec": "/home/ervin/bin/reboot-to-win.sh", 24 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/microsoft.svg" 25 | }, 26 | { 27 | "name": "Shutdown", 28 | "exec": "systemctl -i poweroff", 29 | "icon": "/home/ervin/.config/nwg-launchers/nwgbar/system-shutdown.svg" 30 | } 31 | ] -------------------------------------------------------------------------------- /configs/.config/qtile-wl/scripts/listen_for_alt_release.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import select 4 | import subprocess 5 | 6 | 7 | def notify_qtile(): 8 | subprocess.run( 9 | ["qticc", "cmd-obj", "-f", "fire_user_hook", "-a", "alt_release"], 10 | stdout=subprocess.DEVNULL, 11 | stderr=subprocess.DEVNULL, 12 | ) 13 | 14 | 15 | def listen_for_alt_release(): 16 | process = subprocess.Popen( 17 | ["libinput", "debug-events", "--show-keycodes"], stdout=subprocess.PIPE 18 | ) 19 | 20 | poll = select.poll() 21 | poll.register(process.stdout, select.POLLIN) 22 | 23 | try: 24 | while True: 25 | if poll.poll(100): 26 | line = process.stdout.readline() 27 | if not line: 28 | break 29 | decoded_line = line.decode("utf-8").strip() 30 | 31 | if "KEY_LEFTALT" in decoded_line and "released" in decoded_line: 32 | notify_qtile() 33 | except KeyboardInterrupt: 34 | process.terminate() 35 | 36 | 37 | if __name__ == "__main__": 38 | listen_for_alt_release() 39 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/screens.py: -------------------------------------------------------------------------------- 1 | from libqtile import bar 2 | from libqtile.config import Screen 3 | 4 | from modules.settings import bar_bg, settings 5 | from modules.widgets import widgets_1, widgets_2, widgets_3 6 | 7 | bh = settings["bar_height"] 8 | ms = settings["margin_size"] 9 | 10 | def statusbar(widgets, margin, size): 11 | return bar.Bar( 12 | widgets, 13 | size=size, 14 | margin=margin, 15 | background=bar_bg, 16 | ) 17 | 18 | 19 | screens = [ 20 | Screen( 21 | bottom=statusbar( 22 | widgets=widgets_1, 23 | size=bh, 24 | margin=[0, ms, ms, ms], 25 | ), 26 | x11_drag_polling_rate=60 27 | ), 28 | Screen( 29 | bottom=statusbar( 30 | widgets=widgets_2, 31 | size=bh, 32 | margin=[0, ms, ms, ms], 33 | ), 34 | x11_drag_polling_rate=60 35 | ), 36 | Screen( 37 | bottom=statusbar( 38 | widgets=widgets_3, 39 | size=bh, 40 | margin=[0, ms, ms, ms], 41 | ), 42 | x11_drag_polling_rate=60 43 | ), 44 | ] 45 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/wallpaper.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | # import os 5 | # import subprocess 6 | from modules.settings import colors, settings 7 | 8 | 9 | def wallpaper(): 10 | return widget.TextBox( 11 | font=settings["icon_font"], 12 | foreground=colors["red"], 13 | mouse_callbacks={"Button1": lazy.spawn("/home/ervin/bin/run_wall.sh rand all")}, 14 | padding=10, 15 | text="", 16 | ) 17 | # pix = subprocess.check_output("xdg-user-dir PICTURES".split()).decode() 18 | # return widget.Wallpaper( 19 | # # random_selection=True, 20 | # # directory=os.path.join( 21 | # # pix, 22 | # # "wallpapers", 23 | # # "rand", 24 | # # ), 25 | # font="Font Awesome 6 Free Solid", 26 | # fontsize=34, 27 | # foreground=colors["red"], 28 | # label="", 29 | # padding=10, 30 | # wallpaper=os.path.join( 31 | # pix, 32 | # "wallpapers", 33 | # "rand", 34 | # "windowsy.png", 35 | # ), 36 | # ) 37 | -------------------------------------------------------------------------------- /configs/.config/zsh/rc/command_not_found_handler.zsh: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | # # Pacman 4 | # function command_not_found_handler { 5 | # local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m' 6 | # printf 'zsh: command not found: %s\n' "$1" 7 | # local entries=( 8 | # ${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"} 9 | # ) 10 | # if (( ${#entries[@]} )) 11 | # then 12 | # printf "${bright}$1${reset} may be found in the following packages:\n" 13 | # local pkg 14 | # for entry in "${entries[@]}" 15 | # do 16 | # # (repo package version file) 17 | # local fields=( 18 | # ${(0)entry} 19 | # ) 20 | # if [[ "$pkg" != "${fields[2]}" ]] 21 | # then 22 | # printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}" 23 | # fi 24 | # printf ' /%s\n' "${fields[4]}" 25 | # pkg="${fields[2]}" 26 | # done 27 | # fi 28 | # return 127 29 | # 30 | # } 31 | 32 | source /usr/share/doc/pkgfile/command-not-found.zsh 33 | 34 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/checkupdates.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import shutil 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | def chkup(): 8 | try: 9 | num = len(subprocess.check_output("checkupdates").decode("utf-8").splitlines()) 10 | return str(num) 11 | except subprocess.CalledProcessError as e: 12 | if e.returncode == 0: 13 | return str(num) 14 | elif e.returncode == 2: 15 | return "0" 16 | else: 17 | shutil.rmtree("/tmp/checkup-db-1000") 18 | return chkup() 19 | 20 | class CheckUpdates(widget.GenPollText): 21 | defaults = [ 22 | ("update_interval", 3600, "Update interval in seconds"), 23 | ("padding", 5, ""), 24 | ("fontsize", 12, ""), 25 | ("foreground", colors["fg2"], ""), 26 | ] 27 | 28 | def __init__(self, **config): 29 | widget.GenPollText.__init__(self, **config) 30 | self.add_defaults(CheckUpdates.defaults) 31 | 32 | def poll(self): 33 | data = chkup() 34 | self.foreground = colors["lightgreen"] if data == "0" else colors["red"] 35 | return data 36 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/battery_icon.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget.battery import BatteryState, BatteryStatus 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors 5 | 6 | 7 | class BatteryIcon(widget.BatteryIcon): 8 | defaults = ( 9 | ("update_interval", 1, "Update interval in seconds"), 10 | ("fontsize", 34, ""), 11 | ("foreground", colors["fg2"], ""), 12 | ) 13 | 14 | def __init__(self, **config): 15 | widget.BatteryIcon.__init__(self, **config) 16 | self.add_defaults(BatteryIcon.defaults) 17 | 18 | @staticmethod 19 | def _get_icon_key(status: BatteryStatus) -> str: 20 | key = "battery" 21 | 22 | percent = status.percent 23 | if percent < 0.1: 24 | key += "-caution" 25 | elif percent < 0.3: 26 | key += "-low" 27 | elif percent < 0.8: 28 | key += "-good" 29 | else: 30 | key += "-full" 31 | 32 | state = status.state 33 | if state == BatteryState.CHARGING: 34 | key += "-charging" 35 | elif state == BatteryState.FULL: 36 | key += "-charged" 37 | return key 38 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/battery_icon.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget.battery import BatteryState, BatteryStatus 2 | from qtile_extras import widget 3 | 4 | from modules.settings import colors 5 | 6 | 7 | class BatteryIcon(widget.BatteryIcon): 8 | defaults = ( 9 | ("update_interval", 60, "Update interval in seconds"), 10 | ("fontsize", 34, ""), 11 | ("foreground", colors["fg2"], ""), 12 | ) 13 | 14 | def __init__(self, **config): 15 | widget.BatteryIcon.__init__(self, **config) 16 | self.add_defaults(BatteryIcon.defaults) 17 | 18 | @staticmethod 19 | def _get_icon_key(status: BatteryStatus) -> str: 20 | key = "battery" 21 | 22 | percent = status.percent 23 | if percent < 0.1: 24 | key += "-caution" 25 | elif percent < 0.3: 26 | key += "-low" 27 | elif percent < 0.8: 28 | key += "-good" 29 | else: 30 | key += "-full" 31 | 32 | state = status.state 33 | if state == BatteryState.CHARGING: 34 | key += "-charging" 35 | elif state == BatteryState.FULL: 36 | key += "-charged" 37 | return key 38 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/checkupdates.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import shutil 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | def chkup(): 9 | try: 10 | num = len(subprocess.check_output("checkupdates").decode("utf-8").splitlines()) 11 | return str(num) 12 | except subprocess.CalledProcessError as e: 13 | if e.returncode == 0: 14 | return str(num) 15 | elif e.returncode == 2: 16 | return "0" 17 | else: 18 | shutil.rmtree("/tmp/checkup-db-1000") 19 | return chkup() 20 | 21 | 22 | class CheckUpdates(widget.GenPollText): 23 | defaults = [ 24 | ("update_interval", 3600, "Update interval in seconds"), 25 | ("padding", 5, ""), 26 | ("fontsize", 12, ""), 27 | ("foreground", colors["fg2"], ""), 28 | ] 29 | 30 | def __init__(self, **config): 31 | widget.GenPollText.__init__(self, **config) 32 | self.add_defaults(CheckUpdates.defaults) 33 | 34 | def poll(self): 35 | data = chkup() 36 | self.foreground = colors["lightgreen"] if data == "0" else colors["red"] 37 | return data 38 | -------------------------------------------------------------------------------- /configs/.config/X11/Xresources: -------------------------------------------------------------------------------- 1 | alttab.background: #1E1E2E 2 | alttab.bordercolor: #1E1E2E 3 | alttab.foreground: #D9E0EE 4 | alttab.framecolor: #DDB6F2 5 | alttab.inactcolor: #1E1E2E 6 | alttab.icon.source: 1 7 | alttab.icon.geometry: 250x200 8 | alttab.tile.geometry: 250x200 9 | alttab.framewidth: 12 10 | alttab.borderwidth: 10 11 | alttab.desktops: 2 12 | alttab.screens: 0 13 | alttab.windowmanager: 1 14 | alttab.font: xft:CaskaydiaCove Nerd Font Mono Bold-30 15 | /*alttab.bottomline: 0*/ 16 | *background: #1E1E2E 17 | *color0: #6E6C7E 18 | *color10: #ABE9B3 19 | *color11: #FAE3B0 20 | *color12: #96CDFB 21 | *color13: #DDB6F2 22 | *color14: #F5C2E7 23 | *color15: #D9E0EE 24 | *color1: #F28FAD 25 | *color2: #ABE9B3 26 | *color3: #FAE3B0 27 | *color4: #96CDFB 28 | *color5: #DDB6F2 29 | *color6: #F5C2E7 30 | *color7: #C3BAC6 31 | *color8: #988BA2 32 | *color9: #F28FAD 33 | *foreground: #D9E0EE 34 | Xcursor.size: 48 35 | Xcursor.theme: Bibata-Modern-Ice 36 | Xft.antialias: 1 37 | Xft.autohint: 0 38 | Xft.hinting: 1 39 | Xft.hintstyle: hintnone 40 | Xft.lcdfilter: lcddefault 41 | Xft.rgba: rgb 42 | ! Use a truetype font and size. 43 | xterm*faceName: Monospace 44 | xterm*faceSize: 30 45 | XTerm*selectToClipboard: true 46 | -------------------------------------------------------------------------------- /configs/.config/git/config: -------------------------------------------------------------------------------- 1 | [alias] 2 | lp = "log --decorate --graph --date=relative --pretty=format:'%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(13,trunc)%aN %C(auto,reset)%s%C(auto,red)% gD% D'" 3 | lpa = "log --all --decorate --graph --date=relative --pretty=format:'%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(13,trunc)%aN %C(auto,reset)%s%C(auto,red)% gD% D'" 4 | 5 | [color] 6 | ui = auto 7 | 8 | [commit] 9 | gpgsign = true 10 | 11 | [diff] 12 | mnemonicprefix = true 13 | renames = true 14 | submodule = log 15 | tool = vscode 16 | wordregex = . 17 | 18 | [difftool "vscode"] 19 | cmd = code -r --wait --diff $LOCAL $REMOTE 20 | 21 | [filter "lfs"] 22 | clean = git-lfs clean -- %f 23 | process = git-lfs filter-process 24 | required = true 25 | smudge = git-lfs smudge -- %f 26 | 27 | [gpg] 28 | format = ssh 29 | 30 | [gpg "ssh"] 31 | allowedsignersfile = ~/.config/git/allowed_signers 32 | 33 | [init] 34 | defaultbranch = main 35 | 36 | [tag] 37 | gpgsign = true 38 | 39 | [user] 40 | email = ervin.popescu10@gmail.com 41 | name = ervinpopescu 42 | signingkey = ~/.ssh/id_ed25519.pub 43 | 44 | [core] 45 | editor = code -r --wait 46 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/widgets/wallpaper.py: -------------------------------------------------------------------------------- 1 | from libqtile.lazy import lazy 2 | from qtile_extras import widget 3 | 4 | # import os 5 | # import subprocess 6 | from modules.settings import colors, settings 7 | 8 | 9 | def wallpaper(): 10 | return widget.TextBox( 11 | name="wallpaper", 12 | font=settings["icon_font"], 13 | foreground=colors["red"], 14 | mouse_callbacks={ 15 | "Button1": lazy.spawn("/home/ervin/bin/run_wall_wl.sh rand all") 16 | }, 17 | padding=10, 18 | text="", 19 | ) 20 | # pix = subprocess.check_output("xdg-user-dir PICTURES".split()).decode() 21 | # return widget.Wallpaper( 22 | # # random_selection=True, 23 | # # directory=os.path.join( 24 | # # pix, 25 | # # "wallpapers", 26 | # # "rand", 27 | # # ), 28 | # font="Font Awesome 6 Free Solid", 29 | # fontsize=34, 30 | # foreground=colors["red"], 31 | # label="", 32 | # padding=10, 33 | # wallpaper=os.path.join( 34 | # pix, 35 | # "wallpapers", 36 | # "rand", 37 | # "windowsy.png", 38 | # ), 39 | # ) 40 | -------------------------------------------------------------------------------- /configs/bin/rofi-wallpaper: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import subprocess 4 | from rofi import Rofi 5 | import os 6 | import notify2 7 | 8 | notify2.init("rofi-wallpaper") 9 | 10 | directory = os.path.join( 11 | subprocess.check_output("xdg-user-dir PICTURES".split()).decode().strip(), 12 | "wallpapers", 13 | "rand", 14 | ) 15 | wallpapers = os.listdir(directory) 16 | wallpapers.sort() 17 | wallpapers = [x for x in wallpapers if not x.startswith(".git")] 18 | # wallpapers = random.choices(wallpapers, k=len(wallpapers)) 19 | wallpapers_paths = [os.path.join(directory, i) for i in wallpapers] 20 | r = Rofi( 21 | lines=len(wallpapers), 22 | rofi_args=[ 23 | "-i", 24 | "-config", 25 | os.path.join( 26 | os.path.expanduser("~"), 27 | ".config", 28 | "rofi", 29 | "wallpapers.rasi", 30 | ), 31 | "show-icons", 32 | ], 33 | ) 34 | index, key = r.select( 35 | prompt="Select wallpaper", 36 | options=wallpapers, 37 | ) 38 | 39 | if key == 0: 40 | ret = subprocess.call(f"run_wall.sh {wallpapers_paths[index]} all".split()) 41 | if ret != 0: 42 | notify2.Notification(f"failed to set {wallpapers[index]}").show() 43 | -------------------------------------------------------------------------------- /configs/bin/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## load X11 defaults 4 | xrdb -merge ~/.config/X11/Xresources & 5 | autorandr -c && run_wall.sh rand all & 6 | xset s 1800 7 | xset +dpms 8 | xclickroot -l 'nwgbar -b 1d1d2d -o 0.4' & 9 | 10 | ## "daemons" 11 | gnome-keyring-daemon --start --components=secrets & 12 | /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & 13 | battery-notification.py & 14 | alttab & 15 | dunst & 16 | libinput-gestures-setup start & 17 | setxkbmap -option "terminate:ctrl_alt_bksp" & 18 | xmousepasteblock & 19 | # search_phone.sh & 20 | # activate-linux -id -s 1.5 -f 'CodeNewRoman Nerd Font Mono Bold' & 21 | # setsid -f restart_qtile_on_config_change.sh 22 | # xsettingsd & 23 | 24 | ## theme 25 | # change_theme.py & 26 | 27 | ## various apps 28 | yes | rmshit.py & 29 | plank & 30 | # /home/ervin/.config/conky/start_qtile.sh -n & 31 | # firefox & 32 | # codium & 33 | # alacritty & 34 | 35 | ## systray 36 | mictray & 37 | nm-applet & 38 | blueman-applet & 39 | flameshot & 40 | systray_profile.py & 41 | pa-applet --disable-key-grabbing --disable-notifications & 42 | 43 | ## compositor 44 | picom --config /home/ervin/.config/picom.conf &>/dev/null & 45 | 46 | pids=$(jobs -p) 47 | printf '%s\n' "$pids" >/tmp/autostart_pids 48 | -------------------------------------------------------------------------------- /configs/.config/pythonrc: -------------------------------------------------------------------------------- 1 | import atexit 2 | import os 3 | import readline 4 | import time 5 | from libqtile.command.client import InteractiveCommandClient 6 | 7 | # enable syntax completion 8 | readline.parse_and_bind("tab: complete") 9 | 10 | # clear screen 11 | def clear(): 12 | os.system('clear') 13 | 14 | c = InteractiveCommandClient() 15 | 16 | if 'PYTHONHISTFILE' in os.environ: 17 | history = os.path.expanduser(os.environ['PYTHONHISTFILE']) 18 | elif 'XDG_DATA_HOME' in os.environ: 19 | history = os.path.join(os.path.expanduser(os.environ['XDG_DATA_HOME']), 20 | 'python', 'python_history') 21 | else: 22 | history = os.path.join(os.path.expanduser('~'), 23 | '.python_history') 24 | 25 | history = os.path.abspath(history) 26 | _dir, _ = os.path.split(history) 27 | os.makedirs(_dir, exist_ok=True) 28 | 29 | try: 30 | readline.read_history_file(history) 31 | except OSError: 32 | pass 33 | 34 | if readline.get_current_history_length() == 0: 35 | readline.add_history(f'# History created at {time.asctime()}') 36 | 37 | def write_history(): 38 | try: 39 | readline.write_history_file(history) 40 | except OSError: 41 | pass 42 | 43 | atexit.register(write_history) 44 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/keys/window_managing.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.popups import close_app_with_warning_window 5 | from modules.settings import settings 6 | 7 | window_managing_keys = [ 8 | Key( 9 | [settings["keymaps"]["mod"]], 10 | "e", 11 | lazy.window.toggle_maximize(), 12 | desc="Make window maximized", 13 | ), 14 | Key( 15 | [settings["keymaps"]["mod"], "shift"], 16 | "e", 17 | lazy.window.toggle_fullscreen(), 18 | desc="Make window fullscreen", 19 | ), 20 | Key( 21 | [settings["keymaps"]["mod"], "shift"], 22 | "f", 23 | lazy.window.toggle_floating(), 24 | desc="Make window floating", 25 | ), 26 | Key( 27 | [settings["keymaps"]["mod"], "shift"], 28 | "b", 29 | lazy.window.bring_to_front(), 30 | desc="Bring window to front", 31 | ), 32 | Key( 33 | [settings["keymaps"]["mod"]], 34 | "q", 35 | lazy.window.kill(), 36 | desc="Kill window", 37 | ), 38 | Key( 39 | [settings["keymaps"]["mod"]], 40 | "w", 41 | close_app_with_warning_window(), 42 | desc="Kill window", 43 | ), 44 | ] 45 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/keys/window_managing.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.popups import close_app_with_warning_window 5 | from modules.settings import settings 6 | 7 | window_managing_keys = [ 8 | Key( 9 | [settings["keymaps"]["mod"]], 10 | "e", 11 | lazy.window.toggle_maximize(), 12 | desc="Make window maximized", 13 | ), 14 | Key( 15 | [settings["keymaps"]["mod"], "shift"], 16 | "e", 17 | lazy.window.toggle_fullscreen(), 18 | desc="Make window fullscreen", 19 | ), 20 | Key( 21 | [settings["keymaps"]["mod"], "shift"], 22 | "f", 23 | lazy.window.toggle_floating(), 24 | desc="Make window floating", 25 | ), 26 | Key( 27 | [settings["keymaps"]["mod"], "shift"], 28 | "b", 29 | lazy.window.bring_to_front(), 30 | desc="Bring window to front", 31 | ), 32 | Key( 33 | [settings["keymaps"]["mod"]], 34 | "q", 35 | lazy.window.kill(), 36 | desc="Kill window", 37 | ), 38 | Key( 39 | [settings["keymaps"]["mod"]], 40 | "w", 41 | close_app_with_warning_window(), 42 | desc="Kill window", 43 | ), 44 | ] 45 | -------------------------------------------------------------------------------- /configs/.config/qtile/json/window_rules.json: -------------------------------------------------------------------------------- 1 | { 2 | "arandr": { 3 | "center": true, 4 | "set_size_floating": true, 5 | "w": 2160, 6 | "h": 1000 7 | }, 8 | "devtools": { 9 | "center": true, 10 | "set_size_floating": true, 11 | "w": 1440, 12 | "h": 1000 13 | }, 14 | "gsimplecal": { 15 | "center": true, 16 | "set_position_floating": true, 17 | "w": 482, 18 | "h": 408 19 | }, 20 | "nemo-terminal": { 21 | "center": true, 22 | "set_size_floating": true, 23 | "w": 1440, 24 | "h": 1000 25 | }, 26 | "normcap": { 27 | "toggle_fullscreen": true 28 | }, 29 | "orar.py": { 30 | "center": true, 31 | "set_size_floating": true, 32 | "w": 1302, 33 | "h": 1036 34 | }, 35 | "toolbox": { 36 | "center": true, 37 | "set_size_floating": true, 38 | "w": 1440, 39 | "h": 1000 40 | }, 41 | "Torrent Properties": { 42 | "center": true, 43 | "set_size_floating": true, 44 | "w": 1440, 45 | "h": 1000 46 | }, 47 | "file_progress": { 48 | "keep_above": true 49 | }, 50 | "feh_thumbnail": { 51 | "set_size_floating": true, 52 | "w": 400, 53 | "h": 300, 54 | "keep_above": true 55 | }, 56 | "discord": { 57 | "move": true, 58 | "group": 2 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /configs/.config/zathura/catppuccin: -------------------------------------------------------------------------------- 1 | set default-fg "#d9e0ee" 2 | set default-bg "#1e1d2f" 3 | 4 | set completion-bg "#302d41" 5 | set completion-fg "#d9e0ee" 6 | set completion-highlight-bg "#575268" 7 | set completion-highlight-fg "#d9e0ee" 8 | set completion-group-bg "#302d41" 9 | set completion-group-fg "#96cdfb" 10 | 11 | set statusbar-fg "#d9e0ee" 12 | set statusbar-bg "#302d41" 13 | 14 | set notification-bg "#302d41" 15 | set notification-fg "#d9e0ee" 16 | set notification-error-bg "#302d41" 17 | set notification-error-fg "#f28fad" 18 | set notification-warning-bg "#302d41" 19 | set notification-warning-fg "#fae3b0" 20 | 21 | set inputbar-fg "#d9e0ee" 22 | set inputbar-bg "#302d41" 23 | 24 | set recolor-lightcolor "#1e1d2f" 25 | set recolor-darkcolor "#d9e0ee" 26 | set recolor "true" 27 | 28 | set index-fg "#d9e0ee" 29 | set index-bg "#1e1d2f" 30 | set index-active-fg "#d9e0ee" 31 | set index-active-bg "#302d41" 32 | 33 | set render-loading-bg "#1e1d2f" 34 | set render-loading-fg "#d9e0ee" 35 | 36 | set highlight-color "#575268" 37 | set highlight-fg "#f5c2e7" 38 | set highlight-active-color "#f5c2e7" 39 | -------------------------------------------------------------------------------- /configs/.config/zsh/rc/misc.zsh: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | WORDCHARS=${WORDCHARS//\//} # Don't consider certain characters part of the word 4 | 5 | # History configurations 6 | HISTSIZE=10000 7 | SAVEHIST=20000 8 | setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE 9 | setopt hist_ignore_dups # ignore duplicated commands history list 10 | setopt hist_ignore_space # ignore commands that start with space 11 | setopt hist_verify # show command with history expansion to user before running it 12 | setopt share_history # share command history data 13 | 14 | # force zsh to show the complete history 15 | alias history="history 0" 16 | 17 | # configure `time` format 18 | export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' 19 | 20 | export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink 21 | export LESS_TERMCAP_md=$'\E[1;36m' # begin bold 22 | export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink 23 | export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video 24 | export LESS_TERMCAP_se=$'\E[0m' # reset reverse video 25 | export LESS_TERMCAP_us=$'\E[1;32m' # begin underline 26 | export LESS_TERMCAP_ue=$'\E[0m' # reset underline 27 | 28 | [[ "$(tmux display-message -p '#S')" == "archnet" ]] && ssh ervin@archen.home.ro -p 8922 29 | -------------------------------------------------------------------------------- /configs/bin/workdays.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # start=$(date +%s%N) 4 | # export PS4='+[$(((`date +%s%N`-$start)/1000000))ms][${BASH_SOURCE}:${LINENO}]: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' 5 | # set -x 6 | 7 | nr_days_in_month=$(cal | awk 'FNR>2{d+=NF}END{print d}') 8 | current_day=$(date +%d) 9 | remaining=$(awk -v n="$nr_days_in_month" -v c="$current_day" 'BEGIN {print n-c}') 10 | 11 | case "$1" in 12 | "today") 13 | 14 | dates=$({ for d in $(seq 1 "$remaining") 15 | do 16 | date +%Y-%m-%d -d "$(date +%Y-%m-%d) +$d days" 17 | done 18 | } | sort) 19 | 20 | for d in $dates 21 | do 22 | case $(date -d "$d" "+%a") in 23 | Mon|Tue|Wed|Thu|Fri) 24 | printf "%s\n" "$(date +%d.%m.%Y -d "$d")";; 25 | *) 26 | continue;; 27 | esac 28 | done;; 29 | "") 30 | dates=$({ for d in $(seq 1 "$nr_days_in_month") 31 | do 32 | date +%Y-%m-%d -d "$(date +%Y-%m-01) +$d days" 33 | done 34 | } | sort) 35 | 36 | printf '%s\n' "$dates" 37 | 38 | for d in $dates 39 | do 40 | case $(date -d "$d" "+%a") in 41 | Mon|Tue|Wed|Thu|Fri) 42 | printf "%s\n" "$(date +%d.%m.%Y -d "$d")";; 43 | *) 44 | continue;; 45 | esac 46 | done;; 47 | esac 48 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/config.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | 4 | from libqtile.backend.wayland.inputs import InputConfig 5 | 6 | from modules import ( 7 | alt_tab_hooks, 8 | apps_hooks, 9 | floating_layout, 10 | groups, 11 | keys, 12 | layouts, 13 | misc_hooks, 14 | mouse, 15 | screens, 16 | window_rules_hooks, 17 | ) 18 | from modules.settings import config_path, widget_defaults 19 | 20 | assert alt_tab_hooks 21 | assert apps_hooks 22 | assert window_rules_hooks 23 | assert misc_hooks 24 | 25 | assert widget_defaults 26 | assert layouts 27 | assert floating_layout 28 | assert keys 29 | assert mouse 30 | assert groups 31 | # assert screens 32 | 33 | with open(os.path.join(config_path, "json", "config.json")) as f: 34 | config = json.load(f) 35 | for key, val in config.items(): 36 | if key != "theme": 37 | exec(f"{key}=val") 38 | 39 | 40 | def focus_on_window_activation(win): 41 | return "feh_thumbnail" not in win.get_wm_class() 42 | 43 | 44 | # When using the Wayland backend, this can be used to configure input devices. 45 | wl_input_rules = { 46 | "type:touchpad": InputConfig( 47 | pointer_accel=0.5, 48 | drag=True, 49 | natural_scroll=True, 50 | tap=True, 51 | middle_emulation=True, 52 | ), 53 | } 54 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/firefox_themes/themes/nord.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "frame": "#2e3440", 4 | "toolbar": "#3b4252", 5 | "tab_text": "#eceff4", 6 | "tab_loading": "#81a1c1", 7 | "tab_line": "#81a1c1", 8 | "tab_selected": "#434c5e", 9 | "bookmark_text": "#d8dee9", 10 | "icons": "#d8dee9", 11 | "icons_attention": "#88c0d0", 12 | "tab_background_text": "#d8dee9", 13 | "toolbar_field": "#2e3440", 14 | "toolbar_field_text": "#eceff4", 15 | "toolbar_field_focus": "#434c5e", 16 | "toolbar_field_border_focus": "#88c0d0", 17 | "toolbar_field_highlight": "#5e81ac", 18 | "toolbar_field_highlight_text": "#eceff4", 19 | "toolbar_top_separator": "#3b4252", 20 | "toolbar_bottom_separator": "#3b4252", 21 | "popup": "#434c5e", 22 | "popup_text": "#eceff4", 23 | "popup_highlight": "#88c0d0", 24 | "popup_highlight_text": "#2e3440", 25 | "popup_border": "#4c566a", 26 | "ntp_background": "#2e3440", 27 | "ntp_text": "#d8dee9", 28 | "sidebar": "#434c5e", 29 | "sidebar_text": "#eceff4", 30 | "sidebar_highlight": "#88c0d0", 31 | "sidebar_highlight_text": "#2e3440", 32 | "sidebar_border": "#4c566a" 33 | } 34 | } -------------------------------------------------------------------------------- /configs/.config/qtile/firefox_themes/themes/nord.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "frame": "#2e3440", 4 | "toolbar": "#3b4252", 5 | "tab_text": "#eceff4", 6 | "tab_loading": "#81a1c1", 7 | "tab_line": "#81a1c1", 8 | "tab_selected": "#434c5e", 9 | "bookmark_text": "#d8dee9", 10 | "icons": "#d8dee9", 11 | "icons_attention": "#88c0d0", 12 | "tab_background_text": "#d8dee9", 13 | "toolbar_field": "#2e3440", 14 | "toolbar_field_text": "#eceff4", 15 | "toolbar_field_focus": "#434c5e", 16 | "toolbar_field_border_focus": "#88c0d0", 17 | "toolbar_field_highlight": "#5e81ac", 18 | "toolbar_field_highlight_text": "#eceff4", 19 | "toolbar_top_separator": "#3b4252", 20 | "toolbar_bottom_separator": "#3b4252", 21 | "popup": "#434c5e", 22 | "popup_text": "#eceff4", 23 | "popup_highlight": "#88c0d0", 24 | "popup_highlight_text": "#2e3440", 25 | "popup_border": "#4c566a", 26 | "ntp_background": "#2e3440", 27 | "ntp_text": "#d8dee9", 28 | "sidebar": "#434c5e", 29 | "sidebar_text": "#eceff4", 30 | "sidebar_highlight": "#88c0d0", 31 | "sidebar_highlight_text": "#2e3440", 32 | "sidebar_border": "#4c566a" 33 | } 34 | } -------------------------------------------------------------------------------- /configs/.config/zsh/rc/completions.zsh: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | autoload -Uz compinit 4 | compinit -d ~/.cache/zcompdump 5 | zstyle ':completion:*:*:*:*:*' menu select 6 | zstyle ':completion:*' auto-description 'specify: %d' 7 | zstyle ':completion:*' completer _complete _expand _correct _approximate 8 | zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' 9 | zstyle ':completion:*' format 'Completing %d' 10 | zstyle ':completion:*' group-name '' 11 | zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s 12 | zstyle ':completion:*' rehash true 13 | zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s 14 | zstyle ':completion:*' use-compctl true 15 | zstyle ':completion:*' verbose true 16 | zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' 17 | 18 | # pip zsh completion start 19 | function _pip_completion { 20 | local words cword 21 | read -Ac words 22 | read -cn cword 23 | reply=($(COMP_WORDS="$words[*]" \ 24 | COMP_CWORD=$((cword - 1)) \ 25 | PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null)) 26 | } 27 | compctl -K _pip_completion pip 28 | # pip zsh completion end 29 | 30 | eval "$(register-python-argcomplete pipx)" 31 | 32 | export FPATH="$HOME/src/cloned/github/misc/eza/completions/zsh:$FPATH" 33 | compdef _eza ls 34 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/widgetbox.py: -------------------------------------------------------------------------------- 1 | # from libqtile import hook 2 | 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | class WidgetBox(widget.WidgetBox): 9 | defaults = [ 10 | ("fontsize", 40, ""), 11 | ("padding", 1, ""), 12 | ("text_closed", "", ""), 13 | ("text_open", "", ""), 14 | ("foreground", colors["darkblue"], ""), 15 | ("fontsize", 40, ""), 16 | ("start_opened", False), 17 | ] 18 | 19 | def __init__(self, **config): 20 | widget.WidgetBox.__init__(self, **config) 21 | self.add_defaults(WidgetBox.defaults) 22 | # if self.start_opened: 23 | # hook.subscribe.startup(self.toggle) 24 | 25 | @property 26 | def actual_padding(self): 27 | return self.fontsize / 2 if self.padding is None else self.padding 28 | 29 | def calculate_length(self): 30 | return self.layout.width + self.actual_padding * 2 31 | 32 | def draw(self): 33 | self.drawer.clear(self.background or self.bar.background) 34 | 35 | self.layout.draw( 36 | (self.actual_padding or 0), 37 | int(self.bar.height / 2.0 - self.layout.height / 2.0) + 1, 38 | ) 39 | 40 | self.drawer.draw(offsetx=self.offsetx, offsety=self.offsety, width=self.width) 41 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/widgetbox.py: -------------------------------------------------------------------------------- 1 | # from libqtile import hook 2 | 3 | from qtile_extras import widget 4 | 5 | from modules.settings import colors 6 | 7 | 8 | class WidgetBox(widget.WidgetBox): 9 | defaults = [ 10 | ("fontsize", 40, ""), 11 | ("padding", 1, ""), 12 | ("text_closed", "", ""), 13 | ("text_open", "", ""), 14 | ("foreground", colors["darkblue"], ""), 15 | ("fontsize", 40, ""), 16 | ("start_opened", False), 17 | ] 18 | 19 | def __init__(self, **config): 20 | widget.WidgetBox.__init__(self, **config) 21 | self.add_defaults(WidgetBox.defaults) 22 | # if self.start_opened: 23 | # hook.subscribe.startup(self.toggle) 24 | 25 | @property 26 | def actual_padding(self): 27 | return self.fontsize / 2 if self.padding is None else self.padding 28 | 29 | def calculate_length(self): 30 | return self.layout.width + self.actual_padding * 2 31 | 32 | def draw(self): 33 | self.drawer.clear(self.background or self.bar.background) 34 | 35 | self.layout.draw( 36 | (self.actual_padding or 0), 37 | int(self.bar.height / 2.0 - self.layout.height / 2.0) + 1, 38 | ) 39 | 40 | self.drawer.draw(offsetx=self.offsetx, offsety=self.offsety, width=self.width) 41 | -------------------------------------------------------------------------------- /configs/.config/spicetify/Extensions/catppuccin-mocha.js: -------------------------------------------------------------------------------- 1 | // Color map 2 | let colorPalette = { 3 | rosewater: "#f5e0dc", 4 | flamingo: "#f2cdcd", 5 | pink: "#f5c2e7", 6 | maroon: "#eba0ac", 7 | red: "#f38ba8", 8 | peach: "#fab387", 9 | yellow: "#f9e2af", 10 | green: "#a6e3a1", 11 | teal: "#94e2d5", 12 | blue: "#89b4fa", 13 | sky: "#89dceb", 14 | lavender: "#b4befe", 15 | white: "#d9e0ee" 16 | } 17 | 18 | // waitForElement borrowed from: 19 | // https://github.com/morpheusthewhite/spicetify-themes/blob/master/Dribbblish/dribbblish.js 20 | function waitForElement(els, func, timeout = 100) { 21 | const queries = els.map(el => document.querySelector(el)); 22 | if (queries.every(a => a)) { 23 | func(queries); 24 | } else if (timeout > 0) { 25 | setTimeout(waitForElement, 300, els, func, --timeout); 26 | } 27 | } 28 | 29 | // Return the color label for a given hex color value 30 | function getKeyByValue(object, value) { 31 | return Object.keys(object).find(key => object[key] === value.trim()); 32 | } 33 | 34 | // Used to select matching equalizer-animated-COLOR.gif 35 | waitForElement([".Root"], (root) => { 36 | let spiceEq = getComputedStyle(document.querySelector(":root")).getPropertyValue("--spice-equalizer"); 37 | let eqColor = getKeyByValue(colorPalette, spiceEq); 38 | root[0].classList.add(`catppuccin-eq-${eqColor}`); 39 | }); 40 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/hooks/misc.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import os 3 | import subprocess 4 | import psutil 5 | import signal 6 | 7 | from libqtile import hook, qtile 8 | from libqtile.core.manager import Qtile 9 | 10 | qtile: Qtile 11 | 12 | @hook.subscribe.screen_change 13 | def screen_change(event): 14 | qtile.reconfigure_screens() 15 | qtile.reconfigure_screens() 16 | 17 | @hook.subscribe.screens_reconfigured 18 | async def change_wallpaper(): 19 | with open(os.path.expanduser("~/.local/share/wallpaper/log")) as f: 20 | path = f.readlines() 21 | if path is not None or path.len() != 0: 22 | subprocess.call(f"run_wall.sh {path} all".split()) 23 | else: 24 | subprocess.call("run_wall.sh rand all".split()) 25 | 26 | @hook.subscribe.client_killed 27 | def switch_group(client): 28 | with contextlib.suppress(AttributeError): 29 | num_windows_in_group = len(client.group.info()["windows"]) 30 | if num_windows_in_group == 0: 31 | qtile.current_screen.toggle_group(qtile.current_screen.previous_group) 32 | 33 | @hook.subscribe.startup 34 | def set_properties(): 35 | for screen in qtile.screens: 36 | screen.bottom.window.window.set_property("ROUNDED_CORNERS_EXCLUDE", 1, "CARDINAL", 32) 37 | for p in psutil.process_iter(): 38 | if p.name() == "picom": 39 | p.send_signal(signal.SIGUSR1) 40 | -------------------------------------------------------------------------------- /configs/.config/qtile/json/matches.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": [ 3 | "Alacritty", 4 | "atom", 5 | "brackets", 6 | "caja", 7 | "code-oss", 8 | "code", 9 | "evince", 10 | "geany", 11 | "MATLAB R2019b - academic use", 12 | "notable", 13 | "org.gnome.nautilus", 14 | "sublime_text", 15 | "sun-awt-X11-XFramePeer", 16 | "terminator", 17 | "vscodium", 18 | "matplotlib" 19 | ], 20 | "1": [ 21 | "brave-browser", 22 | "Navigator", 23 | "chromium", 24 | "google-chrome-beta", 25 | "qbittorrent", 26 | "transmission-qt" 27 | ], 28 | "2": [ 29 | "ferdium", 30 | "discord", 31 | "telegramDesktop", 32 | "whatsapp-for-linux", 33 | "whatsapp-nativefier-d40211", 34 | "teams-for-linux" 35 | ], 36 | "3": [ 37 | "balena-etcher-electron", 38 | "gnome-control-center", 39 | "nitrogen", 40 | "pling-store", 41 | "Xfce4-power-manager-settings", 42 | "lxappearance", 43 | "lightdm-settings" 44 | ], 45 | "4": [ 46 | "virt-manager", 47 | "VirtualBox Machine", 48 | "VirtualBox Manager", 49 | "gimp-2.10", 50 | "Gimp-2.10" 51 | ], 52 | "5": [ 53 | "jellyfinmediaplayer", 54 | "gl", 55 | "plexmediaplayer", 56 | "pragha", 57 | "clementine", 58 | "deadbeef", 59 | "audacious", 60 | "anbox", 61 | "vlc", 62 | "mpv", 63 | "obs", 64 | "kdeconnect-app" 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /configs/.config/zathura/dark: -------------------------------------------------------------------------------- 1 | set notification-error-bg "#161821" 2 | set notification-error-fg "#e98989" 3 | set notification-warning-bg "#161821" 4 | set notification-warning-fg "#e9b189" 5 | set notification-bg "#161821" 6 | set notification-fg "#d2d4de" 7 | 8 | set completion-bg "#161821" 9 | set completion-fg "#d2d4de" 10 | set completion-group-bg "#84a0c6" 11 | set completion-group-fg "#161821" 12 | set completion-highlight-bg "#e9b189" 13 | set completion-highlight-fg "#161821" 14 | 15 | set index-bg "#161821" 16 | set index-fg "#c6c8d1" 17 | set index-active-bg "#c6c8d1" 18 | set index-active-fg "#161821" 19 | 20 | set inputbar-bg "#1e2132" 21 | set inputbar-fg "#c6c8d1" 22 | 23 | set statusbar-bg "#161821" 24 | set statusbar-fg "#c6c8d1" 25 | 26 | set highlight-color "#e9b189" 27 | set highlight-active-color "#89b8c2" 28 | 29 | set default-bg "#161821" 30 | set default-fg "#6b7089" 31 | set render-loading "true" 32 | set render-loading-bg "#d2d4de" 33 | set render-loading-fg "#6b7089" 34 | 35 | set recolor-lightcolor "#161821" 36 | set recolor-darkcolor "#d2d4de" 37 | set recolor "true" 38 | -------------------------------------------------------------------------------- /configs/.config/zathura/nord: -------------------------------------------------------------------------------- 1 | set notification-error-bg "#2e3440" 2 | set notification-error-fg "#e98989" 3 | set notification-warning-bg "#2e3440" 4 | set notification-warning-fg "#e9b189" 5 | set notification-bg "#2e3440" 6 | set notification-fg "#d2d4de" 7 | 8 | set completion-bg "#2e3440" 9 | set completion-fg "#d2d4de" 10 | set completion-group-bg "#84a0c6" 11 | set completion-group-fg "#2e3440" 12 | set completion-highlight-bg "#e9b189" 13 | set completion-highlight-fg "#2e3440" 14 | 15 | set index-bg "#2e3440" 16 | set index-fg "#c6c8d1" 17 | set index-active-bg "#c6c8d1" 18 | set index-active-fg "#2e3440" 19 | 20 | set inputbar-bg "#1e2132" 21 | set inputbar-fg "#c6c8d1" 22 | 23 | set statusbar-bg "#2e3440" 24 | set statusbar-fg "#c6c8d1" 25 | 26 | set highlight-color "#e9b189" 27 | set highlight-active-color "#89b8c2" 28 | 29 | set default-bg "#2e3440" 30 | set default-fg "#6b7089" 31 | set render-loading "true" 32 | set render-loading-bg "#d2d4de" 33 | set render-loading-fg "#6b7089" 34 | 35 | set recolor-lightcolor "#2e3440" 36 | set recolor-darkcolor "#d2d4de" 37 | set recolor "true" 38 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/weather.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget.open_weather import ( 2 | OpenWeatherResponseError, 3 | _OpenWeatherResponseParser, 4 | ) 5 | from qtile_extras.widget import OpenWeather 6 | 7 | from modules.settings import colors 8 | 9 | 10 | class Weather(OpenWeather): 11 | defaults = [ 12 | ("appkey", "ce4579dd88a8d4877a8c23f2a10d61cc", ""), 13 | ("padding", 5, ""), 14 | ("fontsize", 12, ""), 15 | ("foreground", "#D9E0EE", ""), 16 | ("format", "{icon}{main_feels_like:.0f}°{units_temperature}", ""), 17 | ] 18 | 19 | def __init__(self, **config): 20 | OpenWeather.__init__(self, **config) 21 | self.add_defaults(Weather.defaults) 22 | 23 | def parse(self, response): 24 | try: 25 | rp = _OpenWeatherResponseParser(response, self.dateformat, self.timeformat) 26 | except OpenWeatherResponseError as e: 27 | return f"Error {e.resp_code}" 28 | 29 | data = rp.data 30 | data["units_temperature"] = "C" if self.metric else "F" 31 | data["units_wind_speed"] = "Km/h" if self.metric else "m/h" 32 | data["icon"] = self.symbols.get(data["weather_0_icon"], self.symbols["Unknown"]) 33 | if data["temp"] >= 15: 34 | self.foreground = colors["yellow"] 35 | else: 36 | self.foreground = colors["lightblue"] 37 | return self.format.format(**data) 38 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/weather.py: -------------------------------------------------------------------------------- 1 | from libqtile.widget.open_weather import ( 2 | OpenWeatherResponseError, 3 | _OpenWeatherResponseParser, 4 | ) 5 | from qtile_extras.widget import OpenWeather 6 | 7 | from modules.settings import colors 8 | 9 | 10 | class Weather(OpenWeather): 11 | defaults = [ 12 | ("appkey", "ce4579dd88a8d4877a8c23f2a10d61cc", ""), 13 | ("padding", 5, ""), 14 | ("fontsize", 12, ""), 15 | ("foreground", "#D9E0EE", ""), 16 | ("format", "{icon}{main_feels_like:.0f}°{units_temperature}", ""), 17 | ] 18 | 19 | def __init__(self, **config): 20 | OpenWeather.__init__(self, **config) 21 | self.add_defaults(Weather.defaults) 22 | 23 | def parse(self, response): 24 | try: 25 | rp = _OpenWeatherResponseParser(response, self.dateformat, self.timeformat) 26 | except OpenWeatherResponseError as e: 27 | return f"Error {e.resp_code}" 28 | 29 | data = rp.data 30 | data["units_temperature"] = "C" if self.metric else "F" 31 | data["units_wind_speed"] = "Km/h" if self.metric else "m/h" 32 | data["icon"] = self.symbols.get(data["weather_0_icon"], self.symbols["Unknown"]) 33 | if data["temp"] >= 15: 34 | self.foreground = colors["yellow"] 35 | else: 36 | self.foreground = colors["lightblue"] 37 | return self.format.format(**data) 38 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/mouse.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Click, Drag 2 | from libqtile.lazy import lazy 3 | 4 | # from extras.floating_window_snapping import move_snap_window 5 | from modules.settings import settings 6 | 7 | mouse = [ 8 | Drag( 9 | [settings["keymaps"]["mod"]], 10 | "Button1", 11 | # move_snap_window(snap_dist=10), 12 | lazy.window.set_position(), 13 | start=lazy.window.get_position(), 14 | ), 15 | Drag( 16 | [settings["keymaps"]["mod"]], 17 | "Button3", 18 | lazy.window.set_size_floating(), 19 | start=lazy.window.get_size(), 20 | # warp_pointer=True, 21 | ), 22 | Click( 23 | [settings["keymaps"]["mod"]], 24 | "Button2", 25 | lazy.window.bring_to_front(), 26 | ), 27 | Click( 28 | [settings["keymaps"]["mod"]], 29 | "Button5", 30 | lazy.layout.grow_right().when(layout=["bsp", "columns"]), 31 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 32 | lazy.layout.increase_ratio().when(layout="spiral"), 33 | ), 34 | Click( 35 | [settings["keymaps"]["mod"]], 36 | "Button4", 37 | lazy.layout.grow_left().when(layout=["bsp", "columns"]), 38 | lazy.layout.shrink().when(layout=["monadwide", "monadtall", "monadthreecol"]), 39 | lazy.layout.decrease_ratio().when(layout="spiral"), 40 | ), 41 | ] 42 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/mouse.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Click, Drag 2 | from libqtile.lazy import lazy 3 | 4 | # from extras.floating_window_snapping import move_snap_window 5 | from modules.settings import settings 6 | 7 | mouse = [ 8 | Drag( 9 | [settings["keymaps"]["mod"]], 10 | "Button1", 11 | # move_snap_window(snap_dist=10), 12 | lazy.window.set_position(), 13 | start=lazy.window.get_position(), 14 | ), 15 | Drag( 16 | [settings["keymaps"]["mod"]], 17 | "Button3", 18 | lazy.window.set_size_floating(), 19 | start=lazy.window.get_size(), 20 | # warp_pointer=True, 21 | ), 22 | Click( 23 | [settings["keymaps"]["mod"]], 24 | "Button2", 25 | lazy.window.bring_to_front(), 26 | ), 27 | Click( 28 | [settings["keymaps"]["mod"]], 29 | "Button5", 30 | lazy.layout.grow_right().when(layout=["bsp", "columns"]), 31 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 32 | lazy.layout.increase_ratio().when(layout="spiral"), 33 | ), 34 | Click( 35 | [settings["keymaps"]["mod"]], 36 | "Button4", 37 | lazy.layout.grow_left().when(layout=["bsp", "columns"]), 38 | lazy.layout.shrink().when(layout=["monadwide", "monadtall", "monadthreecol"]), 39 | lazy.layout.decrease_ratio().when(layout="spiral"), 40 | ), 41 | ] 42 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/json/matches.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": [ 3 | "Alacritty", 4 | "atom", 5 | "brackets", 6 | "caja", 7 | "code-oss", 8 | "code", 9 | "evince", 10 | "geany", 11 | "MATLAB R2019b - academic use", 12 | "notable", 13 | "org.gnome.nautilus", 14 | "sublime_text", 15 | "sun-awt-X11-XFramePeer", 16 | "terminator", 17 | "vscodium", 18 | "matplotlib" 19 | ], 20 | "1": [ 21 | "brave-browser", 22 | "firefox", 23 | "firefox-developer-edition", 24 | "chromium", 25 | "google-chrome-beta", 26 | "qbittorrent", 27 | "transmission-qt" 28 | ], 29 | "2": [ 30 | "ferdium", 31 | "discord", 32 | "telegramDesktop", 33 | "whatsapp-for-linux", 34 | "whatsapp-nativefier-d40211", 35 | "teams-for-linux" 36 | ], 37 | "3": [ 38 | "balena-etcher-electron", 39 | "gnome-control-center", 40 | "nitrogen", 41 | "pling-store", 42 | "Xfce4-power-manager-settings", 43 | "lxappearance", 44 | "lightdm-settings" 45 | ], 46 | "4": [ 47 | "virt-manager", 48 | "VirtualBox Machine", 49 | "VirtualBox Manager", 50 | "gimp-2.10", 51 | "Gimp-2.10" 52 | ], 53 | "5": [ 54 | "jellyfinmediaplayer", 55 | "gl", 56 | "plexmediaplayer", 57 | "pragha", 58 | "clementine", 59 | "deadbeef", 60 | "audacious", 61 | "anbox", 62 | "vlc", 63 | "mpv", 64 | "obs", 65 | "kdeconnect-app" 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/extras/widgets/launchbar.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from qtile_extras import widget 4 | from xdg.IconTheme import getIconPath 5 | 6 | 7 | class LaunchBar(widget.LaunchBar): 8 | defaults = [ 9 | ( 10 | "theme_path", 11 | None, 12 | "Path to icon theme to be used by pyxdg for icons. ``None`` will use default icon theme.", 13 | ), 14 | ] 15 | 16 | def __init__(self, **config): 17 | widget.LaunchBar.__init__(self, **config) 18 | self.add_defaults(LaunchBar.defaults) 19 | 20 | def _lookup_icon(self, name): 21 | """Search for the icon corresponding to one command.""" 22 | self.icons_files[name] = None 23 | # if the software_name is directly an absolute path icon file 24 | if os.path.isabs(name): 25 | # name start with '/' thus it's an absolute path 26 | root, ext = os.path.splitext(name) 27 | if ext == ".png": 28 | self.icons_files[name] = name if os.path.isfile(name) else None 29 | else: 30 | # try to add the extension 31 | self.icons_files[name] = f"{name}.png" if os.path.isfile(f"{name}.png") else None 32 | else: 33 | self.icons_files[name] = getIconPath(name, theme=self.theme_path) 34 | # no search method found an icon, so default icon 35 | if self.icons_files[name] is None: 36 | self.icons_files[name] = self.default_icon 37 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/hooks/misc.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | 4 | from libqtile import hook, qtile 5 | from libqtile.backend.wayland.layer import LayerStatic 6 | from libqtile.core.manager import Qtile 7 | 8 | qtile: Qtile 9 | 10 | 11 | @hook.subscribe.client_managed 12 | def hide_scratchpads_on_new_window(client): 13 | if not isinstance(client, LayerStatic): 14 | if client.group and not client.group.name.startswith("scratchpad_"): 15 | for group in client.qtile.groups: 16 | if hasattr(group, "dropdowns"): 17 | group.hide_all() 18 | 19 | 20 | @hook.subscribe.screen_change 21 | def change_wallpaper(event): 22 | with open(os.path.expanduser("~/.local/share/wallpaper/log")) as f: 23 | path = f.readlines() 24 | if path is not None or path.len() != 0: 25 | subprocess.call(f"run_wall_wl.sh {path} all".split()) 26 | else: 27 | subprocess.call("run_wall_wl.sh rand all".split()) 28 | n_screens = len(qtile.get_screens()) 29 | if n_screens == 3 or n_screens == 1: 30 | qtile.reconfigure_screens() 31 | qtile.reload_config() 32 | 33 | 34 | # @hook.subscribe.client_killed 35 | # def switch_group(client): 36 | # with contextlib.suppress(AttributeError): 37 | # num_windows_in_group = len(client.group.info()["windows"]) 38 | # if num_windows_in_group == 0: 39 | # qtile.current_screen.toggle_group(qtile.current_screen.previous_group) # type: ignore 40 | -------------------------------------------------------------------------------- /configs/bin/git-status: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir="$1" 4 | 5 | # No directory has been provided, use current 6 | if [ -z "$dir" ] 7 | then 8 | dir="`pwd`" 9 | fi 10 | 11 | # Make sure directory ends with "/" 12 | if [[ $dir != */ ]] 13 | then 14 | dir="$dir/*" 15 | else 16 | dir="$dir*" 17 | fi 18 | 19 | # Loop all sub-directories 20 | for f in $dir 21 | do 22 | # Only interested in directories 23 | [ -d "${f}" ] || continue 24 | 25 | echo -en "\033[0;35m" 26 | echo "${f}" 27 | echo -en "\033[0m" 28 | 29 | # Check if directory is a git repository 30 | if [ -d "$f/.git" ] 31 | then 32 | mod=0 33 | cd $f 34 | 35 | # Check for modified files 36 | if [ $(git status | grep modified -c) -ne 0 ] 37 | then 38 | mod=1 39 | echo -en "\033[0;31m" 40 | echo "Modified files" 41 | echo -en "\033[0m" 42 | fi 43 | 44 | # Check for untracked files 45 | if [ $(git status | grep Untracked -c) -ne 0 ] 46 | then 47 | mod=1 48 | echo -en "\033[0;31m" 49 | echo "Untracked files" 50 | echo -en "\033[0m" 51 | fi 52 | 53 | # Check for unpushed changes 54 | if [ $(git status | grep 'Your branch is ahead' -c) -ne 0 ] 55 | then 56 | mod=1 57 | echo -en "\033[0;31m" 58 | echo "Unpushed commit" 59 | echo -en "\033[0m" 60 | fi 61 | 62 | # Check if everything is peachy keen 63 | if [ $mod -eq 0 ] 64 | then 65 | echo "Nothing to commit" 66 | fi 67 | 68 | cd ../ 69 | else 70 | echo "Not a git repository" 71 | fi 72 | 73 | echo 74 | done 75 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/keys/__init__.py: -------------------------------------------------------------------------------- 1 | from libqtile import qtile 2 | from libqtile.config import Key 3 | from libqtile.lazy import lazy 4 | 5 | from modules.hooks.alt_tab import cycle_windows 6 | 7 | # from libqtile.log_utils import logger 8 | from .apps import apps_keys 9 | from .de import de_keys 10 | from .layout_managing import layout_managing_keys 11 | from .layouts import layouts_keys 12 | from .qtile_stuff import qtile_keys 13 | from .window_managing import window_managing_keys 14 | from .windows_and_groups import windows_and_groups_keys 15 | 16 | keys = [] 17 | keys.extend(windows_and_groups_keys) 18 | keys.extend(layouts_keys) 19 | keys.extend(layout_managing_keys) 20 | keys.extend(window_managing_keys) 21 | keys.extend(qtile_keys) 22 | keys.extend(apps_keys) 23 | keys.extend(de_keys) 24 | # Add key bindings to switch VTs in Wayland. 25 | # We can't check qtile.core.name in default config as it is loaded before qtile is started 26 | # We therefore defer the check until the key binding is run by using .when(func=...) 27 | keys.extend( 28 | [ 29 | Key( 30 | ["control", "mod1"], 31 | f"f{vt}", 32 | lazy.core.change_vt(vt).when(func=lambda: qtile.core.name == "wayland"), 33 | desc=f"Switch to VT{vt}", 34 | ) 35 | for vt in range(1, 8) 36 | ] 37 | ) 38 | keys.append( 39 | Key( 40 | ["mod1"], 41 | "Tab", 42 | lazy.function(cycle_windows), 43 | desc="Cycle windows", 44 | ) 45 | ) 46 | 47 | __all__ = ["keys"] 48 | -------------------------------------------------------------------------------- /configs/.config/qtile/extras/widgets/launchbar.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from qtile_extras import widget 4 | from xdg.IconTheme import getIconPath 5 | 6 | 7 | class LaunchBar(widget.LaunchBar): 8 | defaults = [ 9 | ( 10 | "theme_path", 11 | None, 12 | "Path to icon theme to be used by pyxdg for icons. ``None`` will use default icon theme.", 13 | ), 14 | ] 15 | 16 | def __init__(self, **config): 17 | widget.LaunchBar.__init__(self, **config) 18 | self.add_defaults(LaunchBar.defaults) 19 | 20 | def _lookup_icon(self, name): 21 | """Search for the icon corresponding to one command.""" 22 | self.icons_files[name] = None 23 | # if the software_name is directly an absolute path icon file 24 | if os.path.isabs(name): 25 | # name start with '/' thus it's an absolute path 26 | root, ext = os.path.splitext(name) 27 | if ext == ".png": 28 | self.icons_files[name] = name if os.path.isfile(name) else None 29 | else: 30 | # try to add the extension 31 | self.icons_files[name] = ( 32 | f"{name}.png" if os.path.isfile(f"{name}.png") else None 33 | ) 34 | else: 35 | self.icons_files[name] = getIconPath(name, theme=self.theme_path) 36 | # no search method found an icon, so default icon 37 | if self.icons_files[name] is None: 38 | self.icons_files[name] = self.default_icon 39 | -------------------------------------------------------------------------------- /configs/.config/zsh/rc/keys.zsh: -------------------------------------------------------------------------------- 1 | lfcd () { 2 | tmp="$(mktemp)" 3 | lf -last-dir-path="$tmp" "$@" 4 | if [ -f "$tmp" ]; then 5 | dir="$(cat "$tmp")" 6 | rm -f "$tmp" >/dev/null 7 | [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" 8 | fi 9 | } 10 | 11 | # configure key keybindings 12 | bindkey -e # emacs key bindings 13 | bindkey ' ' magic-space # do history expansion on space 14 | bindkey '^[[3;5~' kill-word # ctrl + Supr 15 | bindkey '^[[3~' delete-char # delete 16 | bindkey '^[[1;5C' forward-word # ctrl + -> 17 | bindkey '^[[1;5D' backward-word # ctrl + <- 18 | bindkey '^[[5~' beginning-of-buffer-or-history # page up 19 | bindkey '^[[6~' end-of-buffer-or-history # page down 20 | bindkey '^[[H' beginning-of-line # home 21 | bindkey '^[[F' end-of-line # end 22 | bindkey '^[[Z' undo # shift + tab undo last action 23 | bindkey -s '^o' 'lfcd\n' # open lf in current directory 24 | bindkey -s '^L' 'clear\n' # clear terminal 25 | 26 | cdUndoKey() { 27 | popd 28 | zle reset-prompt 29 | print 30 | ls 31 | zle reset-prompt 32 | } 33 | 34 | cdParentKey() { 35 | pushd .. 36 | zle reset-prompt 37 | print 38 | ls 39 | zle reset-prompt 40 | } 41 | 42 | zle -N cdParentKey 43 | zle -N cdUndoKey 44 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/keys/layout_managing.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import settings 5 | 6 | layout_managing_keys = [ 7 | Key( 8 | [settings["keymaps"]["mod"]], 9 | "n", 10 | lazy.layout.normalize(), 11 | lazy.layout.reset(), 12 | desc="(Normalize || Reset) layout", 13 | ), 14 | Key( 15 | [settings["keymaps"]["mod"]], 16 | "Tab", 17 | lazy.next_layout(), 18 | desc="Next layout", 19 | ), 20 | Key( 21 | [settings["keymaps"]["mod"], "shift"], 22 | "Tab", 23 | lazy.prev_layout(), 24 | desc="Previous layout", 25 | ), 26 | Key( 27 | [settings["keymaps"]["mod"], "shift"], 28 | "s", 29 | lazy.layout.toggle_split().when(layout="bsp"), 30 | desc="Toggle bsp split", 31 | ), 32 | Key( 33 | [settings["keymaps"]["mod"], "shift"], 34 | "Up", 35 | lazy.layout.shuffle_up(), 36 | desc="Shuffle up", 37 | ), 38 | Key( 39 | [settings["keymaps"]["mod"], "shift"], 40 | "Left", 41 | lazy.layout.shuffle_left(), 42 | desc="Shuffle left", 43 | ), 44 | Key( 45 | [settings["keymaps"]["mod"], "shift"], 46 | "Right", 47 | lazy.layout.shuffle_right(), 48 | desc="Shuffle right", 49 | ), 50 | Key( 51 | [settings["keymaps"]["mod"], "shift"], 52 | "Down", 53 | lazy.layout.shuffle_down(), 54 | desc="Shuffle down", 55 | ), 56 | ] 57 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/keys/layout_managing.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import settings 5 | 6 | layout_managing_keys = [ 7 | Key( 8 | [settings["keymaps"]["mod"]], 9 | "n", 10 | lazy.layout.normalize(), 11 | lazy.layout.reset(), 12 | desc="(Normalize || Reset) layout", 13 | ), 14 | Key( 15 | [settings["keymaps"]["mod"]], 16 | "Tab", 17 | lazy.next_layout(), 18 | desc="Next layout", 19 | ), 20 | Key( 21 | [settings["keymaps"]["mod"], "shift"], 22 | "Tab", 23 | lazy.prev_layout(), 24 | desc="Previous layout", 25 | ), 26 | Key( 27 | [settings["keymaps"]["mod"], "shift"], 28 | "s", 29 | lazy.layout.toggle_split().when(layout="bsp"), 30 | desc="Toggle bsp split", 31 | ), 32 | Key( 33 | [settings["keymaps"]["mod"], "shift"], 34 | "Up", 35 | lazy.layout.shuffle_up(), 36 | desc="Shuffle up", 37 | ), 38 | Key( 39 | [settings["keymaps"]["mod"], "shift"], 40 | "Left", 41 | lazy.layout.shuffle_left(), 42 | desc="Shuffle left", 43 | ), 44 | Key( 45 | [settings["keymaps"]["mod"], "shift"], 46 | "Right", 47 | lazy.layout.shuffle_right(), 48 | desc="Shuffle right", 49 | ), 50 | Key( 51 | [settings["keymaps"]["mod"], "shift"], 52 | "Down", 53 | lazy.layout.shuffle_down(), 54 | desc="Shuffle down", 55 | ), 56 | ] 57 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/hooks/apps.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import os 3 | import signal 4 | import subprocess 5 | 6 | from libqtile import hook 7 | from libqtile.core.manager import Qtile 8 | from libqtile.log_utils import logger 9 | from libqtile.utils import create_task 10 | 11 | from modules.settings import config_path 12 | 13 | qtile: Qtile 14 | 15 | 16 | @hook.subscribe.startup_once 17 | def autostart(): 18 | create_task(run_autostart()).add_done_callback(autostart_done) # type: ignore 19 | # subprocess.call( 20 | # [os.path.expanduser("~/bin/birthday-notification.sh")], 21 | # stdout=subprocess.DEVNULL, 22 | # stderr=subprocess.STDOUT, 23 | # ) 24 | 25 | 26 | async def run_autostart(): 27 | autostart = os.path.expanduser("~/bin/autostart-wl.sh") 28 | with open(os.path.join(config_path, "autostart.log"), "w") as autostart_log_file: 29 | proc = await asyncio.create_subprocess_exec( 30 | autostart, 31 | stdout=autostart_log_file, 32 | # stdout=subprocess.DEVNULL, 33 | stderr=subprocess.STDOUT, 34 | ) 35 | return_code = await proc.wait() 36 | return return_code 37 | 38 | 39 | def autostart_done(return_code): 40 | logger.info(f"Autostart finished with return code {return_code}") 41 | 42 | 43 | @hook.subscribe.shutdown 44 | def kill_all_autostarted_programs(): 45 | with open("/tmp/autostart-wl_pids", "r") as pids_file: 46 | pids = pids_file.readlines() 47 | if not pids: 48 | for pid in pids: 49 | os.kill(int(pid), signal.SIGKILL) 50 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/modules/keys/layouts.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import settings 5 | 6 | layouts_keys = [ 7 | Key( 8 | [settings["keymaps"]["mod"], "control"], 9 | "Right", 10 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 11 | lazy.layout.grow_right().when(layout=["bsp", "columns"]), 12 | lazy.layout.increase_ratio().when(layout="spiral"), 13 | desc="Grow (monad*) || Grow right (bsp&col) || Increase ratio (spiral)", 14 | ), 15 | Key( 16 | [settings["keymaps"]["mod"], "control"], 17 | "Left", 18 | lazy.layout.shrink().when(layout=["monadwide", "monadtall" or "monadthreecol"]), 19 | lazy.layout.grow_left().when(layout=["bsp", "columns"]), 20 | lazy.layout.decrease_ratio().when(layout="spiral"), 21 | desc="Shrink (monad*) || Grow left (bsp&col) || Decrease ratio (spiral)", 22 | ), 23 | Key( 24 | [settings["keymaps"]["mod"], "control"], 25 | "Up", 26 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 27 | lazy.layout.grow_up().when(layout=["bsp", "columns"]), 28 | desc="Grow (monad*) || Grow up (bsp&col)", 29 | ), 30 | Key( 31 | [settings["keymaps"]["mod"], "control"], 32 | "Down", 33 | lazy.layout.shrink().when(layout=["monadwide", "monadtall", "monadthreecol"]), 34 | lazy.layout.grow_down().when(layout=["bsp", "columns"]), 35 | desc="Shrink (monad*) || Grow down (bsp&col)", 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/keys/layouts.py: -------------------------------------------------------------------------------- 1 | from libqtile.config import Key 2 | from libqtile.lazy import lazy 3 | 4 | from modules.settings import settings 5 | 6 | layouts_keys = [ 7 | Key( 8 | [settings["keymaps"]["mod"], "control"], 9 | "Right", 10 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 11 | lazy.layout.grow_right().when(layout=["bsp", "columns"]), 12 | lazy.layout.increase_ratio().when(layout="spiral"), 13 | desc="Grow (monad*) || Grow right (bsp&col) || Increase ratio (spiral)", 14 | ), 15 | Key( 16 | [settings["keymaps"]["mod"], "control"], 17 | "Left", 18 | lazy.layout.shrink().when(layout=["monadwide", "monadtall" or "monadthreecol"]), 19 | lazy.layout.grow_left().when(layout=["bsp", "columns"]), 20 | lazy.layout.decrease_ratio().when(layout="spiral"), 21 | desc="Shrink (monad*) || Grow left (bsp&col) || Decrease ratio (spiral)", 22 | ), 23 | Key( 24 | [settings["keymaps"]["mod"], "control"], 25 | "Up", 26 | lazy.layout.grow().when(layout=["monadwide", "monadtall", "monadthreecol"]), 27 | lazy.layout.grow_up().when(layout=["bsp", "columns"]), 28 | desc="Grow (monad*) || Grow up (bsp&col)", 29 | ), 30 | Key( 31 | [settings["keymaps"]["mod"], "control"], 32 | "Down", 33 | lazy.layout.shrink().when(layout=["monadwide", "monadtall", "monadthreecol"]), 34 | lazy.layout.grow_down().when(layout=["bsp", "columns"]), 35 | desc="Shrink (monad*) || Grow down (bsp&col)", 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/hooks/apps.py: -------------------------------------------------------------------------------- 1 | import os 2 | import signal 3 | import subprocess 4 | 5 | from libqtile import hook, qtile 6 | from libqtile.core.manager import Qtile 7 | 8 | from modules.functions import check_if_process_running 9 | from modules.settings import config_path 10 | 11 | qtile: Qtile 12 | 13 | 14 | @hook.subscribe.startup_once 15 | def autostart(): 16 | qtile.info() 17 | autostart = os.path.expanduser("~/bin/autostart.sh") 18 | with open(os.path.join(config_path, "autostart.log"), "w") as autostart_log_file: 19 | subprocess.call( 20 | [autostart], 21 | stdout=autostart_log_file, 22 | # stdout=subprocess.DEVNULL, 23 | stderr=subprocess.STDOUT, 24 | ) 25 | subprocess.call( 26 | [os.path.expanduser("~/bin/birthday-notification.sh")], 27 | stdout=subprocess.DEVNULL, 28 | stderr=subprocess.STDOUT, 29 | ) 30 | for window in qtile.windows_map.values(): 31 | if window.name == "plank": 32 | window.keep_above() 33 | 34 | 35 | @hook.subscribe.shutdown 36 | def kill_all_autostarted_programs(): 37 | with open("/tmp/autostart_pids", "r") as pids_file: 38 | pids = pids_file.readlines() 39 | if not pids: 40 | for pid in pids: 41 | os.kill(int(pid), signal.SIGKILL) 42 | if check_if_process_running("plank"): 43 | for win in qtile.windows_map.values(): 44 | if win.name == "plank": 45 | os.kill( 46 | int(win.eval("self.window.get_net_wm_pid()")[1]), signal.SIGKILL 47 | ) 48 | -------------------------------------------------------------------------------- /configs/.config/qtile/scripts/rofi_layout.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import inspect 4 | import json 5 | import os 6 | import pathlib 7 | 8 | import notify2 9 | from libqtile.command.client import InteractiveCommandClient 10 | from rofi import Rofi 11 | 12 | notify2.init("rofi_layout") 13 | 14 | c = InteractiveCommandClient() 15 | with open( 16 | os.path.join( 17 | (pathlib.Path(c.qtile_info()["config_path"]).parent), "json", "settings.json" 18 | ), 19 | "r", 20 | ) as f: 21 | group_layouts = json.load(f)["groups"]["layouts"] 22 | print(group_layouts) 23 | 24 | groups = c.get_groups() 25 | keys = list(groups.keys()) 26 | layouts: str = groups[keys[0]]["layouts"] 27 | 28 | folder = f"{pathlib.Path(inspect.getfile(InteractiveCommandClient)).parent.parent}/resources/layout-icons/" 29 | icons = os.listdir(folder) 30 | icons.sort() 31 | 32 | options = [None] * len(layouts) 33 | 34 | for icon in icons: 35 | for layout in layouts: 36 | if layout in icon: 37 | options[layouts.index(layout)] = ( 38 | f" {layout}" + f"\x00icon\x1f{folder}" + icon 39 | ) 40 | r = Rofi( 41 | lines=len(layouts), 42 | rofi_args=[ 43 | "-config", 44 | os.path.join( 45 | os.path.expanduser("~"), 46 | ".config", 47 | "rofi", 48 | "layouts.rasi", 49 | ), 50 | "show-icons", 51 | ], 52 | ) 53 | index, key = r.select( 54 | prompt="Select layout", 55 | options=options, 56 | ) 57 | 58 | if key == 0: 59 | notify2.Notification(layouts[index]).show() 60 | c.group.setlayout(layouts[index]) 61 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/firefox_themes/firefox_theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "toolbar": "#1e1e2eff", 4 | "toolbar_text": "#cdd6f4ff", 5 | "frame": "#11111bff", 6 | "tab_background_text": "#cdd6f4ff", 7 | "toolbar_field": "#181825ff", 8 | "toolbar_field_text": "#cdd6f4ff", 9 | "tab_line": "#89b4faff", 10 | "popup": "#1e1e2eff", 11 | "popup_text": "#cdd6f4ff", 12 | "button_background_active": "#a6adc8ff", 13 | "frame_inactive": "#11111bff", 14 | "icons_attention": "#89b4faff", 15 | "icons": "#89b4faff", 16 | "ntp_background": "#11111bff", 17 | "ntp_text": "#cdd6f4ff", 18 | "popup_border": "#89b4faff", 19 | "popup_highlight_text": "#cdd6f4ff", 20 | "popup_highlight": "#a6adc8ff", 21 | "sidebar_border": "#89b4faff", 22 | "sidebar_highlight_text": "#cdd6f4ff", 23 | "sidebar_highlight": "#89b4faff", 24 | "sidebar_text": "#cdd6f4ff", 25 | "sidebar": "#1e1e2eff", 26 | "tab_background_separator": "#89b4faff", 27 | "tab_loading": "#89b4faff", 28 | "tab_selected": "#1e1e2eff", 29 | "tab_text": "#cdd6f4ff", 30 | "toolbar_bottom_separator": "#1e1e2eff", 31 | "toolbar_field_border_focus": "#89b4faff", 32 | "toolbar_field_border": "#1e1e2eff", 33 | "toolbar_field_focus": "#1e1e2eff", 34 | "toolbar_field_highlight_text": "#1e1e2eff", 35 | "toolbar_field_highlight": "#89b4faff", 36 | "toolbar_field_separator": "#89b4faff", 37 | "toolbar_vertical_separator": "#89b4faff" 38 | } 39 | } -------------------------------------------------------------------------------- /configs/.config/qtile/firefox_themes/firefox_theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "toolbar": "#1e1e2eff", 4 | "toolbar_text": "#cdd6f4ff", 5 | "frame": "#11111bff", 6 | "tab_background_text": "#cdd6f4ff", 7 | "toolbar_field": "#181825ff", 8 | "toolbar_field_text": "#cdd6f4ff", 9 | "tab_line": "#89b4faff", 10 | "popup": "#1e1e2eff", 11 | "popup_text": "#cdd6f4ff", 12 | "button_background_active": "#a6adc8ff", 13 | "frame_inactive": "#11111bff", 14 | "icons_attention": "#89b4faff", 15 | "icons": "#89b4faff", 16 | "ntp_background": "#11111bff", 17 | "ntp_text": "#cdd6f4ff", 18 | "popup_border": "#89b4faff", 19 | "popup_highlight_text": "#cdd6f4ff", 20 | "popup_highlight": "#a6adc8ff", 21 | "sidebar_border": "#89b4faff", 22 | "sidebar_highlight_text": "#cdd6f4ff", 23 | "sidebar_highlight": "#89b4faff", 24 | "sidebar_text": "#cdd6f4ff", 25 | "sidebar": "#1e1e2eff", 26 | "tab_background_separator": "#89b4faff", 27 | "tab_loading": "#89b4faff", 28 | "tab_selected": "#1e1e2eff", 29 | "tab_text": "#cdd6f4ff", 30 | "toolbar_bottom_separator": "#1e1e2eff", 31 | "toolbar_field_border_focus": "#89b4faff", 32 | "toolbar_field_border": "#1e1e2eff", 33 | "toolbar_field_focus": "#1e1e2eff", 34 | "toolbar_field_highlight_text": "#1e1e2eff", 35 | "toolbar_field_highlight": "#89b4faff", 36 | "toolbar_field_separator": "#89b4faff", 37 | "toolbar_vertical_separator": "#89b4faff" 38 | } 39 | } -------------------------------------------------------------------------------- /configs/.config/qtile-wl/firefox_themes/themes/catppuccin.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "toolbar": "#1e1e2eff", 4 | "toolbar_text": "#cdd6f4ff", 5 | "frame": "#11111bff", 6 | "tab_background_text": "#cdd6f4ff", 7 | "toolbar_field": "#181825ff", 8 | "toolbar_field_text": "#cdd6f4ff", 9 | "tab_line": "#89b4faff", 10 | "popup": "#1e1e2eff", 11 | "popup_text": "#cdd6f4ff", 12 | "button_background_active": "#a6adc8ff", 13 | "frame_inactive": "#11111bff", 14 | "icons_attention": "#89b4faff", 15 | "icons": "#89b4faff", 16 | "ntp_background": "#11111bff", 17 | "ntp_text": "#cdd6f4ff", 18 | "popup_border": "#89b4faff", 19 | "popup_highlight_text": "#cdd6f4ff", 20 | "popup_highlight": "#a6adc8ff", 21 | "sidebar_border": "#89b4faff", 22 | "sidebar_highlight_text": "#cdd6f4ff", 23 | "sidebar_highlight": "#89b4faff", 24 | "sidebar_text": "#cdd6f4ff", 25 | "sidebar": "#1e1e2eff", 26 | "tab_background_separator": "#89b4faff", 27 | "tab_loading": "#89b4faff", 28 | "tab_selected": "#1e1e2eff", 29 | "tab_text": "#cdd6f4ff", 30 | "toolbar_bottom_separator": "#1e1e2eff", 31 | "toolbar_field_border_focus": "#89b4faff", 32 | "toolbar_field_border": "#1e1e2eff", 33 | "toolbar_field_focus": "#1e1e2eff", 34 | "toolbar_field_highlight_text": "#1e1e2eff", 35 | "toolbar_field_highlight": "#89b4faff", 36 | "toolbar_field_separator": "#89b4faff", 37 | "toolbar_vertical_separator": "#89b4faff" 38 | } 39 | } -------------------------------------------------------------------------------- /configs/.config/qtile/firefox_themes/themes/catppuccin.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "toolbar": "#1e1e2eff", 4 | "toolbar_text": "#cdd6f4ff", 5 | "frame": "#11111bff", 6 | "tab_background_text": "#cdd6f4ff", 7 | "toolbar_field": "#181825ff", 8 | "toolbar_field_text": "#cdd6f4ff", 9 | "tab_line": "#89b4faff", 10 | "popup": "#1e1e2eff", 11 | "popup_text": "#cdd6f4ff", 12 | "button_background_active": "#a6adc8ff", 13 | "frame_inactive": "#11111bff", 14 | "icons_attention": "#89b4faff", 15 | "icons": "#89b4faff", 16 | "ntp_background": "#11111bff", 17 | "ntp_text": "#cdd6f4ff", 18 | "popup_border": "#89b4faff", 19 | "popup_highlight_text": "#cdd6f4ff", 20 | "popup_highlight": "#a6adc8ff", 21 | "sidebar_border": "#89b4faff", 22 | "sidebar_highlight_text": "#cdd6f4ff", 23 | "sidebar_highlight": "#89b4faff", 24 | "sidebar_text": "#cdd6f4ff", 25 | "sidebar": "#1e1e2eff", 26 | "tab_background_separator": "#89b4faff", 27 | "tab_loading": "#89b4faff", 28 | "tab_selected": "#1e1e2eff", 29 | "tab_text": "#cdd6f4ff", 30 | "toolbar_bottom_separator": "#1e1e2eff", 31 | "toolbar_field_border_focus": "#89b4faff", 32 | "toolbar_field_border": "#1e1e2eff", 33 | "toolbar_field_focus": "#1e1e2eff", 34 | "toolbar_field_highlight_text": "#1e1e2eff", 35 | "toolbar_field_highlight": "#89b4faff", 36 | "toolbar_field_separator": "#89b4faff", 37 | "toolbar_vertical_separator": "#89b4faff" 38 | } 39 | } -------------------------------------------------------------------------------- /configs/.config/qtile-wl/scripts/rofi_layout.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import inspect 4 | import json 5 | import os 6 | import pathlib 7 | 8 | import notify2 9 | from libqtile.command.client import InteractiveCommandClient 10 | from rofi import Rofi 11 | 12 | notify2.init("rofi_layout") 13 | 14 | c = InteractiveCommandClient() 15 | with open( 16 | os.path.join( 17 | (pathlib.Path(c.qtile_info()["config_path"]).parent), "json", "settings.json" 18 | ), 19 | "r", 20 | ) as f: 21 | group_layouts = [group["layout"] for group in json.load(f)["groups"].values()] 22 | print(group_layouts) 23 | 24 | groups = c.get_groups() 25 | keys = list(groups.keys()) 26 | layouts: str = groups[keys[0]]["layouts"] 27 | 28 | folder = f"{pathlib.Path(inspect.getfile(InteractiveCommandClient)).parent.parent}/resources/layout-icons/" 29 | icons = os.listdir(folder) 30 | icons.sort() 31 | 32 | options = [None] * len(layouts) 33 | 34 | for icon in icons: 35 | for layout in layouts: 36 | if layout in icon: 37 | options[layouts.index(layout)] = ( # type: ignore 38 | f" {layout}" + f"\x00icon\x1f{folder}" + icon 39 | ) 40 | r = Rofi( 41 | lines=len(layouts), 42 | rofi_args=[ 43 | "-config", 44 | os.path.join( 45 | os.path.expanduser("~"), 46 | ".config", 47 | "rofi", 48 | "layouts.rasi", 49 | ), 50 | "show-icons", 51 | ], 52 | ) 53 | index, key = r.select( 54 | prompt="Select layout", 55 | options=options, 56 | ) 57 | 58 | if key == 0: 59 | notify2.Notification(layouts[index]).show() 60 | c.group.setlayout(layouts[index]) 61 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/settings.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import pathlib 4 | from os import path 5 | 6 | # import notify2 7 | from libqtile import qtile 8 | from libqtile.core.manager import Qtile 9 | 10 | 11 | def load_theme(): 12 | theme = "catppuccin" 13 | 14 | config = path.join(config_path, "json", "config.json") 15 | if path.isfile(config): 16 | with open(config) as f: 17 | theme = json.load(f)["theme"] 18 | else: 19 | with open(config, "w") as f: 20 | f.write(f'{{"theme": "{theme}"}}\n') 21 | 22 | theme_file = path.join(config_path, "themes", f"{theme}.json") 23 | if not path.isfile(theme_file): 24 | raise FileNotFoundError(f'"{theme_file}" does not exist') 25 | 26 | with open(path.join(theme_file)) as f: 27 | return json.load(f) 28 | 29 | 30 | # notify2.init("qtile config") 31 | qtile: Qtile 32 | qtile_info = qtile.qtile_info() 33 | if len(qtile_info) != 0: 34 | config_path = str(pathlib.Path(qtile_info["config_path"]).parent.resolve()) 35 | else: 36 | config_path = str(pathlib.Path(__file__).parent.parent.resolve()) 37 | 38 | colors = load_theme() 39 | with open(os.path.join(config_path, "json", "settings.json")) as f: 40 | settings: dict = json.load(f) 41 | 42 | bar_bg = "2e344000" 43 | decor_bg = colors["bg0"] 44 | layout_defaults = dict( 45 | margin=settings["margin_size"], 46 | border_width=5, 47 | border_focus=colors["purple"], 48 | border_normal=colors["bg0"], 49 | ) 50 | widget_defaults = { 51 | "font": "Font Awesome 6 Free Solid", 52 | "fontsize": settings["font_size"], 53 | "padding": 6, 54 | } 55 | extension_defaults = widget_defaults.copy() 56 | -------------------------------------------------------------------------------- /configs/.config/qtile-wl/wephyr.py: -------------------------------------------------------------------------------- 1 | from libqtile import hook, qtile 2 | from libqtile.bar import Bar 3 | from libqtile.config import Key, Screen 4 | from libqtile.lazy import lazy 5 | from qtile_extras import widget 6 | 7 | 8 | @hook.subscribe.startup_once 9 | def autostart(): 10 | qtile.spawn("systray_profile.py", shell=True) 11 | 12 | 13 | class Systray(widget.StatusNotifier): 14 | def __init__(self, **config) -> None: 15 | super().__init__(**config) 16 | self.add_callbacks({"Button1": self.show_menu}, force=True) 17 | self.add_callbacks({"Button2": self.show_menu}, force=True) 18 | 19 | 20 | screens = [ 21 | Screen( 22 | bottom=Bar( 23 | widgets=[ 24 | widget.Spacer(), 25 | Systray( 26 | mouse_callbacks={ 27 | "Button1": lazy.bar["top"].widget["systray"].show_menu() 28 | }, 29 | ), 30 | widget.Spacer(), 31 | ], 32 | size=100, 33 | ), 34 | ) 35 | ] 36 | 37 | widget_defaults = { 38 | "fontsize": 40, 39 | "iconsize": 30, 40 | "icon_size": 40, 41 | } 42 | 43 | keys = [ 44 | Key( 45 | ["mod4"], 46 | "Return", 47 | lazy.spawn("alacritty"), 48 | ), 49 | Key( 50 | ["mod4", "Shift"], 51 | "q", 52 | lazy.shutdown(), 53 | ), 54 | ] 55 | keys.extend( 56 | [ 57 | Key( 58 | ["control", "mod1"], 59 | f"f{vt}", 60 | lazy.core.change_vt(vt).when(func=lambda: qtile.core.name == "wayland"), 61 | desc=f"Switch to VT{vt}", 62 | ) 63 | for vt in range(1, 8) 64 | ] 65 | ) 66 | -------------------------------------------------------------------------------- /configs/.config/qtile/modules/widgets/task_list.py: -------------------------------------------------------------------------------- 1 | from extras.widgets import TaskList 2 | import os 3 | from modules.path import config_path 4 | from modules.settings import colors, settings 5 | from qtile_extras.popup.toolkit import PopupRelativeLayout, PopupImage 6 | 7 | icon_size = settings["bar_height"] - 12 8 | margin_y = icon_size + 4 9 | margin_x = margin_y - icon_size 10 | padding_x = (margin_y - icon_size) // 2 11 | padding_y = 0 12 | # margin_y = 0 13 | # margin_x = 5 14 | # padding_x = 0 15 | 16 | tasklist_layout = PopupRelativeLayout( 17 | width=400, 18 | height=300, 19 | controls=[ 20 | PopupImage( 21 | name="image", 22 | filename=os.path.join(config_path, "xwd.png"), 23 | pos_x=0, 24 | pos_y=0, 25 | width=1, 26 | height=1, 27 | ), 28 | ], 29 | background="00000000", 30 | ) 31 | 32 | def task_list(): 33 | return TaskList( 34 | border=colors["darkblue"], 35 | highlight_method="block", 36 | icon_only=True, 37 | rounded=False, 38 | # rounded=True, 39 | theme_mode="preferred", 40 | theme_path="/usr/share/icons/Papirus", 41 | padding_x=padding_x, 42 | padding_y=padding_y, 43 | icon_size=icon_size, 44 | margin_x=margin_x, 45 | margin_y=margin_y, 46 | popup_layout=tasklist_layout, 47 | popup_hide_timeout=0, 48 | popup_show_args={"relative_to": 7, "relative_to_bar": True}, 49 | # max_title_width=1, 50 | # txt_floating="🗗 ", 51 | # txt_maximized="🗖 ", 52 | # txt_minimized="🗕 ", 53 | txt_floating="", 54 | txt_maximized="", 55 | txt_minimized="", 56 | font=settings["icon_font"], 57 | ) 58 | -------------------------------------------------------------------------------- /configs/bin/md-preview.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | 3 | import argparse 4 | import contextlib 5 | import os 6 | import subprocess 7 | import sys 8 | from time import sleep 9 | 10 | import psutil 11 | from libqtile.command.client import InteractiveCommandClient 12 | 13 | 14 | def dunstify(string): 15 | command = "dunstify -t 5000 -a orar -u normal -r 311213".split() 16 | subprocess.run(command + ["Error!", string]) 17 | 18 | 19 | def check_if_process_running(process_name): 20 | """ 21 | Check if there is any running process that contains the given name processName. 22 | """ 23 | # Iterate over the all the running process 24 | for proc in psutil.process_iter(): 25 | with contextlib.suppress( 26 | psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess 27 | ): 28 | # Check if process name contains the given name string. 29 | if process_name.lower() in proc.name().lower(): 30 | return True 31 | return False 32 | 33 | 34 | def main(): 35 | c = InteractiveCommandClient() 36 | parser = argparse.ArgumentParser(description="open Markdown preview in qt window") 37 | parser.add_argument( 38 | "url", 39 | default=None, 40 | help="url to open in qt window", 41 | ) 42 | parser.add_argument( 43 | "-f", 44 | "--file", 45 | dest="file", 46 | default=None, 47 | help="file to open in qt window", 48 | ) 49 | if check_if_process_running("qt_html.py"): 50 | subprocess.run(["pkill", "-9", "qt_html.py"]) 51 | browser = f"qt_html.py {' '.join(sys.argv[1:])}" 52 | c.spawn(browser) 53 | c.group.setlayout("monadtall") 54 | sleep(1) 55 | c.group.focus_back() 56 | 57 | 58 | if __name__ == "__main__": 59 | main() 60 | -------------------------------------------------------------------------------- /markdown/archinstall.md: -------------------------------------------------------------------------------- 1 | # Arch install notes 2 | 3 | ## Install 4 | 5 | `ping archlinux.org` 6 | 7 | `timedatectl set-ntp true` 8 | 9 | create partition with `fdisk` : 500M for boot 20G for root the rest for home (change type to 1 for boot to UEFI) 10 | 11 | `mkfs.fat -F32` for boot and `mkfs.ext4` for root and home 12 | 13 | `mount` /mnt on root fs and /mnt/home (mkdir) on home fs 14 | 15 | `cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup` 16 | 17 | `pacman -Sy pacman-mirrorlist` 18 | 19 | `rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist` 20 | 21 | `pacstrap /mnt base base-devel vim git reflector` 22 | 23 | `genfstab -U -p /mnt >> /mnt/etc/fstab` 24 | 25 | `arch-chroot /mnt` 26 | 27 | ## Post-Install 28 | 29 | #### logged in as root 30 | 31 | - edit /etc/pacman.conf 32 | - `testing,core,extra,community-testing,community` 33 | - `Color,CheckSpace,VerbosePkgLists,ParallelDownloads = 5,ILoveCandy` 34 | 35 | ```sh 36 | echo "arch" > /etc/hostname 37 | echo -e "127.0.0.1 localhost\n::1 localhost" > /etc/hosts 38 | useradd -m -g wheel ervin 39 | passwd ervin 40 | EDITOR=vim visudo 41 | systemctl start reflector.service 42 | su ervin 43 | ``` 44 | 45 | #### logged in as ervin 46 | 47 | ```sh 48 | cd 49 | git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si --noconfirm 50 | yay -Syyu < pkgs-to-install.txt 51 | ``` 52 | 53 | ```sh 54 | cd 55 | bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) 56 | git clone https://github.com/ervinpopescu/dots && cd dots 57 | mkdir ~/.config && cp -alrf .config/* ~/.config 58 | cp -alrf bin ~ 59 | cp -alrf etc /etc 60 | cp -alrf usr /usr 61 | cp -alrf etc /etc 62 | fc-cache -f -v 63 | ``` 64 | 65 | ## Useful 66 | 67 | - `lscpu | grep MHz` 68 | - `fc-list | grep -i awesome` 69 | - `fc-cache -f -v` 70 | -------------------------------------------------------------------------------- /markdown/features.md: -------------------------------------------------------------------------------- 1 | ## Features 2 | 3 | 1. apps [config](/configs/.config) 4 | 5 | - **_global_** 6 | - [catppuccin](https://github.com/catppuccin) colorscheme 7 | - **_alacritty_** (mostly default, fonts and cursor changed) 8 | - **_conky_** 9 | - ~~_stolen_~~ 10 | - \+ fortune cookie 11 | - **_neovim_** 12 | - mostly default [LazyVim](https://www.lazyvim.org) 13 | - added the following plugins: 14 | - `Pocco81/auto-save.nvim` 15 | - `norcalli/nvim-colorizer.lua` 16 | - `ethanholz/nvim-lastplace` 17 | - `iamcco/markdown-preview.nvim` 18 | - `prettier/vim-prettier` 19 | - **_check [/configs/.config/nvim/lua/plugins/user.lua](/configs/.config/nvim/lua/plugins/user.lua)_** for more plugins 20 | - **_nwg-launchers_** 21 | - nwgbar 22 | - used for powermenu 23 | - nwgdmenu 24 | - not used 25 | - nwggrid 26 | - rarely used 27 | - **_qtile_**: 28 | - Apps tied to specific groups 29 | - Mouse bindings for every widget 30 | - [Keybindings](./keybinds.md) for **_every freakin' program_** 31 | - Layouts that just **_make sense_** 32 | - Sensible picom config 33 | - **_reflector_**: the best config for my location and capabilities 34 | - **_rofi_**: 35 | - run, drun, window list 36 | - **_zathura_**: 37 | - clean af UI 38 | - **_zsh_**: 39 | - ~~**stolen**~~ from Kali Linux and added some stuff over time: 40 | - .zshenv: 41 | - env vars for $HOME cleaning 42 | - nvidia env vars (fuck nvidia) 43 | - random env vars 44 | - aliases 45 | - cleanup some systemd mess 46 | - .zshrc: 47 | - setopts that **_just make sense_** 48 | - keybindings, completions, prompt 49 | 50 | 2. 79 scripts that each do one thing only 51 | (KISS UNIX philosophy): [bin](/configs/bin/) 52 | --------------------------------------------------------------------------------