diff --git a/README.md b/README.md index 16fe56d0f..59443a1a4 100644 --- a/README.md +++ b/README.md @@ -9,23 +9,22 @@ this repository. THIS SETUP IS WIP. ## Dependencies +These commands are for setting up a new arch install with my dotfiles. These +include all the things I personally use, so I don't recommend just copying and +pasting these into your current install, just take a look at the configs and +grab what you'll absolutely need. -### Dependencies to build awesome +### Main dependencies ``` sh -sudo xbps-install -S xorg-server xorg-input-drivers libX11 libX11-devel libXinerama libXinerama-devel libXft libXft-devel libXrandr libXrandr-devel imlib2 imlib2-devel harfbuzz harfbuzz-devel freetype freetype-devel gd gd-devel gdk-pixbuf gdk-pixbuf-devel xcb-util-cursor xcb-util-cursor-devel xcb-util-keysyms xcb-util-keysyms-devel xcb-util-image xcb-util-image-devel xcb-util-xrm xcb-util-xrm-devel xcb-util-wm xcb-util-wm-devel libxkbcommon libxkbcommon-devel libxkbcommon-x11 startup-notification startup-notification-devel libxdg-basedir libxdg-basedir-devel lua54 lua52 lua54-lgi lua54-devel lua52-devel lua52-lgi -``` - -### Supplemental dependencies -``` sh -sudo xbps-install -S brightnessctl picom pamixer pulsemixer fd ripgrep jq fzf eza bat arandr playerctl nerd-fonts noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji cantarell-fonts newsboat vifm cmus cmus-ffmpeg kvantum gtk-engine-murrine zathura zathura-pdf-poppler j4-dmenu-desktop maim slop feh nsxiv chafa xdpyinfo xdotool +paru -S awesome-git rofi betterlockscreen-git ueberzugpp unclutter-xfixes-git polkit-gnome acpi power-profiles-daemon python-gobject xorg-server xorg-xev xorg-xprop xorg-setxkbmap xorg-xinit xorg-xkill xorg-xrandr xclip xf86-input-evdev xf86-input-libinput xf86-input-wacom bluez bluez-tools bluez-utils neovim udisks2 pipewire pipewire-pulse pipewire-jack pipewire-alsa pipewire-audio pipewire-v4l2 wireplumber brightnessctl xorg-xdpyinfo xdotool maim slop jq fd eza bat starship playerctl ttf-nerd-fonts-symbols ttf-nerd-fonts-symbols-mono ttf-mononoki-nerd cantarell-fonts picom mpv pamixer vifm ffmpegthumbnailer epub-thumbnailer-git ripgrep fzf eza bat arandr pulsemixer noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji newsboat cmus kvantum gtk-engine-murrine zathura zathura-pdf-poppler nsxiv chafa qutebrowser ``` ### Dev dependencies ``` sh -sudo xbps-install -S base-devel cmake clang llvm rust cargo nodejs vala +paru -S --needed base-devel cmake clang llvm rust cargo nodejs vala ``` ### VMs & Containers dependencies ``` sh -sudo xbps-install -S libvirt virt-manager qemu iptables-nft dnsmasq openbsd-netcat dmidecode podman +paru -S --needed libvirt virt-manager qemu-full iptables-nft dnsmasq openbsd-netcat dmidecode podman podman-compose ``` diff --git a/system/boot/loader/entries/arch.conf b/system/boot/loader/entries/arch.conf deleted file mode 100755 index 631d042af..000000000 --- a/system/boot/loader/entries/arch.conf +++ /dev/null @@ -1,5 +0,0 @@ -title Arch Linux -linux /vmlinuz-linux -initrd /intel-ucode.img -initrd /initramfs-linux.img -options rd.luks.name=[uuid]=thklvm root=/dev/thkvg/root rw quiet loglevel=0 systemd.show_status=auto rd.udev.log_level=0 nowatchdog splash diff --git a/system/etc/default/grub/grub b/system/etc/default/grub/grub new file mode 100644 index 000000000..526342268 --- /dev/null +++ b/system/etc/default/grub/grub @@ -0,0 +1,64 @@ +# GRUB boot loader configuration + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=0 +GRUB_DISTRIBUTOR="Arch" +GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.name== rd.luks.key== loglevel=3 quiet systemd.show_status=auto rd.udev.log_level=3" +GRUB_CMDLINE_LINUX="" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'hidden' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=menu + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `videoinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" +#GRUB_THEME="/path/to/gfxtheme" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +#GRUB_SAVEDEFAULT=true + +# Uncomment to disable submenus in boot menu +#GRUB_DISABLE_SUBMENU=y + +# Probing for other operating systems is disabled for security reasons. Read +# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this +# functionality install os-prober and uncomment to detect and include other +# operating systems. +#GRUB_DISABLE_OS_PROBER=false + diff --git a/system/etc/mkinitcpio.conf b/system/etc/mkinitcpio.conf index 6d5de2ff6..83667b8b6 100644 --- a/system/etc/mkinitcpio.conf +++ b/system/etc/mkinitcpio.conf @@ -16,7 +16,7 @@ BINARIES=() # FILES # This setting is similar to BINARIES above, however, files are added # as-is and are not parsed in any way. This is useful for config files. -FILES=() +FILES=(/boot/volume.key) # HOOKS # This is the most important setting in this file. The HOOKS control the @@ -49,7 +49,7 @@ FILES=() # ## NOTE: If you have /usr on a separate partition, you MUST include the # usr and fsck hooks. -HOOKS=(base systemd sd-plymouth autodetect keyboard modconf block sd-encrypt kms keymap consolefont block lvm2 filesystems fsck) +HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole block sd-encrypt keymap lvm2 filesystems fsck) # COMPRESSION # Use this to compress the initramfs image. By default, zstd compression diff --git a/system/etc/pacman.conf b/system/etc/pacman.conf index 08ff03609..aaa63da0d 100644 --- a/system/etc/pacman.conf +++ b/system/etc/pacman.conf @@ -70,19 +70,16 @@ LocalFileSigLevel = Optional # repo name header and Include lines. You can add preferred servers immediately # after the header, and they will be used before the default mirrors. -#[testing] +#[core-testing] #Include = /etc/pacman.d/mirrorlist [core] Include = /etc/pacman.d/mirrorlist -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] +#[extra-testing] #Include = /etc/pacman.d/mirrorlist -[community] +[extra] Include = /etc/pacman.d/mirrorlist # If you want to run 32 bit applications on your x86_64 system, @@ -91,8 +88,8 @@ Include = /etc/pacman.d/mirrorlist #[multilib-testing] #Include = /etc/pacman.d/mirrorlist -[multilib] -Include = /etc/pacman.d/mirrorlist +#[multilib] +#Include = /etc/pacman.d/mirrorlist # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. diff --git a/user/.bash_profile b/user/.bash_profile index bf0d9b073..020d16462 100644 --- a/user/.bash_profile +++ b/user/.bash_profile @@ -6,26 +6,39 @@ ## /_____/_/ \__,_/_/|_|\___/ My custom bash_profile config ## -### STARTING XSESSION -if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ] -then - startx -- vt1 -keeptty &>/dev/null - logout +# Starting xsession +if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + startx -- vt1 -keeptty &>/dev/null + logout fi -# environment variables -export EDITOR="emacsclient -t -a ''" -export VISUAL="emacsclient -c -a 'emacs'" - -# clean home +# Home folders export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" + +# Sanely export XDG Base dir variables +eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" + +# Clean home export W3M_DIR="$XDG_DATA_HOME/w3m" export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0" export WGETRC="$HOME/.config/wget/wgetrc" export INPUTRC="$HOME/.config/inputrc" export GNUPGHOME="$HOME/.local/share/gnupg" +export LESSHISTFILE="-" -# bashrc +# Create GNUPG & WGETRC directories if they don't exist +if [ ! -d "$HOME/.config/wget/" ] && [ ! -d "$GNUPGHOME" ]; then + mkdir -p "$HOME/.config/wget/" "$GNUPGHOME" +fi + +# Default apps +export TERMINAL="wezterm" +export EDITOR="$HOME/.local/bin/lvim" +export VISUAL="$TERMINAL start --class editor $EDITOR" +export BROWSER="qutebrowser" +export VIEWER="zathura" + +# Bashrc source "$HOME"/.bashrc diff --git a/user/.bashrc b/user/.bashrc index 93cd3fabc..5af643a5b 100644 --- a/user/.bashrc +++ b/user/.bashrc @@ -19,9 +19,6 @@ export MANPAGER="sh -c 'col -bx | bat -l man -p'" # if not running interactively, don't do anything [[ $- != *i* ]] && return -# use neovim for vim if present. -[ -x "$(command -v $HOME/.local/bin/lvim)" ] && alias vim="lvim" - ### SET VI MODE ### # Comment this line out to enable default emacs-like bindings set -o vi @@ -30,22 +27,22 @@ bind -m vi-insert 'Control-l: clear-screen' ### PATH ### if [ -d "$HOME/.bin" ] ; - then PATH="$HOME/.bin:$PATH" + then PATH="$HOME/.bin:$PATH" fi if [ -d "$HOME/.local/bin" ] ; - then PATH="$HOME/.local/bin:$PATH" + then PATH="$HOME/.local/bin:$PATH" fi if [ -d "$HOME/Applications" ] ; - then PATH="$HOME/Applications:$PATH" + then PATH="$HOME/Applications:$PATH" fi ### CHANGE TITLE OF TERMINALS ### case ${TERM} in - xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' + xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' ;; - screen*) - PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' + screen*) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' ;; esac @@ -68,169 +65,167 @@ done; unset command ### ARCHIVE EXTRACTION ### # usage: ex -ex () -{ - if [ -f "$1" ] ; then - case $1 in - *.tar.bz2) tar xjf "$1" ;; - *.tar.gz) tar xzf "$1" ;; - *.bz2) bunzip2 "$1" ;; - *.rar) unrar x "$1" ;; - *.gz) gunzip "$1" ;; - *.tar) tar xf "$1" ;; - *.tbz2) tar xjf "$1" ;; - *.tgz) tar xzf "$1" ;; - *.zip) unzip "$1" ;; - *.Z) uncompress "$1";; - *.7z) 7zz x "$1" ;; - *.deb) ar x "$1" ;; - *.tar.xz) tar xf "$1" ;; - *.tar.zst) unzstd "$1" ;; - *) echo "'$1' cannot be extracted via ex()" ;; - esac - else - echo "'$1' is not a valid file" - fi +function ex() { + if [ -f "$1" ] ; then + case $1 in + *.tar.bz2) tar xjf "$1" ;; + *.tar.gz) tar xzf "$1" ;; + *.bz2) bunzip2 "$1" ;; + *.rar) unrar x "$1" ;; + *.gz) gunzip "$1" ;; + *.tar) tar xf "$1" ;; + *.tbz2) tar xjf "$1" ;; + *.tgz) tar xzf "$1" ;; + *.zip) unzip "$1" ;; + *.Z) uncompress "$1";; + *.7z) 7zz x "$1" ;; + *.deb) ar x "$1" ;; + *.tar.xz) tar xf "$1" ;; + *.tar.zst) unzstd "$1" ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi } ### ALIASES ### # navigation -up () { - local d="" - local limit="$1" +function up () { + local d="" + local limit="$1" - # Default to limit of 1 - if [ -z "$limit" ] || [ "$limit" -le 0 ]; then - limit=1 - fi + # Default to limit of 1 + if [ -z "$limit" ] || [ "$limit" -le 0 ]; then + limit=1 + fi - for ((i=1;i<=limit;i++)); do - d="../$d" - done + for ((i=1;i<=limit;i++)); do + d="../$d" + done - # perform cd. Show error if cd fails - if ! cd "$d"; then - echo "Couldn't go up $limit dirs."; - fi + # perform cd. Show error if cd fails + if ! cd "$d"; then + echo "Couldn't go up $limit dirs."; + fi } # cd alias \ - ..="cd .." \ - .2="cd ../.." \ - .3="cd ../../.." \ - .4="cd ../../../.." \ - .5="cd ../../../../.." + ..="cd .." \ + .2="cd ../.." \ + .3="cd ../../.." \ + .4="cd ../../../.." \ + .5="cd ../../../../.." # bat as cat [ -x "$(command -v bat)" ] && alias cat="bat" -# pfetch as neofetch -[ -x "$(command -v pfetch)" ] && alias neofetch="pfetch" +# use lunarvim for vim if present. +[ -x "$(command -v $HOME/.local/bin/lvim)" ] && alias vim="$HOME/.local/bin/lvim" -# Changing "ls" to "exa" +# Changing "ls" to "eza" alias \ - ls="exa -al --icons --color=always --group-directories-first" \ - la="exa -a --icons --color=always --group-directories-first" \ - ll="exa -l --icons --color=always --group-directories-first" \ - lt="exa -aT --icons --color=always --group-directories-first" \ - l.='exa -a | grep -E "^\."' + ls="eza --icons -al --color=always --group-directories-first" \ + la="eza --icons -a --color=always --group-directories-first" \ + ll="eza --icons -l --color=always --group-directories-first" \ + lt="eza --icons -aT --color=always --group-directories-first" \ + l.='eza --icons -a | grep -E "^\."' -# pacman +# function to detect os and assign aliases to package managers alias \ - pac-up="paru -Syu" \ - pac-get="paru -S" \ - pac-rmv="paru -Rcns" \ - pac-rmv-sec="paru -R" \ - pac-qry="paru -Ss" \ - pac-cln="paru -Scc && sudo pacman -Rns $(pacman -Qtdq)" + pac-up="paru -Syu" \ + pac-get="paru -S" \ + pac-rmv="paru -Rcns" \ + pac-rmv-sec="paru -R" \ + pac-qry="paru -Ss" \ + pac-cln="paru -Scc && sudo pacman -Rns $(pacman -Qtdq)" # colorize grep output (good for log files) alias \ - grep="grep --color=auto" \ - egrep="egrep --color=auto" \ - fgrep="fgrep --color=auto" + grep="grep --color=auto" \ + egrep="egrep --color=auto" \ + fgrep="fgrep --color=auto" # git alias \ - git-adu="git add -u" \ - git-adl="git add ." \ - git-brn="git branch" \ - git-chk="git checkout" \ - git-cln="git clone" \ - git-cmt="git commit -m" \ - git-fth="git fetch" \ - git-pll="git pull origin" \ - git-psh="git push origin" \ - git-sts="git status" \ - git-tag="git tag" \ - git-ntg="git tag -a" + git-adu="git add -u" \ + git-adl="git add ." \ + git-brn="git branch" \ + git-chk="git checkout" \ + git-cln="git clone" \ + git-cmt="git commit -m" \ + git-fth="git fetch" \ + git-pll="git pull origin" \ + git-psh="git push origin" \ + git-sts="git status" \ + git-tag="git tag" \ + git-ntg="git tag -a" # adding flags alias \ - df="df -h" \ - free="free -m" + df="df -h" \ + free="free -m" # multimedia scripts alias \ - fli="flix-cli" \ - ani="ani-cli" \ - aniq="ani-cli -q" + fli="flix-cli" \ + ani="ani-cli" \ + aniq="ani-cli -q" # audio alias \ - mx="pulsemixer" \ - amx="alsamixer" \ - mk="cmus" \ - ms="cmus" \ - music="cmus" + mx="pulsemixer" \ + mk="cmus" \ + ms="cmus" \ + music="cmus" # power management alias \ - po="systemctl poweroff" \ - sp="systemctl suspend" \ - rb="systemctl reboot" + po="systemctl poweroff" \ + sp="systemctl suspend" \ + rb="systemctl reboot" # file management alias \ - fm="vifm" \ - file="vifm" \ - flm="vifm" \ - rm="rm -vI" \ - mv="mv -iv" \ - cp="cp -iv" \ - mkd="mkdir -pv" + fm="$HOME/.config/vifm/scripts/vifmrun" \ + flm="$HOME/.config/vifm/scripts/vifmrun" \ + vifm="$HOME/.config/vifm/scripts/vifmrun" \ + rm="rm -vI" \ + mv="mv -iv" \ + cp="cp -iv" \ + mkd="mkdir -pv" # ps alias \ - psa="ps auxf" \ - psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" \ - psmem="ps auxf | sort -nr -k 4" \ - pscpu="ps auxf | sort -nr -k 3" + psa="ps auxf" \ + psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" \ + psmem="ps auxf | sort -nr -k 4" \ + pscpu="ps auxf | sort -nr -k 3" # youtube alias \ - yta-aac="yt-dlp --extract-audio --audio-format aac" \ - yta-best="yt-dlp --extract-audio --audio-format best" \ - yta-flac="yt-dlp --extract-audio --audio-format flac" \ - yta-m4a="yt-dlp --extract-audio --audio-format m4a" \ - yta-mp3="yt-dlp --extract-audio --audio-format mp3" \ - yta-opus="yt-dlp --extract-audio --audio-format opus" \ - yta-vorbis="yt-dlp --extract-audio --audio-format vorbis" \ - yta-wav="yt-dlp --extract-audio --audio-format wav" \ - ytv-best="yt-dlp -f bestvideo+bestaudio" \ - yt="ytfzf -ftsl" \ - ytm="ytfzf -mtsl" + yta-aac="yt-dlp --extract-audio --audio-format aac" \ + yta-best="yt-dlp --extract-audio --audio-format best" \ + yta-flac="yt-dlp --extract-audio --audio-format flac" \ + yta-m4a="yt-dlp --extract-audio --audio-format m4a" \ + yta-mp3="yt-dlp --extract-audio --audio-format mp3" \ + yta-opus="yt-dlp --extract-audio --audio-format opus" \ + yta-vorbis="yt-dlp --extract-audio --audio-format vorbis" \ + yta-wav="yt-dlp --extract-audio --audio-format wav" \ + ytv-best="yt-dlp -f bestvideo+bestaudio" \ + yt="ytfzf -ftsl" \ + ytm="ytfzf -mtsl" # network and bluetooth alias \ - netstats="nmcli dev" \ - wfi="nmtui-connect" \ - wfi-scan="nmcli dev wifi rescan && nmcli dev wifi list" \ - wfi-edit="nmtui-edit" \ - wfi-on="nmcli radio wifi on" \ - wfi-off="nmcli radio wifi off" \ - blt="bluetoothctl" + netstats="nmcli dev" \ + wfi="nmtui-connect" \ + wfi-scan="nmcli dev wifi rescan && nmcli dev wifi list" \ + wfi-edit="nmtui-edit" \ + wfi-on="nmcli radio wifi on" \ + wfi-off="nmcli radio wifi off" \ + blt="bluetoothctl" ### SETTING THE STARSHIP PROMPT ### eval "$(starship init bash)" diff --git a/user/.config/awesome/apps.lua b/user/.config/awesome/apps.lua index bb3d89e1d..a321f4e0d 100644 --- a/user/.config/awesome/apps.lua +++ b/user/.config/awesome/apps.lua @@ -1,35 +1,35 @@ -- Apps config, see keymaps/keyboard.lua to see how this is handled in keybindings local apps = { - terminal = "wezterm", -- terminal emulator - -- rofi settings - drunner = "rofi -show drun -show-icons", -- desktop runner - runner = "rofi -show run", -- normal runner - runner_power = "$HOME/.config/rofi/scripts/rofi_power", -- power manager - runner_mount = "$HOME/.config/rofi/scripts/rofi_mount", -- drive mounter - runner_blue = "$HOME/.config/rofi/scripts/rofi_blue", -- bluetooth manager - runner_wifi = "$HOME/.config/rofi/scripts/rofi_wifi", -- wifi manager - runner_scrot = "$HOME/.config/rofi/scripts/rofi_scrot", -- screenshots manager - runner_emoji = "$HOME/.config/rofi/scripts/rofi_emoji", -- emojis manager - runner_wall = "$HOME/.config/rofi/scripts/rofi_wall", -- wallpapers manager - -- terminal scripts - vidytfzf = "wezterm start --class vidytfzf -- ytfzf -flstT chafa", -- youtube - musytfzf = "wezterm start --class musytfzf -- ytfzf -mlstT chafa", -- youtube music - ani_cli = "wezterm start --class ani-cli -- ani-cli", -- anime - flix_cli = "wezterm start --class flix-cli -- flix-cli", -- movies - newsboat = "wezterm start --class newsboat -- newsboat", -- newsboat - btop = "wezterm start --class btop -- btop", -- btop - htop = "wezterm start --class htop -- htop", -- htop - pulsemixer = "wezterm start --class pulsemixer -- pulsemixer", -- pulsemixer - alsamixer = "wezterm start --class alsamixer -- alsamixer", -- alsamixer - -- default apps per tag - editor = "emacsclient -c -a emacs", -- TAG 1 - file = "wezterm start --class vifm -- vifm", -- TAG 2 - browser = "firefox", -- TAG 3 - chat = "org.signal.Signal", -- TAG 4 - music = "wezterm start --class cmus -- cmus", -- TAG 5 - videoeditor = "org.kde.kdenlive", -- TAG 6 - imageeditor = "org.kde.krita", -- TAG 7 - noteapp = "com.notesnook.Notesnook", -- TAG 8 - game = "org.libretro.Retroarch" -- TAG 9 + terminal = "wezterm", -- terminal emulator + -- rofi settings + drunner = "rofi -show drun -show-icons", -- desktop runner + runner = "rofi -show run", -- normal runner + runner_power = "$HOME/.config/rofi/scripts/rofi_power", -- power manager + runner_mount = "$HOME/.config/rofi/scripts/rofi_mount", -- drive mounter + runner_blue = "$HOME/.config/rofi/scripts/rofi_blue", -- bluetooth manager + runner_wifi = "$HOME/.config/rofi/scripts/rofi_wifi", -- wifi manager + runner_scrot = "$HOME/.config/rofi/scripts/rofi_scrot", -- screenshots manager + runner_emoji = "$HOME/.config/rofi/scripts/rofi_emoji", -- emojis manager + runner_wall = "$HOME/.config/rofi/scripts/rofi_wall", -- wallpapers manager + -- terminal scripts + vidytfzf = "wezterm start --class vidytfzf -- ytfzf -flstT ueberzug", -- youtube + musytfzf = "wezterm start --class musytfzf -- ytfzf -mlstT ueberzug", -- youtube music + ani_cli = "wezterm start --class ani-cli -- ani-cli", -- anime + flix_cli = "wezterm start --class flix-cli -- flix-cli", -- movies + newsboat = "wezterm start --class newsboat -- newsboat", -- newsboat + btop = "wezterm start --class btop -- btop", -- btop + htop = "wezterm start --class htop -- htop", -- htop + pulsemixer = "wezterm start --class pulsemixer -- pulsemixer", -- pulsemixer + alsamixer = "wezterm start --class alsamixer -- alsamixer", -- alsamixer + -- default apps per tag + editor = "wezterm start --class editor -- .local/bin/lvim", -- TAG 1 + file = "wezterm start --class vifm -- .config/vifm/scripts/vifmrun", -- TAG 2 + browser = "qutebrowser", -- TAG 3 + chat = "flatpak run org.signal.Signal", -- TAG 4 + music = "wezterm start --class cmus -- cmus", -- TAG 5 + videoeditor = "flatpak run org.kde.kdenlive", -- TAG 6 + imageeditor = "flatpak run org.kde.krita", -- TAG 7 + office = "flatpak run org.libreoffice.LibreOffice", -- TAG 8 + game = "flatpak run com.valvesoftware.Steam" -- TAG 9 } return apps diff --git a/user/.config/awesome/autostart.lua b/user/.config/awesome/autostart.lua index 2d4d4dd61..3fc2991c5 100644 --- a/user/.config/awesome/autostart.lua +++ b/user/.config/awesome/autostart.lua @@ -1,17 +1,9 @@ local awful = require("awful") -- session manager -awful.util.spawn_with_shell( - "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &" -) +awful.util.spawn_with_shell("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &") -- set wallpaper -awful.util.spawn_with_shell( - "$HOME/.fehbg &" -) +awful.util.spawn_with_shell("$HOME/.fehbg &") -- automatically hide the cursor -awful.util.spawn_with_shell( - "unclutter --hide-on-touch &" -) +awful.util.spawn_with_shell("unclutter --hide-on-touch &") -- compositor -awful.util.spawn_with_shell( - "picom --experimental-backends --config ~/.config/picom/picom.conf &" -) +awful.util.spawn_with_shell("picom --config ~/.config/picom/picom.conf &") diff --git a/user/.config/awesome/helpers.lua b/user/.config/awesome/helpers.lua index 1ec793dcc..3412fe0a0 100644 --- a/user/.config/awesome/helpers.lua +++ b/user/.config/awesome/helpers.lua @@ -4,32 +4,32 @@ local beautiful = require("beautiful") -- {{{ Error handling naughty.connect_signal( - "request::display_error", - function(message, startup) - naughty.notification { - urgency = "critical", - title = "Oops, an error happened" .. (startup and " during startup!" or "!"), - message = message - } - end + "request::display_error", + function(message, startup) + naughty.notification { + urgency = "critical", + title = "Oops, an error happened" .. (startup and " during startup!" or "!"), + message = message + } + end ) -- }}} -- {{{ Signals -- no borders when rearranging only 1 non-floating or maximized client screen.connect_signal( - "arrange", - function(s) - local max = s.selected_tag.layout.name == "max" - local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count - -- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows - for _, c in pairs(s.clients) do - if (max or only_one) and not c.floating or c.maximized then - c.border_width = 0 - else - c.border_width = beautiful.border_width - end + "arrange", + function(s) + local max = s.selected_tag.layout.name == "max" + local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count + -- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows + for _, c in pairs(s.clients) do + if (max or only_one) and not c.floating or c.maximized then + c.border_width = 0 + else + c.border_width = beautiful.border_width + end + end end - end ) -- }}} diff --git a/user/.config/awesome/keymaps/keyboard.lua b/user/.config/awesome/keymaps/keyboard.lua index f614565c7..efa24f428 100644 --- a/user/.config/awesome/keymaps/keyboard.lua +++ b/user/.config/awesome/keymaps/keyboard.lua @@ -11,778 +11,679 @@ shikey = "Shift" --[[ Main keybinds ]] -- -awful.keyboard.append_global_keybindings( - { - -- Show the help menu - awful.key( - { modkey }, - "s", - hotkeys_popup.show_help, - { - description = - "Show Help Menu", - group = - "Main keybinds" - } - ), - -- Reload awesome - awful.key( - { modkey, conkey }, - "r", - awesome.restart, - { - description = - "Reload Awesome", - group = - "Main keybinds" - } - ), - -- Open a terminal - awful.key( - { modkey }, - "Return", - function() - awful.spawn(apps.terminal) - end, - { - description = - "Open a terminal", - group = - "Main keybinds" - } - ), - } -) +awful.keyboard.append_global_keybindings({ + -- Show the help menu + awful.key( + { modkey }, + "s", + hotkeys_popup.show_help, + { + description = "Show Help Menu", + group = "Main keybinds" + } + ), + -- Reload awesome + awful.key( + { modkey, conkey }, + "r", + awesome.restart, + { + description = "Reload Awesome", + group = "Main keybinds" + } + ), + -- Open a terminal + awful.key( + { modkey }, + "Return", + function() + awful.spawn(apps.terminal) + end, + { + description = "Open a terminal", + group = "Main keybinds" + } + ), +}) --[[ ]] -- --[[ Tags related keybindings ]] -- -awful.keyboard.append_global_keybindings( - { +awful.keyboard.append_global_keybindings({ -- Switch to previous tag awful.key( - { modkey }, - "Left", - awful.tag.viewprev, - { - description = - "Quickly switch to previous tag", - group = - "Tag keybinds" - } + { modkey }, + "Left", + awful.tag.viewprev, + { + description = "Quickly switch to previous tag", + group = "Tag keybinds" + } ), -- Switch to next tag awful.key( - { modkey }, - "Right", - awful.tag.viewnext, - { - description = - "Quickly switch to next tag", - group = - "Tag keybinds" - } + { modkey }, + "Right", + awful.tag.viewnext, + { + description = "Quickly switch to next tag", + group = "Tag keybinds" + } ), -- Switch back to the previous tag awful.key( - { modkey }, - "Escape", - awful.tag.history.restore, - { - description = - "Go back to previus tag (from history)", - group = - "Tag keybinds" - } + { modkey }, + "Escape", + awful.tag.history.restore, + { + description = "Go back to previus tag (from history)", + group = "Tag keybinds" + } ), -- Switch tags by numbers 1-9 awful.key { - modifiers = { modkey }, - keygroup = "numrow", - description = "Switch tags with number keys from {1 to 9}", - group = "Tag keybinds", - on_press = function(index) - local screen = awful.screen.focused() - local tag = screen.tags[index] - if tag then - tag:view_only() - end - end, + modifiers = { modkey }, + keygroup = "numrow", + description = "Switch tags with number keys from {1 to 9}", + group = "Tag keybinds", + on_press = function(index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + tag:view_only() + end + end, }, -- Toggle tags by numbers 1-9 awful.key { - modifiers = { modkey, conkey }, - keygroup = "numrow", - description = "Quickly view contents in another tag with number keys from {1 to 9}", - group = "Tag keybinds", - on_press = function(index) - local screen = awful.screen.focused() - local tag = screen.tags[index] - if tag then - awful.tag.viewtoggle(tag) - end - end, + modifiers = { modkey, conkey }, + keygroup = "numrow", + description = "Quickly view contents in another tag with number keys from {1 to 9}", + group = "Tag keybinds", + on_press = function(index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + awful.tag.viewtoggle(tag) + end + end, }, -- Move focused window to tag by numbers 1-9 awful.key { - modifiers = { modkey, shikey }, - keygroup = "numrow", - description = "Move focused window to another tag with number keys from {1 to 9}", - group = "Tag keybinds", - on_press = function(index) - if client.focus then - local tag = client.focus.screen.tags[index] - if tag then - client.focus:move_to_tag(tag) - end - end - end, + modifiers = { modkey, shikey }, + keygroup = "numrow", + description = "Move focused window to another tag with number keys from {1 to 9}", + group = "Tag keybinds", + on_press = function(index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:move_to_tag(tag) + end + end + end, }, -- Toggle focused window on tag by numbers 1-9 awful.key { - modifiers = { modkey, conkey, shikey }, - keygroup = "numrow", - description = "View focused window on more than one tag with number keys from {1 to 9}", - group = "Tag keybinds", - on_press = function(index) - if client.focus then - local tag = client.focus.screen.tags[index] - if tag then - client.focus:toggle_tag(tag) - end - end - end, + modifiers = { modkey, conkey, shikey }, + keygroup = "numrow", + description = "View focused window on more than one tag with number keys from {1 to 9}", + group = "Tag keybinds", + on_press = function(index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:toggle_tag(tag) + end + end + end, }, - } -) +}) --[[ ]] -- --[[ Focus related keybindings ]] -- -awful.keyboard.append_global_keybindings( - { +awful.keyboard.append_global_keybindings({ -- Focus next window by index awful.key( - { modkey }, - "j", - function() - awful.client.focus.byidx(1) - end, - { - description = - "Focus the next window by index", - group = - "Focus keybinds" - } + { modkey }, + "j", + function() + awful.client.focus.byidx(1) + end, + { + description = "Focus the next window by index", + group = "Focus keybinds" + } ), -- Focus previous window by index awful.key( - { modkey }, - "k", - function() - awful.client.focus.byidx(-1) - end, - { - description = - "Focus the previous window by index", - group = - "Focus keybinds" - } + { modkey }, + "k", + function() + awful.client.focus.byidx(-1) + end, + { + description = "Focus the previous window by index", + group = "Focus keybinds" + } ), -- Focus last focused window awful.key( - { modkey }, - "Tab", - function() - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end, - { - description = - "Focus back the previous focused window", - group = - "Focus keybinds" - } + { modkey }, + "Tab", + function() + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + { + description = "Focus back the previous focused window", + group = "Focus keybinds" + } ), -- Focus next screen awful.key( - { modkey, conkey }, - "j", - function() - awful.screen.focus_relative(1) - end, - { - description = - "Focus the next screen", - group = - "Focus keybinds" - } + { modkey, conkey }, + "j", + function() + awful.screen.focus_relative(1) + end, + { + description = "Focus the next screen", + group = "Focus keybinds" + } ), -- Focus previous screen awful.key( - { modkey, conkey }, - "k", - function() - awful.screen.focus_relative(-1) - end, - { - description = - "Focus the previous screen", - group = - "Focus keybinds" - } + { modkey, conkey }, + "k", + function() + awful.screen.focus_relative(-1) + end, + { + description = "Focus the previous screen", + group = "Focus keybinds" + } ), - } -) +}) --[[ ]] -- --[[ Layout keybinds ]] -- -awful.keyboard.append_global_keybindings( - { +awful.keyboard.append_global_keybindings({ -- Swap with next window by index awful.key( - { modkey, shikey }, - "j", - function() - awful.client.swap.byidx(1) - end, - { - description = - "Swap with next window in current layout by index", - group = - "Layout keybinds" - } + { modkey, shikey }, + "j", + function() + awful.client.swap.byidx(1) + end, + { + description = "Swap with next window in current layout by index", + group = "Layout keybinds" + } ), -- Swap with previous window by index awful.key( - { modkey, shikey }, - "k", - function() - awful.client.swap.byidx(-1) - end, - { - description = - "Swap with previous window in current layout by index", - group = - "Layout keybinds" - } + { modkey, shikey }, + "k", + function() + awful.client.swap.byidx(-1) + end, + { + description = "Swap with previous window in current layout by index", + group = "Layout keybinds" + } ), -- Increase master width awful.key( - { modkey }, - "l", - function() - awful.tag.incmwfact(0.05) - end, - { - description = - "Increase master window width size", - group = - "Layout keybinds" - } + { modkey }, + "l", + function() + awful.tag.incmwfact(0.05) + end, + { + description = "Increase master window width size", + group = "Layout keybinds" + } ), -- Decrease master width awful.key( - { modkey }, - "h", - function() - awful.tag.incmwfact(-0.05) - end, - { - description = - "Decrease master window width size", - group = - "Layout keybinds" - } + { modkey }, + "h", + function() + awful.tag.incmwfact(-0.05) + end, + { + description = "Decrease master window width size", + group = "Layout keybinds" + } ), -- Increase the number of master window awful.key( - { modkey, shikey }, - "h", - function() - awful.tag.incnmaster(1, nil, true) - end, - { - description = - "Increase the number of master windows", - group = - "Layout keybinds" - } + { modkey, shikey }, + "h", + function() + awful.tag.incnmaster(1, nil, true) + end, + { + description = "Increase the number of master windows", + group = "Layout keybinds" + } ), -- Decrease the number of master windows awful.key( - { modkey, shikey }, - "l", - function() - awful.tag.incnmaster(-1, nil, true) - end, - { - description = - "Decrease the number of master windows", - group = - "Layout keybinds" - } + { modkey, shikey }, + "l", + function() + awful.tag.incnmaster(-1, nil, true) + end, + { + description = "Decrease the number of master windows", + group = "Layout keybinds" + } ), -- Increase the number of columns awful.key( - { modkey, conkey }, - "h", - function() - awful.tag.incncol(1, nil, true) - end, - { - description = - "Increase the number of columns in layout", - group = - "Layout keybinds" - } + { modkey, conkey }, + "h", + function() + awful.tag.incncol(1, nil, true) + end, + { + description = "Increase the number of columns in layout", + group = "Layout keybinds" + } ), -- Decrease the number of columns awful.key( - { modkey, conkey }, - "l", - function() - awful.tag.incncol(-1, nil, true) - end, - { - description = - "Decrease the number of columns in layout", - group = - "Layout keybinds" - } + { modkey, conkey }, + "l", + function() + awful.tag.incncol(-1, nil, true) + end, + { + description = "Decrease the number of columns in layout", + group = "Layout keybinds" + } ), -- Switch to next layout awful.key( - { modkey }, - "space", - function() - awful.layout.inc(1) - end, - { - description = - "Switch to the next layout", - group = - "Layout keybinds" - } + { modkey }, + "space", + function() + awful.layout.inc(1) + end, + { + description = "Switch to the next layout", + group = "Layout keybinds" + } ), -- Switch to previous layout awful.key( - { modkey, shikey }, - "space", - function() - awful.layout.inc(-1) - end, - { - description = - "Switch to previous layout", - group = - "Layout keybinds" - } + { modkey, shikey }, + "space", + function() + awful.layout.inc(-1) + end, + { + description = "Switch to previous layout", + group = "Layout keybinds" + } ), -- Select layouts directly awful.key { - modifiers = { modkey }, - keygroup = "numpad", - description = "Select layouts directly using the numpad", - group = "layout", - on_press = function(index) - local t = awful.screen.focused().selected_tag - if t then - t.layout = t.layouts[index] or t.layout - end - end, + modifiers = { modkey }, + keygroup = "numpad", + description = "Select layouts directly using the numpad", + group = "layout", + on_press = function(index) + local t = awful.screen.focused().selected_tag + if t then + t.layout = t.layouts[index] or t.layout + end + end, }, -- Show/Hide Wibox awful.key( - { modkey }, - "b", - function() - for s in screen do - s.mywibox.visible = not s.mywibox.visible - if s.mybottomwibox then - s.mybottomwibox.visible = not s.mybottomwibox.visible - end - end - end, - { - description = - "Toggle the bar", - group = - "Layout keybinds" - } + { modkey }, + "b", + function() + for s in screen do + s.mywibox.visible = not s.mywibox.visible + if s.mybottomwibox then + s.mybottomwibox.visible = not s.mybottomwibox.visible + end + end + end, + { + description = "Toggle the bar", + group = "Layout keybinds" + } ), - } -) +}) --[[ ]] -- --[[ Window keybinds ]] -- client.connect_signal( - "request::default_keybindings", - function() - awful.keyboard.append_client_keybindings( - { - -- Set focused window to fullscreen - awful.key( - { modkey }, - "f", - function(c) - c.fullscreen = not c.fullscreen - c:raise() - end, - { - description = - "Toggle fullscreen", - group = - "Window keybinds" - } - ), - -- Close focused window - awful.key( - { modkey }, - "q", - function(c) - c:kill() - end, - { - description = - "Close focused window", - group = - "Window keybinds" - } - ), - -- Toggle floating mode on focused window - awful.key( - { modkey, conkey }, - "space", - awful.client.floating.toggle, - { - description = - "Toggle floating mode on focused window", - group = - "Window keybinds" - } - ), - -- Move focused window to master - awful.key( - { modkey, conkey }, - "Return", - function(c) - c:swap( - awful.client.getmaster() - ) - end, - { - description = - "Move focused window to master", - group = - "Window keybinds" - } - ), - -- Move focused window to the other screen - awful.key( - { modkey }, - "o", - function(c) - c:move_to_screen() - end, - { - description = - "Move focused window to the next screen", - group = - "Window keybinds" - } - ), - -- Toggle focused window to be on top - awful.key( - { modkey }, - "t", - function(c) - c.ontop = not c.ontop - end, - { - description = - "Toggle keep on top for focused window", - group = - "Window keybinds" - } - ), - -- Jump to urgent window - awful.key( - { modkey }, - "u", - awful.client.urgent.jumpto, - { - description = - "Quickly jump to urgent window", - group = - "Window keybinds" - } - ), - } - ) - end + "request::default_keybindings", + function() + awful.keyboard.append_client_keybindings({ + -- Set focused window to fullscreen + awful.key( + { modkey }, + "f", + function(c) + c.fullscreen = not c.fullscreen + c:raise() + end, + { + description = "Toggle fullscreen", + group = "Window keybinds" + } + ), + -- Close focused window + awful.key( + { modkey }, + "q", + function(c) + c:kill() + end, + { + description = "Close focused window", + group = "Window keybinds" + } + ), + -- Toggle floating mode on focused window + awful.key( + { modkey, conkey }, + "space", + awful.client.floating.toggle, + { + description = "Toggle floating mode on focused window", + group = "Window keybinds" + } + ), + -- Move focused window to master + awful.key( + { modkey, conkey }, + "Return", + function(c) + c:swap( + awful.client.getmaster() + ) + end, + { + description = "Move focused window to master", + group = "Window keybinds" + } + ), + -- Move focused window to the other screen + awful.key( + { modkey }, + "o", + function(c) + c:move_to_screen() + end, + { + description = "Move focused window to the next screen", + group = "Window keybinds" + } + ), + -- Toggle focused window to be on top + awful.key( + { modkey }, + "t", + function(c) + c.ontop = not c.ontop + end, + { + description = "Toggle keep on top for focused window", + group = "Window keybinds" + } + ), + -- Jump to urgent window + awful.key( + { modkey }, + "u", + awful.client.urgent.jumpto, + { + description = "Quickly jump to urgent window", + group = "Window keybinds" + } + ), + }) + end ) --[[ ]] -- --[[ Quick keybinds ]] -awful.keyboard.append_global_keybindings( - { +awful.keyboard.append_global_keybindings({ -- Volume awful.key( - {}, - "XF86AudioRaiseVolume", - function() - awful.spawn("pamixer -i 5") - end, - { - description = - "Increase volume by +5%", - group = - "Quick keybinds" - } + {}, + "XF86AudioRaiseVolume", + function() + awful.spawn("pamixer -i 5") + end, + { + description = "Increase volume by +5%", + group = "Quick keybinds" + } ), awful.key( - {}, - "XF86AudioLowerVolume", - function() - awful.spawn("pamixer -d 5") - end, - { - description = - "Decrease volume by +5%", - group = - "Quick keybinds" - } + {}, + "XF86AudioLowerVolume", + function() + awful.spawn("pamixer -d 5") + end, + { + description = "Decrease volume by +5%", + group = "Quick keybinds" + } ), awful.key( - {}, - "XF86AudioMute", - function() - awful.spawn("pamixer -t") - end, - { - description = - "Mute volume", - group = - "Quick keybinds" - } + {}, + "XF86AudioMute", + function() + awful.spawn("pamixer -t") + end, + { + description = "Mute volume", + group = "Quick keybinds" + } ), awful.key( - {}, - "XF86AudioMicMute", - function() - awful.spawn("pamixer --default-source -t") - end, - { - description = - "Mute microphone", - group = - "Quick keybinds" - } + {}, + "XF86AudioMicMute", + function() + awful.spawn("pamixer --default-source -t") + end, + { + description = "Mute microphone", + group = "Quick keybinds" + } ), -- Brightness awful.key( - {}, - "XF86MonBrightnessUp", - function() - awful.spawn("xbacklight -inc 10") - end, - { - description = - "Increase brightness by +10%", - group = - "Quick keybinds" - } + {}, + "XF86MonBrightnessUp", + function() + awful.spawn("brightnessctl s 5%+") + end, + { + description = "Increase brightness by +5%", + group = "Quick keybinds" + } ), awful.key( - {}, - "XF86MonBrightnessDown", - function() - awful.spawn("xbacklight -dec 10") - end, - { - description = - "Decrease brightness by +10%", - group = - "Quick keybinds" - } + {}, + "XF86MonBrightnessDown", + function() + awful.spawn("brightnessctl s 5%-") + end, + { + description = "Decrease brightness by -5%", + group = "Quick keybinds" + } ), -- Display configuration awful.key( - {}, - "XF86Display", - function() - awful.spawn("arandr") - end, - { - description = - "Configure the display using arandr", - group = "Quick keybinds" - } + {}, + "XF86Display", + function() + awful.spawn("arandr") + end, + { + description = "Configure the display using arandr", + group = "Quick keybinds" + } ), -- Apps (Super + a followed by KEY) awful.key( - { modkey }, - "a", - function() - local grabber - grabber = - awful.keygrabber.run( - function(_, key, event) - if event == "release" then - return + { modkey }, + "a", + function() + local grabber = awful.keygrabber.run( + function(_, key, event) + if event == "release" then + return + end + if key == "1" then + awful.util.spawn(apps.editor) -- TAG 1 + elseif key == "2" then + awful.util.spawn(apps.file) -- TAG 2 + elseif key == "3" then + awful.util.spawn(apps.browser) -- TAG 3 + elseif key == "4" then + awful.util.spawn(apps.chat) -- TAG 4 + elseif key == "5" then + awful.util.spawn(apps.music) -- TAG 5 + elseif key == "6" then + awful.util.spawn(apps.videoeditor) -- TAG 5 + elseif key == "7" then + awful.util.spawn(apps.imageeditor) -- TAG 5 + elseif key == "8" then + awful.util.spawn(apps.office) -- TAG 8 + elseif key == "9" then + awful.util.spawn(apps.game) -- TAG 9 + end + awful.keygrabber.stop(grabber) end - if key == "1" then - awful.util.spawn(apps.editor) -- TAG 1 - elseif key == "2" then - awful.util.spawn(apps.file) -- TAG 2 - elseif key == "3" then - awful.util.spawn(apps.browser) -- TAG 3 - elseif key == "4" then - awful.util.spawn(apps.chat) -- TAG 4 - elseif key == "5" then - awful.util.spawn(apps.music) -- TAG 5 - elseif key == "6" then - awful.util.spawn(apps.videoeditor) -- TAG 5 - elseif key == "7" then - awful.util.spawn(apps.imageeditor) -- TAG 5 - elseif key == "8" then - awful.util.spawn(apps.noteapp) -- TAG 8 - elseif key == "9" then - awful.util.spawn(apps.game) -- TAG 9 - end - awful.keygrabber.stop(grabber) - end ) - end, - { - description = - "Launch apps with {Super + a} keychord and then numbers from {1 to 9}", - group = - "Quick keybinds" - } + end, + { + description = "Launch apps with {Super + a} keychord and then numbers from {1 to 9}", + group = "Quick keybinds" + } ), -- Keyboard layouts (Super + x followed by KEY) awful.key( - { modkey }, - "x", - function() - local grabber - grabber = - awful.keygrabber.run( - function(_, key, event) - if event == "release" then - return + { modkey }, + "x", + function() + local grabber = awful.keygrabber.run( + function(_, key, event) + if event == "release" then + return + end + if key == "e" then + awful.util.spawn("setxkbmap es") + elseif key == "u" then + awful.util.spawn("setxkbmap us") + end + awful.keygrabber.stop(grabber) end - if key == "e" then - awful.util.spawn("setxkbmap es") - elseif key == "u" then - awful.util.spawn("setxkbmap us") - end - awful.keygrabber.stop(grabber) - end ) - end, - { - description = - "Change keyboard layout with {Super + x} keychord and then {e} for spanish and {u} for english", - group = - "Quick keybinds" - } + end, + { + description = "Change keyboard layout with {Super + x} keychord and then {e} for spanish and {u} for english", + group = "Quick keybinds" + } ), -- Runners (Super + p followed by KEY) awful.key( - { modkey }, - "p", - function() - local grabber - grabber = - awful.keygrabber.run( - function(_, key, event) - if event == "release" then - return + { modkey }, + "p", + function() + local grabber = awful.keygrabber.run( + function(_, key, event) + if event == "release" then + return + end + if key == "d" then + awful.util.spawn(apps.drunner) + elseif key == "r" then + awful.util.spawn(apps.runner) + elseif key == "q" then + awful.spawn.with_shell(apps.runner_power) + elseif key == "i" then + awful.spawn.with_shell(apps.runner_wifi) + elseif key == "s" then + awful.spawn.with_shell(apps.runner_scrot) + elseif key == "e" then + awful.spawn.with_shell(apps.runner_emoji) + elseif key == "w" then + awful.spawn.with_shell(apps.runner_wall) + elseif key == "m" then + awful.spawn.with_shell(apps.runner_mount) + elseif key == "b" then + awful.spawn.with_shell(apps.runner_blue) + end + awful.keygrabber.stop(grabber) end - if key == "d" then - awful.util.spawn(apps.drunner) - elseif key == "r" then - awful.util.spawn(apps.runner) - elseif key == "q" then - awful.spawn.with_shell(apps.runner_power) - elseif key == "i" then - awful.spawn.with_shell(apps.runner_wifi) - elseif key == "s" then - awful.spawn.with_shell(apps.runner_scrot) - elseif key == "e" then - awful.spawn.with_shell(apps.runner_emoji) - elseif key == "w" then - awful.spawn.with_shell(apps.runner_wall) - elseif key == "m" then - awful.spawn.with_shell(apps.runner_mount) - elseif key == "b" then - awful.spawn.with_shell(apps.runner_blue) - end - awful.keygrabber.stop(grabber) - end ) - end, - { - description = - "Launch quick action menus with {Super + p} keychord and then {d, r, e, q, i, b, s, z, w}", - group = - "Quick keybinds" - } + end, + { + description = "Launch quick action menus with {Super + p} keychord and then {d, r, e, q, i, b, s, z, w}", + group = "Quick keybinds" + } ), -- Multimedia scripts (Super + t followed by KEY) awful.key( - { modkey }, - "t", - function() - local grabber - grabber = - awful.keygrabber.run( - function(_, key, event) - if event == "release" then - return + { modkey }, + "t", + function() + local grabber = awful.keygrabber.run( + function(_, key, event) + if event == "release" then + return + end + if key == "y" then + awful.util.spawn(apps.vidytfzf) + elseif key == "m" then + awful.util.spawn(apps.musytfzf) + elseif key == "a" then + awful.util.spawn(apps.ani_cli) + elseif key == "f" then + awful.util.spawn(apps.flix_cli) + elseif key == "r" then + awful.util.spawn(apps.newsboat) + elseif key == "b" then + awful.util.spawn(apps.btop) + elseif key == "h" then + awful.util.spawn(apps.htop) + elseif key == "p" then + awful.util.spawn(apps.pulsemixer) + elseif key == "o" then + awful.util.spawn(apps.alsamixer) + end + awful.keygrabber.stop(grabber) end - if key == "y" then - awful.util.spawn(apps.vidytfzf) - elseif key == "m" then - awful.util.spawn(apps.musytfzf) - elseif key == "a" then - awful.util.spawn(apps.ani_cli) - elseif key == "f" then - awful.util.spawn(apps.flix_cli) - elseif key == "r" then - awful.util.spawn(apps.newsboat) - elseif key == "b" then - awful.util.spawn(apps.btop) - elseif key == "h" then - awful.util.spawn(apps.htop) - elseif key == "p" then - awful.util.spawn(apps.pulsemixer) - elseif key == "o" then - awful.util.spawn(apps.alsamixer) - end - awful.keygrabber.stop(grabber) - end ) - end, - { - description = - "Launch multimedia terminal scripts with {Super + t} and then {m, y, a, f}", - group = - "Quick keybinds" - } + end, + { + description = "Launch multimedia terminal scripts with {Super + t} and then {m, y, a, f}", + group = "Quick keybinds" + } ), - } -) +}) --[[ ]] diff --git a/user/.config/awesome/keymaps/mouse.lua b/user/.config/awesome/keymaps/mouse.lua index 12631c7ea..60710e0f0 100644 --- a/user/.config/awesome/keymaps/mouse.lua +++ b/user/.config/awesome/keymaps/mouse.lua @@ -1,50 +1,46 @@ local awful = require("awful") -- Window related mouse bindings client.connect_signal( - "request::default_mousebindings", - function() - awful.mouse.append_client_mousebindings( - { - awful.button( - { }, - 1, - function(c) - c:activate {context = "mouse_click"} - end - ), - awful.button( - { modkey }, - 1, - function(c) - c:activate {context = "mouse_click", action = "mouse_move"} - end - ), - awful.button( - { modkey }, - 3, - function(c) - c:activate {context = "mouse_click", action = "mouse_resize"} - end - ) - } - ) - end + "request::default_mousebindings", + function() + awful.mouse.append_client_mousebindings({ + awful.button( + { }, + 1, + function(c) + c:activate {context = "mouse_click"} + end + ), + awful.button( + { modkey }, + 1, + function(c) + c:activate {context = "mouse_click", action = "mouse_move"} + end + ), + awful.button( + { modkey }, + 3, + function(c) + c:activate {context = "mouse_click", action = "mouse_resize"} + end + ) + }) + end ) -- Mouse bindings on desktop -awful.mouse.append_global_mousebindings( - { +awful.mouse.append_global_mousebindings({ awful.button( - { }, - 4, - awful.tag.viewprev + { }, + 4, + awful.tag.viewprev ), awful.button( - { }, - 5, - awful.tag.viewnext + { }, + 5, + awful.tag.viewnext ) - } -) +}) -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) diff --git a/user/.config/awesome/ui/bar.lua b/user/.config/awesome/ui/bar.lua index d9e277401..7abc02e25 100644 --- a/user/.config/awesome/ui/bar.lua +++ b/user/.config/awesome/ui/bar.lua @@ -12,187 +12,186 @@ local volume = require("ui.widgets.volume") -- Textclock widget local mytextclock = wibox.widget.textclock() screen.connect_signal("request::desktop_decoration", function(s) - -- Tag names for each screen - awful.tag( - { - "󰅩", -- EDITOR - "󰉖", -- FILE MANAGER - "󰖟", -- WEB BROWSER - "󰻞", -- CHAT - "󰲹", -- MUSIC - "󰯜", -- VIDEO - "󱇤", -- IMAGE/EDIT TOOLS - "󰧮", -- OFFICE - "󰸶", -- GAMES - }, - s, - awful.layout.layouts[1] - ) - - -- Layoutbox widget - s.mylayoutbox = { - widget = wibox.container.background, - bg = theme.bg_normal, - shape = gears.shape.circle, - awful.widget.layoutbox { - screen = s, - buttons = { - awful.button( - {}, - 1, - function() - awful.layout.inc(1) - end - ), - awful.button( - {}, - 3, - function() - awful.layout.inc(-1) - end - ), - awful.button( - {}, - 4, - function() - awful.layout.inc(-1) - end - ), - awful.button( - {}, - 5, - function() - awful.layout.inc(1) - end - ), - } - } - } - - -- Taglist widget - s.mytaglist = { - widget = wibox.container.background, - bg = theme.taglist_bg, - shape = gears.shape.octogon, - awful.widget.taglist { - screen = s, - filter = awful.widget.taglist.filter.all, - buttons = { - awful.button( - {}, - 1, - function(t) - t:view_only() - end - ), - awful.button( - { modkey }, - 1, - function(t) - if client.focus then - client.focus:move_to_tag(t) - end - end - ), - awful.button( - {}, - 3, - awful.tag.viewtoggle - ), - awful.button( - { modkey }, - 3, - function(t) - if client.focus then - client.focus:toggle_tag(t) - end - end - ), - awful.button( - {}, - 4, - function(t) - awful.tag.viewprev(t.screen) - end - ), - awful.button( - {}, - 5, - function(t) - awful.tag.viewnext(t.screen) - end - ), - } - } - } - - -- Prepare custom widgets container - local custom_widget_container = { - -- Keyboard layout widget - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one), - wibox.container.background(layout, theme.bar_bg_one), - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one), - -- Volume widget - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two), - wibox.container.background(volume, theme.bar_bg_two), - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two), - -- Brightness widget - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre), - wibox.container.background(brightness, theme.bar_bg_tre), - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre), - -- Battery widget - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for), - wibox.container.background(battery, theme.bar_bg_for), - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for), - -- Wifi widget - wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_fiv), - wibox.container.background(wifi, theme.bar_bg_fiv), - layout = wibox.layout.fixed.horizontal, - } - - -- Main right widget container with pill shape - local right_widgets = { - custom_widget_container, - widget = wibox.container.background, - shape = gears.shape.octogon, - } - - -- Wibar - s.mywibox = awful.wibar { - position = "top", - height = (30), - border_width = (6), - border_color = theme.bg_normal, - screen = s, - widget = { - layout = wibox.layout.stack, - { - layout = wibox.layout.align.horizontal, + -- Tag names for each screen + awful.tag( { - -- [[ Left widgets ]] - layout = wibox.layout.fixed.horizontal, - -- Layoubox widget - s.mylayoutbox, - wibox.container.background(wibox.widget.textbox(" "), theme.bg_normal), - -- Taglist widget - s.mytaglist, + "󰅩", -- EDITOR + "󰉖", -- FILE MANAGER + "󰖟", -- WEB BROWSER + "󰻞", -- CHAT + "󰲹", -- MUSIC + "󰯜", -- VIDEO + "󱇤", -- IMAGE/EDIT TOOLS + "󰧮", -- OFFICE + "󰸶", -- GAMES }, - nil, - { - -- [[ Right widgets ]] - layout = wibox.layout.fixed.horizontal, - right_widgets - }, - }, - { - -- [[ Center widgets ]] - -- Clock widget - wibox.container.background(mytextclock, theme.bar_clock, gears.shape.octogon), - valign = "center", - halign = "center", - layout = wibox.container.place, - } + s, + awful.layout.layouts[1] + ) + + -- Layoutbox widget + s.mylayoutbox = { + widget = wibox.container.background, + bg = theme.bg_normal, + shape = gears.shape.circle, + awful.widget.layoutbox { + screen = s, + buttons = { + awful.button( + {}, + 1, + function() + awful.layout.inc(1) + end + ), + awful.button( + {}, + 3, + function() + awful.layout.inc(-1) + end + ), + awful.button( + {}, + 4, + function() + awful.layout.inc(-1) + end + ), + awful.button( + {}, + 5, + function() + awful.layout.inc(1) + end + ), + } + } } - } -end -) + + -- Taglist widget + s.mytaglist = { + widget = wibox.container.background, + bg = theme.taglist_bg, + shape = gears.shape.octogon, + awful.widget.taglist { + screen = s, + filter = awful.widget.taglist.filter.all, + buttons = { + awful.button( + {}, + 1, + function(t) + t:view_only() + end + ), + awful.button( + { modkey }, + 1, + function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end + ), + awful.button( + {}, + 3, + awful.tag.viewtoggle + ), + awful.button( + { modkey }, + 3, + function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end + ), + awful.button( + {}, + 4, + function(t) + awful.tag.viewprev(t.screen) + end + ), + awful.button( + {}, + 5, + function(t) + awful.tag.viewnext(t.screen) + end + ), + } + } + } + + -- Prepare custom widgets container + local custom_widget_container = { + -- Keyboard layout widget + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one), + wibox.container.background(layout, theme.bar_bg_one), + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one), + -- Volume widget + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two), + wibox.container.background(volume, theme.bar_bg_two), + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two), + -- Brightness widget + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre), + wibox.container.background(brightness, theme.bar_bg_tre), + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre), + -- Battery widget + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for), + wibox.container.background(battery, theme.bar_bg_for), + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for), + -- Wifi widget + wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_fiv), + wibox.container.background(wifi, theme.bar_bg_fiv), + layout = wibox.layout.fixed.horizontal, + } + + -- Main right widget container with pill shape + local right_widgets = { + custom_widget_container, + widget = wibox.container.background, + shape = gears.shape.octogon, + } + + -- Wibar + s.mywibox = awful.wibar { + position = "top", + height = (30), + border_width = (6), + border_color = theme.bg_normal, + screen = s, + widget = { + layout = wibox.layout.stack, + { + layout = wibox.layout.align.horizontal, + { + -- [[ Left widgets ]] + layout = wibox.layout.fixed.horizontal, + -- Layoubox widget + s.mylayoutbox, + wibox.container.background(wibox.widget.textbox(" "), theme.bg_normal), + -- Taglist widget + s.mytaglist, + }, + nil, + { + -- [[ Right widgets ]] + layout = wibox.layout.fixed.horizontal, + right_widgets + }, + }, + { + -- [[ Center widgets ]] + -- Clock widget + wibox.container.background(mytextclock, theme.bar_clock, gears.shape.octogon), + valign = "center", + halign = "center", + layout = wibox.container.place, + } + } + } +end) diff --git a/user/.config/awesome/ui/layouts.lua b/user/.config/awesome/ui/layouts.lua index 47c3bcd38..487ceb2d3 100644 --- a/user/.config/awesome/ui/layouts.lua +++ b/user/.config/awesome/ui/layouts.lua @@ -3,27 +3,26 @@ local awful = require("awful") local centerwork = require("modules.custom-layouts.centerwork") -- {{{ Selected layouts tag.connect_signal( - "request::default_layouts", - function() - awful.layout.append_default_layouts( - { - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, - centerwork, --- awful.layout.suit.fair, --- awful.layout.suit.fair.horizontal, --- awful.layout.suit.spiral, --- awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, - awful.layout.suit.max.fullscreen, --- awful.layout.suit.magnifier, --- awful.layout.suit.corner.nw, - awful.layout.suit.floating, - } - ) - end + "request::default_layouts", + function() + awful.layout.append_default_layouts( + { + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + awful.layout.suit.tile.top, + centerwork, + -- awful.layout.suit.fair, + -- awful.layout.suit.fair.horizontal, + -- awful.layout.suit.spiral, + -- awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, + awful.layout.suit.max.fullscreen, + -- awful.layout.suit.magnifier, + -- awful.layout.suit.corner.nw, + awful.layout.suit.floating, + } + ) + end ) -- }}} - diff --git a/user/.config/awesome/ui/notif.lua b/user/.config/awesome/ui/notif.lua index fdf41ed57..99428a424 100644 --- a/user/.config/awesome/ui/notif.lua +++ b/user/.config/awesome/ui/notif.lua @@ -13,100 +13,100 @@ naughty.config.defaults.position = "top_right" naughty.config.defaults.title = "Notification" ruled.notification.connect_signal( - "request::rules", - function() - -- Critical - ruled.notification.append_rule { - rule = { - urgency = "critical" - }, - properties = { - bg = beautiful.notification_bg, - fg = beautiful.notification_critical, - timeout = 0 - } - } - -- Normal - ruled.notification.append_rule { - rule = { - urgency = "normal" - }, - properties = { - bg = beautiful.notification_bg, - fg = beautiful.notification_fg, - timeout = 5 - } - } - -- Low - ruled.notification.append_rule { - rule = { - urgency = "low" - }, - properties = { - bg = beautiful.notification_bg, - fg = beautiful.notification_fg, - timeout = 5 - } - } - end + "request::rules", + function() + -- Critical + ruled.notification.append_rule { + rule = { + urgency = "critical" + }, + properties = { + bg = beautiful.notification_bg, + fg = beautiful.notification_critical, + timeout = 0 + } + } + -- Normal + ruled.notification.append_rule { + rule = { + urgency = "normal" + }, + properties = { + bg = beautiful.notification_bg, + fg = beautiful.notification_fg, + timeout = 5 + } + } + -- Low + ruled.notification.append_rule { + rule = { + urgency = "low" + }, + properties = { + bg = beautiful.notification_bg, + fg = beautiful.notification_fg, + timeout = 5 + } + } + end ) naughty.connect_signal( - "request::display", - function(n) - naughty.layout.box { - notification = n, - type = "notification", - bg = beautiful.bg_normal, - widget_template = { - { - { - { - { + "request::display", + function(n) + naughty.layout.box { + notification = n, + type = "notification", + bg = beautiful.bg_normal, + widget_template = { { - { - naughty.widget.title, - forced_height = dpi(38), - layout = wibox.layout.align.horizontal - }, - left = dpi(15), - right = dpi(15), - widget = wibox.container.margin + { + { + { + { + { + naughty.widget.title, + forced_height = dpi(38), + layout = wibox.layout.align.horizontal + }, + left = dpi(15), + right = dpi(15), + widget = wibox.container.margin + }, + bg = beautiful.notification_bg_alt, + widget = wibox.container.background + }, + strategy = "min", + width = dpi(300), + widget = wibox.container.constraint + }, + strategy = "max", + width = dpi(400), + widget = wibox.container.constraint + }, + { + { + { + naughty.widget.message, + left = dpi(15), + right = dpi(15), + top = dpi(15), + bottom = dpi(15), + widget = wibox.container.margin + }, + strategy = "min", + height = dpi(60), + widget = wibox.container.constraint + }, + strategy = "max", + width = dpi(400), + widget = wibox.container.constraint + }, + layout = wibox.layout.align.vertical }, - bg = beautiful.notification_bg_alt, - widget = wibox.container.background - }, - strategy = "min", - width = dpi(300), - widget = wibox.container.constraint - }, - strategy = "max", - width = dpi(400), - widget = wibox.container.constraint - }, - { - { - { - naughty.widget.message, - left = dpi(15), - right = dpi(15), - top = dpi(15), - bottom = dpi(15), - widget = wibox.container.margin - }, - strategy = "min", - height = dpi(60), - widget = wibox.container.constraint - }, - strategy = "max", - width = dpi(400), - widget = wibox.container.constraint - }, - layout = wibox.layout.align.vertical - }, - id = "background_role", - widget = naughty.container.background - } - } - end + id = "background_role", + widget = naughty.container.background + } + } + end ) diff --git a/user/.config/awesome/ui/rules.lua b/user/.config/awesome/ui/rules.lua index 63e08a4d1..75533fe56 100644 --- a/user/.config/awesome/ui/rules.lua +++ b/user/.config/awesome/ui/rules.lua @@ -3,197 +3,196 @@ local ruled = require("ruled") -- Rules to apply to new clients. ruled.client.connect_signal( - "request::rules", - function() - -- All clients will match this rule. - ruled.client.append_rule { - id = "global", - rule = {}, - properties = { - focus = awful.client.focus.filter, - raise = true, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap + awful.placement.no_offscreen, - callback = awful.client.setslave - } - } - - -- Floating clients. - ruled.client.append_rule { - id = "floating", - rule_any = { - hinstance = { "copyq", "pinentry" }, - class = { - "Galculator", - "Qalculate-gtk", - "Blueman-manager", - "Gpick", - "Kruler", - "Tor Browser", - "Wpa_gui", - "veromix", - "xtightvncviewer" - }, - -- Note that the name property shown in xprop might be set slightly after creation of the client - -- and the name shown there might not match defined rules here. - name = { - "Event Tester", -- xev. - }, - role = { - "AlarmWindow", -- Thunderbird's calendar. - "ConfigManager", -- Thunderbird's about:config. - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + "request::rules", + function() + -- All clients will match this rule. + ruled.client.append_rule { + id = "global", + rule = {}, + properties = { + focus = awful.client.focus.filter, + raise = true, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap + awful.placement.no_offscreen, + callback = awful.client.setslave + } } - }, - properties = { floating = true } - } - -- TAG 1 - ruled.client.append_rule { - rule_any = { - class = { - "Emacs", - "neovide", - "lvim", - "Godot", - "neovim", - "htop", - "btop", - "Virt-manager" + -- Floating clients. + ruled.client.append_rule { + id = "floating", + rule_any = { + hinstance = { "copyq", "pinentry" }, + class = { + "Galculator", + "Qalculate-gtk", + "Blueman-manager", + "Gpick", + "Kruler", + "Tor Browser", + "Wpa_gui", + "veromix", + "xtightvncviewer" + }, + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, + properties = { floating = true } } - }, - properties = { tag = "󰅩" }, - } - -- TAG 2 - ruled.client.append_rule { - rule_any = { - class = { - "vifm", - "pcmanfm", - "nemo" + -- TAG 1 + ruled.client.append_rule { + rule_any = { + class = { + "Emacs", + "neovide", + "lvim", + "Godot", + "neovim", + "htop", + "btop", + "Virt-manager" + } + }, + properties = { tag = "󰅩" }, } - }, - properties = { tag = "󰉖" }, - } - -- TAG 3 - ruled.client.append_rule { - rule_any = { - class = { - "Brave-browser", - "librewolf", - "firefox", - "Luakit", - "Chromium", - "Bitwarden", - "qutebrowser", - "tut", - "newsboat" + -- TAG 2 + ruled.client.append_rule { + rule_any = { + class = { + "vifm", + "pcmanfm", + "nemo" + } + }, + properties = { tag = "󰉖" }, } - }, - properties = { tag = "󰖟" } - } - -- TAG 4 - ruled.client.append_rule { - rule_any = { - class = { - "gomuks", - "Signal", - "Revolt", - "Element" + -- TAG 3 + ruled.client.append_rule { + rule_any = { + class = { + "Brave-browser", + "librewolf", + "firefox", + "Luakit", + "Chromium", + "Bitwarden", + "qutebrowser", + "tut", + "newsboat" + } + }, + properties = { tag = "󰖟" } } - }, - properties = { tag = "󰻞" } - } - -- TAG 5 - ruled.client.append_rule { - rule_any = { - class = { - "cmus", - "musytfzf", - "Audacity", - "Ardour", - "Carla2", - "Carla2-Control", - "alsamixer", - "pulsemixer" + -- TAG 4 + ruled.client.append_rule { + rule_any = { + class = { + "gomuks", + "Signal", + "Revolt", + "Element" + } + }, + properties = { tag = "󰻞" } } - }, - properties = { tag = "󰲹" } - } - -- TAG 6 - ruled.client.append_rule { - rule_any = { - class = { - "kdenlive", - "Blender", - "Natron", - "SimpleScreenRecorder", - "Ghb", - "obs", - "mpv", - "ani-cli", - "flix-cli", - "vidytfzf" + -- TAG 5 + ruled.client.append_rule { + rule_any = { + class = { + "cmus", + "musytfzf", + "Audacity", + "Ardour", + "Carla2", + "Carla2-Control", + "alsamixer", + "pulsemixer" + } + }, + properties = { tag = "󰲹" } } - }, - properties = { tag = "󰯜" } - } - -- TAG 7 - ruled.client.append_rule { - rule_any = { - class = { - "Qjackctl", - "lsp-plugins", - "qpwgraph", - "Gimp-2.10", - "krita", - "Inkscape", - "Xournalpp", + -- TAG 6 + ruled.client.append_rule { + rule_any = { + class = { + "kdenlive", + "Blender", + "Natron", + "SimpleScreenRecorder", + "Ghb", + "obs", + "mpv", + "ani-cli", + "flix-cli", + "vidytfzf" + } + }, + properties = { tag = "󰯜" } } - }, - properties = { tag = "󱇤" } - } - -- TAG 8 - ruled.client.append_rule { - rule_any = { - class = { - "DesktopEditors", - "Soffice", - "Notesnook", - "libreoffice-startcenter", - "Joplin" + -- TAG 7 + ruled.client.append_rule { + rule_any = { + class = { + "Qjackctl", + "lsp-plugins", + "qpwgraph", + "Gimp-2.10", + "krita", + "Inkscape", + "Xournalpp", + } + }, + properties = { tag = "󱇤" } } - }, - properties = { tag = "󰧮" } - } - -- TAG 9 - ruled.client.append_rule { - rule_any = { - class = { - "retroarch", - "airshipper", - "pyrogenesis", - "DarkPlaces", - "xonotic-sdl", - "supertuxkart", - "supertux2", - "wesnoth", - "Minetest", - "openttd", - "warzone2100", - "steam" + -- TAG 8 + ruled.client.append_rule { + rule_any = { + class = { + "DesktopEditors", + "Soffice", + "Notesnook", + "libreoffice-startcenter", + "Joplin" + } + }, + properties = { tag = "󰧮" } } - }, - properties = { tag = "󰸶" } - } - --}}} - end + + -- TAG 9 + ruled.client.append_rule { + rule_any = { + class = { + "retroarch", + "airshipper", + "pyrogenesis", + "DarkPlaces", + "xonotic-sdl", + "supertuxkart", + "supertux2", + "wesnoth", + "Minetest", + "openttd", + "warzone2100", + "steam" + } + }, + properties = { tag = "󰸶" } + } + end ) diff --git a/user/.config/awesome/ui/widgets/battery.lua b/user/.config/awesome/ui/widgets/battery.lua index 4571f4594..b1fe67f67 100644 --- a/user/.config/awesome/ui/widgets/battery.lua +++ b/user/.config/awesome/ui/widgets/battery.lua @@ -1,110 +1,117 @@ local wibox = require("wibox") local awful = require("awful") +local gears = require("gears") -- Create a text widget to display the battery percentage and power profile local battery_text = wibox.widget.textbox() -local function update_battery_widget(widget, stdout) - -- Get the current battery percentage and charging status - local battery_percentage = tonumber(string.match(stdout, "(%d?%d?%d)%%")) - local ac_adapter_status = io.popen("cat /sys/class/power_supply/AC/online"):read("*line") +local function update_battery_widget() + awful.spawn.easy_async("acpi", function(stdout) + -- Get the current battery percentage and charging status + local battery_percentage = tonumber(string.match(stdout, "(%d?%d?%d)%%")) + local ac_adapter_status = stdout:match("Charging") and "1" or "0" - -- Get the current power profile - local currntpwr = io.popen("powerprofilesctl get"):read("*line") + -- Get the current power profile + local currntpwr = io.popen("powerprofilesctl get"):read("*line") - -- Set the appropriate power profile symbol based on the current power profile - local pwr_symbol = "" - if currntpwr == "performance" then - pwr_symbol = " - 󰓅 Performance" - elseif currntpwr == "balanced" then - pwr_symbol = " - 󰾅 Balanced" - elseif currntpwr == "power-saver" then - pwr_symbol = " - 󰾆 PowerSaver" - end + -- Set the appropriate power profile symbol based on the current power profile + local pwr_symbol = "" + if currntpwr == "performance" then + pwr_symbol = " - 󰓅 Performance" + elseif currntpwr == "balanced" then + pwr_symbol = " - 󰾅 Balanced" + elseif currntpwr == "power-saver" then + pwr_symbol = " - 󰾆 PowerSaver" + end - -- Set the appropriate battery icon based on the current battery percentage and charging status - local icon = "󰁹" - if ac_adapter_status == "1" then - if battery_percentage >= 100 then - icon = "󰂅" - elseif battery_percentage >= 90 then - icon = "󰂋" - elseif battery_percentage >= 80 then - icon = "󰂊" - elseif battery_percentage >= 70 then - icon = "󰢞" - elseif battery_percentage >= 60 then - icon = "󰂉" - elseif battery_percentage >= 50 then - icon = "󰢝" - elseif battery_percentage >= 40 then - icon = "󰂈" - elseif battery_percentage >= 30 then - icon = "󰂇" - elseif battery_percentage >= 20 then - icon = "󰂆" - else - icon = "󰢜" - end - else - if battery_percentage >= 100 then - icon = "󰁹" - elseif battery_percentage >= 90 then - icon = "󰂂" - elseif battery_percentage >= 80 then - icon = "󰂁" - elseif battery_percentage >= 70 then - icon = "󰂀" - elseif battery_percentage >= 60 then - icon = "󰁿" - elseif battery_percentage >= 50 then - icon = "󰁾" - elseif battery_percentage >= 40 then - icon = "󰁽" - elseif battery_percentage >= 30 then - icon = "󰁼" - elseif battery_percentage >= 20 then - icon = "󰁻" - else - icon = "󰂃" - end - end + -- Set the appropriate battery icon based on the current battery percentage and charging status + local icon = "󰁹" + if ac_adapter_status == "1" then + if battery_percentage >= 100 then + icon = "󰂅" + elseif battery_percentage >= 90 then + icon = "󰂋" + elseif battery_percentage >= 80 then + icon = "󰂊" + elseif battery_percentage >= 70 then + icon = "󰢞" + elseif battery_percentage >= 60 then + icon = "󰂉" + elseif battery_percentage >= 50 then + icon = "󰢝" + elseif battery_percentage >= 40 then + icon = "󰂈" + elseif battery_percentage >= 30 then + icon = "󰂇" + elseif battery_percentage >= 20 then + icon = "󰂆" + else + icon = "󰢜" + end + else + if battery_percentage >= 100 then + icon = "󰁹" + elseif battery_percentage >= 90 then + icon = "󰂂" + elseif battery_percentage >= 80 then + icon = "󰂁" + elseif battery_percentage >= 70 then + icon = "󰂀" + elseif battery_percentage >= 60 then + icon = "󰁿" + elseif battery_percentage >= 50 then + icon = "󰁾" + elseif battery_percentage >= 40 then + icon = "󰁽" + elseif battery_percentage >= 30 then + icon = "󰁼" + elseif battery_percentage >= 20 then + icon = "󰁻" + else + icon = "󰂃" + end + end - -- Set the text of the battery_text widget with the battery icon, battery percentage, and power profile symbol - battery_text:set_markup("" .. - icon .. "" .. " " .. battery_percentage .. "%" .. pwr_symbol) + -- Set the text of the battery_text widget with the battery icon, battery percentage, and power profile symbol + battery_text:set_markup("" .. + icon .. "" .. " " .. battery_percentage .. "%" .. pwr_symbol) + end) end --- Use the acpi command to get the battery information and call the update_battery_widget function -awful.widget.watch('acpi', 10, function(widget, stdout) - update_battery_widget(widget, stdout) +-- Update the battery widget initially +update_battery_widget() + +-- Refresh the battery widget every 10 seconds +local timer = gears.timer.start_new(10, function() + update_battery_widget() + return true end) -- Create a battery widget that contains the text widget local battery_widget = wibox.widget { - battery_text, - layout = wibox.layout.align.horizontal + battery_text, + layout = wibox.layout.align.horizontal } -- Add a tooltip to the battery widget battery_widget.tooltip = awful.tooltip { - objects = { battery_widget }, - timer_function = function() - local remaining_time = "Unknown" - local status = io.popen("acpi -b"):read("*line") - local percentage = tonumber(string.match(status, "(%d?%d?%d)%%")) - if percentage ~= nil then - local time = string.match(status, "%d+:%d+:%d+") - if time ~= nil then - if string.match(status, "Discharging") then - remaining_time = "Time remaining: " .. time - else - remaining_time = "Time until fully charged: " .. time + objects = { battery_widget }, + timer_function = function() + local remaining_time = "Unknown" + local status = io.popen("acpi -b"):read("*line") + local percentage = tonumber(string.match(status, "(%d?%d?%d)%%")) + if percentage ~= nil then + local time = string.match(status, "%d+:%d+:%d+") + if time ~= nil then + if string.match(status, "Discharging") then + remaining_time = "Time remaining: " .. time + else + remaining_time = "Time until fully charged: " .. time + end + end end - end - end - return remaining_time - end, + return remaining_time + end, } return battery_widget diff --git a/user/.config/awesome/ui/widgets/brightness.lua b/user/.config/awesome/ui/widgets/brightness.lua index 5362672c7..eedd387ce 100644 --- a/user/.config/awesome/ui/widgets/brightness.lua +++ b/user/.config/awesome/ui/widgets/brightness.lua @@ -1,47 +1,49 @@ local wibox = require("wibox") local awful = require("awful") +local gears = require("gears") -- Create a textbox widget -local brightness_text = wibox.widget.textbox() +local brightness_widget = wibox.widget.textbox() -- Function to update the brightness value local function update_brightness() - awful.spawn.easy_async_with_shell("xbacklight -get", function(stdout) - local brightness = stdout:gsub("\n", "") - local icon + awful.spawn.easy_async_with_shell("brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}'", function(stdout) + local brightness = stdout:gsub("\n", "") + local icon - if tonumber(brightness) == 100 then - icon = "󰛨" - elseif tonumber(brightness) >= 90 then - icon = "󱩖" - elseif tonumber(brightness) >= 80 then - icon = "󱩕" - elseif tonumber(brightness) >= 70 then - icon = "󱩔" - elseif tonumber(brightness) >= 60 then - icon = "󱩓" - elseif tonumber(brightness) >= 50 then - icon = "󱩒" - elseif tonumber(brightness) >= 40 then - icon = "󱩑" - elseif tonumber(brightness) >= 30 then - icon = "󱩐" - elseif tonumber(brightness) >= 20 then - icon = "󱩏" - else - icon = "󱩎" - end + if tonumber(brightness) == 100 then + icon = "󰛨" + elseif tonumber(brightness) >= 90 then + icon = "󱩖" + elseif tonumber(brightness) >= 80 then + icon = "󱩕" + elseif tonumber(brightness) >= 70 then + icon = "󱩔" + elseif tonumber(brightness) >= 60 then + icon = "󱩓" + elseif tonumber(brightness) >= 50 then + icon = "󱩒" + elseif tonumber(brightness) >= 40 then + icon = "󱩑" + elseif tonumber(brightness) >= 30 then + icon = "󱩐" + elseif tonumber(brightness) >= 20 then + icon = "󱩏" + else + icon = "󱩎" + end - brightness_text:set_markup(icon .. " " .. math.floor(tonumber(brightness)) .. "%") - end) + brightness_widget:set_markup(icon .. " " .. math.floor(tonumber(brightness)) .. "%") + end) end -- Update the brightness initially update_brightness() --- Refresh the brightness every 5 seconds -awful.widget.watch("bash -c 'xbacklight -get'", 10, function(widget, stdout) - update_brightness() +-- Refresh the widget every 5 seconds +local timer = gears.timer.start_new(5, function() + update_brightness() + return true end) -return brightness_text +return brightness_widget diff --git a/user/.config/awesome/ui/widgets/layout.lua b/user/.config/awesome/ui/widgets/layout.lua index 1606139f3..ab7ffbe16 100644 --- a/user/.config/awesome/ui/widgets/layout.lua +++ b/user/.config/awesome/ui/widgets/layout.lua @@ -1,23 +1,25 @@ local wibox = require("wibox") local awful = require("awful") +local gears = require("gears") -- Create a textbox widget -local layout_text = wibox.widget.textbox() +local keyboard_layout_widget = wibox.widget.textbox() -- Function to update the layout value -local function update_layout() - awful.spawn.easy_async_with_shell("setxkbmap -query | grep -oP 'layout:\\s*\\K\\w+'", function(stdout) - local layout = stdout:gsub("\n", "") - layout_text:set_markup("󰌌 " .. layout:upper()) - end) +local function update_keyboard_layout_widget() + awful.spawn.easy_async_with_shell("setxkbmap -query | grep -oP 'layout:\\s*\\K\\w+'", function(stdout) + local layout = stdout:gsub("\n", "") + keyboard_layout_widget:set_markup("󰌌 " .. layout:upper()) + end) end --- Update the layout initially -update_layout() +-- Update the widget initially +update_keyboard_layout_widget() --- Refresh the layout every 5 seconds -awful.widget.watch("bash -c 'setxkbmap -query | grep -oP \"layout:\\\\s*\\\\K\\\\w+\"'", 10, function(widget, stdout) - update_layout() +-- Refresh the widget every 10 seconds +local timer = gears.timer.start_new(10, function() + update_keyboard_layout_widget() + return true end) -return layout_text +return keyboard_layout_widget diff --git a/user/.config/awesome/ui/widgets/volume.lua b/user/.config/awesome/ui/widgets/volume.lua index 4ce37c267..313d71a7d 100644 --- a/user/.config/awesome/ui/widgets/volume.lua +++ b/user/.config/awesome/ui/widgets/volume.lua @@ -1,35 +1,47 @@ -- Required libraries local awful = require("awful") local wibox = require("wibox") +local gears = require("gears") -- Create text widget local volume_widget = wibox.widget.textbox() -- Function to update the text widget -local function update_volume(widget) - local mute = io.popen("pamixer --get-mute"):read() - if mute == "true\n" then - widget:set_text("󰕿x") - else - local vol = tonumber(io.popen("pamixer --get-volume"):read()) - local icon - if vol > 50 then - icon = "󰕾" - elseif vol > 10 then - icon = "󰖀" - elseif vol > 0 then - icon = "󰕿" - else - widget:set_text("󰕿x") - return - end - widget:set_text(icon .. " " .. vol .. "%") - end +local function update_volume_widget() + awful.spawn.easy_async_with_shell("pamixer --get-mute", function(mute_stdout) + local mute = mute_stdout:match("^%s*(.-)%s*$") -- Trim leading/trailing whitespaces + + if mute == "true" then + volume_widget:set_text("󰕿x") + else + awful.spawn.easy_async_with_shell("pamixer --get-volume", function(vol_stdout) + local vol = tonumber(vol_stdout:match("^%s*(.-)%s*$")) -- Trim leading/trailing whitespaces + local icon + + if vol > 50 then + icon = "󰕾" + elseif vol > 10 then + icon = "󰖀" + elseif vol > 0 then + icon = "󰕿" + else + volume_widget:set_text("󰕿x") + return + end + + volume_widget:set_text(icon .. " " .. vol .. "%") + end) + end + end) end --- Update the widget every 5 seconds -awful.widget.watch("bash -c 'pamixer --get-volume'", 10, function(widget, stdout) - update_volume(widget) -end, volume_widget) +-- Update the widget initially +update_volume_widget() + +-- Refresh the widget every 5 seconds +local timer = gears.timer.start_new(5, function() + update_volume_widget() + return true +end) return volume_widget diff --git a/user/.config/awesome/ui/widgets/wifi.lua b/user/.config/awesome/ui/widgets/wifi.lua index 5eb2cd353..a002698e8 100644 --- a/user/.config/awesome/ui/widgets/wifi.lua +++ b/user/.config/awesome/ui/widgets/wifi.lua @@ -1,70 +1,62 @@ local awful = require("awful") local wibox = require("wibox") +local gears = require("gears") -local wifi_widget = wibox.widget { - widget = wibox.widget.textbox -} +local wifi_widget = wibox.widget.textbox() -local function get_wifi_strength() - local cmd = [[nmcli -t -f active,ssid,signal dev wifi | grep yes | cut -d ":" -f3]] - local f = io.popen(cmd) - local strength = f:read("*all") - f:close() - strength = tonumber(strength) - - if strength <= 30 then - return 1 - elseif strength <= 60 then - return 2 - elseif strength <= 90 then - return 3 - else - return 4 - end +local function get_wifi_strength(callback) + local cmd = [[nmcli -t -f active,ssid,signal dev wifi | grep yes | cut -d ":" -f3]] + awful.spawn.easy_async_with_shell(cmd, function(stdout) + local strength = tonumber(stdout) or 0 + callback(strength) + end) end local function update_wifi_widget() - local constate = "" - local currentwfi = "" + local constate = "" + local currentwfi = "" - -- Get connection state and SSID - local cmd = [[nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3,4 | head -1]] - local f = io.popen(cmd) - local output = f:read("*all") - f:close() + -- Get connection state and SSID + local cmd = [[nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3,4 | head -1]] + awful.spawn.easy_async_with_shell(cmd, function(output) + for token in string.gmatch(output, "[^|\n]+") do + if constate == "" then + constate = token + else + currentwfi = token + end + end - for token in string.gmatch(output, "[^|\n]+") do - if constate == "" then - constate = token - else - currentwfi = token - end - end - - -- Update wifi widget - if constate == "disconnected" then - wifi_widget:set_text("󰤮 ") - elseif constate == "connected" then - local strength = get_wifi_strength() - local icon = "" - if strength == 1 then - icon = "󰤟 " - elseif strength == 2 then - icon = "󰤢 " - elseif strength == 3 then - icon = "󰤥 " - elseif strength == 4 then - icon = "󰤨 " - end - wifi_widget:set_text(icon .. currentwfi) - else - wifi_widget:set_text("󰤮 ") - end + -- Update wifi widget + if constate == "disconnected" then + wifi_widget:set_text("󰤮 ") + elseif constate == "connected" then + get_wifi_strength(function(strength) + local icon = "" + if strength <= 30 then + icon = "󰤟 " + elseif strength <= 60 then + icon = "󰤢 " + elseif strength <= 90 then + icon = "󰤥 " + else + icon = "󰤨 " + end + wifi_widget:set_text(icon .. currentwfi) + end) + else + wifi_widget:set_text("󰤮 ") + end + end) end --- Update the widget every five seconds -awful.widget.watch("bash -c 'source $HOME/.profile; wifi-widget'", 10, function(widget, stdout) - update_wifi_widget() +-- Update the widget initially +update_wifi_widget() + +-- Refresh the widget every 10 seconds +local timer = gears.timer.start_new(5, function() + update_wifi_widget() + return true end) return wifi_widget diff --git a/user/.config/btop/btop.conf b/user/.config/btop/btop.conf index cf427fc49..42753d077 100644 --- a/user/.config/btop/btop.conf +++ b/user/.config/btop/btop.conf @@ -54,7 +54,7 @@ update_ms = 200 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. -proc_sorting = "cpu lazy" +proc_sorting = "pid" #* Reverse sorting order, True or False. proc_reversed = False @@ -69,7 +69,7 @@ proc_colors = True proc_gradient = True #* If process cpu usage should be of the core it's running on or usage of the total available cpu power. -proc_per_core = False +proc_per_core = True #* Show process memory as bytes instead of percent. proc_mem_bytes = True @@ -209,4 +209,4 @@ selected_battery = "Auto" #* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". #* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. -log_level = "WARNING" +log_level = "WARNING" \ No newline at end of file diff --git a/user/.config/doom/config.el b/user/.config/doom/config.el deleted file mode 100644 index c8ff9d6c5..000000000 --- a/user/.config/doom/config.el +++ /dev/null @@ -1,567 +0,0 @@ -(beacon-mode 1) - -(map! :leader - (:prefix ("b". "buffer") - :desc "List bookmarks" "L" #'list-bookmarks - :desc "Save current bookmarks to bookmark file" "w" #'bookmark-save)) - -(global-auto-revert-mode 1) -(setq global-auto-revert-non-file-buffers t) - -(evil-define-key 'normal ibuffer-mode-map - (kbd "f c") 'ibuffer-filter-by-content - (kbd "f d") 'ibuffer-filter-by-directory - (kbd "f f") 'ibuffer-filter-by-filename - (kbd "f m") 'ibuffer-filter-by-mode - (kbd "f n") 'ibuffer-filter-by-name - (kbd "f x") 'ibuffer-filter-disable - (kbd "g h") 'ibuffer-do-kill-lines - (kbd "g H") 'ibuffer-update) - -;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months -(defun dt/year-calendar (&optional year) - (interactive) - (require 'calendar) - (let* ( - (current-year (number-to-string (nth 5 (decode-time (current-time))))) - (month 0) - (year (if year year (string-to-number (format-time-string "%Y" (current-time)))))) - (switch-to-buffer (get-buffer-create calendar-buffer)) - (when (not (eq major-mode 'calendar-mode)) - (calendar-mode)) - (setq displayed-month month) - (setq displayed-year year) - (setq buffer-read-only nil) - (erase-buffer) - ;; horizontal rows - (dotimes (j 4) - ;; vertical columns - (dotimes (i 3) - (calendar-generate-month - (setq month (+ month 1)) - year - ;; indentation / spacing between months - (+ 5 (* 25 i)))) - (goto-char (point-max)) - (insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n)) - (widen) - (goto-char (point-max)) - (narrow-to-region (point-max) (point-max))) - (widen) - (goto-char (point-min)) - (setq buffer-read-only t))) - -(defun dt/scroll-year-calendar-forward (&optional arg event) - "Scroll the yearly calendar by year in a forward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (unless arg (setq arg 0)) - (save-selected-window - (if (setq event (event-start event)) (select-window (posn-window event))) - (unless (zerop arg) - (let* ( - (year (+ displayed-year arg))) - (dt/year-calendar year))) - (goto-char (point-min)) - (run-hooks 'calendar-move-hook))) - -(defun dt/scroll-year-calendar-backward (&optional arg event) - "Scroll the yearly calendar by year in a backward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (dt/scroll-year-calendar-forward (- (or arg 1)) event)) - -(map! :leader - :desc "Scroll year calendar backward" "" #'dt/scroll-year-calendar-backward - :desc "Scroll year calendar forward" "" #'dt/scroll-year-calendar-forward) - -(defalias 'year-calendar 'dt/year-calendar) - -(use-package! calfw) -(use-package! calfw-org) - -(use-package dashboard - :init ;; tweak dashboard config before loading it - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) - (setq dashboard-banner-logo-title "\nKEYBINDINGS:\ -\nFind file (SPC .) \ -Open buffer list (SPC b i)\ -\nFind recent files (SPC f r) \ -Open the eshell (SPC e s)\ -\nOpen dired file manager (SPC d d) \ -List of keybindings (SPC h b b)") - ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) - (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner - (setq dashboard-center-content nil) ;; set to 't' for centered content - (setq dashboard-items '((recents . 5) - (agenda . 5 ) - (bookmarks . 5) - (projects . 5) - (registers . 5))) - :config - (dashboard-setup-startup-hook) - (dashboard-modify-heading-icons '((recents . "file-text") - (bookmarks . "book")))) - -(setq doom-fallback-buffer "*dashboard*") - -(map! :leader - (:prefix ("d" . "dired") - :desc "Open dired" "d" #'dired - :desc "Dired jump to current" "j" #'dired-jump) - (:after dired - (:map dired-mode-map - :desc "Peep-dired image previews" "d p" #'peep-dired - :desc "Dired view file" "d v" #'dired-view-file))) - -(evil-define-key 'normal dired-mode-map - (kbd "M-RET") 'dired-display-file - (kbd "h") 'dired-up-directory - (kbd "l") 'dired-open-file ; use dired-find-file instead of dired-open. - (kbd "m") 'dired-mark - (kbd "t") 'dired-toggle-marks - (kbd "u") 'dired-unmark - (kbd "C") 'dired-do-copy - (kbd "D") 'dired-do-delete - (kbd "J") 'dired-goto-file - (kbd "M") 'dired-do-chmod - (kbd "O") 'dired-do-chown - (kbd "P") 'dired-do-print - (kbd "R") 'dired-do-rename - (kbd "T") 'dired-do-touch - (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. - (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory - (kbd "% l") 'dired-downcase - (kbd "% u") 'dired-upcase - (kbd "; d") 'epa-dired-do-decrypt - (kbd "; e") 'epa-dired-do-encrypt) -;; Get file icons in dired -(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) -;; With dired-open plugin, you can launch external programs for certain extensions -;; For example, I set all .png files to open in 'sxiv' and all .mp4 files to open in 'mpv' -(setq dired-open-extensions '(("gif" . "sxiv") - ("jpg" . "sxiv") - ("png" . "sxiv") - ("mkv" . "mpv") - ("mp4" . "mpv"))) - -(evil-define-key 'normal peep-dired-mode-map - (kbd "j") 'peep-dired-next-file - (kbd "k") 'peep-dired-prev-file) -(add-hook 'peep-dired-hook 'evil-normalize-keymaps) - -(setq delete-by-moving-to-trash t - trash-directory "~/.local/share/Trash/files/") - -(setq doom-theme 'doom-gruvbox) -(map! :leader - :desc "Load new theme" "h t" #'counsel-load-theme) - -(use-package emojify - :hook (after-init . global-emojify-mode)) - -(map! :leader - (:prefix ("e". "evaluate/EWW") - :desc "Evaluate elisp in buffer" "b" #'eval-buffer - :desc "Evaluate defun" "d" #'eval-defun - :desc "Evaluate elisp expression" "e" #'eval-expression - :desc "Evaluate last sexpression" "l" #'eval-last-sexp - :desc "Evaluate elisp in region" "r" #'eval-region)) - -(setq browse-url-browser-function 'eww-browse-url) -(map! :leader - :desc "Search web for text between BEG/END" - "s w" #'eww-search-words - (:prefix ("e" . "evaluate/EWW") - :desc "Eww web browser" "w" #'eww - :desc "Eww reload page" "R" #'eww-reload)) - -(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-big-font (font-spec :family "mononoki Nerd Font" :size 20)) -(after! doom-themes - (setq doom-themes-enable-bold t - doom-themes-enable-italic t)) -(custom-set-faces! - '(font-lock-comment-face :slant italic) - '(font-lock-keyword-face :slant italic)) - -(setq imenu-list-focus-after-activation t) - -(map! :leader - (:prefix ("s" . "Search") - :desc "Menu to jump to places in buffer" "i" #'counsel-imenu)) - -(map! :leader - (:prefix ("t" . "Toggle") - :desc "Toggle imenu shown in a sidebar" "i" #'imenu-list-smart-toggle)) - -(defun dt/insert-todays-date (prefix) - (interactive "P") - (let ((format (cond - ((not prefix) "%A, %B %d, %Y") - ((equal prefix '(4)) "%m-%d-%Y") - ((equal prefix '(16)) "%Y-%m-%d")))) - (insert (format-time-string format)))) - -(require 'calendar) -(defun dt/insert-any-date (date) - "Insert DATE using the current locale." - (interactive (list (calendar-read-date))) - (insert (calendar-date-string date))) - -(map! :leader - (:prefix ("i d" . "Insert date") - :desc "Insert any date" "a" #'dt/insert-any-date - :desc "Insert todays date" "t" #'dt/insert-todays-date)) - -(setq ivy-posframe-display-functions-alist - '((swiper . ivy-posframe-display-at-point) - (complete-symbol . ivy-posframe-display-at-point) - (counsel-M-x . ivy-display-function-fallback) - (counsel-esh-history . ivy-posframe-display-at-window-center) - (counsel-describe-function . ivy-display-function-fallback) - (counsel-describe-variable . ivy-display-function-fallback) - (counsel-find-file . ivy-display-function-fallback) - (counsel-recentf . ivy-display-function-fallback) - (counsel-register . ivy-posframe-display-at-frame-bottom-window-center) - (dmenu . ivy-posframe-display-at-frame-top-center) - (nil . ivy-posframe-display)) - ivy-posframe-height-alist - '((swiper . 20) - (dmenu . 20) - (t . 10))) -(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it. - -(map! :leader - (:prefix ("v" . "Ivy") - :desc "Ivy push view" "v p" #'ivy-push-view - :desc "Ivy switch view" "v s" #'ivy-switch-view)) - -(setq display-line-numbers-type t) -(map! :leader - :desc "Comment or uncomment lines" "TAB TAB" #'comment-line - (:prefix ("t" . "toggle") - :desc "Toggle line numbers" "l" #'doom/toggle-line-numbers - :desc "Toggle line highlight in frame" "h" #'hl-line-mode - :desc "Toggle line highlight globally" "H" #'global-hl-line-mode - :desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) - -(custom-set-faces - '(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch")))) - '(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7)))) - '(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6)))) - '(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5)))) - '(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4)))) - '(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3)))) - '(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2))))) - -(setq minimap-window-location 'right) -(map! :leader - (:prefix ("t" . "toggle") - :desc "Toggle minimap-mode" "m" #'minimap-mode)) - -(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13") -(setq doom-modeline-height 30 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t) ;; adds folder icon next to persp name - -(xterm-mouse-mode 1) - -(after! neotree - (setq neo-smart-open t - neo-window-fixed-size nil)) -(after! doom-themes - (setq doom-neotree-enable-variable-pitch t)) -(map! :leader - :desc "Toggle neotree file viewer" "t n" #'neotree-toggle - :desc "Open directory in neotree" "d n" #'neotree-dir) - -(map! :leader - (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) - :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) - :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) - :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) -(map! :leader - (:prefix ("= e" . "open eshell files") - :desc "Edit eshell aliases" "a" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/aliases")) - :desc "Edit eshell profile" "p" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/profile")))) - -(map! :leader - :desc "Org babel tangle" "m B" #'org-babel-tangle) -(after! org - (setq org-directory "~/nc/Org/" - org-agenda-files '("~/nc/Org/agenda.org") - org-default-notes-file (expand-file-name "notes.org" org-directory) - org-ellipsis " ▼ " - org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆") - org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists - org-log-done 'time - org-hide-emphasis-markers t - ;; ex. of org-link-abbrev-alist in action - ;; [[arch-wiki:Name_of_Page][Description]] - org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list - '(("google" . "http://www.google.com/search?q=") - ("arch-wiki" . "https://wiki.archlinux.org/index.php/") - ("ddg" . "https://duckduckgo.com/?q=") - ("wiki" . "https://en.wikipedia.org/wiki/")) - org-todo-keywords ; This overwrites the default Doom org-todo-keywords - '((sequence - "TODO(t)" ; A task that is ready to be tackled - "BLOG(b)" ; Blog writing assignments - "GYM(g)" ; Things to accomplish at the gym - "PROJ(p)" ; A project that contains other tasks - "VIDEO(v)" ; Video assignments - "WAIT(w)" ; Something is holding up this task - "|" ; The pipe necessary to separate "active" states and "inactive" states - "DONE(d)" ; Task has been completed - "CANCELLED(c)" )))) ; Task has been cancelled - -(defun dt/org-colors-doom-one () - "Enable Doom One colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#51afef" ultra-bold) - (org-level-2 1.6 "#c678dd" extra-bold) - (org-level-3 1.5 "#98be65" bold) - (org-level-4 1.4 "#da8548" semi-bold) - (org-level-5 1.3 "#5699af" normal) - (org-level-6 1.2 "#a9a1e1" normal) - (org-level-7 1.1 "#46d9ff" normal) - (org-level-8 1.0 "#ff6c6b" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-dracula () - "Enable Dracula colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#8be9fd" ultra-bold) - (org-level-2 1.6 "#bd93f9" extra-bold) - (org-level-3 1.5 "#50fa7b" bold) - (org-level-4 1.4 "#ff79c6" semi-bold) - (org-level-5 1.3 "#9aedfe" normal) - (org-level-6 1.2 "#caa9fa" normal) - (org-level-7 1.1 "#5af78e" normal) - (org-level-8 1.0 "#ff92d0" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-gruvbox-dark () - "Enable Gruvbox Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#458588" ultra-bold) - (org-level-2 1.6 "#b16286" extra-bold) - (org-level-3 1.5 "#98971a" bold) - (org-level-4 1.4 "#fb4934" semi-bold) - (org-level-5 1.3 "#83a598" normal) - (org-level-6 1.2 "#d3869b" normal) - (org-level-7 1.1 "#d79921" normal) - (org-level-8 1.0 "#8ec07c" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-monokai-pro () - "Enable Monokai Pro colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#78dce8" ultra-bold) - (org-level-2 1.6 "#ab9df2" extra-bold) - (org-level-3 1.5 "#a9dc76" bold) - (org-level-4 1.4 "#fc9867" semi-bold) - (org-level-5 1.3 "#ff6188" normal) - (org-level-6 1.2 "#ffd866" normal) - (org-level-7 1.1 "#78dce8" normal) - (org-level-8 1.0 "#ab9df2" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-nord () - "Enable Nord colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a1c1" ultra-bold) - (org-level-2 1.6 "#b48ead" extra-bold) - (org-level-3 1.5 "#a3be8c" bold) - (org-level-4 1.4 "#ebcb8b" semi-bold) - (org-level-5 1.3 "#bf616a" normal) - (org-level-6 1.2 "#88c0d0" normal) - (org-level-7 1.1 "#81a1c1" normal) - (org-level-8 1.0 "#b48ead" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-oceanic-next () - "Enable Oceanic Next colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#6699cc" ultra-bold) - (org-level-2 1.6 "#c594c5" extra-bold) - (org-level-3 1.5 "#99c794" bold) - (org-level-4 1.4 "#fac863" semi-bold) - (org-level-5 1.3 "#5fb3b3" normal) - (org-level-6 1.2 "#ec5f67" normal) - (org-level-7 1.1 "#6699cc" normal) - (org-level-8 1.0 "#c594c5" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-palenight () - "Enable Palenight colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#82aaff" ultra-bold) - (org-level-2 1.6 "#c792ea" extra-bold) - (org-level-3 1.5 "#c3e88d" bold) - (org-level-4 1.4 "#ffcb6b" semi-bold) - (org-level-5 1.3 "#a3f7ff" normal) - (org-level-6 1.2 "#e1acff" normal) - (org-level-7 1.1 "#f07178" normal) - (org-level-8 1.0 "#ddffa7" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-dark () - "Enable Solarized Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-light () - "Enable Solarized Light colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-tomorrow-night () - "Enable Tomorrow Night colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a2be" ultra-bold) - (org-level-2 1.6 "#b294bb" extra-bold) - (org-level-3 1.5 "#b5bd68" bold) - (org-level-4 1.4 "#e6c547" semi-bold) - (org-level-5 1.3 "#cc6666" normal) - (org-level-6 1.2 "#70c0ba" normal) - (org-level-7 1.1 "#b77ee0" normal) - (org-level-8 1.0 "#9ec400" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -;; Load our desired dt/org-colors-* theme on startup -(dt/org-colors-tomorrow-night) - -(use-package ox-man) -(use-package ox-gemini) - -(setq org-journal-dir "~/nc/Org/journal/" - org-journal-date-prefix "* " - org-journal-time-prefix "** " - org-journal-date-format "%B %d, %Y (%A) " - org-journal-file-format "%Y-%m-%d.org") - -(setq org-publish-use-timestamps-flag nil) -(setq org-export-with-broken-links t) - -(use-package! org-auto-tangle - :defer t - :hook (org-mode . org-auto-tangle-mode) - :config - (setq org-auto-tangle-default t)) - -(map! :leader - :desc "Switch to perspective NAME" "DEL" #'persp-switch - :desc "Switch to buffer in perspective" "," #'persp-switch-to-buffer - :desc "Switch to next perspective" "]" #'persp-next - :desc "Switch to previous perspective" "[" #'persp-prev - :desc "Add a buffer current perspective" "+" #'persp-add-buffer - :desc "Remove perspective by name" "-" #'persp-remove-by-name) - -(define-globalized-minor-mode global-rainbow-mode rainbow-mode - (lambda () (rainbow-mode 1))) -(global-rainbow-mode 1 ) - -(map! :leader - (:prefix ("r" . "registers") - :desc "Copy to register" "c" #'copy-to-register - :desc "Frameset to register" "f" #'frameset-to-register - :desc "Insert contents of register" "i" #'insert-register - :desc "Jump to register" "j" #'jump-to-register - :desc "List registers" "l" #'list-registers - :desc "Number to register" "n" #'number-to-register - :desc "Interactively choose a register" "r" #'counsel-register - :desc "View a register" "v" #'view-register - :desc "Window configuration to register" "w" #'window-configuration-to-register - :desc "Increment register" "+" #'increment-register - :desc "Point to register" "SPC" #'point-to-register)) - -(setq shell-file-name "/bin/bash" - vterm-max-scrollback 5000) -(setq eshell-rc-script "~/.config/doom/eshell/profile" - eshell-aliases-file "~/.config/doom/eshell/aliases" - eshell-history-size 5000 - eshell-buffer-maximum-lines 5000 - eshell-hist-ignoredups t - eshell-scroll-to-bottom-on-input t - eshell-destroy-buffer-when-process-dies t - eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh")) -(map! :leader - :desc "Eshell" "e s" #'eshell - :desc "Eshell popup toggle" "e t" #'+eshell/toggle - :desc "Counsel eshell history" "e h" #'counsel-esh-history - :desc "Vterm popup toggle" "v t" #'+vterm/toggle) - -(defun prefer-horizontal-split () - (set-variable 'split-height-threshold nil t) - (set-variable 'split-width-threshold 40 t)) ; make this as low as needed -(add-hook 'markdown-mode-hook 'prefer-horizontal-split) -(map! :leader - :desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window) - -(map! :leader - (:prefix ("w" . "window") - :desc "Winner redo" "" #'winner-redo - :desc "Winner undo" "" #'winner-undo)) - -(map! :leader - :desc "Zap to char" "z" #'zap-to-char - :desc "Zap up to char" "Z" #'zap-up-to-char) - -(set-frame-parameter (selected-frame) 'alpha '(98 . 80)) -(add-to-list 'default-frame-alist '(alpha . (98 . 80))) - -(add-hook 'prog-mode-hook #'lsp) diff --git a/user/.config/doom/config.org b/user/.config/doom/config.org deleted file mode 100644 index 209981ef7..000000000 --- a/user/.config/doom/config.org +++ /dev/null @@ -1,1136 +0,0 @@ -#+TITLE: DRK's Doom Emacs Config -#+AUTHOR: Clay Gomera (Drake) -#+DESCRIPTION: DRK's personal Doom Emacs config. -#+STARTUP: showeverything -#+PROPERTY: header-args :tangle config.el - -* TABLE OF CONTENTS :toc: -- [[#about-this-config][About this config]] -- [[#beacon][Beacon]] -- [[#bookmarks-and-buffers][Bookmarks and buffers]] - - [[#bookmarks][Bookmarks]] - - [[#buffers][Buffers]] - - [[#global-auto-revert][Global Auto Revert]] - - [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]] -- [[#calendar][Calendar]] -- [[#dashboard][Dashboard]] - - [[#configuring-dashboard][Configuring Dashboard]] - - [[#dashboard-in-emacsclient][Dashboard in Emacsclient]] -- [[#dired][Dired]] - - [[#keybindings-to-open-dired][Keybindings To Open Dired]] - - [[#keybindings-within-dired][Keybindings Within Dired]] - - [[#keybindings-within-dired-with-peep-dired-mode-enabled][Keybindings Within Dired With Peep-Dired-Mode Enabled]] - - [[#making-deleted-files-go-to-trash-can][Making deleted files go to trash can]] -- [[#doom-theme][Doom theme]] -- [[#emojis][Emojis]] -- [[#evaluate-elisp-expressions][Evaluate elisp expressions]] -- [[#eww][Eww]] -- [[#fonts][Fonts]] -- [[#imenu][Imenu]] -- [[#insert-date][Insert date]] -- [[#ivy][Ivy]] - - [[#ivy-posframe][Ivy-posframe]] - - [[#ivy-keybindings][Ivy keybindings]] -- [[#line-settings][Line settings]] -- [[#markdown][Markdown]] -- [[#minimap][Minimap]] -- [[#modeline][Modeline]] -- [[#mouse-support][Mouse support]] -- [[#neotree][Neotree]] -- [[#open-specific-files][Open specific files]] -- [[#org-mode][Org mode]] - - [[#org-fonts][Org fonts]] - - [[#org-export][Org-export]] - - [[#org-journal][Org-journal]] - - [[#org-publish][Org-publish]] - - [[#org-auto-tangle][Org-auto-tangle]] -- [[#perspective][Perspective]] -- [[#rainbow-mode][Rainbow mode]] -- [[#registers][Registers]] -- [[#shells][Shells]] -- [[#splits][Splits]] -- [[#winner-mode][Winner mode]] -- [[#zap-to-char][Zap to char]] -- [[#transparency][Transparency]] -- [[#autostart-lsp][Autostart lsp]] - -* About this config -This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs -that uses the "evil" keybindings (Vim keybindings) and includes a number of nice -extensions and a bit of configuration out of the box. I am maintaining this -config not just for myself, but also for those that want to explore some of what -is possible with Emacs. I will add a lot of examples of plugins and settings, -some of them I may not even use personally. This config is a fork of -DistroTube's config. - -* Beacon -Never lose your cursor. When you scroll, your cursor will shine! This is a -global minor-mode. Turn it on everywhere with: - -#+begin_src emacs-lisp -(beacon-mode 1) -#+end_src - -* Bookmarks and buffers -Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers. - -** Bookmarks -Bookmarks are somewhat like registers in that they record positions you can jump -to. Unlike registers, they have long names, and they persist automatically from -one Emacs session to the next. The prototypical use of bookmarks is to record -where you were reading in various files. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("b". "buffer") - :desc "List bookmarks" "L" #'list-bookmarks - :desc "Save current bookmarks to bookmark file" "w" #'bookmark-save)) -#+END_SRC - -** Buffers -Regarding /buffers/, the text you are editing in Emacs resides in an object called -a /buffer/. Each time you visit a file, a buffer is used to hold the file’s text. -Each time you invoke Dired, a buffer is used to hold the directory listing. -/Ibuffer/ is a program that lists all of your Emacs /buffers/, allowing you to -navigate between them and filter them. - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------+------------| -| ibuffer | Launch ibuffer | SPC b i | -| kill-buffer | Kill current buffer | SPC b k | -| next-buffer | Goto next buffer | SPC b n | -| previous-buffer | Goto previous buffer | SPC b p | -| save-buffer | Save current buffer | SPC b s | - -** Global Auto Revert -A buffer can get out of sync with respect to its visited file on disk if that -file is changed by another program. To keep it up to date, you can enable Auto -Revert mode by typing M-x auto-revert-mode, or you can set it to be turned on -globally with 'global-auto-revert-mode'. I have also turned on Global Auto -Revert on non-file buffers, which is especially useful for 'dired' buffers. - -#+begin_src emacs-lisp -(global-auto-revert-mode 1) -(setq global-auto-revert-non-file-buffers t) -#+end_src - -** Keybindings within ibuffer mode -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------------------------+----------------------------------------+------------| -| ibuffer-mark-forward | Mark the buffer | m | -| ibuffer-unmark-forward | Unmark the buffer | u | -| ibuffer-do-kill-on-deletion-marks | Kill the marked buffers | x | -| ibuffer-filter-by-content | Ibuffer filter by content | f c | -| ibuffer-filter-by-directory | Ibuffer filter by directory | f d | -| ibuffer-filter-by-filename | Ibuffer filter by filename (full path) | f f | -| ibuffer-filter-by-mode | Ibuffer filter by mode | f m | -| ibuffer-filter-by-name | Ibuffer filter by name | f n | -| ibuffer-filter-disable | Disable ibuffer filter | f x | -| ibuffer-do-kill-lines | Hide marked buffers | g h | -| ibuffer-update | Restore hidden buffers | g H | - -#+begin_src emacs-lisp -(evil-define-key 'normal ibuffer-mode-map - (kbd "f c") 'ibuffer-filter-by-content - (kbd "f d") 'ibuffer-filter-by-directory - (kbd "f f") 'ibuffer-filter-by-filename - (kbd "f m") 'ibuffer-filter-by-mode - (kbd "f n") 'ibuffer-filter-by-name - (kbd "f x") 'ibuffer-filter-disable - (kbd "g h") 'ibuffer-do-kill-lines - (kbd "g H") 'ibuffer-update) -#+end_src - -* Calendar -Let's make a 12-month calendar available so we can have a calendar app that, -when we click on time/date in xmobar, we get a nice 12-month calendar to view. - -This is a modification of: http://homepage3.nifty.com/oatu/emacs/calendar.html -See also: https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months - -#+begin_src emacs-lisp -;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months -(defun dt/year-calendar (&optional year) - (interactive) - (require 'calendar) - (let* ( - (current-year (number-to-string (nth 5 (decode-time (current-time))))) - (month 0) - (year (if year year (string-to-number (format-time-string "%Y" (current-time)))))) - (switch-to-buffer (get-buffer-create calendar-buffer)) - (when (not (eq major-mode 'calendar-mode)) - (calendar-mode)) - (setq displayed-month month) - (setq displayed-year year) - (setq buffer-read-only nil) - (erase-buffer) - ;; horizontal rows - (dotimes (j 4) - ;; vertical columns - (dotimes (i 3) - (calendar-generate-month - (setq month (+ month 1)) - year - ;; indentation / spacing between months - (+ 5 (* 25 i)))) - (goto-char (point-max)) - (insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n)) - (widen) - (goto-char (point-max)) - (narrow-to-region (point-max) (point-max))) - (widen) - (goto-char (point-min)) - (setq buffer-read-only t))) - -(defun dt/scroll-year-calendar-forward (&optional arg event) - "Scroll the yearly calendar by year in a forward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (unless arg (setq arg 0)) - (save-selected-window - (if (setq event (event-start event)) (select-window (posn-window event))) - (unless (zerop arg) - (let* ( - (year (+ displayed-year arg))) - (dt/year-calendar year))) - (goto-char (point-min)) - (run-hooks 'calendar-move-hook))) - -(defun dt/scroll-year-calendar-backward (&optional arg event) - "Scroll the yearly calendar by year in a backward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (dt/scroll-year-calendar-forward (- (or arg 1)) event)) - -(map! :leader - :desc "Scroll year calendar backward" "" #'dt/scroll-year-calendar-backward - :desc "Scroll year calendar forward" "" #'dt/scroll-year-calendar-forward) - -(defalias 'year-calendar 'dt/year-calendar) -#+end_src - -Let's also play around with calfw. -#+begin_src emacs-lisp -(use-package! calfw) -(use-package! calfw-org) -#+end_src - -* Dashboard -Emacs Dashboard is an extensible startup screen showing you recent files, -bookmarks, agenda items and an Emacs banner. - -** Configuring Dashboard -#+begin_src emacs-lisp -(use-package dashboard - :init ;; tweak dashboard config before loading it - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) - (setq dashboard-banner-logo-title "\nKEYBINDINGS:\ -\nFind file (SPC .) \ -Open buffer list (SPC b i)\ -\nFind recent files (SPC f r) \ -Open the eshell (SPC e s)\ -\nOpen dired file manager (SPC d d) \ -List of keybindings (SPC h b b)") - ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) - (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner - (setq dashboard-center-content nil) ;; set to 't' for centered content - (setq dashboard-items '((recents . 5) - (agenda . 5 ) - (bookmarks . 5) - (projects . 5) - (registers . 5))) - :config - (dashboard-setup-startup-hook) - (dashboard-modify-heading-icons '((recents . "file-text") - (bookmarks . "book")))) -#+end_src - -** Dashboard in Emacsclient -This setting ensures that emacsclient always opens on *dashboard* rather than *scratch*. -#+begin_src emacs-lisp -(setq doom-fallback-buffer "*dashboard*") -#+end_src - -* Dired -Dired is the file manager within Emacs. Below, I setup keybindings for image -previews (peep-dired). Doom Emacs does not use 'SPC d' for any of its -keybindings, so I've chosen the format of 'SPC d' plus 'key'. - -** Keybindings To Open Dired - -| COMMAND | DESCRIPTION | KEYBINDING | -|------------+------------------------------------+------------| -| dired | /Open dired file manager/ | SPC d d | -| dired-jump | /Jump to current directory in dired/ | SPC d j | - -** Keybindings Within Dired -*** Basic dired commands - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+---------------------------------------------+------------| -| dired-view-file | /View file in dired/ | SPC d v | -| dired-up-directory | /Go up in directory tree/ | h | -| dired-find-file | /Go down in directory tree (or open if file)/ | l | -| dired-next-line | Move down to next line | j | -| dired-previous-line | Move up to previous line | k | -| dired-mark | Mark file at point | m | -| dired-unmark | Unmark file at point | u | -| dired-do-copy | Copy current file or marked files | C | -| dired-do-rename | Rename current file or marked files | R | -| dired-hide-details | Toggle detailed listings on/off | ( | -| dired-git-info-mode | Toggle git information on/off | ) | -| dired-create-directory | Create new empty directory | + | -| dired-diff | Compare file at point with another | = | -| dired-subtree-toggle | Toggle viewing subtree at point | TAB | - -*** Dired commands using regex - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+----------------------------+------------| -| dired-mark-files-regexp | Mark files using regex | % m | -| dired-do-copy-regexp | Copy files using regex | % C | -| dired-do-rename-regexp | Rename files using regex | % R | -| dired-mark-files-regexp | Mark all files using regex | * % | - -*** File permissions and ownership - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------------------+------------| -| dired-do-chgrp | Change the group of marked files | g G | -| dired-do-chmod | Change the mode of marked files | M | -| dired-do-chown | Change the owner of marked files | O | -| dired-do-rename | Rename file or all marked files | R | - -#+begin_src emacs-lisp -(map! :leader - (:prefix ("d" . "dired") - :desc "Open dired" "d" #'dired - :desc "Dired jump to current" "j" #'dired-jump) - (:after dired - (:map dired-mode-map - :desc "Peep-dired image previews" "d p" #'peep-dired - :desc "Dired view file" "d v" #'dired-view-file))) - -(evil-define-key 'normal dired-mode-map - (kbd "M-RET") 'dired-display-file - (kbd "h") 'dired-up-directory - (kbd "l") 'dired-open-file ; use dired-find-file instead of dired-open. - (kbd "m") 'dired-mark - (kbd "t") 'dired-toggle-marks - (kbd "u") 'dired-unmark - (kbd "C") 'dired-do-copy - (kbd "D") 'dired-do-delete - (kbd "J") 'dired-goto-file - (kbd "M") 'dired-do-chmod - (kbd "O") 'dired-do-chown - (kbd "P") 'dired-do-print - (kbd "R") 'dired-do-rename - (kbd "T") 'dired-do-touch - (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. - (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory - (kbd "% l") 'dired-downcase - (kbd "% u") 'dired-upcase - (kbd "; d") 'epa-dired-do-decrypt - (kbd "; e") 'epa-dired-do-encrypt) -;; Get file icons in dired -(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) -;; With dired-open plugin, you can launch external programs for certain extensions -;; For example, I set all .png files to open in 'sxiv' and all .mp4 files to open in 'mpv' -(setq dired-open-extensions '(("gif" . "sxiv") - ("jpg" . "sxiv") - ("png" . "sxiv") - ("mkv" . "mpv") - ("mp4" . "mpv"))) -#+end_src - -** Keybindings Within Dired With Peep-Dired-Mode Enabled -If peep-dired is enabled, you will get image previews as you go up/down with 'j' -and 'k' - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------+------------------------------------------+------------| -| peep-dired | /Toggle previews within dired/ | SPC d p | -| peep-dired-next-file | /Move to next file in peep-dired-mode/ | j | -| peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k | - -#+BEGIN_SRC emacs-lisp -(evil-define-key 'normal peep-dired-mode-map - (kbd "j") 'peep-dired-next-file - (kbd "k") 'peep-dired-prev-file) -(add-hook 'peep-dired-hook 'evil-normalize-keymaps) -#+END_SRC - -** Making deleted files go to trash can -#+begin_src emacs-lisp -(setq delete-by-moving-to-trash t - trash-directory "~/.local/share/Trash/files/") -#+end_src - -* Doom theme -Setting the theme to doom-gruvbox. To try out new themes, I set a keybinding for -counsel-load-theme with 'SPC h t'. - -#+BEGIN_SRC emacs-lisp -(setq doom-theme 'doom-gruvbox) -(map! :leader - :desc "Load new theme" "h t" #'counsel-load-theme) -#+END_SRC - -* Emojis -Emojify is an Emacs extension to display emojis. It can display github style -emojis like :smile: or plain ascii ones like :). - -#+begin_src emacs-lisp -(use-package emojify - :hook (after-init . global-emojify-mode)) -#+end_src - -* Evaluate elisp expressions -Changing some keybindings from their defaults to better fit with Doom Emacs, and -to avoid conflicts with my window managers which sometimes use the control key -in their keybindings. By default, Doom Emacs does not use 'SPC e' for anything, -so I choose to use the format 'SPC e' plus 'key' for these (I also use 'SPC e' -for 'eww' keybindings). - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------------------------------+------------| -| eval-buffer | /Evaluate elisp in buffer/ | SPC e b | -| eval-defun | /Evaluate the defun containing or after point/ | SPC e d | -| eval-expression | /Evaluate an elisp expression/ | SPC e e | -| eval-last-sexp | /Evaluate elisp expression before point/ | SPC e l | -| eval-region | /Evaluate elisp in region/ | SPC e r | - -#+Begin_src emacs-lisp -(map! :leader - (:prefix ("e". "evaluate/EWW") - :desc "Evaluate elisp in buffer" "b" #'eval-buffer - :desc "Evaluate defun" "d" #'eval-defun - :desc "Evaluate elisp expression" "e" #'eval-expression - :desc "Evaluate last sexpression" "l" #'eval-last-sexp - :desc "Evaluate elisp in region" "r" #'eval-region)) -#+END_SRC - -* Eww -EWW is the Emacs Web Wowser, the builtin browser in Emacs. Below I set urls to -open in a specific browser (eww) with browse-url-browser-function. By default, -Doom Emacs does not use 'SPC e' for anything, so I choose to use the format 'SPC -e' plus 'key' for these (I also use 'SPC e' for 'eval' keybindings). I chose to -use 'SPC s w' for eww-search-words because Doom Emacs uses 'SPC s' for 'search' -commands. - -#+BEGIN_SRC emacs-lisp -(setq browse-url-browser-function 'eww-browse-url) -(map! :leader - :desc "Search web for text between BEG/END" - "s w" #'eww-search-words - (:prefix ("e" . "evaluate/EWW") - :desc "Eww web browser" "w" #'eww - :desc "Eww reload page" "R" #'eww-reload)) -#+END_SRC - -* Fonts -Settings related to fonts within Doom Emacs: -+ 'doom-font' -- standard monospace font that is used for most things in Emacs. -+ 'doom-variable-pitch-font' -- variable font which is useful in some Emacs plugins. -+ 'doom-big-font' -- used in doom-big-font-mode; useful for presentations. -+ 'font-lock-comment-face' -- for comments. -+ 'font-lock-keyword-face' -- for keywords with special significanclike 'setq' in elisp. - -#+BEGIN_SRC emacs-lisp -(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-big-font (font-spec :family "mononoki Nerd Font" :size 20)) -(after! doom-themes - (setq doom-themes-enable-bold t - doom-themes-enable-italic t)) -(custom-set-faces! - '(font-lock-comment-face :slant italic) - '(font-lock-keyword-face :slant italic)) -#+END_SRC - -* Imenu -Imenu produces menus for accessing locations in documents, typically in the -current buffer. You can access the locations using an ordinary menu (menu bar or -other) or using minibuffer completion, or you can install 'imenu-list' and have -the imenu displayed as a vertical split that you can toggle show/hide. - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+----------------------------------+------------| -| counsel-imenu | /Menu to jump to places in buffer/ | SPC s i | -| imenu-list-smart-toggle | /Toggle imenu shown in a sidebar/ | SPC t i | - -#+BEGIN_SRC emacs-lisp -(setq imenu-list-focus-after-activation t) - -(map! :leader - (:prefix ("s" . "Search") - :desc "Menu to jump to places in buffer" "i" #'counsel-imenu)) - -(map! :leader - (:prefix ("t" . "Toggle") - :desc "Toggle imenu shown in a sidebar" "i" #'imenu-list-smart-toggle)) - -#+END_SRC - -* Insert date -Some custom functions to insert the date. The function 'insert-todays-date' can -be used one of three different ways: (1) just the keybinding without the -universal argument prefix, (2) with one universal argument prefix, or (3) with -two universal argument prefixes. The universal argument prefix is 'SPC-u' in -Doom Emacs (C-u in standard GNU Emacs). The function 'insert-any-date' only -outputs to one format, which is the same format as 'insert-todays-date' without -a prefix. - -| COMMAND | EXAMPLE OUTPUT | KEYBINDING | -|-----------------------+---------------------------+-----------------------| -| dt/insert-todays-date | Friday, November 19, 2021 | SPC i d t | -| dt/insert-todays-date | 11-19-2021 | SPC u SPC i d t | -| dt/insert-todays-date | 2021-11-19 | SPC u SPC u SPC i d t | -| dt/insert-any-date | Friday, November 19, 2021 | SPC i d a | - -#+begin_src emacs-lisp -(defun dt/insert-todays-date (prefix) - (interactive "P") - (let ((format (cond - ((not prefix) "%A, %B %d, %Y") - ((equal prefix '(4)) "%m-%d-%Y") - ((equal prefix '(16)) "%Y-%m-%d")))) - (insert (format-time-string format)))) - -(require 'calendar) -(defun dt/insert-any-date (date) - "Insert DATE using the current locale." - (interactive (list (calendar-read-date))) - (insert (calendar-date-string date))) - -(map! :leader - (:prefix ("i d" . "Insert date") - :desc "Insert any date" "a" #'dt/insert-any-date - :desc "Insert todays date" "t" #'dt/insert-todays-date)) -#+end_src - -* Ivy -Ivy is a generic completion mechanism for Emacs. - -** Ivy-posframe -Ivy-posframe is an ivy extension, which lets ivy use posframe to show its -candidate menu. Some of the settings below involve: -+ ivy-posframe-display-functions-alist -- sets the display position for specific - programs -+ ivy-posframe-height-alist -- sets the height of the list displayed for - specific programs - -# Available functions (positions) for 'ivy-posframe-display-functions-alist' -+ ivy-posframe-display-at-frame-center -+ ivy-posframe-display-at-window-center -+ ivy-posframe-display-at-frame-bottom-left -+ ivy-posframe-display-at-window-bottom-left -+ ivy-posframe-display-at-frame-bottom-window-center -+ ivy-posframe-display-at-point -+ ivy-posframe-display-at-frame-top-center - -=NOTE:= If the setting for 'ivy-posframe-display' is set to 'nil' (false), -anything that is set to 'ivy-display-function-fallback' will just default to -their normal position in Doom Emacs (usually a bottom split). However, if this -is set to 't' (true), then the fallback position will be centered in the window. - -#+BEGIN_SRC emacs-lisp -(setq ivy-posframe-display-functions-alist - '((swiper . ivy-posframe-display-at-point) - (complete-symbol . ivy-posframe-display-at-point) - (counsel-M-x . ivy-display-function-fallback) - (counsel-esh-history . ivy-posframe-display-at-window-center) - (counsel-describe-function . ivy-display-function-fallback) - (counsel-describe-variable . ivy-display-function-fallback) - (counsel-find-file . ivy-display-function-fallback) - (counsel-recentf . ivy-display-function-fallback) - (counsel-register . ivy-posframe-display-at-frame-bottom-window-center) - (dmenu . ivy-posframe-display-at-frame-top-center) - (nil . ivy-posframe-display)) - ivy-posframe-height-alist - '((swiper . 20) - (dmenu . 20) - (t . 10))) -(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it. -#+END_SRC - -** Ivy keybindings -By default, Doom Emacs does not use 'SPC v', so the format I use for these -bindings is 'SPC v' plus 'key'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("v" . "Ivy") - :desc "Ivy push view" "v p" #'ivy-push-view - :desc "Ivy switch view" "v s" #'ivy-switch-view)) -#+END_SRC - -* Line settings -I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for -me on my ZSA Moonlander keyboard. The standard Emacs keybinding for -comment-line is 'C-x C-;'. The other keybindings are for commands that toggle -on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle" -commands, so I choose 'SPC t' plus 'key' for those bindings. - -| COMMAND | DESCRIPTION | KEYBINDING | -|--------------------------+-------------------------------------------+-------------| -| comment-line | /Comment or uncomment lines/ | SPC TAB TAB | -| hl-line-mode | /Toggle line highlighting in current frame/ | SPC t h | -| global-hl-line-mode | /Toggle line highlighting globally/ | SPC t H | -| doom/toggle-line-numbers | /Toggle line numbers/ | SPC t l | -| toggle-truncate-lines | /Toggle truncate lines/ | SPC t t | - -#+BEGIN_SRC emacs-lisp -(setq display-line-numbers-type t) -(map! :leader - :desc "Comment or uncomment lines" "TAB TAB" #'comment-line - (:prefix ("t" . "toggle") - :desc "Toggle line numbers" "l" #'doom/toggle-line-numbers - :desc "Toggle line highlight in frame" "h" #'hl-line-mode - :desc "Toggle line highlight globally" "H" #'global-hl-line-mode - :desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) -#+END_SRC - -* Markdown - -#+begin_src emacs-lisp -(custom-set-faces - '(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch")))) - '(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7)))) - '(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6)))) - '(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5)))) - '(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4)))) - '(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3)))) - '(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2))))) -#+end_src - -* Minimap -A minimap sidebar displaying a smaller version of the current buffer on either -the left or right side. It highlights the currently shown region and updates its -position automatically. Be aware that this minimap program does not work in Org -documents. This is not unusual though because I have tried several minimap -programs and none of them can handle Org. - -| COMMAND | DESCRIPTION | KEYBINDING | -|--------------+-------------------------------------------+------------| -| minimap-mode | /Toggle minimap-mode/ | SPC t m | - -#+begin_src emacs-lisp -(setq minimap-window-location 'right) -(map! :leader - (:prefix ("t" . "toggle") - :desc "Toggle minimap-mode" "m" #'minimap-mode)) -#+end_src - -* Modeline -The modeline is the bottom status bar that appears in Emacs windows. For more -information on what is available to configure in the Doom modeline, check out: -https://github.com/seagle0128/doom-modeline - -#+begin_src emacs-lisp -(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13") -(setq doom-modeline-height 30 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t) ;; adds folder icon next to persp name -#+end_src - -* Mouse support -Adding mouse support in the terminal version of Emacs. - -#+begin_src emacs-lisp -(xterm-mouse-mode 1) -#+end_src - -* Neotree -Neotree is a file tree viewer. When you open neotree, it jumps to the current -file thanks to neo-smart-open. The neo-window-fixed-size setting makes the -neotree width be adjustable. Doom Emacs had no keybindings set for neotree. -Since Doom Emacs uses 'SPC t' for 'toggle' keybindings, I used 'SPC t n' for -toggle-neotree. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------+---------------------------+------------| -| neotree-toggle | /Toggle neotree/ | SPC t n | -| neotree- dir | /Open directory in neotree/ | SPC d n | - -#+BEGIN_SRC emacs-lisp -(after! neotree - (setq neo-smart-open t - neo-window-fixed-size nil)) -(after! doom-themes - (setq doom-neotree-enable-variable-pitch t)) -(map! :leader - :desc "Toggle neotree file viewer" "t n" #'neotree-toggle - :desc "Open directory in neotree" "d n" #'neotree-dir) -#+END_SRC - -* Open specific files -Keybindings to open files that I work with all the time using the find-file -command, which is the interactive file search that opens with 'C-x C-f' in GNU -Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file -non-interactively since we specify exactly what file to open. The format I use -for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='. - -| PATH TO FILE | DESCRIPTION | KEYBINDING | -|--------------------------------+-----------------------+------------| -| ~/Org/agenda.org | /Edit agenda file/ | SPC = a | -| ~/.config/doom/config.org" | /Edit doom config.org/ | SPC = c | -| ~/.config/doom/init.el" | /Edit doom init.el/ | SPC = i | -| ~/.config/doom/packages.el" | /Edit doom packages.el/ | SPC = p | -| ~/.config/doom/eshell/aliases" | /Edit eshell aliases/ | SPC = e a | -| ~/.config/doom/eshell/profile" | /Edit eshell profile/ | SPC = e p | - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) - :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) - :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) - :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) -(map! :leader - (:prefix ("= e" . "open eshell files") - :desc "Edit eshell aliases" "a" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/aliases")) - :desc "Edit eshell profile" "p" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/profile")))) -#+END_SRC - -* Org mode -I wrapped most of this block in (after! org). Without this, my settings might -be evaluated too early, which will result in my settings being overwritten by -Doom's defaults. I have also enabled org-journal, org-superstar and org-roam by -adding (+journal +pretty +roam2) to the org section of my Doom Emacs init.el. - -=NOTE:= I have the location of my Org directory and Roam directory in $HOME/nc/ -which is a Nextcloud folder that allows me to instantly sync all of my Org work -between my home computer and my office computer. - -#+BEGIN_SRC emacs-lisp -(map! :leader - :desc "Org babel tangle" "m B" #'org-babel-tangle) -(after! org - (setq org-directory "~/nc/Org/" - org-agenda-files '("~/nc/Org/agenda.org") - org-default-notes-file (expand-file-name "notes.org" org-directory) - org-ellipsis " ▼ " - org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆") - org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists - org-log-done 'time - org-hide-emphasis-markers t - ;; ex. of org-link-abbrev-alist in action - ;; [[arch-wiki:Name_of_Page][Description]] - org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list - '(("google" . "http://www.google.com/search?q=") - ("arch-wiki" . "https://wiki.archlinux.org/index.php/") - ("ddg" . "https://duckduckgo.com/?q=") - ("wiki" . "https://en.wikipedia.org/wiki/")) - org-todo-keywords ; This overwrites the default Doom org-todo-keywords - '((sequence - "TODO(t)" ; A task that is ready to be tackled - "BLOG(b)" ; Blog writing assignments - "GYM(g)" ; Things to accomplish at the gym - "PROJ(p)" ; A project that contains other tasks - "VIDEO(v)" ; Video assignments - "WAIT(w)" ; Something is holding up this task - "|" ; The pipe necessary to separate "active" states and "inactive" states - "DONE(d)" ; Task has been completed - "CANCELLED(c)" )))) ; Task has been cancelled -#+END_SRC - -** Org fonts -I have created an interactive function for each color scheme (M-x -dt/org-colors-*). These functions will set appropriate colors and font -attributes for org-level fonts and the org-table font. - -#+begin_src emacs-lisp - -(defun dt/org-colors-doom-one () - "Enable Doom One colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#51afef" ultra-bold) - (org-level-2 1.6 "#c678dd" extra-bold) - (org-level-3 1.5 "#98be65" bold) - (org-level-4 1.4 "#da8548" semi-bold) - (org-level-5 1.3 "#5699af" normal) - (org-level-6 1.2 "#a9a1e1" normal) - (org-level-7 1.1 "#46d9ff" normal) - (org-level-8 1.0 "#ff6c6b" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-dracula () - "Enable Dracula colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#8be9fd" ultra-bold) - (org-level-2 1.6 "#bd93f9" extra-bold) - (org-level-3 1.5 "#50fa7b" bold) - (org-level-4 1.4 "#ff79c6" semi-bold) - (org-level-5 1.3 "#9aedfe" normal) - (org-level-6 1.2 "#caa9fa" normal) - (org-level-7 1.1 "#5af78e" normal) - (org-level-8 1.0 "#ff92d0" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-gruvbox-dark () - "Enable Gruvbox Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#458588" ultra-bold) - (org-level-2 1.6 "#b16286" extra-bold) - (org-level-3 1.5 "#98971a" bold) - (org-level-4 1.4 "#fb4934" semi-bold) - (org-level-5 1.3 "#83a598" normal) - (org-level-6 1.2 "#d3869b" normal) - (org-level-7 1.1 "#d79921" normal) - (org-level-8 1.0 "#8ec07c" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-monokai-pro () - "Enable Monokai Pro colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#78dce8" ultra-bold) - (org-level-2 1.6 "#ab9df2" extra-bold) - (org-level-3 1.5 "#a9dc76" bold) - (org-level-4 1.4 "#fc9867" semi-bold) - (org-level-5 1.3 "#ff6188" normal) - (org-level-6 1.2 "#ffd866" normal) - (org-level-7 1.1 "#78dce8" normal) - (org-level-8 1.0 "#ab9df2" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-nord () - "Enable Nord colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a1c1" ultra-bold) - (org-level-2 1.6 "#b48ead" extra-bold) - (org-level-3 1.5 "#a3be8c" bold) - (org-level-4 1.4 "#ebcb8b" semi-bold) - (org-level-5 1.3 "#bf616a" normal) - (org-level-6 1.2 "#88c0d0" normal) - (org-level-7 1.1 "#81a1c1" normal) - (org-level-8 1.0 "#b48ead" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-oceanic-next () - "Enable Oceanic Next colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#6699cc" ultra-bold) - (org-level-2 1.6 "#c594c5" extra-bold) - (org-level-3 1.5 "#99c794" bold) - (org-level-4 1.4 "#fac863" semi-bold) - (org-level-5 1.3 "#5fb3b3" normal) - (org-level-6 1.2 "#ec5f67" normal) - (org-level-7 1.1 "#6699cc" normal) - (org-level-8 1.0 "#c594c5" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-palenight () - "Enable Palenight colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#82aaff" ultra-bold) - (org-level-2 1.6 "#c792ea" extra-bold) - (org-level-3 1.5 "#c3e88d" bold) - (org-level-4 1.4 "#ffcb6b" semi-bold) - (org-level-5 1.3 "#a3f7ff" normal) - (org-level-6 1.2 "#e1acff" normal) - (org-level-7 1.1 "#f07178" normal) - (org-level-8 1.0 "#ddffa7" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-dark () - "Enable Solarized Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-light () - "Enable Solarized Light colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-tomorrow-night () - "Enable Tomorrow Night colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a2be" ultra-bold) - (org-level-2 1.6 "#b294bb" extra-bold) - (org-level-3 1.5 "#b5bd68" bold) - (org-level-4 1.4 "#e6c547" semi-bold) - (org-level-5 1.3 "#cc6666" normal) - (org-level-6 1.2 "#70c0ba" normal) - (org-level-7 1.1 "#b77ee0" normal) - (org-level-8 1.0 "#9ec400" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -;; Load our desired dt/org-colors-* theme on startup -(dt/org-colors-tomorrow-night) - -#+end_src - -** Org-export -We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting -to gemtext (for the gemini protocol). - -=NOTE:= I also enable ox-publish for converting an Org site into an HTML site, -but that is done in init.el (org +publish). - -#+BEGIN_SRC emacs-lisp -(use-package ox-man) -(use-package ox-gemini) -#+END_SRC - -** Org-journal -#+begin_src emacs-lisp -(setq org-journal-dir "~/nc/Org/journal/" - org-journal-date-prefix "* " - org-journal-time-prefix "** " - org-journal-date-format "%B %d, %Y (%A) " - org-journal-file-format "%Y-%m-%d.org") -#+end_src - -** Org-publish -#+begin_src emacs-lisp -(setq org-publish-use-timestamps-flag nil) -(setq org-export-with-broken-links t) -#+end_src - -** Org-auto-tangle -=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file so that it automatically tangles when you save the document. - -#+begin_src emacs-lisp -(use-package! org-auto-tangle - :defer t - :hook (org-mode . org-auto-tangle-mode) - :config - (setq org-auto-tangle-default t)) - -#+end_src - -* Perspective -Perspective provides multiple named workspaces (or "perspectives") in Emacs, -similar to having multiple desktops in window managers like Awesome and XMonad. -Each perspective has its own buffer list and its own window layout, making it -easy to work on many separate projects without getting lost in all the buffers. -Switching to a perspective activates its window configuration, and when in a -perspective, only its buffers are available (by default). Doom Emacs uses 'SPC -some_key' for binding some of the perspective commands, so I used this binging -format for the perspective bindings that I created.. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------------+-------------------------------------+------------| -| persp-switch | Switch to perspective NAME | SPC DEL | -| persp-switch-to-buffer | Switch to buffer in perspective | SPC , | -| persp-next | Switch to next perspective | SPC ] | -| persp-prev | Switch to previous perspective | SPC [ | -| persp-add-buffer | Add a buffer to current perspective | SPC + | -| persp-remove-by-name | Remove perspective by name | SPC - | -| +workspace/switch-to-{0-9} | Switch to workspace /n/ | SPC 0-9 | - -#+begin_src emacs-lisp -(map! :leader - :desc "Switch to perspective NAME" "DEL" #'persp-switch - :desc "Switch to buffer in perspective" "," #'persp-switch-to-buffer - :desc "Switch to next perspective" "]" #'persp-next - :desc "Switch to previous perspective" "[" #'persp-prev - :desc "Add a buffer current perspective" "+" #'persp-add-buffer - :desc "Remove perspective by name" "-" #'persp-remove-by-name) -#+end_src - -* Rainbow mode -Rainbox mode displays the actual color for any hex value color. It's such a -nice feature that I wanted it turned on all the time, regardless of what mode I -am in. The following creates a global minor mode for rainbow-mode and enables -it. - -#+begin_src emacs-lisp -(define-globalized-minor-mode global-rainbow-mode rainbow-mode - (lambda () (rainbow-mode 1))) -(global-rainbow-mode 1 ) -#+end_src - -* Registers -Emacs registers are compartments where you can save text, rectangles and -positions for later use. Once you save text or a rectangle in a register, you -can copy it into the buffer once or many times; once you save a position in a -register, you can jump back to that position once or many times. The default -GNU Emacs keybindings for these commands (with the exception of -counsel-register) involves 'C-x r' followed by one or more other keys. I wanted -to make this a little more user friendly, and since I am using Doom Emacs, I -choose to replace the 'C-x r' part of the key chords with 'SPC r'. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------------------+----------------------------------+------------| -| copy-to-register | /Copy to register/ | SPC r c | -| frameset-to-register | /Frameset to register/ | SPC r f | -| insert-register | /Insert contents of register/ | SPC r i | -| jump-to-register | /Jump to register/ | SPC r j | -| list-registers | /List registers/ | SPC r l | -| number-to-register | /Number to register/ | SPC r n | -| counsel-register | /Interactively choose a register/ | SPC r r | -| view-register | /View a register/ | SPC r v | -| window-configuration-to-register | /Window configuration to register/ | SPC r w | -| increment-register | /Increment register/ | SPC r + | -| point-to-register | /Point to register/ | SPC r SPC | - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("r" . "registers") - :desc "Copy to register" "c" #'copy-to-register - :desc "Frameset to register" "f" #'frameset-to-register - :desc "Insert contents of register" "i" #'insert-register - :desc "Jump to register" "j" #'jump-to-register - :desc "List registers" "l" #'list-registers - :desc "Number to register" "n" #'number-to-register - :desc "Interactively choose a register" "r" #'counsel-register - :desc "View a register" "v" #'view-register - :desc "Window configuration to register" "w" #'window-configuration-to-register - :desc "Increment register" "+" #'increment-register - :desc "Point to register" "SPC" #'point-to-register)) -#+END_SRC - -* Shells -Settings for the various shells and terminal emulators within Emacs. -+ 'shell-file-name' -- sets the shell to be used in M-x shell, M-x term, M-x - ansi-term and M-x vterm. -+ 'eshell-aliases-file' -- sets an aliases file for the eshell. - -#+BEGIN_SRC emacs-lisp -(setq shell-file-name "/bin/bash" - vterm-max-scrollback 5000) -(setq eshell-rc-script "~/.config/doom/eshell/profile" - eshell-aliases-file "~/.config/doom/eshell/aliases" - eshell-history-size 5000 - eshell-buffer-maximum-lines 5000 - eshell-hist-ignoredups t - eshell-scroll-to-bottom-on-input t - eshell-destroy-buffer-when-process-dies t - eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh")) -(map! :leader - :desc "Eshell" "e s" #'eshell - :desc "Eshell popup toggle" "e t" #'+eshell/toggle - :desc "Counsel eshell history" "e h" #'counsel-esh-history - :desc "Vterm popup toggle" "v t" #'+vterm/toggle) -#+END_SRC - -* Splits -I set splits to default to opening on the right using 'prefer-horizontal-split'. -I set a keybinding for 'clone-indirect-buffer-other-window' for when I want to -have the same document in two splits. The text of the indirect buffer is always -identical to the text of its base buffer; changes made by editing either one are -visible immediately in the other. But in all other respects, the indirect -buffer and its base buffer are completely separate. For example, I can fold one -split but other will be unfolded. - -#+BEGIN_SRC emacs-lisp -(defun prefer-horizontal-split () - (set-variable 'split-height-threshold nil t) - (set-variable 'split-width-threshold 40 t)) ; make this as low as needed -(add-hook 'markdown-mode-hook 'prefer-horizontal-split) -(map! :leader - :desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window) -#+END_SRC - -* Winner mode -Winner mode has been included with GNU Emacs since version 20. This is a global -minor mode and, when activated, it allows you to “undo” (and “redo”) changes in -the window configuration with the key commands 'SCP w ' and 'SPC w -'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("w" . "window") - :desc "Winner redo" "" #'winner-redo - :desc "Winner undo" "" #'winner-undo)) -#+END_SRC - -* Zap to char -Emacs provides a 'zap-to-char' command that kills from the current point to a -character. It is bound to 'M-z' in standard GNU Emacs but since Doom Emacs uses -'SPC' as its leader key and does not have 'SPC z' binded to anything, it just -makes since to use it for 'zap-to-char'. Note that 'zap-to-char' can be used -with the universal argument 'SPC u' to modify its behavior. Examples of -'zap-to-char' usage are listed in the table below: - -| KEYBINDING | WHAT IS DOES | -|---------------------------+------------------------------------------------------------| -| SPC z e | deletes all chars to the next occurrence of 'e' | -| SPC u 2 SPC z e | deletes all chars to the second occurrence of 'e' | -| SPC u - SPC z e | deletes all chars to the previous occurrence of 'e' | -| SPC u -2 SPC z e | deletes all chars to the fourth previous occurrence of 'e' | -| SPC u 1 0 0 SPC u SPC z e | deletes all chars to the 100th occurrence of 'e' | - -=TIP:= The universal argument (SPC u) can only take a single integer by default. -If you need to use a multi-digit number (like 100 in the last example in the -table above), then you must terminate the universal argument with another 'SPC -u' after typing the number. - -'zap-up-to-char' is an alternative command that does not zap the char specified. -It is binded to 'SPC Z'. It can also be used in conjunction with the universal -argument 'SPC u' in similar fashion to the the 'zap-to-char' examples above. - -=NOTE:= Vim (evil mode) has similar functionality builtin. You can delete to -the next occurrence of 'e' by using 'dte' in normal. To delete to the next -occurrence of 'e' including the 'e', then you would use 'dfe'. And you can -modify 'dt' and 'df' by prefixing them with numbers, so '2dte' would delete to -the second occurrence of 'e'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - :desc "Zap to char" "z" #'zap-to-char - :desc "Zap up to char" "Z" #'zap-up-to-char) -#+END_SRC - -* Transparency -#+BEGIN_SRC emacs-lisp -(set-frame-parameter (selected-frame) 'alpha '(98 . 80)) -(add-to-list 'default-frame-alist '(alpha . (98 . 80))) -#+END_SRC - -* Autostart lsp -#+BEGIN_SRC emacs-lisp -(add-hook 'prog-mode-hook #'lsp) -#+END_SRC diff --git a/user/.config/doom/emacs-dash.txt b/user/.config/doom/emacs-dash.txt deleted file mode 100644 index 5d5f70293..000000000 --- a/user/.config/doom/emacs-dash.txt +++ /dev/null @@ -1,19 +0,0 @@ - ================= =============== =============== ======== ======== - \\ . . . . . . .\\ //. . . . . . .\\ //. . . . . . .\\ \\. . .\\// . . // - ||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . . .|| - || . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . || - ||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .|| - || . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . . || - ||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\_ . .|. .|| - || . _|| || || || || ||_ . || || . _|| || || || |\ `-_/| . || - ||_-' || .|/ || || \|. || `-_|| ||_-' || .|/ || || | \ / |-_.|| - || ||_-' || || `-_|| || || ||_-' || || | \ / | `|| - || `' || || `' || || `' || || | \ / | || - || .===' `===. .==='.`===. .===' /==. | \/ | || - || .==' \_|-_ `===. .===' _|_ `===. .===' _-|/ `== \/ | || - || .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \/ | || - || .==' _-' '-__\._-' '-_./__-' `' |. /| | || - ||.==' _-' `' | /==.|| - ==' _-' EMACS \/ `== - \ _-' `-_ / - `'' ``' diff --git a/user/.config/doom/eshell/aliases b/user/.config/doom/eshell/aliases deleted file mode 100644 index ef5aa3a9e..000000000 --- a/user/.config/doom/eshell/aliases +++ /dev/null @@ -1,26 +0,0 @@ -# Aliases for emacs commands -alias ff find-file $1 - -# Changing "ls" to "exa" -alias ls exa -al --color=always --group-directories-first $* # my preferred listing -alias la exa -a --color=always --group-directories-first $* # all files and dirs -alias ll exa -l --color=always --group-directories-first $* # long format -alias lt exa -aT --color=always --group-directories-first $* # tree listing -alias l. exa -a1 $* | grep "^\." # list hidden files - -# Merge Xresources -alias merge xrdb -merge ~/.Xresources - -# Aliases for doom emacs utilties -alias doomsync ~/.emacs.d/bin/doom sync -alias doomdoctor ~/.emacs.d/bin/doom doctor -alias doomupgrade ~/.emacs.d/bin/doom upgrade -alias doompurge ~/.emacs.d/bin/doom purge - -# Confirm before overwriting something -alias cp cp -i $1 -alias mv mv -i $1 -alias rm rm -i $1 - -# bare git repo alias for dotfiles -alias config /usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME $* diff --git a/user/.config/doom/eshell/profile b/user/.config/doom/eshell/profile deleted file mode 100644 index 3c871d69c..000000000 --- a/user/.config/doom/eshell/profile +++ /dev/null @@ -1 +0,0 @@ -colorscript random \ No newline at end of file diff --git a/user/.config/doom/init.el b/user/.config/doom/init.el deleted file mode 100644 index 07422364e..000000000 --- a/user/.config/doom/init.el +++ /dev/null @@ -1,191 +0,0 @@ -;;; init.el -*- lexical-binding: t; -*- - -;; This file controls what Doom modules are enabled and what order they load -;; in. Remember to run 'doom sync' after modifying it! - -;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find a "Module Index" link where you'll find -;; a comprehensive list of Doom's modules and what flags they support. - -;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or -;; 'C-c c k' for non-vim users) to view its documentation. This works on -;; flags as well (those symbols that start with a plus). -;; -;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its -;; directory (for easy access to its source code). - -(doom! :input - ;;chinese - ;;japanese - ;;layout ; auie,ctsrnm is the superior home row - - :completion - company ; the ultimate code completion backend - ;;helm ; the *other* search engine for love and life - ;;ido ; the other *other* search engine... - (ivy +fonts +childframe) ; a search engine for love and life - - :ui - ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does - ;;doom-dashboard ; a nifty splash screen for Emacs - doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; 🙂 - ;;fill-column ; a `fill-column' indicator - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - ;;indent-guides ; highlighted indent columns - (ligatures +extras) ; ligatures and symbols to make your code pretty again - ;;minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - ;;tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages - vc-gutter ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB - window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces - zen ; distraction-free coding or writing - - :editor - (evil +everywhere) ; come to the dark side, we have cookies - file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness - ;;god ; run Emacs commands without modifier keys - lispy ; vim for lisp, for people who don't like vim - ;;multiple-cursors ; editing in many places at once - ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of - ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to - ;;word-wrap ; soft wrapping with language-aware indent - - :emacs - (dired +icons) ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent - (ibuffer +icons) ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes - vc ; version-control and Emacs, sitting in a tree - - :term - eshell ; the elisp shell that works everywhere - shell ; simple shell REPL for Emacs - ;;term ; basic terminal emulator for Emacs - vterm ; the best terminal emulation in Emacs - - :checkers - syntax ; tasing you for every semicolon you forget - ;;(spell +aspell) ; tasing you for misspelling mispelling - ;;grammar ; tasing grammar mistake every you make - - :tools - ;;ansible - ;;debugger ; FIXME stepping through code, to help you add bugs - ;;direnv - ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces - ;;ein ; tame Jupyter notebooks with emacs - (eval +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation - lsp - magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs - ;;pass ; password manager for nerds - pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects - ;;terraform ; infrastructure as code - ;;tmux ; an API for interacting with tmux - ;;upload ; map local to remote projects via ssh/ftp - - :os - (:if IS-MAC macos) ; improve compatibility with macOS - ;;tty ; improve the terminal Emacs experience - - :lang - ;;agda ; types of types of types of types... - cc ; C/C++/Obj-C madness - ;;clojure ; java with a lisp - common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs - ;;crystal ; ruby at the speed of c - csharp ; unity, .NET, and mono shenanigans - ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else - ;;elixir ; erlang done right - ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses - ;;erlang ; an elegant language for a more civilized age - ;;ess ; emacs speaks statistics - ;;faust ; dsp, but you get to keep your soul - ;;fsharp ; ML stands for Microsoft's Language - ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect - ;;(haskell +dante) ; a language that's lazier than I am - ;;hy ; readability of scheme w/ speed of python - ;;idris ; a language you can depend on - json ; At least it ain't XML - ;;(java +meghanada) ; the poster child for carpal tunnel syndrome - javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) - latex ; writing papers in Emacs has never been so fun - ;;lean - ;;factor - ;;ledger ; an accounting system in Emacs - lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel - (org - +journal ; enable org journal - +pretty ; replace asterisks with pretty org bullets - +publish ; create static websites with org - +roam2) ; org roam v2 - php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more - ;;purescript ; javascript, but functional - python ; beautiful is better than ugly - ;;qt ; the 'cutest' gui framework ever - ;;racket ; a DSL for DSLs - ;;raku ; the artist formerly known as perl6 - ;;rest ; Emacs as a REST client - ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good - scheme ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor - ;;sml - ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? - ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes - yaml ; JSON, but readable - - :email - ;;mu4e - ;;smtpmail - ;;notmuch - ;;(wanderlust +gmail) - - :app - ;;calendar - ;; emms - ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize - ;;rss ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought - - :config - literate - (default +bindings +smartparens)) diff --git a/user/.config/doom/packages.el b/user/.config/doom/packages.el deleted file mode 100644 index 791d18aa3..000000000 --- a/user/.config/doom/packages.el +++ /dev/null @@ -1,90 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; $DOOMDIR/packages.el - -;; To install a package with Doom you must declare them here and run 'doom sync' -;; on the command line, then restart Emacs for the changes to take effect -- or -;; use 'M-x doom/reload'. - - -;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: -;(package! some-package) - -;; To install a package directly from a remote git repo, you must specify a -;; `:recipe'. You'll find documentation on what `:recipe' accepts here: -;; https://github.com/raxod502/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) - -;; If the package you are trying to install does not contain a PACKAGENAME.el -;; file, or is located in a subdirectory of the repo, you'll need to specify -;; `:files' in the `:recipe': -;(package! this-package -; :recipe (:host github :repo "username/repo" -; :files ("some-file.el" "src/lisp/*.el"))) - -;; If you'd like to disable a package included with Doom, you can do so here -;; with the `:disable' property: -;(package! builtin-package :disable t) - -;; You can override the recipe of a built in package without having to specify -;; all the properties for `:recipe'. These will inherit the rest of its recipe -;; from Doom or MELPA/ELPA/Emacsmirror: -;(package! builtin-package :recipe (:nonrecursive t)) -;(package! builtin-package-2 :recipe (:repo "myfork/package")) - -;; Specify a `:branch' to install a package from a particular branch or tag. -;; This is required for some packages whose default branch isn't 'master' (which -;; our package manager can't deal with; see raxod502/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) - -;; Use `:pin' to specify a particular commit to install. -;(package! builtin-package :pin "1a2b3c4d5e") - - -;; Doom's packages are pinned to a specific commit and updated from release to -;; release. The `unpin!' macro allows you to unpin single packages... -;(unpin! pinned-package) -;; ...or multiple packages -;(unpin! pinned-package another-pinned-package) -;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) -;(unpin! t) - -(package! gitconfig-mode - :recipe (:host github :repo "magit/git-modes" - :files ("gitconfig-mode.el"))) -(package! gitignore-mode - :recipe (:host github :repo "magit/git-modes" - :files ("gitignore-mode.el"))) -(package! flycheck-aspell) -(package! async) -(package! calfw) -(package! calfw-org) -(package! dashboard) -(package! dired-open) -(package! dired-subtree) -(package! dmenu) -(package! elpher) -(package! emojify) -(package! esxml) -(package! evil-tutor) -(package! imenu-list) -(package! ivy-posframe) -(package! mw-thesaurus) -(package! org-board) -(package! org-web-tools) -(package! org-auto-tangle) -(package! ox-gemini) -(package! pacmacs) -(package! peep-dired) -(package! rainbow-mode) -(package! request) -(package! resize-window) -(package! s) -(package! tldr) -(package! wc-mode) -(package! beacon) -(package! minimap) -(package! olivetti) -(package! sharper) -(package! csproj-mode) -(package! dap-mode) diff --git a/user/.config/fish/config.fish b/user/.config/fish/config.fish index 55a1ef528..8cc6dff9b 100644 --- a/user/.config/fish/config.fish +++ b/user/.config/fish/config.fish @@ -9,13 +9,13 @@ # First line removes the path; second line sets it. Without the first line, # your path gets massive and fish becomes very slow. set -e fish_user_paths -set -U fish_user_paths $HOME/.bin $HOME/.local/bin $HOME/.config/emacs/bin $HOME/Applications /var/lib/flatpak/exports/bin/ $fish_user_paths +set -U fish_user_paths $HOME/.local/bin /var/lib/flatpak/exports/bin/ $fish_user_paths ### EXPORT ### set fish_greeting # Supresses fish's intro message set TERM "xterm-256color" # Sets the terminal type -set EDITOR "emacsclient -t -a ''" -set VISUAL "emacsclient -c -a 'emacs'" +set EDITOR "$HOME/.local/bin/lvim" +set VISUAL "wezterm start --class editor -- $EDITOR" ### SET BAT AS MANPAGER set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" @@ -34,7 +34,6 @@ set fish_color_command brcyan set fish_color_error '#fb4934' set fish_color_param brcyan - ### FUNCTIONS ### # Functions needed for !! and !$ function __history_previous_command @@ -126,23 +125,17 @@ alias .4='cd ../../../..' alias .5='cd ../../../../..' # emacs as vim -alias vim="emacsclient -t -a ''" - -# newsboat -alias newsboat='newsboat -u ~/.config/newsboat/urls' +alias vim="$EDITOR" # bat as cat alias cat='bat' -# pfetch as neofetch -alias neofetch='pfetch' - -# Changing "ls" to "exa" -alias ls='exa -al --color=always --group-directories-first' # my preferred listing -alias la='exa -a --color=always --group-directories-first' # all files and dirs -alias ll='exa -l --color=always --group-directories-first' # long format -alias lt='exa -aT --color=always --group-directories-first' # tree listing -alias l.='exa -a | egrep "^\."' +# Changing "ls" to "eza" +alias ls='eza -al --color=always --group-directories-first' # my preferred listing +alias la='eza -a --color=always --group-directories-first' # all files and dirs +alias ll='eza -l --color=always --group-directories-first' # long format +alias lt='eza -aT --color=always --group-directories-first' # tree listing +alias l.='eza -a | egrep "^\."' # package management alias pac-up='paru -Syu' @@ -158,9 +151,9 @@ alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' # file management -alias fm="vifm" -alias file="vifm" -alias flm="vifm" +alias fm="$HOME/.config/vifm/scripts/vifmrun" +alias flm="$HOME/.config/vifm/scripts/vifmrun" +alias vifm="$HOME/.config/vifm/scripts/vifmrun" alias cp='cp -iv' alias mv='mv -iv' alias rm='rm -vI' @@ -222,12 +215,6 @@ alias youtube='ytfzf -ftsl' alias ytm='ytfzf -mtsl' alias youtube-music='ytfzf -mtsl' -# the terminal rickroll -alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' - -# Mocp must be launched with bash instead of Fish! -alias mocp="bash -c mocp" - # network and bluetooth alias netstats='nmcli dev' alias wfi='nmtui-connect' diff --git a/user/.config/git/config b/user/.config/git/config index f7effc496..e39e01c66 100644 --- a/user/.config/git/config +++ b/user/.config/git/config @@ -1,4 +1,4 @@ [user] - mail = misterclay@tutanota.com - name = Clay Gomera - email = misterclay@tutanota.com + mail = maverick.xero@proton.me + name = Darius Drake + email = maverick.xero@proton.me diff --git a/user/.config/gtk-2.0/gtkfilechooser.ini b/user/.config/gtk-2.0/gtkfilechooser.ini index 65fa2a6e5..3de31bfd5 100644 --- a/user/.config/gtk-2.0/gtkfilechooser.ini +++ b/user/.config/gtk-2.0/gtkfilechooser.ini @@ -4,8 +4,8 @@ ShowHidden=false ShowSizeColumn=true GeometryX=0 GeometryY=0 -GeometryWidth=772 -GeometryHeight=560 +GeometryWidth=780 +GeometryHeight=585 SortColumn=name SortOrder=ascending StartupMode=recent diff --git a/user/.config/gtk-2.0/gtkrc-2.0 b/user/.config/gtk-2.0/gtkrc-2.0 index 385c75acc..baac8dd86 100644 --- a/user/.config/gtk-2.0/gtkrc-2.0 +++ b/user/.config/gtk-2.0/gtkrc-2.0 @@ -1,19 +1,14 @@ -# DO NOT EDIT! This file will be overwritten by nwg-look. -# Any customization should be done in ~/.gtkrc-2.0.mine instead. - -include "/home/drk/.gtkrc-2.0.mine" gtk-theme-name="gruvbox-dark-gtk" gtk-icon-theme-name="gruvbox-dark-icons-gtk" gtk-font-name="Cantarell 10" gtk-cursor-theme-name="Simp1e-Gruvbox-Dark" -gtk-cursor-theme-size=24 +gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=0 +gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 -gtk-xft-hintstyle="hintslight" -gtk-xft-rgba="rgb" +gtk-xft-hintstyle="hintfull" diff --git a/user/.config/gtk-3.0/bookmarks b/user/.config/gtk-3.0/bookmarks new file mode 100644 index 000000000..e69de29bb diff --git a/user/.config/gtk-3.0/settings.ini b/user/.config/gtk-3.0/settings.ini index 7b4e43bc1..22c394419 100644 --- a/user/.config/gtk-3.0/settings.ini +++ b/user/.config/gtk-3.0/settings.ini @@ -3,15 +3,13 @@ gtk-theme-name=gruvbox-dark-gtk gtk-icon-theme-name=gruvbox-dark-icons-gtk gtk-font-name=Cantarell 10 gtk-cursor-theme-name=Simp1e-Gruvbox-Dark -gtk-cursor-theme-size=24 +gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=0 +gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 -gtk-xft-hintstyle=hintslight -gtk-xft-rgba=rgb -gtk-application-prefer-dark-theme=1 +gtk-xft-hintstyle=hintfull diff --git a/user/.config/lvim/config.lua b/user/.config/lvim/config.lua new file mode 100644 index 000000000..bb61cc230 --- /dev/null +++ b/user/.config/lvim/config.lua @@ -0,0 +1,129 @@ +-- neovide options +vim.o.guifont = "mononoki Nerd Font:h08" +vim.g.neovide_hide_mouse_when_typing = true +vim.g.neovide_input_macos_alt_is_meta = true +vim.g.neovide_hide_mouse_when_typing = false +vim.g.neovide_refresh_rate = 60 +vim.g.neovide_refresh_rate_idle = 5 +vim.g.neovide_no_idle = true +vim.g.neovide_confirm_quit = true +vim.g.neovide_input_use_logo = true + +vim.g.neovide_cursor_antialiasing = true +vim.g.neovide_cursor_animate_in_insert_mode = true +vim.g.neovide_cursor_vfx_mode = "pixiedust" +vim.g.neovide_cursor_vfx_particle_speed = 20.0 + +vim.g.neovide_padding_top = 0 +vim.g.neovide_padding_bottom = 0 +vim.g.neovide_padding_right = 0 +vim.g.neovide_padding_left = 0 + +-- Helper function for transparency formatting +local alpha = function() + return string.format("%x", math.floor(255 * (vim.g.transparency or 0.98))) +end +vim.g.neovide_transparency = 0.98 +vim.g.transparency = 0.98 +vim.g.neovide_background_color = "#1d2021" .. alpha() + +-- nvim options +vim.opt.shiftwidth = 4 +vim.opt.tabstop = 4 +vim.opt.relativenumber = true +vim.cmd('autocmd FileType markdown setlocal nospell') +vim.opt.wrap = true -- wrap lines +vim.opt.spell = false +vim.o.shell = '/usr/bin/bash' +vim.o.autochdir = true +vim.cmd('autocmd BufEnter * lcd %:p:h') + +-- general +lvim.use_icons = true +lvim.log.level = "info" +lvim.format_on_save = { + enabled = true, + pattern = "*.lua", + timeout = 1000, +} + +-- change theme settings +lvim.colorscheme = "gruvbox" +lvim.transparent_window = false +lvim.builtin.alpha.active = true +lvim.builtin.alpha.mode = "dashboard" +lvim.builtin.terminal.active = true +lvim.builtin.nvimtree.setup.view.side = "left" +lvim.builtin.nvimtree.setup.renderer.icons.show.git = false + +-- automatically install missing parsers when entering buffer +lvim.builtin.treesitter.auto_install = true + +-- additional Plugins +lvim.plugins = { + { "lunarvim/colorschemes" }, + { "ellisonleao/gruvbox.nvim" }, + { "puremourning/vimspector" }, + { "SirVer/ultisnips" }, + { "CRAG666/code_runner.nvim" }, +} + +-- configuring colorscheme +require("gruvbox").setup({ + undercurl = true, + underline = true, + bold = false, + italic = { + strings = true, + comments = true, + operators = false, + folds = true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "hard", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = false, +}) + +-- vimspector options +vim.g.vimspector_enable_mappings = 'HUMAN' +vim.g.vimspector_enable_mappings_for_mode = { + [''] = { 'n', 'v' }, +} + +-- code runner options +require('code_runner').setup({ + filetype = { + java = { + "cd $dir &&", + "javac $fileName &&", + "java $fileNameWithoutExt" + }, + python = "python3 -u", + typescript = "deno run", + rust = { + "cd $dir &&", + "rustc $fileName &&", + "$dir/$fileNameWithoutExt" + }, + cs = { + "cd '$dir' &&", + "dotnet run" + } + }, +}) + +lvim.keys.normal_mode["r"] = ":RunCode" +lvim.keys.normal_mode["rf"] = ":RunFile" +lvim.keys.normal_mode["rft"] = ":RunFile tab" +lvim.keys.normal_mode["rp"] = ":RunProject" +lvim.keys.normal_mode["rc"] = ":RunClose" +lvim.keys.normal_mode["crf"] = ":CRFiletype" +lvim.keys.normal_mode["crp"] = ":CRProjects" diff --git a/user/.config/neofetch/config.conf b/user/.config/neofetch/config.conf new file mode 100644 index 000000000..8e9f9da84 --- /dev/null +++ b/user/.config/neofetch/config.conf @@ -0,0 +1,113 @@ +print_info() { + prin " " + prin "┌─────────\n Hardware Information \n─────────┐" + info " ​ ​ 󰟀 " model + info " ​ ​ 󰍛 " cpu + info " ​ ​ 󰘚 " gpu + info " ​ ​ 󰍛 " memory + info " ​ ​ 󱑆 " uptime + prin "├─────────\n Software Information \n─────────┤" + info " ​ ​ 󰌽 " distro + info " ​ ​  " kernel + info " ​ ​ 󰏖 " packages + info " ​ ​ 󰧨 " wm + info " ​ ​ 󰆍 " shell + info " ​ ​ 󰉼 " theme + info " ​ ​  " icons + info " ​ ​ 󰝚 " song + # [[ "$player" ]] && prin "Music Player" "$player" +# info " ​ ​  " local_ip +# info " ​ ​  " public_ip +# info " ​ ​  " locale # This only works on glibc systems. + prin "└───────────────────────────────────────┘" + info cols +prin "\n \n \n \n \n ${cl3} \n \n ${cl5} \n \n ${cl2} \n \n ${cl6} \n \n ${cl4} \n \n ${cl1} \n \n ${cl7} \n \n ${cl0}" +} + +kernel_shorthand="on" +distro_shorthand="off" +os_arch="off" +uptime_shorthand="on" +memory_percent="on" +package_managers="on" +shell_path="off" +shell_version="on" +speed_type="bios_limit" +speed_shorthand="on" +cpu_brand="off" +cpu_speed="off" +cpu_cores="logical" +cpu_temp="off" +gpu_brand="off" +gpu_type="all" +refresh_rate="on" +gtk_shorthand="on" +gtk2="on" +gtk3="on" +public_ip_host="http://ident.me" +public_ip_timeout=2 +disk_show=('/') +music_player="cmus" +song_format="%artist% - %title%" +song_shorthand="off" +colors=(distro) +bold="on" +underline_enabled="on" +underline_char="-" +separator="  " +color_blocks="off" +block_range=(0 15) # Colorblocks + +# Colors for custom colorblocks +magenta="\033[1;35m" +green="\033[1;32m" +white="\033[1;37m" +blue="\033[1;34m" +red="\033[1;31m" +black="\033[1;40;30m" +yellow="\033[1;33m" +cyan="\033[1;36m" +reset="\033[0m" +bgyellow="\033[1;43;33m" +bgwhite="\033[1;47;37m" +cl0="${reset}" +cl1="${magenta}" +cl2="${green}" +cl3="${white}" +cl4="${blue}" +cl5="${red}" +cl6="${yellow}" +cl7="${cyan}" +cl8="${black}" +cl9="${bgyellow}" +cl10="${bgwhite}" + +block_width=4 +block_height=1 + +bar_char_elapsed="-" +bar_char_total="=" +bar_border="on" +bar_length=15 +bar_color_elapsed="distro" +bar_color_total="distro" + +cpu_display="on" +memory_display="on" +battery_display="on" +disk_display="on" + +aascii_distro="void-small" +ascii_colors=(distro) +ascii_bold="on" + +thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" +crop_mode="normal" +crop_offset="center" + +gap=2 + +yoffset=0 +xoffset=0 + +stdout="off" diff --git a/user/.config/newsboat/urls b/user/.config/newsboat/urls index c66f25428..d6689f728 100644 --- a/user/.config/newsboat/urls +++ b/user/.config/newsboat/urls @@ -6,7 +6,7 @@ https://planet.kde.org/global/atom.xml "~Planet KDE" https://pointieststick.com/feed/ "~This Week on KDE" https://www.kdeblog.com/rss "~KDE Blog" https://thisweek.gnome.org/index.xml "~This Week on GNOME" -https://www.omgubuntu.co.uk/feed "~OMG Ubuntu!" +https://www.omgubuntu.co.uk/feed "~OMG!Ubuntu" https://www.omglinux.com/feed "~OMG!Linux" https://blog.thunderbird.net/feed/ "~The Thunderbird Blog" https://thelinuxexp.com/feed.xml "~The Linux Experiment" @@ -19,81 +19,136 @@ https://blog.zorin.com/index.xml "~Zorin OS Blog" http://blog.linuxmint.com/?feed=rss2 "~Linux Mint Blog" https://www.gamingonlinux.com/article_rss.php "~Gaming on linux" https://hackaday.com/blog/feed/ "~Hackaday" -https://opensource.com/feed "~Opensource" https://linux.softpedia.com/backend.xml "~Softpedia Linux" https://www.phoronix.com/rss.php "~Phoronix" https://www.computerworld.com/index.rss "~Computerworld" -https://www.networkworld.com/category/linux/index.rss "~Networkworld Linux" https://betanews.com/feed "~Betanews Linux" http://lxer.com/module/newswire/headlines.rss "~Lxer" https://theevilskeleton.gitlab.io/feed.xml "~TheEvilSkeleton" https://tutanota.com/blog/feed.xml "~Tutanota Blogs" -https://vanillaos.org/feed.xml "~Vanilla OS" https://techcrunch.com/feed/ "~TechCrunch" http://www.techradar.com/rss "~TechRadar" https://www.zdnet.com/news/rss.xml "~ZDNET - News" https://c3po.website/rss/ "~Blog de C3PO" +https://thecheis.com/feed/ "~THE_CHEI$" http://yro.slashdot.org/yro.rss "~Slashdot: Your Rights Online" https://freedom-to-tinker.com/feed/rss/ "~Freedom to Tinker" https://act.eff.org/action.atom "~EFF - Action Center" https://www.eff.org/rss/updates.xml "~EFF - Updates" https://victorhckinthefreeworld.com/feed/ "~Victorhck in the free world" -https://invidious.sethforprivacy.com/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "~YT - Veritasium" -https://invidious.sethforprivacy.com/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ "~YT - SomeOrdinaryGamers" -https://invidious.sethforprivacy.com/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w "~YT - Louis Rossmann" -https://invidious.sethforprivacy.com/feed/channel/UChI0q9a-ZcbZh7dAu_-J-hg "~YT - Upper Echelon" -https://invidious.sethforprivacy.com/feed/channel/UCj8orMezFWVcoN-4S545Wtw "~YT - Max Derrat" -https://invidious.sethforprivacy.com/feed/channel/UCkmMACUKpQeIxN9D9ARli1Q "~YT - Shadiversity" -https://invidious.sethforprivacy.com/feed/channel/UCNYW2vfGrUE6R5mIJYzkRyQ "~YT - DrossRotzank" -https://invidious.sethforprivacy.com/feed/channel/UC36xmz34q02JYaZYKrMwXng "~YT - Nate Gentile" -https://invidious.sethforprivacy.com/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ "~YT - Chris Titus Tech" -https://invidious.sethforprivacy.com/feed/channel/UCVls1GmFKf6WlTraIb_IaJg "~YT - DistroTube" -https://invidious.sethforprivacy.com/feed/channel/UCxQKHvKbmSzGMvUrVtJYnUA "~YT - Learn Linux TV" -https://invidious.sethforprivacy.com/feed/channel/UC5UAwBUum7CPN5buc-_N1Fw "~YT - The Linux Experiment" -https://invidious.sethforprivacy.com/feed/channel/UCylGUf9BvQooEFjgdNudoQg "~YT - The Linux Cast" -https://invidious.sethforprivacy.com/feed/channel/UCoryWpk4QVYKFCJul9KBdyw "~YT - Switched to Linux" -https://invidious.sethforprivacy.com/feed/channel/UCgkyQiY_Q5AlrygIXGWO2Zw "~YT - Tux Traveler" -https://invidious.sethforprivacy.com/feed/channel/UCxkw-TfCK1t1VKxfHwPzD6w "~YT - Our Walk in Christ" -https://invidious.sethforprivacy.com/feed/channel/UCld68syR8Wi-GY_n4CaoJGA "~YT - Brodie Robertson" -https://invidious.sethforprivacy.com/feed/channel/UCjSEJkpGbcZhvo0lr-44X_w "~YT - TechHut" -https://invidious.sethforprivacy.com/feed/channel/UC2eYFnH61tmytImy1mTYvhA "~YT - Luke Smith" -https://invidious.sethforprivacy.com/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA "~YT - Mental Outlaw" -https://invidious.sethforprivacy.com/feed/channel/UC3jSNmKWYA04R47fDcc1ImA "~YT - InfinitelyGalactic" -https://invidious.sethforprivacy.com/feed/channel/UCONH73CdRXUjlh3-DdLGCPw "~YT - Nicco Loves Linux" -https://invidious.sethforprivacy.com/feed/channel/UC1s1OsWNYDFgbROPV-q5arg "~YT - Michael Horn" -https://invidious.sethforprivacy.com/feed/channel/UCOSSzBN8e3JHOxvltQbf_mQ "~YT - Jack Keifer" -https://invidious.sethforprivacy.com/feed/channel/UC05XpvbHZUQOfA6xk4dlmcw "~YT - DJ Ware" -https://invidious.sethforprivacy.com/feed/channel/UCAiiOTio8Yu69c3XnR7nQBQ "~YT - System Crafters" -https://invidious.sethforprivacy.com/feed/channel/UCAYKj_peyESIMDp5LtHlH2A "~YT - unfa" -https://invidious.sethforprivacy.com/feed/channel/UCmw-QGOHbHA5cDAvwwqUTKQ "~YT - Zaney" -https://invidious.sethforprivacy.com/feed/channel/UCNvl_86ygZXRuXjxbONI5jA "~YT - 10leej" -https://invidious.sethforprivacy.com/feed/channel/UC3yaWWA9FF9OBog5U9ml68A "~YT - SavvyNik" -https://invidious.sethforprivacy.com/feed/channel/UCS97tchJDq17Qms3cux8wcA "~YT - chris@machine" -https://invidious.sethforprivacy.com/feed/channel/UCl8XUDjAOLc7GNKcDp9Nepg "~YT - Locos por Linux" -https://invidious.sethforprivacy.com/feed/channel/UClVi5MQZ6T0InZYT7oFs6wg "~YT - Mumbling Hugo" -https://invidious.sethforprivacy.com/feed/channel/UCmyGZ0689ODyReHw3rsKLtQ "~YT - Michael Tunnell" -https://invidious.sethforprivacy.com/feed/channel/UCv1Kcz-CuGM6mxzL3B1_Eiw "~YT - Gardiner Bryant" -https://invidious.sethforprivacy.com/feed/channel/UCcf2Mr1qNoX51XXDUd3Rquw "~YT - ByteSeb" -https://invidious.sethforprivacy.com/feed/channel/UCCIHOP7e271SIumQgyl6XBQ "~YT - OldTechBloke" -https://invidious.sethforprivacy.com/feed/channel/UCIFzjAer2W9gTWVECZgtDzg "~YT - GaryH Tech" -https://invidious.sethforprivacy.com/feed/channel/UCMiyV_Ib77XLpzHPQH_q0qQ "~YT - Veronica Explains" -https://invidious.sethforprivacy.com/feed/channel/UCsnGwSIHyoYN0kiINAGUKxg "~YT - Wolfgang's Channel" -https://invidious.sethforprivacy.com/feed/channel/UCnIfca4LPFVn8-FjpPVc1ow "~YT - Fedora Project" -https://invidious.sethforprivacy.com/feed/channel/UCH5DsMZAgdx5Fkk9wwMNwCA "~YT - The New Oil" -https://invidious.sethforprivacy.com/feed/channel/UCs6KfncB4OV6Vug4o_bzijg "~YT - Techlore" -https://invidious.sethforprivacy.com/feed/channel/UCYVU6rModlGxvJbszCclGGw "~YT - Rob Braxman Tech" -https://invidious.sethforprivacy.com/feed/channel/UCSuHzQ3GrHSzoBbwrIq3LLA "~YT - Naomi Brockwell: NBTV" -https://invidious.sethforprivacy.com/feed/channel/UCvFGf8HZGZWFzpcDCqb3Lhw "~YT - All Things Secured" -https://invidious.sethforprivacy.com/feed/channel/UCvjgXvBlbQiydffZU7m1_aw "~YT - The Coding Train" -https://invidious.sethforprivacy.com/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "~YT - Computerphile" -https://invidious.sethforprivacy.com/feed/channel/UCbiGcwDWZjz05njNPrJU7jA "~YT - ExplainingComputers" -https://invidious.sethforprivacy.com/feed/channel/UCy0tKL1T7wFoYcxCe0xjN6Q "~YT - Technology Connections" -https://invidious.sethforprivacy.com/feed/channel/UC8uT9cgJorJPWu7ITLGo9Ww "~YT - The 8-Bit Guy" -https://invidious.sethforprivacy.com/feed/channel/UCoL8olX-259lS1N6QPyP4IQ "~YT - Action Retro" -https://invidious.sethforprivacy.com/feed/channel/UCW-HHEyt67RhZ6q21n4p2zQ "~YT - Mac84" -https://invidious.sethforprivacy.com/feed/channel/UChT0QzAGfz_pUIbQnePV6KQ "~YT - Pendleton 115" -https://invidious.sethforprivacy.com/feed/channel/UC-ErgHYY0_Yjhjz2MN1E1lg "~YT - RETRO Hardware" -https://invidious.sethforprivacy.com/feed/channel/UCjgS6Uyg8ok4Jd_lH_MUKgg "~YT - Claus Kellerman" -https://invidious.sethforprivacy.com/feed/channel/UC0W_BIuwk8D0Bv4THbVZZOQ "~YT - Surveillance Report" -https://invidious.sethforprivacy.com/feed/channel/UCBq5p-xOla8xhnrbhu8AIAg "~YT - Tech Over Tea" +https://inv.vern.cc/feed/channel/UC-ErgHYY0_Yjhjz2MN1E1lg "~YT - RETRO Hardware" +https://inv.vern.cc/feed/channel/UC05XpvbHZUQOfA6xk4dlmcw "~YT - DJ Ware" +https://inv.vern.cc/feed/channel/UC0W_BIuwk8D0Bv4THbVZZOQ "~YT - Surveillance Report" +https://inv.vern.cc/feed/channel/UC1D3yD4wlPMico0dss264XA "~YT - NileBlue" +https://inv.vern.cc/feed/channel/UC1_uAIS3r8Vu6JjXWvastJg "~YT - Mathologer" +https://inv.vern.cc/feed/channel/UC1s1OsWNYDFgbROPV-q5arg "~YT - Michael Horn" +https://inv.vern.cc/feed/channel/UC1yGcBvdPGxRIMT1yo_bKIQ "~YT - Jake@Linux" +https://inv.vern.cc/feed/channel/UC2WHjPDvbE6O328n17ZGcfg "~YT - ForrestKnight" +https://inv.vern.cc/feed/channel/UC2eYFnH61tmytImy1mTYvhA "~YT - Luke Smith" +https://inv.vern.cc/feed/channel/UC3jSNmKWYA04R47fDcc1ImA "~YT - InfinitelyGalactic" +https://inv.vern.cc/feed/channel/UC3yaWWA9FF9OBog5U9ml68A "~YT - SavvyNik" +https://inv.vern.cc/feed/channel/UC5I2hjZYiW9gZPVkvzM8_Cw "~YT - Techmoan" +https://inv.vern.cc/feed/channel/UC5KDiSAFxrDWhmysBcNqtMA "~YT - Eric Murphy" +https://inv.vern.cc/feed/channel/UC5UAwBUum7CPN5buc-_N1Fw "~YT - The Linux Experiment" +https://inv.vern.cc/feed/channel/UC5nlKFUNoskvV5XdW6PbgYw "~YT - A Well-Rested Dog" +https://inv.vern.cc/feed/channel/UC6WOxrSKLW8VagrNkfvi6EQ "~YT - THE SQUIDD" +https://inv.vern.cc/feed/channel/UC6biysICWOJ-C3P4Tyeggzg "~YT - Low Level Learning" +https://inv.vern.cc/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA "~YT - Mental Outlaw" +https://inv.vern.cc/feed/channel/UC7qPftDWPw9XuExpSgfkmJQ "~YT - Nostalgia Nerd" +https://inv.vern.cc/feed/channel/UC8ENHE5xdFSwx71u3fDH5Xw "~YT - ThePrimeagen" +https://inv.vern.cc/feed/channel/UC8uT9cgJorJPWu7ITLGo9Ww "~YT - The 8-Bit Guy" +https://inv.vern.cc/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "~YT - Computerphile" +https://inv.vern.cc/feed/channel/UC910yxBmXzGDH_2cx0XE0Xw "~YT - Plano de Juego" +https://inv.vern.cc/feed/channel/UC9RM-iSvTu1uPJb8X5yp3EQ "~YT - Wendover Productions" +https://inv.vern.cc/feed/channel/UC9bORzxOWiewqMXxkmhAwAg "~YT - Gingy" +https://inv.vern.cc/feed/channel/UC9lE09jxmMgMoG13WrNHPmA "~YT - World of Tanks Blitz" +https://inv.vern.cc/feed/channel/UCAYKj_peyESIMDp5LtHlH2A "~YT - unfa" +https://inv.vern.cc/feed/channel/UCAiEWppTvoNSHU939xhMb2g "~YT - hoser" +https://inv.vern.cc/feed/channel/UCAiiOTio8Yu69c3XnR7nQBQ "~YT - System Crafters" +https://inv.vern.cc/feed/channel/UCBq5p-xOla8xhnrbhu8AIAg "~YT - Tech Over Tea" +https://inv.vern.cc/feed/channel/UCCIHOP7e271SIumQgyl6XBQ "~YT - OldTechBloke" +https://inv.vern.cc/feed/channel/UCE0H52NoucHL2JkhPdZ1ykA "~YT - Jwlar" +https://inv.vern.cc/feed/channel/UCEFymXY4eFCo_AchSpxwyrg "~YT - MetalJesusRocks" +https://inv.vern.cc/feed/channel/UCEp20NgOZHmgWdbQdHSxgjw "~YT - This Does Not Compute" +https://inv.vern.cc/feed/channel/UCFhXFikryT4aFcLkLw2LBLA "~YT - NileRed" +https://inv.vern.cc/feed/channel/UCGE-JpLbibXJg3W_N2hbo8g "~YT - Sethorven" +https://inv.vern.cc/feed/channel/UCH5DsMZAgdx5Fkk9wwMNwCA "~YT - The New Oil" +https://inv.vern.cc/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "~YT - Veritasium" +https://inv.vern.cc/feed/channel/UCIFzjAer2W9gTWVECZgtDzg "~YT - GaryH Tech" +https://inv.vern.cc/feed/channel/UCJ0-OtVpF0wOKEqT2Z1HEtA "~YT - ElectroBOOM" +https://inv.vern.cc/feed/channel/UCJYJgj7rzsn0vdR7fkgjuIA "~YT - styropyro" +https://inv.vern.cc/feed/channel/UCLEoyoOKZK0idGqSc6Pi23w "~YT - RMC - The Cave" +https://inv.vern.cc/feed/channel/UCLx053rWZxCiYWsBETgdKrQ "~YT - LGR" +https://inv.vern.cc/feed/channel/UCMbQbVilo-nezMvwf1BZfAA "~YT - CienciaDeSofa" +https://inv.vern.cc/feed/channel/UCMiyV_Ib77XLpzHPQH_q0qQ "~YT - Veronica Explains" +https://inv.vern.cc/feed/channel/UCNvl_86ygZXRuXjxbONI5jA "~YT - 10leej" +https://inv.vern.cc/feed/channel/UCNzszbnvQeFzObW0ghk0Ckw "~YT - Dave's Garage" +https://inv.vern.cc/feed/channel/UCONH73CdRXUjlh3-DdLGCPw "~YT - Nicco Loves Linux" +https://inv.vern.cc/feed/channel/UCOSSzBN8e3JHOxvltQbf_mQ "~YT - Jack Keifer" +https://inv.vern.cc/feed/channel/UCOxmlaJURX3nq8eLuJPbl3A "~YT - Psivewri" +https://inv.vern.cc/feed/channel/UCP5tjEmvPItGyLhmjdwP7Ww "~YT - RealLifeLore" +https://inv.vern.cc/feed/channel/UCQ-W1KE9EYfdxhL6S4twUNw "~YT - The Cherno" +https://inv.vern.cc/feed/channel/UCQX_MZRCaluNKxkywkLEgfA "~YT - Date un Vlog" +https://inv.vern.cc/feed/channel/UCS-WzPVpAAli-1IfEG2lN8A "~YT - Michael MJD" +https://inv.vern.cc/feed/channel/UCS0N5baNlQWJCUrhCEo8WlA "~YT - Ben Eater" +https://inv.vern.cc/feed/channel/UCS97tchJDq17Qms3cux8wcA "~YT - chris@machine" +https://inv.vern.cc/feed/channel/UCSju5G2aFaWMqn-_0YBtq5A "~YT - Stand-up Maths" +https://inv.vern.cc/feed/channel/UCSuHzQ3GrHSzoBbwrIq3LLA "~YT - NBTV, with Naomi Brockwell" +https://inv.vern.cc/feed/channel/UCTNj4UtgopYu5T8ew8WZPuw "~YT - Cat and Andrew" +https://inv.vern.cc/feed/channel/UCUMwY9iS8oMyWDYIe6_RmoA "~YT - No Boilerplate" +https://inv.vern.cc/feed/channel/UCUyeluBRhGPCW4rPe_UvBZQ "~YT - ThePrimeTime" +https://inv.vern.cc/feed/channel/UCVls1GmFKf6WlTraIb_IaJg "~YT - DistroTube" +https://inv.vern.cc/feed/channel/UCW-HHEyt67RhZ6q21n4p2zQ "~YT - Mac84" +https://inv.vern.cc/feed/channel/UCW0gH2G-cMKAEjEkI4YhnPA "~YT - Nerd of the Rings" +https://inv.vern.cc/feed/channel/UCWyrVfwRL-2DOkzsqrbjo5Q "~YT - NCommander" +https://inv.vern.cc/feed/channel/UCX_WM2O-X96URC5n66G-hvw "~YT - EF - Linux Made Simple" +https://inv.vern.cc/feed/channel/UCYO_jab_esuFRV4b17AJtAw "~YT - 3Blue1Brown" +https://inv.vern.cc/feed/channel/UCYVU6rModlGxvJbszCclGGw "~YT - Rob Braxman Tech" +https://inv.vern.cc/feed/channel/UCa6V1UVOXN4wDm7RDQDoa6g "~YT - El Traductor de Ingeniería" +https://inv.vern.cc/feed/channel/UCbdSYaPD-lr1kW27UJuk8Pw "~YT - QuantumFracture" +https://inv.vern.cc/feed/channel/UCbiGcwDWZjz05njNPrJU7jA "~YT - ExplainingComputers" +https://inv.vern.cc/feed/channel/UCcf2Mr1qNoX51XXDUd3Rquw "~YT - ByteSeb" +https://inv.vern.cc/feed/channel/UCd4XwUn2Lure2NHHjukoCwA "~YT - Linux For Everyone" +https://inv.vern.cc/feed/channel/UCeHOkFGW-7uAZFvq3BXb8YA "~YT - :3ildcat" +https://inv.vern.cc/feed/channel/UCerEIdrEW-IqwvlH8lTQUJQ "~YT - Tech Tangents" +https://inv.vern.cc/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ "~YT - Chris Titus Tech" +https://inv.vern.cc/feed/channel/UCgkyQiY_Q5AlrygIXGWO2Zw "~YT - Tux Traveler" +https://inv.vern.cc/feed/channel/UChI0q9a-ZcbZh7dAu_-J-hg "~YT - Upper Echelon" +https://inv.vern.cc/feed/channel/UCj8orMezFWVcoN-4S545Wtw "~YT - Max Derrat" +https://inv.vern.cc/feed/channel/UCjFaPUcJU1vwk193mnW_w1w "~YT - Modern Vintage Gamer" +https://inv.vern.cc/feed/channel/UCjSEJkpGbcZhvo0lr-44X_w "~YT - TechHut" +https://inv.vern.cc/feed/channel/UCjgS6Uyg8ok4Jd_lH_MUKgg "~YT - Claus Kellerman" +https://inv.vern.cc/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w "~YT - Louis Rossmann" +https://inv.vern.cc/feed/channel/UCl8XUDjAOLc7GNKcDp9Nepg "~YT - Locos por Linux" +https://inv.vern.cc/feed/channel/UClVi5MQZ6T0InZYT7oFs6wg "~YT - Mumbling Hugo" +https://inv.vern.cc/feed/channel/UCl_dlV_7ofr4qeP1drJQ-qg "~YT - Tantacrul" +https://inv.vern.cc/feed/channel/UCld68syR8Wi-GY_n4CaoJGA "~YT - Brodie Robertson" +https://inv.vern.cc/feed/channel/UCmw-QGOHbHA5cDAvwwqUTKQ "~YT - Zaney" +https://inv.vern.cc/feed/channel/UCmyGZ0689ODyReHw3rsKLtQ "~YT - Michael Tunnell" +https://inv.vern.cc/feed/channel/UCnIfca4LPFVn8-FjpPVc1ow "~YT - Fedora Project" +https://inv.vern.cc/feed/channel/UCnw3aIEiz60S6O3XcztCVkQ "~YT - PatricianTV" +https://inv.vern.cc/feed/channel/UCoL8olX-259lS1N6QPyP4IQ "~YT - Action Retro" +https://inv.vern.cc/feed/channel/UCoryWpk4QVYKFCJul9KBdyw "~YT - Switched to Linux" +https://inv.vern.cc/feed/channel/UCoxcjq-8xIDTYp3uz647V5A "~YT - Numberphile" +https://inv.vern.cc/feed/channel/UCpuKDBw8IVIdKWPhiB2VDNQ "~YT - Cinematix" +https://inv.vern.cc/feed/channel/UCpuLiczP2Aqq11Gtf4k_fkw "~YT - Futurasound Productions" +https://inv.vern.cc/feed/channel/UCqxM9T6ksiOVKIkb88S2r7Q "~YT - Zac Builds" +https://inv.vern.cc/feed/channel/UCrkPsvLGln62OMZRO6K-llg "~YT - Nick Chapsas" +https://inv.vern.cc/feed/channel/UCs6KfncB4OV6Vug4o_bzijg "~YT - Techlore" +https://inv.vern.cc/feed/channel/UCs7nPQIEba0T3tGOWWsZpJQ "~YT - Like Stories of Old" +https://inv.vern.cc/feed/channel/UCsBjURrPoezykLs9EqgamOA "~YT - Fireship" +https://inv.vern.cc/feed/channel/UCsnGwSIHyoYN0kiINAGUKxg "~YT - Wolfgang's Channel" +https://inv.vern.cc/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ "~YT - SomeOrdinaryGamers" +https://inv.vern.cc/feed/channel/UCvFGf8HZGZWFzpcDCqb3Lhw "~YT - All Things Secured" +https://inv.vern.cc/feed/channel/UCvjgXvBlbQiydffZU7m1_aw "~YT - The Coding Train" +https://inv.vern.cc/feed/channel/UCwEEjrUYHDyQsYPTQdNVacg "~YT - Jacob Pradels" +https://inv.vern.cc/feed/channel/UCwGX2cE21VPBEJ49hcprP9w "~YT - SupraPixel" +https://inv.vern.cc/feed/channel/UCxQKHvKbmSzGMvUrVtJYnUA "~YT - Learn Linux TV" +https://inv.vern.cc/feed/channel/UCxkw-TfCK1t1VKxfHwPzD6w "~YT - Our Walk in Christ" +https://inv.vern.cc/feed/channel/UCy0tKL1T7wFoYcxCe0xjN6Q "~YT - Technology Connections" +https://inv.vern.cc/feed/channel/UCybBViio_TH_uiFFDJuz5tg "~YT - Einzelgänger" +https://inv.vern.cc/feed/channel/UCylGUf9BvQooEFjgdNudoQg "~YT - The Linux Cast" +https://inv.vern.cc/feed/channel/UCz1oFxMrgrQ82-276UCOU9w "~YT - Atlas Pro" +https://inv.vern.cc/feed/channel/UCzGMBzt6UOMoQe_dqOfShZw "~YT - Cultura VJ" +https://inv.vern.cc/feed/channel/UCzXsTSZDoAPSjfHr8IZM9Ew "~YT - FloatyMonkey" diff --git a/user/.config/picom/picom.conf b/user/.config/picom/picom.conf index 14d2490f7..2b96a99b0 100644 --- a/user/.config/picom/picom.conf +++ b/user/.config/picom/picom.conf @@ -4,49 +4,32 @@ ## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) ## /_____/_/ \__,_/_/|_|\___/ My custom picom config -## Animations -animations = true -# `auto`, `none`, `fly-in`, `zoom`, `slide-down`, `slide-up`, `slide-left`, `slide-right` `slide-in`, `slide-out` -animation-for-transient-window = "zoom" -animation-for-open-window = "zoom" -animation-for-unmap-window = "zoom" -animation-for-menu-window = "zoom" -animation-for-workspace-switch-out = "zoom" -animation-for-workspace-switch-in = "zoom" -animation-stiffness = 500; -animation-dampening = 20; -animation-window-mass = 1; -animation-clamping = true; -animation-delta = 16; -#animation-force-steps = true; - - ## Shadows shadow = false; -# shadow-radius = 8; -# shadow-opacity = .90 -# shadow-offset-x = -10; -# shadow-offset-y = -10; -# shadow-red = 0 -# shadow-green = 0 -# shadow-blue = 0 -# shadow-color = "#000000" -# shadow-exclude = [ -# "name = 'Notification'", -# "class_g = 'Conky'", -# "class_g ?= 'Notify-osd'", -# "class_g = 'Cairo-clock'", -# "_GTK_FRAME_EXTENTS@:c" -# ]; +#shadow-radius = 8; +#shadow-opacity = .90 +#shadow-offset-x = -10; +#shadow-offset-y = -10; +# shadow-red = 0 +# shadow-green = 0 +# shadow-blue = 0 +# shadow-color = "#000000" +#shadow-exclude = [ +# "name = 'Notification'", +# "class_g = 'Conky'", +# "class_g ?= 'Notify-osd'", +# "class_g = 'Cairo-clock'", +# "_GTK_FRAME_EXTENTS@:c" +#]; ## Fading fading = false; -# fade-in-step = 0.05; -# fade-out-step = 0.05; -# fade-delta = 8 -# fade-exclude = [] -# no-fading-openclose = false -# no-fading-destroyed-argb = false +#fade-in-step = 0.05; +#fade-out-step = 0.05; +#fade-delta = 8 +#fade-exclude = [] +no-fading-openclose = true +#no-fading-destroyed-argb = false ## Transparency and opacity inactive-opacity = 1.00; @@ -55,17 +38,8 @@ inactive-opacity-override = false; focus-exclude = [ "class_g = 'Cairo-clock'" ]; # opaity-rule = [] -## Blur -# blur-background = true; -# blur-background-frame = true; -# blur-background-fixed = true; -# #blur-method = "dual_kawase"; -# blur-kern = "3x3box"; -# blur-method = "kawase"; -# blur-strength = 2; - ## General Settings -backend = "xrender"; +backend = "glx"; vsync = true; dbe = false; detect-client-opacity = true; @@ -73,7 +47,8 @@ refresh-rate = 60; detect-transient = true; glx-no-stencil = true; use-damage = true; -unredir-if-possible = false; +unredir-if-possible = true; +no-frame-pacing = true; #unredir-if-possible-exclude = [ # "class_g = 'looking-glass-client' && !focused" #]; diff --git a/user/.config/qutebrowser/bookmarks/urls b/user/.config/qutebrowser/bookmarks/urls new file mode 100644 index 000000000..d2f2b0df8 --- /dev/null +++ b/user/.config/qutebrowser/bookmarks/urls @@ -0,0 +1,26 @@ +https://mail.google.com/ gmail +https://app.tuta.com/ tutanota +https://mail.proton.me/ proton-mail +https://outlook.live.com/mail outlook +https://odysee.com/ odysee +https://pi.ggtyler.dev/ youtube +https://beatbump.io/ youtube-music +https://fosstodon.org/ mastodon +https://beehaw.org/ beehaw +https://pixelfed.social/ pixelfed +https://github.com/ github +https://app.element.io/ element +https://app.revolt.chat/ revolt +https://web.whatsapp.com/ whatsapp +https://discord.com/app discord +https://outlook.office.com/ intec-correo +https://campusvirtual.intec.edu.do/ intec-aula-virtual +https://procesos.intec.edu.do/ intec-procesos +https://amazon.com/ amazon +https://mega.nz/ mega +https://drive.google.com/drive/my-drive google-drive +https://clientes.eps.com.do/ eps +https://libgen.li/ libgen +https://annas-archive.org/ annas-archive +https://lt.vern.cc libretranslate +https://cloud.digitalocean.com/login digitalocean diff --git a/user/.config/qutebrowser/config.py b/user/.config/qutebrowser/config.py new file mode 100644 index 000000000..6c9e4b5fe --- /dev/null +++ b/user/.config/qutebrowser/config.py @@ -0,0 +1,248 @@ +## ____ __ +## / __ \_________ _/ /_____ +## / / / / ___/ __ `/ //_/ _ \ +## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) +## /_____/_/ \__,_/_/|_|\___/ My custom qutebrowser config +## + +# NOTE: config.py is intended for advanced users who are comfortable +# with manually migrating the config file on qutebrowser upgrades. If +# you prefer, you can also configure qutebrowser using the +# :set/:bind/:config-* commands without having to write a config.py +# file. +# +# Documentation: +# qute://help/configuring.html +# qute://help/settings.html + +# Uncomment this to still load settings configured via autoconfig.yml +# config.load_autoconfig() +# Or uncomment this line to load settings from config.py +config.load_autoconfig(False) + +# Aliases for commands. The keys of the given dictionary are the +# aliases, while the values are the commands they map to. +# Type: Dict +c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'} + +# Setting dark mode +#config.set("colors.webpage.darkmode.enabled", True) + +# Which cookies to accept. With QtWebEngine, this setting also controls +# other features with tracking capabilities similar to those of cookies; +# including IndexedDB, DOM storage, filesystem API, service workers, and +# AppCache. Note that with QtWebKit, only `all` and `never` are +# supported as per-domain values. Setting `no-3rdparty` or `no- +# unknown-3rdparty` per-domain on QtWebKit will have the same effect as +# `all`. +# Type: String +# Valid values: +# - all: Accept all cookies. +# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail. +# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty. +# - never: Don't accept cookies at all. +config.set('content.cookies.accept', 'all', 'chrome-devtools://*') + +# Which cookies to accept. With QtWebEngine, this setting also controls +# other features with tracking capabilities similar to those of cookies; +# including IndexedDB, DOM storage, filesystem API, service workers, and +# AppCache. Note that with QtWebKit, only `all` and `never` are +# supported as per-domain values. Setting `no-3rdparty` or `no- +# unknown-3rdparty` per-domain on QtWebKit will have the same effect as +# `all`. +# Type: String +# Valid values: +# - all: Accept all cookies. +# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail. +# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty. +# - never: Don't accept cookies at all. +config.set('content.cookies.accept', 'all', 'devtools://*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}', 'https://web.whatsapp.com/') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://accounts.google.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://docs.google.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/120.0', 'https://*.google.com/*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'chrome-devtools://*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome-devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome://*/*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'qute://*/*') + +# Directory to save downloads to. If unset, a sensible OS-specific +# default is used. +# Type: Directory +c.downloads.location.directory = '~/var/downloads' + +# When to show the tab bar. +# Type: String +# Valid values: +# - always: Always show the tab bar. +# - never: Always hide the tab bar. +# - multiple: Hide the tab bar if only one tab is open. +# - switching: Show the tab bar when switching tabs. +c.tabs.show = 'always' + +# Setting default page for when opening new tabs or new windows with +# commands like :open -t and :open -w . +c.url.default_page = 'https://start.duckduckgo.com' +c.url.start_pages = 'https://start.duckduckgo.com' + +# Search engines which can be used via the address bar. Maps a search +# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` +# placeholder. The placeholder will be replaced by the search term, use +# `{{` and `}}` for literal `{`/`}` braces. The following further +# placeholds are defined to configure how special characters in the +# search terms are replaced by safe characters (called 'quoting'): * +# `{}` and `{semiquoted}` quote everything except slashes; this is the +# most sensible choice for almost all search engines (for the search +# term `slash/and&` this placeholder expands to `slash/and%26amp`). +# * `{quoted}` quotes all characters (for `slash/and&` this +# placeholder expands to `slash%2Fand%26amp`). * `{unquoted}` quotes +# nothing (for `slash/and&` this placeholder expands to +# `slash/and&`). The search engine named `DEFAULT` is used when +# `url.auto_search` is turned on and something else than a URL was +# entered to be opened. Other search engines can be used by prepending +# the search engine name to the search term, e.g. `:open google +# qutebrowser`. +# Type: Dict +c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}'} + +# Default font families to use. Whenever "default_family" is used in a +# font setting, it's replaced with the fonts listed here. If set to an +# empty value, a system-specific monospace default is used. +# Type: List of Font, or Font +c.fonts.default_family = '"mononoki Nerd Font"' + +# Default font size to use. Whenever "default_size" is used in a font +# setting, it's replaced with the size listed here. Valid values are +# either a float value with a "pt" suffix, or an integer value with a +# "px" suffix. +# Type: String +c.fonts.default_size = '10pt' + +# Font used in the completion widget. +# Type: Font +c.fonts.completion.entry = '10pt "mononoki Nerd Font"' + +# Font used for the debugging console. +# Type: Font +c.fonts.debug_console = '10pt "mononoki Nerd Font"' + +# Font used for prompts. +# Type: Font +c.fonts.prompts = 'default_size sans-serif' + +# Font used in the statusbar. +# Type: Font +c.fonts.statusbar = '10pt "mononoki Nerd Font"' + +config.source('gruvbox.py') + +# Bindings for normal mode +config.bind('M', 'hint links spawn mpv {hint-url}') +config.bind('Z', 'hint links spawn st -e youtube-dl {hint-url}') +config.bind('t', 'set-cmd-text -s :open -t') +config.bind('xb', 'config-cycle statusbar.show always never') +config.bind('xt', 'config-cycle tabs.show always never') +config.bind('xx', 'config-cycle statusbar.show always never;; config-cycle tabs.show always never') + +# configs +config.set('content.notifications.enabled', False) +config.set('content.blocking.method', 'both') +config.set('content.blocking.enabled', True) +config.set('content.autoplay', False) +config.set('content.register_protocol_handler', False) diff --git a/user/.config/qutebrowser/gruvbox.py b/user/.config/qutebrowser/gruvbox.py new file mode 100644 index 000000000..e800f689f --- /dev/null +++ b/user/.config/qutebrowser/gruvbox.py @@ -0,0 +1,333 @@ +# gruvbox dark hard qutebrowser theme by Florian Bruhin +# +# Originally based on: +# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) +# Base16 qutebrowser template by theova and Daniel Mulford +# Gruvbox dark, hard scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +bg0_hard = "#1d2021" +bg0_soft = '#32302f' +bg0_normal = '#282828' + +bg0 = bg0_normal +bg1 = "#3c3836" +bg2 = "#504945" +bg3 = "#665c54" +bg4 = "#7c6f64" + +fg0 = "#fbf1c7" +fg1 = "#ebdbb2" +fg2 = "#d5c4a1" +fg3 = "#bdae93" +fg4 = "#a89984" + +bright_red = "#fb4934" +bright_green = "#b8bb26" +bright_yellow = "#fabd2f" +bright_blue = "#83a598" +bright_purple = "#d3869b" +bright_aqua = "#8ec07c" +bright_gray = "#928374" +bright_orange = "#fe8019" + +dark_red = "#cc241d" +dark_green = "#98971a" +dark_yellow = "#d79921" +dark_blue = "#458588" +dark_purple = "#b16286" +dark_aqua = "#689d6a" +dark_gray = "#a89984" +dark_orange = "#d65d0e" + +### Completion + +# Text color of the completion widget. May be a single color to use for +# all columns or a list of three colors, one for each column. +c.colors.completion.fg = [fg1, bright_aqua, bright_yellow] + +# Background color of the completion widget for odd rows. +c.colors.completion.odd.bg = bg0 + +# Background color of the completion widget for even rows. +c.colors.completion.even.bg = c.colors.completion.odd.bg + +# Foreground color of completion widget category headers. +c.colors.completion.category.fg = bright_blue + +# Background color of the completion widget category headers. +c.colors.completion.category.bg = bg1 + +# Top border color of the completion widget category headers. +c.colors.completion.category.border.top = c.colors.completion.category.bg + +# Bottom border color of the completion widget category headers. +c.colors.completion.category.border.bottom = c.colors.completion.category.bg + +# Foreground color of the selected completion item. +c.colors.completion.item.selected.fg = fg0 + +# Background color of the selected completion item. +c.colors.completion.item.selected.bg = bg4 + +# Top border color of the selected completion item. +c.colors.completion.item.selected.border.top = bg2 + +# Bottom border color of the selected completion item. +c.colors.completion.item.selected.border.bottom = c.colors.completion.item.selected.border.top + +# Foreground color of the matched text in the selected completion item. +c.colors.completion.item.selected.match.fg = bright_orange + +# Foreground color of the matched text in the completion. +c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg + +# Color of the scrollbar handle in the completion view. +c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg + +# Color of the scrollbar in the completion view. +c.colors.completion.scrollbar.bg = c.colors.completion.category.bg + +### Context menu + +# Background color of disabled items in the context menu. +c.colors.contextmenu.disabled.bg = bg3 + +# Foreground color of disabled items in the context menu. +c.colors.contextmenu.disabled.fg = fg3 + +# Background color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.bg = bg0 + +# Foreground color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.fg = fg2 + +# Background color of the context menu's selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.bg = bg2 + +#Foreground color of the context menu's selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg + +### Downloads + +# Background color for the download bar. +c.colors.downloads.bar.bg = bg0 + +# Color gradient start for download text. +c.colors.downloads.start.fg = bg0 + +# Color gradient start for download backgrounds. +c.colors.downloads.start.bg = bright_blue + +# Color gradient end for download text. +c.colors.downloads.stop.fg = c.colors.downloads.start.fg + +# Color gradient stop for download backgrounds. +c.colors.downloads.stop.bg = bright_aqua + +# Foreground color for downloads with errors. +c.colors.downloads.error.fg = bright_red + +### Hints + +# Font color for hints. +c.colors.hints.fg = bg0 + +# Background color for hints. +c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow + +# Font color for the matched part of hints. +c.colors.hints.match.fg = bg4 + +### Keyhint widget + +# Text color for the keyhint widget. +c.colors.keyhint.fg = fg4 + +# Highlight color for keys to complete the current keychain. +c.colors.keyhint.suffix.fg = fg0 + +# Background color of the keyhint widget. +c.colors.keyhint.bg = bg0 + +### Messages + +# Foreground color of an error message. +c.colors.messages.error.fg = bg0 + +# Background color of an error message. +c.colors.messages.error.bg = bright_red + +# Border color of an error message. +c.colors.messages.error.border = c.colors.messages.error.bg + +# Foreground color of a warning message. +c.colors.messages.warning.fg = bg0 + +# Background color of a warning message. +c.colors.messages.warning.bg = bright_purple + +# Border color of a warning message. +c.colors.messages.warning.border = c.colors.messages.warning.bg + +# Foreground color of an info message. +c.colors.messages.info.fg = fg2 + +# Background color of an info message. +c.colors.messages.info.bg = bg0 + +# Border color of an info message. +c.colors.messages.info.border = c.colors.messages.info.bg + +### Prompts + +# Foreground color for prompts. +c.colors.prompts.fg = fg2 + +# Border used around UI elements in prompts. +c.colors.prompts.border = f'1px solid {bg1}' + +# Background color for prompts. +c.colors.prompts.bg = bg3 + +# Background color for the selected item in filename prompts. +c.colors.prompts.selected.bg = bg2 + +### Statusbar + +# Foreground color of the statusbar. +c.colors.statusbar.normal.fg = fg2 + +# Background color of the statusbar. +c.colors.statusbar.normal.bg = bg0 + +# Foreground color of the statusbar in insert mode. +c.colors.statusbar.insert.fg = bg0 + +# Background color of the statusbar in insert mode. +c.colors.statusbar.insert.bg = dark_aqua + +# Foreground color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.fg = bg0 + +# Background color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.bg = dark_blue + +# Foreground color of the statusbar in private browsing mode. +c.colors.statusbar.private.fg = bright_purple + +# Background color of the statusbar in private browsing mode. +c.colors.statusbar.private.bg = bg0 + +# Foreground color of the statusbar in command mode. +c.colors.statusbar.command.fg = fg3 + +# Background color of the statusbar in command mode. +c.colors.statusbar.command.bg = bg1 + +# Foreground color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg + +# Background color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg + +# Foreground color of the statusbar in caret mode. +c.colors.statusbar.caret.fg = bg0 + +# Background color of the statusbar in caret mode. +c.colors.statusbar.caret.bg = dark_purple + +# Foreground color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg + +# Background color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.bg = bright_purple + +# Background color of the progress bar. +c.colors.statusbar.progress.bg = bright_blue + +# Default foreground color of the URL in the statusbar. +c.colors.statusbar.url.fg = fg4 + +# Foreground color of the URL in the statusbar on error. +c.colors.statusbar.url.error.fg = dark_red + +# Foreground color of the URL in the statusbar for hovered links. +c.colors.statusbar.url.hover.fg = bright_orange + +# Foreground color of the URL in the statusbar on successful load +# (http). +c.colors.statusbar.url.success.http.fg = bright_red + +# Foreground color of the URL in the statusbar on successful load +# (https). +c.colors.statusbar.url.success.https.fg = fg0 + +# Foreground color of the URL in the statusbar when there's a warning. +c.colors.statusbar.url.warn.fg = bright_purple + +### tabs + +# Background color of the tab bar. +c.colors.tabs.bar.bg = bg0 + +# Color gradient start for the tab indicator. +c.colors.tabs.indicator.start = bright_blue + +# Color gradient end for the tab indicator. +c.colors.tabs.indicator.stop = bright_aqua + +# Color for the tab indicator on errors. +c.colors.tabs.indicator.error = bright_red + +# Foreground color of unselected odd tabs. +c.colors.tabs.odd.fg = fg2 + +# Background color of unselected odd tabs. +c.colors.tabs.odd.bg = bg2 + +# Foreground color of unselected even tabs. +c.colors.tabs.even.fg = c.colors.tabs.odd.fg + +# Background color of unselected even tabs. +c.colors.tabs.even.bg = bg3 + +# Foreground color of selected odd tabs. +c.colors.tabs.selected.odd.fg = fg2 + +# Background color of selected odd tabs. +c.colors.tabs.selected.odd.bg = bg0 + +# Foreground color of selected even tabs. +c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg + +# Background color of selected even tabs. +c.colors.tabs.selected.even.bg = bg0 + +# Background color of pinned unselected even tabs. +c.colors.tabs.pinned.even.bg = bright_green + +# Foreground color of pinned unselected even tabs. +c.colors.tabs.pinned.even.fg = bg2 + +# Background color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.bg = bright_green + +# Foreground color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg + +# Background color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.bg = bg0 + +# Foreground color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg + +# Background color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg + +# Foreground color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg + +# Background color for webpages if unset (or empty to use the theme's +# color). +c.colors.webpage.bg = bg4 + diff --git a/user/.config/rofi/scripts/rofi_emoji b/user/.config/rofi/scripts/rofi_emoji index 475c053df..fc104de10 100755 --- a/user/.config/rofi/scripts/rofi_emoji +++ b/user/.config/rofi/scripts/rofi_emoji @@ -1,11 +1,5 @@ #!/bin/bash -wtype 0 -if [ $? -eq 0 ] -then - sed '1,/^### DATA ###$/d' $0 | rofi -dmenu -i -p " 󰙃 Select Emoji " | cut -d ' ' -f 1 | tr -d '\n' | wtype - -else - sed '1,/^### DATA ###$/d' $0 | rofi -dmenu -i -p " 󰙃 Select Emoji " | cut -d ' ' -f 1 | tr -d '\n' | xclip -selection c -fi +sed '1,/^### DATA ###$/d' $0 | rofi -dmenu -i -p " 󰙃 Select Emoji " | cut -d ' ' -f 1 | tr -d '\n' | xclip -selection c exit ### DATA ### 😀 grinning face face smile happy joy :D grin diff --git a/user/.config/rofi/scripts/rofi_power b/user/.config/rofi/scripts/rofi_power index 543afdc35..6ea5b581a 100755 --- a/user/.config/rofi/scripts/rofi_power +++ b/user/.config/rofi/scripts/rofi_power @@ -2,64 +2,101 @@ # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple power menu rofi script -# - Dependencies: rofi, power-profiles-daemon, swaylock -# +# - Dependencies: rofi, power-profiles-daemon, betterlockscreen -## MENU PROMPT ## -menu="rofi -dmenu -i -p" - -## OPTIONS ## +####################### +## Main manu options ## +####################### option1=" Logout" option2=" Reboot" option3=" Power off" option4="󰒲 Suspend" option5=" Lock" option6=" Change power profile" -option7=" Cancel" +option7="󱎘 Exit" options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7" -## POWER PROFILE OPTIONS ## +#################################### +## Power profiles submenu options ## +#################################### pwr1="󰓅 Performance" pwr2="󰾅 Balanced" pwr3="󰾆 Power Saver" pwr4=" Cancel" pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4" -## MAIN ACTION COMMAND ## -action=$(echo -e "$options" | $menu "  Power Options ") +##### +## This variable will store the current power profile +##### +currentpwr=$(powerprofilesctl get) + +##### +## This variable will store the current wallpaper set by feh +##### +currentwall=$(tail --lines=1 "$HOME/.fehbg" | awk '{print $4}' | sed "s/'//g") + +########## +## main ## +########## +action=$(echo -e "$options" | rofi -dmenu -i -p "  Power Options "); # main menu prompt case "$action" in - $option1) - pkill X;; - $option2) - systemctl reboot || loginctl reboot;; - $option3) - systemctl poweroff || loginctl poweroff;; - $option4) - betterlockscreen -l & - sleep 0.1 - systemctl suspend;; - $option5) - betterlockscreen -l;; - $option6) - currentpwr=$(powerprofilesctl get) + "$option1") + pkill awesome + ;; + "$option2") + systemctl reboot + ;; + "$option3") + systemctl poweroff + ;; + "$option4") + betterlockscreen -l -q + sleep 1 + systemctl suspend + ;; + "$option5") + betterlockscreen -l -q + ;; + "$option6") + ##### + ## These conditions will be used for the prompt + ##### if [ "$currentpwr" = "performance" ]; then - currentpwr="$pwr1" + currentpwr="$pwr1"; elif [ "$currentpwr" = "balanced" ]; then - currentpwr="$pwr2" + currentpwr="$pwr2"; elif [ "$currentpwr" = "power-saver" ]; then - currentpwr="$pwr3" + currentpwr="$pwr3"; fi - pwraction=$(echo -e "$pwrs" | $menu "  Power Profile Menu - Currently set to: ${currentpwr} ") + pwraction=$(echo -e "$pwrs" | rofi -dmenu -i -p "  Power Profile Menu - Currently set to: $currentpwr ") # power profiles submenu prompt case "$pwraction" in - $pwr1*) - powerprofilesctl set performance && notify-send "Power profile switched to performance";; - $pwr2*) - powerprofilesctl set balanced && notify-send "Power profile switched to balanced";; - $pwr3*) - powerprofilesctl set power-saver && notify-send "Power profile switched to power saver";; - $pwr4*) - exit 0 + "$pwr1") + if [ "$currentpwr" = "$pwr1" ]; then # if the power profile is already set to performance + notify-send "The power profile is already set to performance"; + exit 1; + else + powerprofilesctl set performance && notify-send "Power profile switched to performance"; # if not, set the powerprofile to performance + fi + ;; + "$pwr2") + if [ "$currentpwr" = "$pwr2" ]; then # if the power profile is already set to balanced + notify-send "The power profile is already set to balanced"; + exit 1; + else + powerprofilesctl set balanced && notify-send "Power profile switched to balanced"; # if not, set the powerprofile to balanced + fi + ;; + "$pwr3") + if [ "$currentpwr" = "$pwr3" ]; then # if the power profile is already set to power saver + notify-send "The power profile is already set to power saver"; + exit 1; + else + powerprofilesctl set power-saver && notify-send "Power profile switched to power saver"; # if not, set the powerprofile to power saver + fi + ;; + "$pwr4") + exit 0; esac;; - $option7) - exit 0 + "$option7") + exit 0; esac diff --git a/user/.config/rofi/scripts/rofi_scrot b/user/.config/rofi/scripts/rofi_scrot index 90899b4a7..6549daf7b 100755 --- a/user/.config/rofi/scripts/rofi_scrot +++ b/user/.config/rofi/scripts/rofi_scrot @@ -1,43 +1,331 @@ #!/usr/bin/env bash # ***This script was made by Clay Gomera (Drake)*** -# - Description: A simple screenshot dmenu script -# - Dependencies: escrotum, dmenu, notify-send +# - Description: A simple screenshot rofi script +# - Dependencies: main, slop, ffmpeg, xdotool, xdpyinfo, rofi, notify-send -## CREATING SCREENSHOT FOLDER ## -mkdir -p "$HOME/Media/Pictures/Screenshots" -cd "$HOME/Media/Pictures/Screenshots" || exit 0 +## Screenshot & Screencast Directory +SHOTDIR="$XDG_PICTURES_DIR/Screenshots" +CASTDIR="$XDG_VIDEOS_DIR/Screencasts" +mkdir -p "$SHOTDIR" "$CASTDIR" -## CHOICES ## -cho1="󱣴 Entire screen" -cho2="󱎫 Entire screen with delay" -cho3="󱕻 Select window or area" -cho4="󱎘 Exit" -chos="$cho1\n$cho2\n$cho3\n$cho4" +## Format Variables +image_formats="jpg\npng" +video_formats="mp4\nmkv" -## DELAY OPTIONS ## +## Main menu choices +mcho1="󰹑 Take a screenshot" +mcho2="󰐍 Record the screen" +mcho3="󰙧 Stop recording" +mcho4="󱎘 Exit" +mchos="$mcho1\n$mcho2\n$mcho3\n$mcho4" + +## Main submenu choices +mscho1="󱣴 Capture the entire screen" +mscho2="󱎫 Capture the entire screen (With delay)" +mscho3="󱕻 Capture area" +mscho4="󰖯 Capture active window" +mscho5="󱎘 Exit" +mschos="$mscho1\n$mscho2\n$mscho3\n$mscho4\n$mscho5" + +## Save/clip submenu choices +svcho1="󰆏 Copy to clipboard" +svcho2="󰠘 Save to $SHOTDIR" +svchos="$svcho1\n$svcho2" + +## Delay subsubmenu del1="󱑀 3 sec delay" del2="󱑂 5 sec delay" del3="󱑇 10 sec delay" dels="$del1\n$del2\n$del3" -## MAIN ACTION ## -choice=$(echo -e "$chos" | rofi -dmenu -i -p "  Sreenshot Menu ") -case $choice in - "$cho1") - escrotum && notify-send "Screenshot saved";; - "$cho2") - del=$(echo -e "$dels" | rofi -dmenu -i -p "  Select Delay "); +##### +## This function will check for dependencies +##### +check_dependencies() { + local dependencies=("maim" "ffmpeg" "rofi" "notify-send" "xclip" "xdotool" "xdpyinfo") + for dep in "${dependencies[@]}"; do + if ! command -v "$dep" &>/dev/null; then + echo "$dep is required but not installed. Please install it and try again." + exit 1 + fi + done +} + +##### +## This function uses the svchos variable to ask the user what to do with the +## screenshot +##### +fsvchos() { + svchoice=$(echo -e "$svchos" | rofi -dmenu -i -p "  What do you want to do with this screenshot? ") +} + +##### +## This function uses the dels variable to ask the user which delay option to +## choose +##### +fdel() { + del=$(echo -e "$dels" | rofi -dmenu -i -p "  Select Delay ") +} + +##### +## This function allows the user to choose the screenshot format +##### +fimage_format() { + image_format=$(echo -e "$image_formats" | rofi -dmenu -i -p "  Choose screenshot format ") +} + +##### +## This function allows the user to choose the recording format +##### +fvideo_format() { + video_format=$(echo -e "$video_formats" | rofi -dmenu -i -p "  Choose video format ") +} + +##### +## This function does a full screen screenshot without delay, depending on what +## the user chooses on the fsvchos function, the screenshot will be saved to the +## clipboard or to $SHOTDIR +##### +shot_screen() { + fimage_format + fsvchos + if [ "$svchoice" = "$svcho1" ]; then + maim | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard" + elif [ "$svchoice" = "$svcho2" ]; then + maim -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved" + else + exit 0 + fi +} + +##### +## This function does a full screen screenshot with delay, depending on what the +## user chooses on the fsvchos function, the screenshot will be saved to the +## clipboard or to $SHOTDIR. And depending on what the user chooses on the fdel +## function, the delay will be between 3 and 10 seconds +##### +shot_screen_delay() { + fimage_format + fsvchos + fdel case $del in - "$del1") - escrotum -d 3 -C && notify-send "Screenshot saved";; - "$del2") - escrotum -d 5 -C && notify-send "Screenshot saved";; - "$del3") - escrotum -d 10 -C && notify-send "Screenshot saved" - esac ;; - "$cho3") - escrotum -s && notify-send "Screenshot saved.";; - "$cho4") - exit 0 + "$del1") + for i in 3 2 1; do + notify-send -t 1000 "Capturing in $i.." + sleep 1 + done + ;; + "$del2") + for i in 5 4 3 2 1; do + notify-send -t 1000 "Capturing in $i.." + sleep 1 + done + ;; + "$del3") + for i in 10 9 8 7 6 5 4 3 2 1; do + notify-send -t 1000 "Capturing in $i.." + sleep 1 + done + ;; + esac + + sleep 1 + if [ "$svchoice" = "$svcho1" ]; then + maim | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"; + elif [ "$svchoice" = "$svcho2" ]; then + maim -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"; + else + exit 0 + fi +} + +##### +## This function allows the user to select the area on the screen to screenshot +## depending on what the user chooses on the fsvchos function, the screenshot will +## be saved to the clipboard or to $SHOTDIR +##### +shot_area() { + fimage_format + fsvchos + if [ "$svchoice" = "$svcho1" ]; then + maim -s | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"; + elif [ "$svchoice" = "$svcho2" ]; then + maim -s -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"; + else + exit 0 + fi +} + +##### +## This function does a screenshot of the currently active window, depending +## on what the user chooses on the fsvchos function, the screenshot will be +## saved to the clipboard or to $SHOTDIR +##### +shot_window() { + fimage_format + fsvchos + if [ "$svchoice" = "$svcho1" ]; then + maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"; + elif [ "$svchoice" = "$svcho2" ]; then + maim -i "$(xdotool getactivewindow)" -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"; + else + exit 0 + fi +} + +##### +## This function uses ffmpeg to record the screen, It will check if ffmpeg is +## already running (already recording), to prevent the user from executing +## another ffmpeg instance, if it's not running, it will grab the screen +## resolution with xdpyinfo and use it to record the screen with ffmpeg. +##### +rec_screen() { + fvideo_format + if pgrep -x "ffmpeg" > /dev/null; then + notify-send "A screen recording is already in progress." + else + filename="$CASTDIR/$(date +%s).$video_format" + resolution="$(xdpyinfo | grep dimensions | awk '{print $2}')" + ffmpeg -f x11grab -s "$resolution" -i :0.0 -c:v libx264 -preset ultrafast -qp 0 "$filename" & + notify-send "Screen recording started." + fi +} + +##### +## This function will record the screen with a given delay +##### +rec_screen_delay() { + fvideo_format + fdel + case $del in + "$del1") + for i in 3 2 1; do + notify-send -t 1000 "Starting in $i.." + sleep 1 + done + ;; + "$del2") + for i in 5 4 3 2 1; do + notify-send -t 1000 "Starting in $i.." + sleep 1 + done + ;; + "$del3") + for i in 10 9 8 7 6 5 4 3 2 1; do + notify-send -t 1000 "Starting in $i.." + sleep 1 + done + ;; + esac + + sleep 1 + if pgrep -x "ffmpeg" > /dev/null; then + notify-send "A screen recording is already in progress." + else + filename="$CASTDIR/$(date +%s).$video_format" + resolution="$(xdpyinfo | grep dimensions | awk '{print $2}')" + ffmpeg -f x11grab -s "$resolution" -i :0.0 -c:v libx264 -preset ultrafast -qp 0 "$filename" & + notify-send "Screen recording started" + fi +} + +## This function allows the user to record a selected area of the screen +rec_area() { + fvideo_format + if pgrep -x "ffmpeg" > /dev/null; then + notify-send "A screen recording is already in progress." + else + filename="$CASTDIR/$(date +%s).$video_format" + slop_result=$(slop -f "%x %y %w %h") + if [ -n "$slop_result" ]; then + IFS=' ' read -r x y w h <<< "$slop_result" + ffmpeg -f x11grab -s "${w}x${h}" -i :0.0+"$x","$y" -c:v libx264 -preset ultrafast -qp 0 "$filename" & + notify-send "Screen recording started" + else + notify-send "No area selected. Aborting recording." + fi + fi +} + +## This function allows the user to record the currently active window +rec_window() { + fvideo_format + if pgrep -x "ffmpeg" > /dev/null; then + notify-send "A screen recording is already in progress." + else + filename="$CASTDIR/$(date +%s).$video_format" + active_window_id=$(xdotool getactivewindow) + + if [ -n "$active_window_id" ]; then + ffmpeg -f x11grab -s "$(xdotool getwindowgeometry --shell $active_window_id | grep WIDTH | cut -d'=' -f2)x$(xdotool getwindowgeometry --shell $active_window_id | grep HEIGHT | cut -d'=' -f2)" -i :0.0+"$(xdotool getwindowgeometry --shell $active_window_id | grep X | cut -d'=' -f2)","$(xdotool getwindowgeometry --shell $active_window_id | grep Y | cut -d'=' -f2)" -c:v libx264 -preset ultrafast -qp 0 "$filename" & + notify-send "Recording active window started" + else + notify-send "No active window found. Aborting recording." + fi + fi +} + +##### +## This function stops screen recording, it first checks if ffmpeg is already +## running (already recording), to only stop a recording if there's an ffmpeg +## instance running +##### +stop_recording() { + if pgrep -x "ffmpeg" > /dev/null; then + pkill -f "ffmpeg -f x11grab" + notify-send "Screen recording stopped. Video saved to $CASTDIR" + else + notify-send "You aren't recording anything at the moment" + fi +} + +## main +check_dependencies; +mchoice=$(echo -e "$mchos" | rofi -dmenu -i -p "  Screen Capture Menu ") # main menu prompt +case $mchoice in + "$mcho1") + mschoice=$(echo -e "$mschos" | rofi -dmenu -i -p "  Screenshot Menu ") # screenshot menu prompt + case $mschoice in + "$mscho1") + shot_screen; + ;; + "$mscho2") + shot_screen_delay; + ;; + "$mscho3") + shot_area; + ;; + "$mscho4") + shot_window; + ;; + "$mscho5") + exit 0 + esac + ;; + "$mcho2") + mschoice=$(echo -e "$mschos" | dmenu -i -l 9 -p " Screencast Menu") # screenshot menu prompt + case $mschoice in + "$mscho1") + rec_screen; + ;; + "$mscho2") + rec_screen_delay; + ;; + "$mscho3") + rec_area; + ;; + "$mscho4") + rec_window; + ;; + "$mscho5") + exit 0 + esac + ;; + "$mcho3") + stop_recording; + ;; + "$mcho4") + exit 0; + ;; esac diff --git a/user/.config/rofi/scripts/rofi_wall b/user/.config/rofi/scripts/rofi_wall index a4017a11d..83fae048f 100755 --- a/user/.config/rofi/scripts/rofi_wall +++ b/user/.config/rofi/scripts/rofi_wall @@ -1,25 +1,18 @@ #!/usr/bin/env bash # ***This script was made by Clay Gomera (Drake)*** -# - Description: A simple wallpaper changer script -# - Dependencies: rofi, fd, feh +# - Description: A simple rofi script to set the wallpaper on X +# - Dependencies: rofi, fd, feh, betterlockscreen -## MAIN VARIABLES AND COMMANDS ## -walldir="$HOME/Media/Pictures/Wallpapers" -cd "$walldir" || exit +########################## +## Wallpapers Directory ## +########################## +walldir="$XDG_PICTURES_DIR/Wallpapers" +cd "$walldir" || exit # we cd into $walldir in order to get only the file name on the main prompt -## SELECT PICTURE FUNCTION ## -selectpic() { - wallpaper=$(fd -p "$walldir" | rofi -dmenu -i -p " 󰋩 Select a wallpaper ") - if [ "$wallpaper" ]; then - chosenwall=$wallpaper - else - exit 0 - fi -} -selectpic - -## WALLPAPER SETTING OPTIONS ## +####################### +## Wallpaper options ## +####################### option1="Fill" option2="Center" option3="Tile" @@ -27,18 +20,35 @@ option4="Max" option5="Scale" options="$option1\n$option2\n$option3\n$option4\n$option5" -## MAIN ACTION ## -action=$(echo -e "$options" | rofi -dmenu -i -p "  Chose the format ") +########## +## main ## +########## +wallpaper=$(fd -p ./ | rofi -dmenu -i -p " 󰋩 Select a wallpaper ") # main prompt +if [ "$wallpaper" ]; then # if the user made a choice + chosenwall=$wallpaper # reassign $wallpaper to $chosenwall +else + exit 0 +fi +action=$(echo -e "$options" | rofi -dmenu -i -p "  Chose the format ") # options prompt case "$action" in - $option1*) - feh --bg-fill "$chosenwall";; - $option2*) - feh --bg-center "$chosenwall";; - $option3*) - feh --bg-tile "$chosenwall";; - $option4*) - feh --bg-max "$chosenwall";; - $option5*) - feh --bg-scale "$chosenwall";; + $option1*) + feh --bg-fill "$chosenwall"; + betterlockscreen -u "$chosenwall" -q & + ;; + $option2*) + feh --bg-center "$chosenwall"; + betterlockscreen -u "$chosenwall" -q & + ;; + $option3*) + feh --bg-tile "$chosenwall"; + betterlockscreen -u "$chosenwall" -q & + ;; + $option4*) + feh --bg-max "$chosenwall"; + betterlockscreen -u "$chosenwall" -q & + ;; + $option5*) + feh --bg-scale "$chosenwall"; + betterlockscreen -u "$chosenwall" -q & + ;; esac -exit 0 diff --git a/user/.config/rofi/scripts/rofi_wifi b/user/.config/rofi/scripts/rofi_wifi index 76d1f293e..1b8ac9444 100755 --- a/user/.config/rofi/scripts/rofi_wifi +++ b/user/.config/rofi/scripts/rofi_wifi @@ -2,98 +2,119 @@ # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple wifi rofi script -# - Dependencies: rofi, NetworkManager, io.elementary.capnet-assist +# - Dependencies: rofi, NetworkManager -## MENU PROMPT ## -menu="rofi -dmenu -i -p" - -## MAIN OPTIONS ## +## Main manu options option1=" Turn on WiFi" option2=" Turn off WiFi" option3="󱛅 Disconnect WiFi" option4="󱛃 Connect WiFi" option5="󱛆 Setup captive portal" -option6=" Exit" +option6="󱎘 Exit" options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6" -## GRAB WIFI INTERFACE ## -wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1) +##### +## These variables will store specific information about the wirelessinterface +##### +wifi_info=$(nmcli dev | awk '/wifi/ {print $1,$3; exit}') +read -r wlan constate <<< "$wifi_info" -## TURN OFF WIFI FUNCTION ## +##### +## This function uses nmcli to turn off wifi and then sends a notification +##### turnoff() { - nmcli radio wifi off - notify-send "WiFi has been turned off" + nmcli radio wifi off && notify-send "WiFi has been turned off" } -## TURN ON WIFI FUNCTION ## +##### +## This function uses nmcli to turn on wifi and then sends a notification +##### turnon() { - nmcli radio wifi on - notify-send "WiFi has been turned on" + nmcli radio wifi on && notify-send "WiFi has been turned on" } -## DISCONNECT WIFI FUNCTION ## +##### +## This function uses nmcli and the $wlan and $constate variables to disconnect +## from the wifi network and then sends a notification +##### disconnect() { - nmcli device disconnect "$wlan" - sleep 1 - constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1) - if [ "$constate" = "disconnected" ]; then - notify-send "WiFi has been disconnected" - fi + if [ "$constate" = "disconnected" ]; then + notify-send "WiFi is already disconnected" + elif [ "$constate" = "connected" ]; then + nmcli device disconnect "$wlan" && notify-send "Wifi has been disconnected" + else + exit 1 + fi } -## CONNECT FUNCTION ## +##### +## This function uses nmcli to first scan for available networks and then the +## $bssid variable will store the SSID of the network that the user chooses +##### connect() { - notify-send "Scannig networks, please wait" - sleep 1 - bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $menu " Select a Wifi Network  " | cut -d' ' -f1) + notify-send -t 5000 "Scanning networks..." + nmcli dev wifi rescan + sleep 1 + wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | rofi -dmenu -i -p "  Select a Wifi Network ") + bssid=$(echo "$wifinet" | cut -d' ' -f1) + ssid=$(echo "$wifinet" | cut -d' ' -f3) } -## SELECT PASSWORD FUNCTION ## +##### +## This function will store the WiFi password in the $pass variable +##### password() { - pass=$(echo " " | $menu " Enter Password  " -password) + if nmcli connection show | grep -q "$ssid"; then # check if the network is already saved + return 0 # no password is required + elif nmcli -f BSSID,SECURITY dev wifi list | sed -n '1!p' | grep "$bssid" | awk '{print $2}' | grep -q -- "--"; then # check if the network is open + return 0 # no password is required + else + pass=$(rofi -dmenu -password -p " Enter Password  ") + if [ -n "$pass" ]; then # if the user gave a password + return 0 + else + exit 1 # if not, exit the script + fi + fi } -## MAIN CONNECTION COMMAND ## +##### +## This function will actually connect to the chosen WiFi network using the +## $bssid and $pass variables +##### action() { - nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid" + if [ -n "$pass" ]; then # we need to check again if the $pass variable exists + nmcli dev wifi connect "$bssid" password "$pass" + else # if not, that means that the password() function ended in one of the first two conditions, the network is saved or open + nmcli dev wifi connect "$bssid" + fi } -## CHECKING IF WIFI IS WORKING -check() { - notify-send "Checking if connection was successful" - sleep 1 - currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1) - if ping -q -c 2 -W 2 google.com >/dev/null; then - notify-send "You are now connected to $currentwfi and internet is working properly" - else - notify-send "Your internet is not working :(" - fi -} - -## MAIN ACTION COMMANDS ## -cases=$(echo -e "$options" | $menu "  Wifi Settings " ) -if [ -n "$cases" ]; then - case "$cases" in - $option1) - turnon;; - $option2) - turnoff;; - $option3) - disconnect;; - $option4) - connect; - if [ -n "$bssid" ]; then - password; - action; - check; - else - exit 0; - fi;; - $option5) - "$BROWSER" http://networkcheck.kde.org;; - $option6) - exit 0; - esac -else - exit 0; -fi +########## +## main ## +########## +cases=$(echo -e "$options" | rofi -dmenu -i -p "  Wifi Settings " ) # main menu prompt +case "$cases" in + "$option1") + turnon + ;; + "$option2") + turnoff + ;; + "$option3") + disconnect + ;; + "$option4") + if connect; then # if the user chooses a network + password # this function will exit the script if the user didn't put a password + action + else + exit 1 # if not, exit the script + fi + ;; + "$option5") + "$BROWSER" http://networkcheck.kde.org + ;; + "$option6") + exit 0 +esac diff --git a/user/.config/user-dirs.dirs b/user/.config/user-dirs.dirs index 1d7ebd4f8..6bad0251b 100644 --- a/user/.config/user-dirs.dirs +++ b/user/.config/user-dirs.dirs @@ -5,11 +5,11 @@ # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an # absolute path. No other format is supported. # -XDG_DESKTOP_DIR="$HOME/Temporal/Desktop" -XDG_DOWNLOAD_DIR="$HOME/Temporal/Downloads" -XDG_TEMPLATES_DIR="$HOME/Temporal/Templates" -XDG_PUBLICSHARE_DIR="$HOME/Temporal/Public" -XDG_DOCUMENTS_DIR="$HOME/Documents" -XDG_MUSIC_DIR="$HOME/Media/Music" -XDG_PICTURES_DIR="$HOME/Media/Pictures" -XDG_VIDEOS_DIR="$HOME/Media/Videos" +XDG_DESKTOP_DIR="$HOME/var/desktop" +XDG_DOWNLOAD_DIR="$HOME/var/downloads" +XDG_TEMPLATES_DIR="$HOME/media/templates" +XDG_PUBLICSHARE_DIR="$HOME/var/public" +XDG_DOCUMENTS_DIR="$HOME/media/documents" +XDG_MUSIC_DIR="$HOME/media/music" +XDG_PICTURES_DIR="$HOME/media/pictures" +XDG_VIDEOS_DIR="$HOME/media/videos" diff --git a/user/.config/vifm/colors/gruvbox-dark.vifm b/user/.config/vifm/colors/gruvbox.vifm similarity index 99% rename from user/.config/vifm/colors/gruvbox-dark.vifm rename to user/.config/vifm/colors/gruvbox.vifm index 67e51db93..b72fe7f49 100644 --- a/user/.config/vifm/colors/gruvbox-dark.vifm +++ b/user/.config/vifm/colors/gruvbox.vifm @@ -27,4 +27,3 @@ highlight BrokenLink cterm=bold ctermfg=167 ctermbg=default highlight Device cterm=none,standout ctermfg=214 ctermbg=default highlight Fifo cterm=none ctermfg=172 ctermbg=default highlight Socket cterm=bold ctermfg=223 ctermbg=default - diff --git a/user/.config/vifm/scripts/vifmimg b/user/.config/vifm/scripts/vifmimg new file mode 100755 index 000000000..5888bdd07 --- /dev/null +++ b/user/.config/vifm/scripts/vifmimg @@ -0,0 +1,56 @@ +#!/bin/sh + +PCACHE="$HOME/.cache/vifm/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$PWD/$6")" | sha256sum)" +export PCACHE="${PCACHE%% *}" + +pclear() { + printf '{"action": "remove", "identifier": "vifm-preview"}\n' > "$FIFO_UEBERZUG" +} + +image() { + printf '{"action": "add", "identifier": "vifm-preview", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$2" "$3" "$4" "$5" "$6" > "$FIFO_UEBERZUG" +} + +main() { + case "$1" in + "clear") + pclear "$@" + ;; + "draw") + FILE="$PWD/$6" + image "$1" "$2" "$3" "$4" "$5" "$FILE" + ;; + "video") + [ ! -f "$PCACHE" ] && \ + ffmpegthumbnailer -i "$6" -o "${PCACHE}.jpg" -s 0 -q 5 + image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg" + ;; + "epub") + [ ! -f "$PCACHE" ] && \ + epub-thumbnailer "$6" "$PCACHE" 1024 + image "$1" "$2" "$3" "$4" "$5" "$PCACHE" + ;; + "pdf") + [ ! -f "${PCACHE}.jpg" ] && \ + pdftoppm -jpeg -f 1 -singlefile "$6" "$PCACHE" + image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg" + ;; + "djvu") + [ ! -f "${PCACHE}.jpg" ] && \ + ddjvu -format=tiff -quality=90 -page=1 "$6" "$PCACHE.jpg" + image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg" + ;; + "audio") + [ ! -f "${PCACHE}.jpg" ] && \ + ffmpeg -hide_banner -i "$6" "${PCACHE}.jpg" -y >/dev/null + image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg" + ;; + "font") + [ ! -f "${PCACHE}.jpg" ] && \ + fontpreview -i "$6" -o "${PCACHE}.jpg" + image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg" + ;; + *) + esac +} +main "$@" diff --git a/user/.config/vifm/scripts/vifmrun b/user/.config/vifm/scripts/vifmrun new file mode 100755 index 000000000..ce9af1770 --- /dev/null +++ b/user/.config/vifm/scripts/vifmrun @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ -z "$(command -v vifm)" ]; then + printf "vifm isn't installed on your system!\n" + exit 1 +elif [ -z "$(command -v ueberzug)" ]; then + exec vifm "$@" +else + cleanup() { + exec 3>&- + rm "$FIFO_UEBERZUG" + } + [ ! -d "$HOME/.cache/vifm" ] && mkdir -p "$HOME/.cache/vifm" + export FIFO_UEBERZUG="$HOME/.cache/vifm/ueberzug-${$}" + mkfifo "$FIFO_UEBERZUG" + ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + exec 3>"$FIFO_UEBERZUG" + trap cleanup EXIT + vifm "$@" 3>&- + vifmimg clear +fi diff --git a/user/.config/vifm/vifmrc b/user/.config/vifm/vifmrc index 8a9132834..c65f7b2c3 100644 --- a/user/.config/vifm/vifmrc +++ b/user/.config/vifm/vifmrc @@ -13,7 +13,7 @@ " Since emacs is a GUI app and not a terminal app like vim, append the command " with an ampersand (&). -set vicmd=nvim +set vicmd=~/.local/bin/lvim " This makes vifm perform file operations on its own instead of relying on " standard utilities like `cp`. While using `cp` and alike is a more universal @@ -65,7 +65,7 @@ set norunexec " Selected color scheme " The following line will cause issues if using vifm.vim with regular vim. " Either use neovim or comment out the following line. -colorscheme gruvbox-dark +colorscheme gruvbox " Format for displaying time in file list. For example: " TIME_STAMP_FORMAT=%m/%d-%H:%M @@ -175,7 +175,9 @@ command! reload :write | restart " Pdf and cbz filextype *.cbz,*.pdf zathura %c %i &, apvlv %c, xpdf %c fileviewer *.pdf - \ pdftotext -nopgbrk %c - + \ vifmimg pdf %px %py %pw %ph %c + \ %pc + \ vifmimg clear " PostScript filextype *.ps,*.eps,*.ps.gz @@ -190,24 +192,37 @@ filextype *.djvu \ zathura %f, \ {View in apvlv} \ apvlv %f, +fileviewer *.djvu + \ vifmimg djvu %px %py %pw %ph %c + \ %pc + \ vifmimg clear + +fileviewer *.epub + \ vifmimg epub %px %py %pw %ph %c + \ %pc + \ vifmimg clear " Audio filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus - \ {Play using mpv} - \ mpv %f, -fileviewer *.mp3 mp3info -fileviewer *.flac soxi + \ {Play using mpv} + \ mpv %f, +fileviewer *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus + \ vifmimg audio %px %py %pw %ph %c + \ %pc + \ vifmimg clear " Video filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] + \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, + \*.as[fx] \ {View using mplayer} \ mpv %f, fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ ffprobe -pretty %c 2>&1 + \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, + \*.as[fx] + \ vifmimg video %px %py %pw %ph %c + \ %pc + \ vifmimg clear " Web filextype *.html,*.htm @@ -235,7 +250,15 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ {View in imv} \ imv %f &, fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm,*.gif - \ wezterm imgcat --width %pw --height %ph %c:p %pd + \ vifmimg draw %px %py %pw %ph %c + \ %pc + \ vifmimg clear + +" Fonts +fileviewer *.ttf, *.otf + \ vifmimg font %px %py %pw %ph %c + \ %pc + \ vifmimg clear " OpenRaster filextype *.ora diff --git a/user/.config/wezterm/wezterm.lua b/user/.config/wezterm/wezterm.lua index d1e5d4dce..da17aa4aa 100644 --- a/user/.config/wezterm/wezterm.lua +++ b/user/.config/wezterm/wezterm.lua @@ -2,31 +2,32 @@ local wezterm = require 'wezterm' local gpus = wezterm.gui.enumerate_gpus() return { - font = wezterm.font { - family = 'mononoki Nerd Font', - weight = 'Medium' - }, - color_scheme = 'Gruvbox dark, hard (base16)', - default_prog = { '/usr/bin/fish' }, - default_cursor_style = "BlinkingUnderline", - font_size = 12, - check_for_updates = false, - use_dead_keys = false, - warn_about_missing_glyphs = false, - enable_kitty_graphics = true, - animation_fps = 1, - cursor_blink_rate = 175, - hide_tab_bar_if_only_one_tab = true, - adjust_window_size_when_changing_font_size = false, - window_padding = { - left = 10, - right = 10, - top = 10, - bottom = 10, - }, - use_fancy_tab_bar = false, - exit_behavior = "Close", - window_close_confirmation = 'NeverPrompt', - tab_bar_at_bottom = false, - window_background_opacity = 0.95, + enable_wayland = true, + font = wezterm.font { + family = 'mononoki Nerd Font', + weight = 'Medium' + }, + color_scheme = 'Gruvbox dark, hard (base16)', + default_prog = { '/usr/bin/fish' }, + default_cursor_style = "BlinkingUnderline", + font_size = 14, + check_for_updates = false, + use_dead_keys = false, + warn_about_missing_glyphs = false, + enable_kitty_graphics = true, + animation_fps = 1, + cursor_blink_rate = 175, + hide_tab_bar_if_only_one_tab = true, + adjust_window_size_when_changing_font_size = false, + window_padding = { + left = 10, + right = 10, + top = 10, + bottom = 10, + }, + use_fancy_tab_bar = false, + exit_behavior = "Close", + window_close_confirmation = 'NeverPrompt', + tab_bar_at_bottom = false, + window_background_opacity = 0.98, } diff --git a/user/.config/xsettingsd/xsettingsd.conf b/user/.config/xsettingsd/xsettingsd.conf deleted file mode 100644 index 073055430..000000000 --- a/user/.config/xsettingsd/xsettingsd.conf +++ /dev/null @@ -1,9 +0,0 @@ -Net/ThemeName "gruvbox-dark-gtk" -Net/IconThemeName "gruvbox-dark-icons-gtk" -Gtk/CursorThemeName "Simp1e-Gruvbox-Dark" -Net/EnableEventSounds 1 -EnableInputFeedbackSounds 0 -Xft/Antialias 1 -Xft/Hinting 1 -Xft/HintStyle "hintslight" -Xft/RGBA "rgb" diff --git a/user/.icons/default/index.theme b/user/.local/share/icons/default/index.theme similarity index 100% rename from user/.icons/default/index.theme rename to user/.local/share/icons/default/index.theme diff --git a/user/.xinitrc b/user/.xinitrc index 85614f405..a35599243 100755 --- a/user/.xinitrc +++ b/user/.xinitrc @@ -28,25 +28,44 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -# environment variables +# Environment variables export MOZ_USE_XINPUT2=1 export QT_STYLE_OVERRIDE=kvantum +export XDG_SESSION_TYPE=X11 -# clean home +# Home folders export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" + +# GTK & cursor stuff +export XCURSOR_PATH="$XDG_DATA_HOME/icons/" +export XCURSOR_THEME="Simp1e-Gruvbox-Dark" +export GTK_THEME="gruvbox-dark-gtk" +export GTK_ICON_THEME="gruvbox-dark-icons-gtk" + +# Sanely export XDG Base dir variables +eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" + +# Clean home export W3M_DIR="$XDG_DATA_HOME/w3m" export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0" export WGETRC="$HOME/.config/wget/wgetrc" export INPUTRC="$HOME/.config/inputrc" export GNUPGHOME="$HOME/.local/share/gnupg" +export LESSHISTFILE="-" -# default apps -export EDITOR="emacsclient -t -a ''" -export VISUAL="emacsclient -c -a 'emacs'" -export BROWSER="firefox" +# Create GNUPG & WGETRC directories if they don't exist +if [ ! -d "$HOME/.config/wget/" ] && [ ! -d "$GNUPGHOME" ]; then + mkdir -p "$HOME/.config/wget/" "$GNUPGHOME" +fi + +# Default apps +export TERMINAL="wezterm" +export EDITOR="$HOME/.local/bin/lvim" +export VISUAL="$TERMINAL -c editor -n editor -e $EDITOR" +export BROWSER="qutebrowser" export VIEWER="zathura" # start window manager / desktop environment -exec awesome +dbus-launch awesome