mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-04-24 00:19:09 +00:00
Revise the dotfiles
A big revision for sure. It's the result of tweaking during this outbreak.
This commit is contained in:
parent
5ff033939d
commit
33f1588474
692
README.adoc
692
README.adoc
@ -1,31 +1,34 @@
|
||||
= dotfiles
|
||||
:toc:
|
||||
|
||||
My dotfiles for my Linux-based system setup.
|
||||
The structure of this repo is designed to be managed with https://www.gnu.org/software/stow/[GNU Stow], a symlinks farm manager.
|
||||
My dotfiles for my Linux-based system setup.
|
||||
The structure of this repo is designed to be managed with https://www.gnu.org/software/stow/[GNU Stow], a symlinks farm manager.
|
||||
|
||||
I don't know what I'm doing most of the time in creating this setup so if you're brave (or suicidal) enough to take a look at my stuff (that may or may not be an escaped entry from the SCP Foundation), go ahead.
|
||||
I don't know what I'm doing most of the time in creating this setup so if you're brave (or suicidal) enough to take a look at my stuff, go ahead.
|
||||
Feel free to add a couple of energy boosts (e.g., alcohol, blunts) and a friend for mini-therapy sessions for the upcoming journey.
|
||||
|
||||
CAUTION: Don't blindly apply these dotfiles unless you know what you're doing.
|
||||
Review the code first, change the setting accordingly, and apply it.
|
||||
CAUTION: If I've paid a dollar for every time I've seen similar expression like the following, I would've been paid at least 10 bucks but as they always say: "Don't blindly apply these dotfiles unless you know what you're doing."
|
||||
Review the code first, change the setting accordingly, and apply it on your own.
|
||||
|
||||
|
||||
|
||||
|
||||
== Inspirations
|
||||
|
||||
* https://github.com/addy-dclxvi/almighty-dotfiles/
|
||||
* https://github.com/LukeSmithxyz/voidrice
|
||||
* https://www.reddit.com/r/unixporn/ (pretty much the little details)
|
||||
* Specifically for https://www.reddit.com/r/unixporn/comments/8ezsq7/bspwm_terminal_tabs_in_polybar_dark_and_dull_exam/[the tabbed terminals idea] and the https://github.com/Nikzt/dotfiles[linked dotfiles repo]) (not yet implemented, still cleaning up my stuff)
|
||||
* https://www.reddit.com/r/unixporn/comments/edmb8b/awesome_gnawesome/[Just] https://github.com/ilovecookieee/Glorious-Dotfiles[saving] https://github.com/PapyElGringo/material-awesome[these] for an **awesome** future, hehehe.
|
||||
* https://github.com/addy-dclxvi/almighty-dotfiles/
|
||||
* https://github.com/LukeSmithxyz/voidrice
|
||||
* https://github.com/jethrokuan/dots/ for his Emacs and Org Mode writing setup.
|
||||
He also has a dedicated series on his https://blog.jethro.dev/[blog site] if you want the juicy details.
|
||||
* https://www.reddit.com/r/unixporn/ obviously.
|
||||
* Specifically for https://www.reddit.com/r/unixporn/comments/8ezsq7/bspwm_terminal_tabs_in_polybar_dark_and_dull_exam/[the tabbed terminals idea] and the https://github.com/Nikzt/dotfiles[linked dotfiles repo]) (not yet implemented, still cleaning up my stuff)
|
||||
* https://www.reddit.com/r/unixporn/comments/edmb8b/awesome_gnawesome/[Just] https://github.com/ilovecookieee/Glorious-Dotfiles[saving] https://github.com/PapyElGringo/material-awesome[these] for an **awesome** future, hehehe.
|
||||
|
||||
|
||||
|
||||
== Screenshots
|
||||
|
||||
My setup was made by the FOSS gang.
|
||||
Take note that the screenshots does not represent the daily look of the desktop since I always change the wallpaper and the colorschemes with https://github.com/dylanaraps/pywal[Pywal].
|
||||
My setup was made by the FOSS gang.
|
||||
Take note that the screenshots does not represent the daily look of the desktop since I always change the wallpaper and the colorschemes with https://github.com/dylanaraps/pywal[Pywal].
|
||||
|
||||
.bspwm setup with no windows
|
||||
image::docs/bspwm-empty.png[bspwm setup with no windows]
|
||||
@ -62,21 +65,24 @@ Here are the main specifications of my machine currently running this (as of 201
|
||||
|
||||
== Wallpapers
|
||||
|
||||
Here's a list of the wallpapers I've used throughout my ricing journey.
|
||||
I've also tried to get the creators to show appreciation for their work.
|
||||
Here's a list of some of the wallpapers I've used throughout my ricing journey.
|
||||
I've also tried to get the creators to show appreciation for their work.
|
||||
|
||||
* https://www.deviantart.com/rmradev/art/Alien-Moon-743912901[`alien-moon.jpg`]
|
||||
* https://www.deviantart.com/rmradev/art/Alien-Moon-743912901[`alien-moon.jpg`]
|
||||
** Creator: https://www.deviantart.com/rmradev[rmRadev]
|
||||
|
||||
* https://dribbble.com/shots/3713646-Small-Memory[`forest-bright.jpg`]
|
||||
** Creator: https://dribbble.com/MikaelGustafsson[Mikael Gustafsson]
|
||||
** Creator: https://dribbble.com/MikaelGustafsson[Mikael Gustafsson]
|
||||
|
||||
* https://dropr.com/mbdsgns/254740/hotline_miami_iv/+?p=1388845[`hotline-miami-alt-cover.png`]
|
||||
* https://dropr.com/mbdsgns/254740/hotline_miami_iv/+?p=1388845[`hotline-miami-alt-cover.png`]
|
||||
** Creator: https://dropr.com/mbdsgns[Mbdsgns]
|
||||
|
||||
* https://www.artstation.com/artwork/wn8ng[`long-walk-home.jpg`]
|
||||
** Creator: https://www.artstation.com/beaulamb[Beau Lamb]
|
||||
|
||||
* https://www.reddit.com/r/wallpapers/comments/g6tgst/night_landscape_mountain_and_milky_way_galaxy[`mountain-with-galaxy.jpg`]
|
||||
** I was not able to track down the photographer of this one.
|
||||
|
||||
* https://www.reddit.com/r/wallpapers/comments/cckpj0/i_made_this_simple_and_clean_drawing_over_the/[`nebula.jpg`]
|
||||
** Creator: https://www.reddit.com/user/datGryphon/[datGryphon]
|
||||
|
||||
@ -91,236 +97,137 @@ I've also tried to get the creators to show appreciation for their work.
|
||||
** Creator: https://www.artstation.com/joejazz[Josef Bartoň]
|
||||
|
||||
|
||||
=== Sources
|
||||
|
||||
My personal recommendations for looking out for more cool-looking photos.
|
||||
|
||||
* https://images.nasa.gov/[Images from NASA].
|
||||
They also have a small collection of them in their https://unsplash.com/@nasa[Unsplash account].
|
||||
* https://imgur.com/gallery/4BKvq[Firewatch] (or any style similar to Firewatch) wallpapers are top-notch ricing material.
|
||||
* https://mantissa.artstation.com/[Midge "Mantissa" Sinnaeve]
|
||||
* https://www.artstation.com/beaulamb[Beau Lamb]
|
||||
* http://louie.co.nz/[Louis Coyle] and https://dribbble.com/louiscoyle[his illustrations].
|
||||
* https://www.deviantart.com/rmradev[rmRadev]
|
||||
* https://www.reddit.com/r/wallpapers/[/r/wallpapers]
|
||||
* https://unsplash.com/s/photos/galaxy-landscape[Any image that features a landscape with stars, lel.]
|
||||
* https://www.pexels.com/[Pexels]
|
||||
* https://www.pixabay.com/[Pixabay]
|
||||
* https://unsplash.com/[Unsplash]
|
||||
|
||||
|
||||
== Tour of my setup
|
||||
|
||||
There are a few things to know on this setup.
|
||||
== Tour of my setup
|
||||
|
||||
* `packages.txt` is mainly for archiving my native package list from the official Arch Linux repos installed in my current Arch Linux setup.
|
||||
* `aur-packages.txt` contains the installed packages from AUR along with their versions.
|
||||
* `locations.json` is a data file that contains all of the packages listed in <<Configured programs>> along with their target path.
|
||||
* `manager.py` is a little manager tailored for this setup.
|
||||
* A makefile (named `makefile`) which makes use of GNU Make.
|
||||
There are a few things to know on this setup.
|
||||
|
||||
`packages.txt` and `aur-packages.txt` are simply a list of installed packages from the official Arch repo and AUR respectively.
|
||||
They are going to be committed at the start of every month (if it works that is).
|
||||
* `packages.txt` is mainly for archiving my native package list from the official Arch Linux repos installed in my current Arch Linux setup.
|
||||
* `aur-packages.txt` contains the installed packages from AUR along with their versions.
|
||||
* `locations.json` is a data file that contains all of the packages listed in <<Configured programs>> along with their target path.
|
||||
* `manager.py` is a little manager tailored for this setup.
|
||||
* A makefile (named `makefile`) which makes use of GNU Make.
|
||||
|
||||
`manager.py` is a tiny https://www.gnu.org/software/stow/[GNU Stow]-inspired manager created for this setup.
|
||||
(Nonetheless, I tried to make it generic for other cases.)
|
||||
It takes a directory with a file named `locations.json` containing the packages with their target path.
|
||||
We can then execute commands with all of the packages and its target path.
|
||||
`packages.txt` and `aur-packages.txt` are simply a list of installed packages from the official Arch repo and AUR respectively.
|
||||
They are going to be committed at the start of every month (if it works that is).
|
||||
|
||||
`manager.py` is a tiny https://www.gnu.org/software/stow/[GNU Stow]-inspired manager created for this setup.
|
||||
(Nonetheless, I tried to make it generic for other cases.)
|
||||
It takes a directory with a file named `locations.json` containing the packages with their target path.
|
||||
We can then execute commands with all of the packages and its target path.
|
||||
That said, using this script is optional and feel free to discard it and use GNU Stow exclusively.
|
||||
footnote:[Obviously, you need Python installed for this.
|
||||
For future references, the version by the time first writing the script is at v3.8.1.]
|
||||
For future references, the version by the time first writing the script is at v3.8.1.
|
||||
That said, I may rewrite this in Bash instead or even just a makefile.]
|
||||
footnote:[I may also making my life harder when I can use something like https://yadm.io/[yadm] or https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/[a bare git repo] instead.]
|
||||
|
||||
[source, shell]
|
||||
----
|
||||
# Take the setup as the filesystem structure.
|
||||
# See the JSON file (locations.json) to see what packages to be installed and where to install them.
|
||||
# Take the setup as the filesystem structure.
|
||||
# See the JSON file (locations.json) to see what packages to be installed and where to install them.
|
||||
|
||||
# Running the program without any arguments for a test run.
|
||||
# There should be a bunch of `echo` commands being ran for all of the listed packages.
|
||||
# Running the program without any arguments for a test run.
|
||||
# There should be a bunch of `echo` commands being ran for all of the listed packages.
|
||||
./manager.py
|
||||
|
||||
# Create the directories of the target path and install them with GNU Stow.
|
||||
# Bada-bing, bada-boom, you have installed your setup or something.
|
||||
# Create the directories of the target path and install them with GNU Stow.
|
||||
# Bada-bing, bada-boom, you have installed your setup or something.
|
||||
./manager.py --commands "mkdir -p {location}" "stow --restow {package} --target {location}"
|
||||
----
|
||||
|
||||
Just execute the script with the `--help` flag for more information. ;p
|
||||
Just execute the script with the `--help` flag for more information. ;p
|
||||
|
||||
Next, more custom scripts.
|
||||
They're located in link:bin/[`bin/`] and ideally should be linked in `$PATH`.
|
||||
Currently, I have them linked in `$HOME/bin`.
|
||||
Next, more custom scripts.
|
||||
They're located in link:bin/[`bin/`] and ideally should be linked in `$PATH`.
|
||||
Currently, I have them linked in `$HOME/bin`.
|
||||
|
||||
The scripts are mostly used with hotkey bindings (e.g., `sxhkd`).
|
||||
Nonetheless, they could be executed in the shell (provided they are linked in `$PATH`).
|
||||
The scripts are mostly used with hotkey bindings (e.g., `sxhkd`).
|
||||
Nonetheless, they could be executed in the shell (provided they are linked in `$PATH`).
|
||||
|
||||
Here's a list of the top most useful scripts:
|
||||
|
||||
* link:./bin/screenshot[Screenshot capture].
|
||||
Includes the option of delaying and region selection mode.
|
||||
* link:./bin/screenshot[Screenshot capture].
|
||||
Includes the option of delaying and region selection mode.
|
||||
|
||||
* link:./bin/ocr[An image-to-text script using OCR].
|
||||
The content are then copied into the clipboard.
|
||||
Built on top of the screenshot script.
|
||||
Useful for capturing links in images or videos.
|
||||
* link:./bin/ocr[An image-to-text script using OCR].
|
||||
The content are then copied into the clipboard.
|
||||
Built on top of the screenshot script.
|
||||
Useful for capturing links in images or videos.
|
||||
|
||||
* link:./bin/record[Screen recording] using https://ffmpeg.org/[FFmpeg].
|
||||
An option of excluding and/or following the mouse cursor is included.
|
||||
* link:./bin/record[Screen recording] using https://ffmpeg.org/[FFmpeg].
|
||||
An option of excluding and/or following the mouse cursor is included.
|
||||
|
||||
* link:./bin/prompt[Quick command prompts].
|
||||
The script is based from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/prompt[Luke Smith's prompt script].
|
||||
* link:./bin/prompt[Quick command prompts].
|
||||
The script is based from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/prompt[Luke Smith's prompt script].
|
||||
|
||||
* link:./bin/toggle-bin[Switching on/off programs].
|
||||
Useful for situations where only one instance of the program is running.
|
||||
* link:./bin/toggle-bin[Switching on/off programs].
|
||||
Useful for situations where only one instance of the program is running.
|
||||
|
||||
Aside from the scripts, there are also some details and files that are not committed to this setup for privacy and security reasons.
|
||||
A few examples of which is my cron setups where it is tasked with updating and committing the package lists to the Git repo, updating the packages, cleaning the cache, and so much more.
|
||||
* link:./bin/select-theme[A basic theme selection for easy color scheme generation] with https://github.com/muennich/sxiv[sxiv].
|
||||
Since the script is tailored to my needs, it is recommended to modify it for your own.
|
||||
|
||||
Aside from the scripts, there are also some details and files that are not committed to this setup for privacy and security reasons.
|
||||
A few examples of which is my cron setups where it is tasked with updating and committing the package lists to the Git repo, updating the packages, cleaning the cache, and so much more.
|
||||
|
||||
|
||||
|
||||
|
||||
== Configured programs
|
||||
|
||||
Here's a list of the programs with details on the config found in this repo.
|
||||
Here's a list of the programs with details on the config found in this repo.
|
||||
Each of the listed directory is designed to be used/managed with https://www.gnu.org/software/stow/[GNU Stow] at the indicated target path.
|
||||
|
||||
|
||||
=== https://github.com/baskerville/bspwm[bspwm]
|
||||
|
||||
A minimalist window manager.
|
||||
Only provides a window manager and nothing else.
|
||||
|
||||
* Config located at link:bspwm/[`bspwm/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/bspwm/`.
|
||||
* Minimum version (from `bspwm --version`):
|
||||
** `0.9.7-10-g2ffd9c1`
|
||||
* Simply contains `bspwmrc` which is an executable setting up bspwm-related settings and and starting up some applications.
|
||||
* This allows for a modular setup.
|
||||
For using keybindings, it uses `sxhkd` (Simple X Hotkey Daemon).
|
||||
For something similar to i3-bar, https://github.com/polybar/polybar[polybar] serves as the replacement.
|
||||
|
||||
|
||||
=== https://github.com/baskerville/sxhkd[sxhkd]
|
||||
|
||||
Stands for "Simple X Hotkey Daemon".
|
||||
It is a hotkey daemon detecting certain X events primarily from the keyboard and mouse.
|
||||
|
||||
It is also very useful since it enables modular setup.
|
||||
Can be used independent of the desktop environment (DE) or the window manager (WM).
|
||||
|
||||
* Config located at link:sxhkd/[`sxhkd/`] folder.
|
||||
* The usual target path is at `$HOME/.config/sxhkd`.
|
||||
* Minimum version (from `sxhkd --version`):
|
||||
** `0.6.0-3-g7124055`
|
||||
* Contains a config file (`sxhkdrc`) for the keybindings.
|
||||
There are some keybindings specifically used for `bspwm`.
|
||||
|
||||
|
||||
=== https://github.com/polybar/polybar[polybar]
|
||||
|
||||
A tool for creating status bars.
|
||||
|
||||
This is the replacement bar from my previous i3-based setup.
|
||||
|
||||
* Config located at link:polybar[`polybar/`].
|
||||
* The usual target path for a user is at `$HOME/.config/polybar`.
|
||||
* Minimum version (from `polybar --version`):
|
||||
** `polybar 3.4.1`
|
||||
** `Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard`
|
||||
* There is only the standalone config (might decide to make it modular) and the launch script which is copied from the https://wiki.archlinux.org/index.php/Polybar[related Arch Wiki entry].
|
||||
|
||||
For documentation, check out the https://wiki.archlinux.org/index.php/Polybar[already linked Arch Wiki entry] and the https://github.com/polybar/polybar/wiki[official documentation from GitHub].
|
||||
|
||||
|
||||
=== https://github.com/davatorium/rofi[Rofi]
|
||||
|
||||
The application switcher and launcher.
|
||||
Also serves as a replacement for https://tools.suckless.org/dmenu/[dmenu].
|
||||
|
||||
* Config located at link:rofi/[`rofi/`].
|
||||
* The usual target path for a user is at `$HOME/.config/rofi/`.
|
||||
* Minimum version (from `rofi -version`):
|
||||
** `Version: 1.5.4`
|
||||
* Main config is `config.rasi`.
|
||||
* Contains the config and my custom Rofi themes.
|
||||
|
||||
To see the documentation, check out the manual entry for `rofi`.
|
||||
For creating or editing Rofi themes, read the manual entry of `rofi-theme`.
|
||||
Also, view the related https://wiki.archlinux.org/index.php/Rofi[Arch Wiki entry].
|
||||
|
||||
|
||||
=== https://www.zsh.org/[Zsh]
|
||||
|
||||
A Unix shell and an alternative to the Bash.
|
||||
|
||||
* Config found at link:zsh/[`zsh/`] directory.
|
||||
* The usual target path for a user is at `$HOME/`.
|
||||
* Minimum version (from `zsh --version`):
|
||||
** `zsh 5.7.1 (x86_64-pc-linux-gnu)`
|
||||
* Contains `.zprofile` and `.zshrc`.
|
||||
The primary file to look for is the `.profile` to set environment variables independent of the shell setups.
|
||||
* Previously relied on https://github.com/robbyrussell/oh-my-zsh/[oh-my-zsh].
|
||||
Eventually, the config became independent and can work without it.
|
||||
|
||||
For the documentation, check out the manual entry for `zsh` to gain an overview of the shell.
|
||||
The main manual explains some things such as the startup/shutdown files and compatibility with other shells.
|
||||
It also lays out the sections of the manual which you can check it out.
|
||||
|
||||
Since the manual has been split into multiple sections, it can be daunting to navigate.
|
||||
The most referred sections by far are `zshmisc` where it gives details on the miscellanea of zsh such as the prompt and special variables you might want to know.
|
||||
The other section is `zshbuiltins` where it explains built-in commands of zsh.
|
||||
|
||||
|
||||
=== https://www.x.org/wiki/[Xorg]
|
||||
|
||||
A display server implementing X window system.
|
||||
|
||||
* Config found at link:xorg/[`xorg/`] directory.
|
||||
* The usual target path for a user is at `$HOME/`.
|
||||
* Minimum version (from `Xorg -version`):
|
||||
** `X.Org X Server 1.20.5`
|
||||
** `X Protocol Version 11, Revision 0`
|
||||
* The configuration is found at `.Xresources` containing the colors (0 to 15, foreground, and the background).
|
||||
|
||||
|
||||
=== https://github.com/yshui/picom[picom]
|
||||
|
||||
A window compositor forked from https://github.com/chjj/compton[compton] that adds off-screen buffers and additional effects and animations to the window.
|
||||
Can be used for adding style to your setup.
|
||||
|
||||
This is formerly the Compton configuration.
|
||||
|
||||
* Config found at link:picom/[`picom/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/picom`.
|
||||
* Minimum version (from `picom --version`):
|
||||
** `v7.2`
|
||||
* The config is copied from `/etc/xorg/picom.conf` and edited a few parameters.
|
||||
|
||||
For documentation, check out the manual entry (i.e., `man picom`) and the https://wiki.archlinux.org/index.php/Picom[related Arch Wiki entry].
|
||||
The default configuration (located at `/etc/xdg/picom.conf` assuming at Arch Linux) can be helpful as well as it is filled with comments.
|
||||
|
||||
|
||||
=== https://neovim.io/[Neovim]
|
||||
|
||||
A modern version of https://www.vim.org/[Vim], a modal text editor.
|
||||
footnote:[Migrated after I've seen https://lukesmith.xyz/[Luke-senpai] used it in his recent videos.
|
||||
Seriously though, I find nvim to be way better for configuration.]
|
||||
|
||||
* Config located at link:nvim/[`nvim/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/nvim`.
|
||||
* Minimum version (from `nvim --version`):
|
||||
** `NVIM v0.4.3`
|
||||
* Uses https://github.com/junegunn/vim-plug[`vim-plug`] as the plugin manager.
|
||||
* Contains my plugin list and editor configurations in `init.vim`.
|
||||
* There are also some https://github.com/sirver/UltiSnips[UltiSnips] snippets stored in `own-snippets` folder (since `snippets` is a reserved folder name).
|
||||
* One of the largest snippet file is the snippets for LaTeX files.
|
||||
It is based on https://github.com/gillescastel/latex-snippets/[_Gilles Castel_'s UltiSnips LaTeX snippets].
|
||||
|
||||
|
||||
=== https://github.com/gokcehan/lf[lf]
|
||||
|
||||
A http://ranger.github.io/[ranger]-inspired terminal file manager.
|
||||
https://godoc.org/github.com/gokcehan/lf[Here's the documentation for it.]
|
||||
|
||||
* Config located at link:lf/[`lf/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/lf/`.
|
||||
* Minimum version (from `lf --version`):
|
||||
** `r14`
|
||||
* All of the config files are basically default config files except with a few personal changes.
|
||||
Each configuration tries to make each to be consistent visually.
|
||||
For a color scheme, my main preference is https://www.nordtheme.com/[Nord].
|
||||
|
||||
|
||||
=== https://github.com/jwilm/alacritty/[Alacritty]
|
||||
|
||||
Similar to https://sw.kovidgoyal.net/kitty[Kitty] , it's a GPU-based terminal emulator.
|
||||
Similar to https://sw.kovidgoyal.net/kitty[Kitty] , it's a GPU-based terminal emulator.
|
||||
It's documentation for the configuration can be viewed at the config file itself being filled with comments.
|
||||
|
||||
* Config located at link:alacritty/[`alacritty/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/alacritty/`.
|
||||
* Minimum version (from `alacritty --version`):
|
||||
** `alacritty 0.3.3`
|
||||
* Contains a single `alacritty.yaml` as the config file. Not much has changed except for the color scheme and the font being used.
|
||||
* Contains a single `alacritty.yaml` as the config file.
|
||||
Not much has changed except for the color scheme and the font being used.
|
||||
|
||||
|
||||
=== https://github.com/baskerville/bspwm[bspwm]
|
||||
|
||||
A minimalist window manager.
|
||||
Only provides a window manager and nothing else.
|
||||
|
||||
* Config located at link:bspwm/[`bspwm/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/bspwm/`.
|
||||
* Minimum version (from `bspwm --version`):
|
||||
** `0.9.7-10-g2ffd9c1`
|
||||
* Simply contains `bspwmrc` which is an executable setting up bspwm-related settings and and starting up some applications.
|
||||
However, the "true" version is stored as a https://github.com/dylanaraps/pywal/wiki/User-Template-Files[template file] for pywal (located at link:wal/templates/bspwmrc[`wal/templates/bspwmrc`]).
|
||||
* This allows for a modular setup.
|
||||
For using keybindings, it uses `sxhkd` (Simple X Hotkey Daemon).
|
||||
For something similar to i3-bar, https://github.com/polybar/polybar[polybar] serves as the replacement.
|
||||
|
||||
To control the window manager, you should use `bspc`.
|
||||
|
||||
|
||||
=== https://dunst-project.org/[Dunst]
|
||||
@ -331,9 +238,61 @@ It's a notification daemon used to display notifications sent by notifiers (prog
|
||||
* The usual target path for a user is at `$HOME/.config/dunst/`.
|
||||
* Minimum version (from `dunst --version`):
|
||||
** `Dunst - A customizable and lightweight notification-daemon 1.4.1 (2019-07-03)`
|
||||
* Simply contains a `dunstrc` configuring appearance of the notifications.
|
||||
* Simply contains a `dunstrc` configuring appearance of the notifications.
|
||||
Though, the "true" version of the config is located at link:wal/templates/dunstrc[`wal/templates/dunstrc`].
|
||||
|
||||
Look out for the related manual entry (i.e., `man dunst`) and the https://wiki.archlinux.org/index.php/Dunst[Arch Wiki entry].
|
||||
Look out for the related manual entry (i.e., `man dunst`) and the https://wiki.archlinux.org/index.php/Dunst[Arch Wiki entry].
|
||||
|
||||
|
||||
=== https://www.gnu.org/software/emacs/[GNU Emacs]
|
||||
|
||||
Another text editor, of course.
|
||||
I finally bit the bullet with this one with the native support for https://orgmode.org/[Org Mode] as the biggest reason.
|
||||
(Is this going to be start of something sinister?)
|
||||
|
||||
* This package is really a https://github.com/hlissner/doom-emacs[Doom Emacs]-based configuration more than the vanilla config so you need to install it first before touching the config with your grubby hands.
|
||||
Just run the following command `git clone https://github.com/hlissner/doom-emacs ~/.emacs.d && ~/.emacs.d/bin/doom install` and it should take care of the rest.
|
||||
* Config located at link:emacs/[`emacs/`].
|
||||
* The ideal target path for a user is at `$HOME/.config/doom`.
|
||||
* Minium version (from `emacs --version`):
|
||||
** `GNU Emacs 26.3`
|
||||
** For Doom Emacs, it's not particularly important since it's in rolling release but for future references, it is from the `develop` branch at commit https://github.com/hlissner/doom-emacs/commit/efa599f076c3a140c6b4006c352fdba3361abebd[`efa599f076c3a140c6b4006c352fdba3361abebd`] accessed at 2020-04-24.
|
||||
* The Doom configs are just the default config so there's not much to go through here.
|
||||
I may also add snippet files in there.
|
||||
* Regarding theming Doom Emacs, I've found mainly two ways.
|
||||
** First is simply using https://gitlab.com/jjzmajic/ewal[ewal] but the resulting colors are not pretty IMO and I haven't found a way to customize it aside from forking and modifying the package itself.
|
||||
** Second is simply generating the Doom Emacs theme file myself;
|
||||
I have a https://gitlab.com/foo-dogsquared/doom-theme-generator[small script] that is generates one from the Pywal color scheme.
|
||||
** Or simply don't and use https://gitlab.com/protesilaos/modus-themes[modus-themes] instead for that light customization options.
|
||||
|
||||
|
||||
=== https://github.com/gokcehan/lf[lf]
|
||||
|
||||
A http://ranger.github.io/[ranger]-inspired terminal file manager.
|
||||
https://godoc.org/github.com/gokcehan/lf[Here's the documentation for it.]
|
||||
|
||||
* Config located at link:lf/[`lf/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/lf/`.
|
||||
* Minimum version (from `lf --version`):
|
||||
** `r14`
|
||||
* All of the config files are basically default config files except with a few personal changes.
|
||||
|
||||
|
||||
=== https://neovim.io/[Neovim]
|
||||
|
||||
A modern version of https://www.vim.org/[Vim], a modal text editor.
|
||||
footnote:[Migrated after I've seen https://lukesmith.xyz/[Luke-senpai] used it in his recent videos.
|
||||
Seriously though, I find nvim to be way better for configuration.]
|
||||
|
||||
* Config located at link:nvim/[`nvim/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/nvim`.
|
||||
* Minimum version (from `nvim --version`):
|
||||
** `NVIM v0.4.3`
|
||||
* Uses https://github.com/junegunn/vim-plug[`vim-plug`] as the plugin manager.
|
||||
* Contains my plugin list and editor configurations in `init.vim`.
|
||||
* There are also some https://github.com/sirver/UltiSnips[UltiSnips] snippets stored in `own-snippets` folder (since `snippets` is a reserved folder name).
|
||||
* One of the largest snippet file is the snippets for LaTeX files.
|
||||
It is based on https://github.com/gillescastel/latex-snippets/[_Gilles Castel_'s UltiSnips LaTeX snippets].
|
||||
|
||||
|
||||
=== https://www.archlinux.org/pacman/[pacman]
|
||||
@ -345,17 +304,142 @@ The default package manager for Arch Linux.
|
||||
* Minimum version (from `pacman --version`):
|
||||
** `Pacman v5.1.3 - libalpm v11.0.3`
|
||||
* Contains the configuration file, a `mirrorlist` file, and some https://www.archlinux.org/mirrorlist/?ip_version=6[pacman hooks].
|
||||
* For the mirrorlist, change it accordingly or https://www.archlinux.org/mirrorlist/?ip_version=6[generate another one].
|
||||
It is also monthly updated from a cron job.
|
||||
* The dotfiles repo also contains two package lists (i.e., `packages.txt` and `aur-packages.txt`) in the root of the project folder.
|
||||
* The setup also uses `yay` as the AUR helper tool.
|
||||
* For the mirrorlist, change it accordingly or https://www.archlinux.org/mirrorlist/?ip_version=6[generate another one].
|
||||
It is also monthly updated from a cron job.
|
||||
* Since this requires root privilege, this is not included in the installation script.
|
||||
Simply copy it (i.e., `sudo cp pacman/ /etc/pacman.d/`) and you're done.
|
||||
* The dotfiles repo also contains two package lists (i.e., `packages.txt` and `aur-packages.txt`) in the root of the project folder.
|
||||
* The setup also uses `yay` as the AUR helper tool.
|
||||
|
||||
|
||||
=== https://github.com/yshui/picom[picom]
|
||||
|
||||
A window compositor forked from https://github.com/chjj/compton[compton] that adds off-screen buffers and additional effects and animations to the window.
|
||||
Can be used for adding style to your setup.
|
||||
|
||||
This is formerly the Compton configuration.
|
||||
|
||||
* Config found at link:picom/[`picom/`] directory.
|
||||
* The usual target path for a user is at `$HOME/.config/picom`.
|
||||
* Minimum version (from `picom --version`):
|
||||
** `v7.2`
|
||||
* The config is copied from `/etc/xorg/picom.conf` and edited a few parameters.
|
||||
|
||||
For documentation, check out the manual entry (i.e., `man picom`) and the https://wiki.archlinux.org/index.php/Picom[related Arch Wiki entry].
|
||||
The default configuration (located at `/etc/xdg/picom.conf` assuming at Arch Linux) can be helpful as well as it is filled with comments.
|
||||
|
||||
|
||||
=== https://github.com/polybar/polybar[polybar]
|
||||
|
||||
A tool for creating status bars.
|
||||
|
||||
This is the replacement bar from my previous i3-based setup.
|
||||
|
||||
* Config located at link:polybar[`polybar/`].
|
||||
* The usual target path for a user is at `$HOME/.config/polybar`.
|
||||
* Minimum version (from `polybar --version`):
|
||||
** `polybar 3.4.1`
|
||||
** `Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard`
|
||||
* There is only the standalone config (might decide to make it modular) and the launch script which is copied from the https://wiki.archlinux.org/index.php/Polybar[related Arch Wiki entry].
|
||||
The theme is dynamically used with the Xresources file (by using `xrdb`).
|
||||
|
||||
For documentation, check out the https://wiki.archlinux.org/index.php/Polybar[already linked Arch Wiki entry] and the https://github.com/polybar/polybar/wiki[official documentation from GitHub].
|
||||
|
||||
|
||||
=== https://github.com/dylanaraps/pywal[Pywal]
|
||||
|
||||
A theme generator written in Python.
|
||||
It is mostly used for ricing to get them consistent colors throughout your setup.
|
||||
|
||||
* Config located at link:wal[`wal/`].
|
||||
* The usual target path for a user is at `$HOME/.config/wal`.
|
||||
It is ideal that you've already have your own color schemes saved in there as well.
|
||||
* Minimum version (from `wal --version`):
|
||||
** `wal 3.3.0`
|
||||
* Due to the nature of my setup where I want those consistent colors, most of the configurations are tucked away as https://github.com/dylanaraps/pywal/wiki/User-Template-Files[template files] but it should be easy to identify which is which.
|
||||
Certain applications such as for `dunst` and `bspwm` are in here and should be considered as the real version of the config.
|
||||
|
||||
For additional information, check out the https://github.com/dylanaraps/pywal/wiki/[documentation] from the GitHub page.
|
||||
|
||||
|
||||
=== https://github.com/davatorium/rofi[Rofi]
|
||||
|
||||
The application switcher and launcher.
|
||||
Also serves as a replacement for https://tools.suckless.org/dmenu/[dmenu].
|
||||
|
||||
* Config located at link:rofi/[`rofi/`].
|
||||
* The usual target path for a user is at `$HOME/.config/rofi/`.
|
||||
* Minimum version (from `rofi -version`):
|
||||
** `Version: 1.5.4`
|
||||
* Main config is `config.rasi`.
|
||||
* Contains the config and my custom Rofi themes.
|
||||
|
||||
To see the documentation, check out the manual entry for `rofi`.
|
||||
For creating or editing Rofi themes, read the manual entry of `rofi-theme`.
|
||||
Also, view the related https://wiki.archlinux.org/index.php/Rofi[Arch Wiki entry].
|
||||
|
||||
|
||||
=== https://github.com/baskerville/sxhkd[sxhkd]
|
||||
|
||||
Stands for "Simple X Hotkey Daemon".
|
||||
It is a hotkey daemon detecting certain X events primarily from the keyboard and mouse.
|
||||
|
||||
It is also very useful since it enables modular setup.
|
||||
Can be used independent of the desktop environment (DE) or the window manager (WM).
|
||||
|
||||
* Config located at link:sxhkd/[`sxhkd/`] folder.
|
||||
* The usual target path is at `$HOME/.config/sxhkd`.
|
||||
* Minimum version (from `sxhkd --version`):
|
||||
** `0.6.0-3-g7124055`
|
||||
* Contains a config file (`sxhkdrc`) for the keybindings.
|
||||
There are some keybindings specifically used for `bspwm`.
|
||||
|
||||
|
||||
=== https://www.x.org/wiki/[Xorg]
|
||||
|
||||
A display server implementing X window system.
|
||||
|
||||
* Config found at link:xorg/[`xorg/`] directory.
|
||||
* The usual target path for a user is at `$HOME/`.
|
||||
* Minimum version (from `Xorg -version`):
|
||||
** `X.Org X Server 1.20.5`
|
||||
** `X Protocol Version 11, Revision 0`
|
||||
* The configuration is found at `.Xresources` containing the colors (0 to 15, foreground, and the background).
|
||||
|
||||
|
||||
=== https://www.zsh.org/[Zsh]
|
||||
|
||||
A Unix shell and an alternative to the Bash.
|
||||
Mostly chosen due to its wide options for customization compared to GNU Bash.
|
||||
|
||||
* Config found at link:zsh/[`zsh/`] directory.
|
||||
* The usual target path for a user is at `$HOME/`.
|
||||
* Minimum version (from `zsh --version`):
|
||||
** `zsh 5.7.1 (x86_64-pc-linux-gnu)`
|
||||
* Contains `.zprofile` and `.zshrc`.
|
||||
The primary file to look for is the `.profile` to set environment variables independent of the shell setups.
|
||||
* Previously relied on https://github.com/robbyrussell/oh-my-zsh/[oh-my-zsh].
|
||||
Eventually, the config became independent and can work without it.
|
||||
|
||||
For the documentation, check out the manual entry for `zsh` to gain an overview of the shell.
|
||||
The documentation itself is massive and comprehensive.
|
||||
The main manual explains some things such as the startup/shutdown files and compatibility with other shells.
|
||||
It also lays out the sections of the manual which you can check it out.
|
||||
|
||||
Since the manual has been split into multiple sections, it can be daunting to navigate.
|
||||
The most referred sections by far are `zshmisc` where it gives details on the miscellanea of zsh such as the prompt and special variables you might want to know.
|
||||
The other section is `zshbuiltins` where it explains built-in commands of zsh.
|
||||
|
||||
For coding with Zsh, look into the http://zsh.sourceforge.net/Doc/Release/index.html[Zsh Manual].
|
||||
|
||||
|
||||
|
||||
|
||||
== Additional programs used
|
||||
|
||||
As much as possible, I use free and open source software for all of my needs.
|
||||
As much as possible, I use free and open source software (FOSS) for all of my needs.
|
||||
Not all of the items listed are FOSS, though.
|
||||
footnote:[You can also view the package lists at the project root for a detailed list.]
|
||||
|
||||
|
||||
=== System administration
|
||||
@ -370,52 +454,79 @@ TIP: I recommend to start at this list especially if you're starting with a bare
|
||||
* https://github.com/coldfix/udiskie[udiskie] - An automounter for removable media.
|
||||
|
||||
|
||||
=== Desktop user experience
|
||||
=== Command line tools
|
||||
|
||||
* https://github.com/tmux/tmux/[tmux] - A terminal multiplexer useful for managing multiple sessions.
|
||||
* https://github.com/noctuid/tdrop[tdrop] - A modular dropdown creator.
|
||||
* https://github.com/reorr/mantablockscreen[mantablockscreen] - A lock screen.
|
||||
* https://github.com/dylanaraps/pywal[pywal] - An automation tool for generating color schemes from images and applying them to your programs.
|
||||
* https://github.com/dylanaraps/neofetch/[neofetch] - A program for getting information for your hardware and software setup.
|
||||
|
||||
|
||||
=== General purpose programs
|
||||
I still use https://www.gnu.org/software/coreutils/[GNU coreutils] and common Unix tools (e.g., https://curl.haxx.se/[cURL]) but it could be good to find some alternatives.
|
||||
If you want to look for some alternatives or just feeling adventurous yourself, I recommend starting with https://github.com/agarrharr/awesome-cli-apps[this awesome list] and https://github.com/alebcay/awesome-shell[this one, too].
|
||||
|
||||
* https://github.com/sharkdp/bat[bat] - Basically `cat(1)` with wings.
|
||||
* https://github.com/jarun/Buku[Buku] - A developer-oriented (i.e., easy to integrate with your own programs) browser-independent bookmark manager for the command line.
|
||||
* https://github.com/ogham/exa[exa] - A user-friendly replacement for `ls(1)`.
|
||||
* https://github.com/sharkdp/fd[fd] - A user-friendly alternative to `find(1)` from https://www.gnu.org/software/findutils/[GNU `findutils`].
|
||||
* https://feh.finalrewind.org/[feh] - A minimal image viewer.
|
||||
* https://www.mozilla.org/en-US/firefox/new/[Firefox] - One of the major web browser second to Chrome.
|
||||
* https://github.com/junegunn/fzf[fzf] - A fuzzy command line finder.
|
||||
* https://github.com/sharkdp/hexyl[hexyl] - A hex viewer on the command line.
|
||||
* https://github.com/gokcehan/lf[lf] - A terminal file manager mainly inspired by http://ranger.github.io/[Ranger].
|
||||
* https://github.com/naelstrof/maim[maim] - A simple screenshot utility.
|
||||
* https://docs.xfce.org/xfce/thunar/start[Thunar] - A file manager. A part of the Xfce desktop environment.
|
||||
* https://www.thunderbird.net/[Thunderbird] - A email client.
|
||||
* https://github.com/dylanaraps/neofetch/[neofetch] - A program for getting information for your hardware and software setup.
|
||||
footnote:[You can also take a look at https://github.com/dylanaraps/pfetch[pfetch] (created by the same author) which can be an excellent reference for getting system information between Unix-based systems.
|
||||
Seriously though, it's insane;
|
||||
the guy's a wizard.]
|
||||
* https://neovim.io/[Neovim] - A modern fork of https://www.vim.org/[Vim].
|
||||
* https://github.com/BurntSushi/ripgrep[ripgrep] - A fast alternative to https://www.gnu.org/software/grep/[GNU `grep`].
|
||||
* https://weechat.org/[Weechat] - An IRC client on the command line.
|
||||
* https://github.com/ytdl-org/youtube-dl[youtube-dl] - A utility for downloading YouTube videos (and also others).
|
||||
|
||||
|
||||
=== Desktop user experience
|
||||
|
||||
* https://github.com/tmux/tmux/[tmux] - A terminal multiplexer useful for managing multiple sessions.
|
||||
* https://github.com/noctuid/tdrop[tdrop] - A modular dropdown creator.
|
||||
* https://github.com/dylanaraps/pywal[pywal] - An automation tool for generating color schemes from images and applying them to your programs.
|
||||
|
||||
|
||||
=== Graphical programs
|
||||
|
||||
* https://discordapp.com/[Discord] - A communication app targeted for gaymers and hackers.
|
||||
* https://www.mozilla.org/en-US/firefox/new/[Firefox] - One of the major web browser second to Chrome.
|
||||
* https://docs.xfce.org/xfce/thunar/start[Thunar] - A file manager and a part of the https://xfce.org/[XFCE] package.
|
||||
footnote:[I'm mainly using https://github.com/gokcehan/lf[lf], don't fret.]
|
||||
* https://www.thunderbird.net/[Thunderbird] - A email client.
|
||||
footnote:[I'm sorry I'm not using a based command line tool like https://github.com/neomutt/neomutt[Neomutt] yet.
|
||||
Please don't crucify me, I'm on my way to be cool, I swear.]
|
||||
* https://www.qbittorrent.org/[Qbittorrent]
|
||||
|
||||
|
||||
=== Device drivers and servers
|
||||
|
||||
* https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture[ALSA] - A Linux sound driver.
|
||||
* https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture[ALSA] - A Linux sound driver.
|
||||
* https://wiki.archlinux.org/index.php/NetworkManager[GNOME NetworkManager]
|
||||
* https://www.nvidia.com/Download/index.aspx?lang=en-us[NVIDIA Driver] - Since I have an NVIDIA-based GPU (NVIDIA GeForce GT 630), I have to use that.
|
||||
I also have to use the https://www.archlinux.org/packages/extra/x86_64/nvidia-390xx/[legacy version].
|
||||
* https://www.nvidia.com/Download/index.aspx?lang=en-us[NVIDIA Driver] - Since I have an NVIDIA-based GPU (NVIDIA GeForce GT 630), I have to use that.
|
||||
|
||||
|
||||
=== Multimedia-related tools
|
||||
=== Multimedia-related tools
|
||||
|
||||
* https://audacious-media-player.org/[Audacious] - An audio player with various listening options.
|
||||
* https://ffmpeg.org/[ffmpeg] - A multimedia codec including for MP4, FLV, and more.
|
||||
Also can be used as a recorder.
|
||||
* https://www.imagemagick.org/[ImageMagick] - A software suite for graphics.
|
||||
* https://obsproject.com/[OBS Studio] - A facility for streaming and recording videos.
|
||||
* https://www.shotcut.org/[Shotcut] - A video editor built with the https://www.mltframework.org/[MLT Framework].
|
||||
* https://www.videolan.org/vlc/[VLC Media Player] - A multimedia player.
|
||||
footnote:[Don't worry, I'm trying to be cool by considering https://rybczak.net/ncmpcpp/[`ncmpcpp`].]
|
||||
* https://ffmpeg.org/[ffmpeg] - A multimedia codec including for MP4, FLV, and more.
|
||||
Also can be used as a recorder.
|
||||
* https://www.imagemagick.org/[ImageMagick] - A software suite for graphics.
|
||||
* https://obsproject.com/[OBS Studio] - A facility for streaming and recording videos.
|
||||
* https://www.shotcut.org/[Shotcut] - A video editor built with the https://www.mltframework.org/[MLT Framework].
|
||||
* https://github.com/muennich/sxiv[sxiv] - Self-explaining-ly named "Simple X Image Viewer".
|
||||
* https://www.videolan.org/vlc/[VLC Media Player] - A multimedia player.
|
||||
|
||||
|
||||
=== Music production
|
||||
|
||||
* https://kx.studio/Applications:Cadence[Cadence] - A set of audio tools. Part of the KX Studio project.
|
||||
* https://kx.studio/Applications:Carla[Carla] - An audio plug-in host supporting various audio plug-in formats such as VST2/3, SF2, and SFZ.
|
||||
Part of the KX Studio project.
|
||||
* https://lmms.io/[LMMS] - A digital audio workstation for beat production.
|
||||
* https://musescore.org/[Musescore] - A music composition and notation software.
|
||||
* https://supercollider.github.io/[SuperCollider] - A platform for audio synthesis and algorithmic composition.
|
||||
You can find my crappy soundtracks primarily in my https://www.youtube.com/channel/UCuMiU9bzATu5oTp-vhOlL2Q[YouTube channel] (may consider a SoundCloud account or similar).
|
||||
|
||||
* https://kx.studio/Applications:Cadence[Cadence] - A set of audio tools.
|
||||
* https://kx.studio/Applications:Carla[Carla] - An audio plug-in host supporting various audio plug-in formats such as VST2/3, SF2, and SFZ.
|
||||
Part of the KX Studio project.
|
||||
* https://lmms.io/[LMMS] - A digital audio workstation for beat production.
|
||||
* https://musescore.org/[Musescore] - A music composition and notation software.
|
||||
* https://supercollider.github.io/[SuperCollider] - A platform for audio synthesis and algorithmic composition.
|
||||
|
||||
|
||||
=== Design
|
||||
@ -423,80 +534,85 @@ Part of the KX Studio project.
|
||||
* https://blender.org/[Blender] - A top-notch 3D modelling program.
|
||||
* https://www.freecadweb.org/[FreeCAD] - A general purpose 3D computer-aided design program.
|
||||
* https://inkscape.org/[Inkscape] - A vector illustration/editing program. Alternative to Adobe Illustrator.
|
||||
* http://www.kicad-pcb.org/[KiCad] - An electronic design automation suite.
|
||||
* https://krita.org/en/[Krita] - A painting/illustration program.
|
||||
* http://www.kicad-pcb.org/[KiCad] - An electronic design automation suite.
|
||||
* https://krita.org/en/[Krita] - A painting/illustration program.
|
||||
|
||||
|
||||
=== Fonts
|
||||
|
||||
* https://github.com/belluzj/fantasque-sans[Fantasque Sans Mono]
|
||||
* https://github.com/tonsky/FiraCode[Fira Code] - A programmer-oriented font that supports ligatures.
|
||||
* https://github.com/be5invis/iosevka[Iosevka] - A monospace text that features ligatures and provides a wide variety of symbols.
|
||||
It is currently my terminal font.
|
||||
* http://www.gust.org.pl/projects/e-foundry/lm-math[Latin Modern Math] - A serif font specifically for mathematical and scientific work.
|
||||
It is based from Computer Modern Math (the default typeface for LaTeX documents).
|
||||
It is also my go-to font for mathematical fonts.
|
||||
* https://github.com/ryanoasis/nerd-fonts[Nerd Fonts] - A suite of font tools.
|
||||
Also offers 40+ patched fonts of the popular fonts such as Iosevka, Fira Code, and many others.
|
||||
* https://github.com/googlefonts/noto-fonts[Noto Fonts] - A font family provided by Google.
|
||||
Features a wide support for a variety of languages and styles.
|
||||
* https://www.ibm.com/plex/[Plex] - The font family of IBM.
|
||||
Offers a wide variety of styles from the serif, sans, and monospace.
|
||||
footnote:[There is a plan to extend the fonts to include mathematical symbols but as of 2020-03-27, it's not yet complete.]
|
||||
* https://github.com/adobe-fonts/source-serif-pro[Source Serif Pro] - A free and open source serif font by Frank Grießhammer for Adobe.
|
||||
Part of the Adobe's Source Pro open source font family.
|
||||
It is also my go-to serif font for my documents (e.g., LaTeX documents).
|
||||
* https://github.com/adobe-fonts/source-sans-pro[Source Sans Pro] - Another one of the Adobe's Source Pro open source font family.
|
||||
I use it when paired with Source Serif Pro.
|
||||
The go-to sans font for my go-to serif font.
|
||||
* https://github.com/stipub/stixfonts[STIX] - A mathematical font based from the Times New Roman font.
|
||||
This is my second math font of choice.
|
||||
* https://fontawesome.com/[Font Awesome] - A set of icons for your user interface and stuff.
|
||||
* https://github.com/be5invis/iosevka[Iosevka] - A monospace text that features ligatures and provides a wide variety of symbols.
|
||||
It is currently my terminal font.
|
||||
* http://www.gust.org.pl/projects/e-foundry/lm-math[Latin Modern Math] - A serif font specifically for mathematical and scientific work.
|
||||
It is based from Computer Modern Math (the default typeface for LaTeX documents).
|
||||
It is also my go-to font for mathematical fonts.
|
||||
* https://github.com/ryanoasis/nerd-fonts[Nerd Fonts] - A suite of font tools.
|
||||
Also offers 40+ patched fonts of the popular fonts such as Iosevka, Fira Code, and many others.
|
||||
* https://github.com/googlefonts/noto-fonts[Noto Fonts] - A font family provided by Google.
|
||||
Features a wide support for a variety of languages and styles.
|
||||
* https://www.ibm.com/plex/[Plex] - The font family of IBM.
|
||||
Offers a wide variety of styles from the serif, sans, and monospace.
|
||||
footnote:[There is a plan to extend the fonts to include mathematical symbols but as of 2020-03-27, it's not yet complete.]
|
||||
* https://github.com/adobe-fonts/source-serif-pro[Source Serif Pro] - A free and open source serif font by Frank Grießhammer for Adobe.
|
||||
Part of the Adobe's Source Pro open source font family.
|
||||
It is also my go-to serif font for my documents (e.g., LaTeX documents).
|
||||
* https://github.com/adobe-fonts/source-sans-pro[Source Sans Pro] - Another one of the Adobe's Source Pro open source font family.
|
||||
I use it when paired with Source Serif Pro.
|
||||
The go-to sans font for my go-to serif font.
|
||||
* https://github.com/stipub/stixfonts[STIX] - A mathematical font based from the Times New Roman font.
|
||||
This is my second math font of choice.
|
||||
|
||||
|
||||
=== Documents
|
||||
|
||||
* https://asciidoctor.org/[Asciidoctor] - A text formatting language suitable for creating books, documentations, and writings. Highlights a heavier feature set compared to Markdown.
|
||||
* https://github.com/gohugoio/hugo[Hugo] - A static site generator for creating websites and personal wikis.
|
||||
* https://jupyter.org/[Jupyter] - Similar to R Markdown.
|
||||
This is closely associated with the https://anaconda.com/[Anaconda distribution].
|
||||
Useful for a variety of document formats to be converted into a website especially with the (bare) support for https://pandoc.org/[Pandoc] converter.
|
||||
* https://www.libreoffice.org/[LibreOffice] - An office productivity suite and serves as a free alternative to Microsoft Office suite.
|
||||
* http://luatex.org/[LuaTeX] - The TeX engine I primarily use for my LaTeX documents.
|
||||
* https://pandoc.org/[Pandoc] - A universal document converter that supports a wide variety of document formats.
|
||||
Primarily used for converting Markdown documents into Asciidoctor text.
|
||||
* https://rmarkdown.rstudio.com/[R Markdown] - A text formatting language that comes with executing programs with live output in the notebook.
|
||||
* https://www.tug.org/texlive/[TeX Live] - A cross-platform LaTeX distribution for compiling LaTeX files.
|
||||
* https://asciidoctor.org/[Asciidoctor] - A text formatting language suitable for creating books, documentations, and writings.
|
||||
Highlights a heavier feature set compared to Markdown.
|
||||
* https://github.com/gohugoio/hugo[Hugo] - A static site generator for creating websites and personal wikis.
|
||||
* https://jupyter.org/[Jupyter] - Similar to R Markdown except with a stronger emphasis for https://en.wikipedia.org/wiki/Literate_programming[literate programming].
|
||||
This is closely associated with the https://anaconda.com/[Anaconda distribution].
|
||||
Useful for a variety of document formats to be converted into a website especially with the (bare) support for https://pandoc.org/[Pandoc] converter.
|
||||
* https://www.libreoffice.org/[LibreOffice] - An office productivity suite and serves as a free alternative to Microsoft Office suite.
|
||||
* http://luatex.org/[LuaTeX] - The TeX engine I primarily use for my LaTeX documents.
|
||||
* https://orgmode.org/[Org-mode] - A lightweight text formatting language that offers a variety of export options, literate programming, and reproducible of stuff similar to Jupyter Notebooks.
|
||||
* https://pandoc.org/[Pandoc] - A universal document converter that supports a wide variety of document formats.
|
||||
Primarily used for converting Markdown documents into Asciidoctor text.
|
||||
* https://rmarkdown.rstudio.com/[R Markdown] - A text formatting language that comes with executing programs with live output in the notebook.
|
||||
* https://www.tug.org/texlive/[TeX Live] - A cross-platform LaTeX distribution for compiling LaTeX files.
|
||||
|
||||
|
||||
=== Mathematical tools
|
||||
|
||||
* https://www.anaconda.com/[Anaconda] - A mathematical environment distribution.
|
||||
* https://www.gnu.org/software/octave/[Octave] - A mathematical computational environment similar to Matlab.
|
||||
* https://www.r-project.org/[R] - Similar to Octave.
|
||||
* https://www.gnu.org/software/octave/[Octave] - A mathematical computational environment similar to Matlab.
|
||||
* https://www.r-project.org/[R] - Similar to Octave.
|
||||
|
||||
|
||||
=== Software development
|
||||
|
||||
* https://cmake.org/[CMake] - A cross-platform build system that takes care of build configurations.
|
||||
* https://gcc.gnu.org/[GCC] - A set of compilers from GNU. I mainly use it for developing and compiling C and C++ languages.
|
||||
* https://docker.com/[Docker] - An application for virtualizing your environments with containers.
|
||||
* https://bitbucket.org/eradman/entr[entr] - A utility for running commands for certain filesystem events.
|
||||
Useful for not fiddling with `inotify`.
|
||||
* https://gcc.gnu.org/[GCC] - A set of compilers from GNU; I mainly use it for developing and compiling C and C++ languages.
|
||||
* https://git-scm.com/[Git] - My one and only version control system.
|
||||
* https://godotengine.org/[Godot Engine] - A game engine with its own interface.
|
||||
* https://llvm.org/[LLVM] - A set of compilers similar to GCC; mainly used it for testing other C/C++ stuff.
|
||||
* https://www.gnu.org/software/make/[Make] - A build automation system.
|
||||
* https://www.vagrantup.com/[Vagrant] - A virtual machine manager with a focus for developer environments.
|
||||
* https://code.visualstudio.com/[Visual Studio Code] - A text editor that comes with lightweight IDE features.
|
||||
* The programming language runtime for https://www.python.org/[Python],
|
||||
https://www.ruby-lang.org/en/[Ruby], https://www.java.com/[Java],
|
||||
https://www.rust-lang.org/[Rust], and https://golang.org/[Go].
|
||||
* Whatever runtimes/toolchains for programming languages I have (e.g., Oracle Java, Rust, Go, LLVM).
|
||||
|
||||
|
||||
=== Browser extensions
|
||||
=== Browser extensions
|
||||
|
||||
* https://bitwarden.com/[Bitwarden] - An open source password manager.
|
||||
Comes with a browser extension or a desktop version of the app.
|
||||
* Internet Archive Web Extension (https://chrome.google.com/webstore/detail/wayback-machine/fpnmgdkabkmnadcjpehmlllkndpkmiak[Chrome] and https://addons.mozilla.org/en-US/firefox/addon/wayback-machine_new/[Firefox] version) - A browser extension for tracking down the saved versions of a page.
|
||||
Very useful extension for tracking old resources that has been moved or deleted.
|
||||
* https://github.com/gorhill/uBlock[uBlock Origin] - A security tool for blocking known trackers.
|
||||
* https://www.one-tab.com/[OneTab extension] - An extension to enable grouping of tabs into one tab.
|
||||
Convenient for preventing a lot of tabs opened at one time.
|
||||
* https://www.eff.org/privacybadger[Privacy Badger] - A security tool for blocking trackers.
|
||||
Unlike the other blockers like uBlock Origin, Privacy Badger learns with more usage.
|
||||
* https://bitwarden.com/[Bitwarden] - An open source password manager.
|
||||
Comes with a browser extension or a desktop version of the app.
|
||||
* Internet Archive Web Extension (https://chrome.google.com/webstore/detail/wayback-machine/fpnmgdkabkmnadcjpehmlllkndpkmiak[Chrome] and https://addons.mozilla.org/en-US/firefox/addon/wayback-machine_new/[Firefox] version) - A browser extension for tracking down the saved versions of a page.
|
||||
Very useful extension for tracking old resources that has been moved or deleted.
|
||||
* https://github.com/gorhill/uBlock[uBlock Origin] - A security tool for blocking known trackers.
|
||||
* https://www.one-tab.com/[OneTab extension] - An extension to enable grouping of tabs into one tab.
|
||||
Convenient for preventing a lot of tabs opened at one time.
|
||||
* https://www.eff.org/privacybadger[Privacy Badger] - A security tool for blocking trackers.
|
||||
Unlike the other blockers like uBlock Origin, Privacy Badger learns with more usage.
|
||||
|
||||
|
@ -153,84 +153,6 @@ font:
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Colors (Tomorrow Night Bright)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
foreground: '0xe5e3e3'
|
||||
background: '0x221e21'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not present.
|
||||
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||
# is `false`, the normal foreground color will be used.
|
||||
#dim_foreground: '0x9a9a9a'
|
||||
#bright_foreground: '0xffffff'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||
# the cursor color will be the inverse of the cell color.
|
||||
#cursor:
|
||||
# text: '0x000000'
|
||||
# cursor: '0xffffff'
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area. If selection
|
||||
# background is unset, selection color will be the inverse of the cell colors.
|
||||
# If only text is unset the cell text color will remain the same.
|
||||
#selection:
|
||||
# text: '0xeaeaea'
|
||||
# background: '0x404040'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x0c080b'
|
||||
red: '0xa83d63'
|
||||
green: '0xd09177'
|
||||
yellow: '0x506699'
|
||||
blue: '0xb5695a'
|
||||
magenta: '0x4da6ce'
|
||||
cyan: '0xaea0c7'
|
||||
white: '0xd1cfcf'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x383437'
|
||||
red: '0xbf718d'
|
||||
green: '0xdcaf9c'
|
||||
yellow: '0x6f81ab'
|
||||
blue: '0xc98fb5'
|
||||
magenta: '0x7dbedb'
|
||||
cyan: '0xbcb1d1'
|
||||
white: '0xeceaea'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
# If the dim colors are not set, they will be calculated automatically based
|
||||
# on the `normal` colors.
|
||||
#dim:
|
||||
# black: '0x000000'
|
||||
# red: '0x8c3336'
|
||||
# green: '0x7a8530'
|
||||
# yellow: '0x97822e'
|
||||
# blue: '0x506d8f'
|
||||
# magenta: '0x80638e'
|
||||
# cyan: '0x497e7a'
|
||||
# white: '0x9a9a9a'
|
||||
|
||||
# Indexed Colors
|
||||
#
|
||||
# The indexed colors include all colors from 16 to 256.
|
||||
# When these are not set, they're filled with sensible defaults.
|
||||
#
|
||||
# Example:
|
||||
# `- { index: 16, color: '0xff00ff' }`
|
||||
#
|
||||
indexed_colors: []
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
@ -261,7 +183,7 @@ visual_bell:
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
background_opacity: 0.875
|
||||
background_opacity: 1
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
|
@ -10,9 +10,10 @@
|
||||
# * rofi - Version: 1.5.4
|
||||
# * xclip - version 0.13
|
||||
|
||||
SELECTION=$(awk 'match($0, /([0-9A-F ]+)\s+; fully-qualified\s+# (\S+) E[[:digit:]]+.[[:digit:]]+ (.+)$/, a){print a[2], a[3]}' ~/.local/share/emoji-test.txt | rofi -dmenu -p "Choose an emoji to copy." -theme fds-sidebar-dark | awk '{print $1}')
|
||||
emoji_file='~/.local/share/emoji-test.txt'
|
||||
selection=$(awk 'match($0, /([0-9A-F ]+)\s+; fully-qualified\s+# (\S+) E[[:digit:]]+.[[:digit:]]+ (.+)$/, a){print a[2], a[3]}' ~/emojis.txt | rofi -dmenu -p "Choose an emoji to copy." -theme fds-sidebar-dark | awk '{print $1}')
|
||||
|
||||
if [ -n "$SELECTION" ]; then
|
||||
printf "$SELECTION" | xclip -selection clipboard && notify-send "'$(xclip -o -selection clipboard)' has been copied to clipboard."
|
||||
if [ -n "$selection" ]; then
|
||||
printf "$selection" | xclip -selection clipboard && notify-send "'$(xclip -o -selection clipboard)' has been copied to clipboard."
|
||||
fi
|
||||
|
||||
|
243
bin/export-wal-theme
Normal file
243
bin/export-wal-theme
Normal file
@ -0,0 +1,243 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# This simple Python 3 script simply generates a color scheme in wpgtk style with the auto-adjusted colors.
|
||||
# I like how wpgtk generates the color palette but I don't like the workflow of it.
|
||||
# I like the simple workflow of pywal but I don't like the colors generated by it and I think it has built-in limitations for generating colors.
|
||||
# So I combined both of the best in this one glued script.
|
||||
|
||||
# The command line program simply needs an image path as the argument — `export-theme ~/Pictures/mountain.jpg`.
|
||||
# It will also export the theme as a JSON file in the current directory — `mountain.json`.
|
||||
|
||||
# Most of the code are "borrowed" from the wpgtk codebase and I've simply studied them and added some documentation.
|
||||
# It simply needs pywal as a dependency.
|
||||
|
||||
import argparse
|
||||
from colorsys import rgb_to_hls, hls_to_rgb
|
||||
import json
|
||||
import math
|
||||
from operator import itemgetter
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
import pywal
|
||||
|
||||
|
||||
###################
|
||||
# COLOR FUNCTIONS #
|
||||
###################
|
||||
|
||||
def hls_to_hex(hls):
|
||||
"""
|
||||
Returns a HLS coordinate into its hex color code equivalent.
|
||||
|
||||
:param: hls - An HLS tuple according to the colorsys library (https://docs.python.org/3.8/library/colorsys.html).
|
||||
|
||||
:returns: A hex color string equivalent.
|
||||
"""
|
||||
h, l, s = hls
|
||||
r, g, b = hls_to_rgb(h, l, s)
|
||||
rgb_int = [max(min(int(elem), 255), 0) for elem in [r, g, b]]
|
||||
|
||||
return pywal.util.rgb_to_hex(rgb_int)
|
||||
|
||||
|
||||
def hex_to_hls(hex_string):
|
||||
"""
|
||||
Returns an HLS coordinate equivalent of the given hex color code.
|
||||
It uses RGB as the intermediate for converting the hex string.
|
||||
|
||||
:param: hex_string - A (hopefully) valid hex string.
|
||||
|
||||
:returns: An HLS tuple compatible with the colorsys library.
|
||||
"""
|
||||
r, g, b = pywal.util.hex_to_rgb(hex_string)
|
||||
return rgb_to_hls(r, g, b)
|
||||
|
||||
|
||||
def get_distance(hex_src, hex_tgt):
|
||||
"""
|
||||
Returns the distance between two hex values.
|
||||
The formula used in this function is based from the Wikipedia article (https://en.wikipedia.org/wiki/Color_difference).
|
||||
|
||||
:param: hex_src - A hex color string.
|
||||
:param: hex_tgt - The target hex color code.
|
||||
|
||||
:returns: A float that describes the distance.
|
||||
"""
|
||||
r1, g1, b1 = pywal.util.hex_to_rgb(hex_src)
|
||||
r2, g2, b2 = pywal.util.hex_to_rgb(hex_tgt)
|
||||
|
||||
return math.sqrt((r2 - r1)**2 + (g2 - g1)**2 + (b2 - b1)**2)
|
||||
|
||||
|
||||
def alter_brightness(hex_string, light, sat=0):
|
||||
"""
|
||||
Alters amount of light and saturation in a color.
|
||||
|
||||
:param: hex_string - A hex color string (top-notch documentation right here, folks).
|
||||
:param: light - The amount of light to apply; generally, the acceptable range is -255 to 255 and beyond that is dangerous territory.
|
||||
:param: sat - The amount of saturation to apply; the acceptable range is -1 to 1.
|
||||
|
||||
:returns: A hex color code of the adjusted color.
|
||||
"""
|
||||
h, l, s = hex_to_hls(hex_string)
|
||||
l = max(min(l + light, 255), 1)
|
||||
s = min(max(s - sat, -1), 0)
|
||||
|
||||
return hls_to_hex((h, l, s))
|
||||
|
||||
|
||||
def is_dark_theme(color_list):
|
||||
"""
|
||||
Checks by the color list if it's a dark theme.
|
||||
|
||||
:param: color_list - A list of hex color codes usually 16 of them.
|
||||
|
||||
:returns: A boolean indicating if it's a dark theme.
|
||||
"""
|
||||
*_, bg_brightness = hex_to_hls(color_list[0])
|
||||
*_, fg_brightness = hex_to_hls(color_list[7])
|
||||
|
||||
return fg_brightness < bg_brightness
|
||||
|
||||
|
||||
def adjust_colors(colors, light_mode = False):
|
||||
"""
|
||||
Create a clear foreground and background set of colors.
|
||||
|
||||
:param: colors - A Pywal color object. See https://github.com/dylanaraps/pywal/wiki/Using-%60pywal%60-as-a-module#color-dict-format for more info.
|
||||
:param: light_mode - Toggle to create a light mode version of the adjustment.
|
||||
|
||||
:returns: A Pywal color object with the adjusted values.
|
||||
"""
|
||||
colors = smart_sort(colors)
|
||||
|
||||
added_sat = 0.25 if light_mode else 0.1
|
||||
sign = -1 if light_mode else 1
|
||||
|
||||
if light_mode == is_dark_theme(colors):
|
||||
colors[7], colors[0] = colors[0], colors[7]
|
||||
|
||||
comment = [alter_brightness(colors[0], sign * 25)]
|
||||
fg = [alter_brightness(colors[7], sign * 60)]
|
||||
|
||||
colors = colors[:8] + comment \
|
||||
+ [alter_brightness(color, sign * hex_to_hls(color)[1] * 0.3, added_sat) for color in colors[1:7]] + fg
|
||||
|
||||
return colors
|
||||
|
||||
|
||||
def smart_sort(colors):
|
||||
"""
|
||||
Automatically set the most look-alike colors to their
|
||||
corresponding place in the standard xterm colors.
|
||||
|
||||
:param: colors - A list of hex color strings.
|
||||
|
||||
:returns: The color list sorted out.
|
||||
"""
|
||||
colors = colors[:8]
|
||||
sorted_by_color = list()
|
||||
base_colors = ["#000000", "#ff0000", "#00ff00", "#ffff00",
|
||||
"#0000ff", "#ff00ff", "#00ffff", "#ffffff"]
|
||||
|
||||
for y in base_colors:
|
||||
cd_tuple = [(x, get_distance(x, y)) for i, x in enumerate(colors)]
|
||||
cd_tuple.sort(key=itemgetter(1))
|
||||
sorted_by_color.append(cd_tuple)
|
||||
|
||||
i = 0
|
||||
while i < 8:
|
||||
current_cd = sorted_by_color[i][0]
|
||||
closest_cds = [sorted_by_color[x][0] for x in range(8)]
|
||||
reps = [x for x in range(8) if closest_cds[x][0] == current_cd[0]]
|
||||
|
||||
if len(reps) > 1:
|
||||
closest = min([closest_cds[x] for x in reps], key=itemgetter(1))
|
||||
reps = [x for x in reps if x != closest_cds.index(closest)]
|
||||
any(sorted_by_color[x].pop(0) for x in reps)
|
||||
i = 0
|
||||
else:
|
||||
i += 1
|
||||
|
||||
sorted_colors = [sorted_by_color[x][0][0] for x in range(8)]
|
||||
return [*sorted_colors, *sorted_colors]
|
||||
|
||||
|
||||
##################
|
||||
# MAIN FUNCTIONS #
|
||||
##################
|
||||
|
||||
def setup_args():
|
||||
"""
|
||||
Setup the argument parser.
|
||||
"""
|
||||
description = "A simple Pywal theme export script with auto-adjusted colors from wpgtk"
|
||||
argparser = argparse.ArgumentParser(description=description)
|
||||
|
||||
argparser.add_argument("input", help="The input (image) of the color scheme to be generated.", metavar="IMAGE")
|
||||
argparser.add_argument("-o", "--output", help="The location of the colorscheme JSON to be exported.", metavar="FILE")
|
||||
argparser.add_argument("--no-output", help="Specifies no JSON output to be created; also overrides any output-related options.", action='store_true')
|
||||
|
||||
return argparser
|
||||
|
||||
|
||||
def export_wpgtk_colors(image_path):
|
||||
"""
|
||||
Export Pywal templates with the given image and the color scheme data.
|
||||
Take note the exported Pywal object has no 'wallpaper' key for portability.
|
||||
|
||||
:param: image_path - The path of the image. ;)
|
||||
|
||||
:returns: The Pywal dictionary.
|
||||
"""
|
||||
pywal_dict = pywal.colors.get(image_path)
|
||||
colors = []
|
||||
for color_name, color in pywal_dict["colors"].items():
|
||||
colors.append(color)
|
||||
|
||||
colors = adjust_colors(colors)
|
||||
|
||||
for index, color in enumerate(colors):
|
||||
pywal_dict["colors"][f"color{index}"] = color
|
||||
|
||||
# Export every templates in Pywal including the user templates and reload the newly applied theme.
|
||||
pywal.export.every(pywal_dict)
|
||||
|
||||
del pywal_dict["wallpaper"]
|
||||
|
||||
# Feel free to add some reloading code that Pywal provides or something.
|
||||
# I'm not putting mine since it's intended to only export theme.
|
||||
# You can't tell me what to do here. >:-)
|
||||
|
||||
return pywal_dict
|
||||
|
||||
|
||||
def parse_args(parser, argv):
|
||||
"""
|
||||
Parse the args and do the thing.
|
||||
|
||||
:param: parser - An `argparse.ArgumentParser` instance.
|
||||
:param: argv - A list of arguments to be parsed.
|
||||
"""
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
pywal_dict = export_wpgtk_colors(args.input)
|
||||
|
||||
if args.output is not None:
|
||||
output_file = args.output
|
||||
else:
|
||||
output_file = f"{Path(args.input).stem}.json"
|
||||
|
||||
if not args.no_output:
|
||||
# Save the adjusted theme as a JSON file.
|
||||
with open(output_file, "w") as json_file:
|
||||
json.dump(pywal_dict, json_file, indent = 4)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
argparser = setup_args()
|
||||
|
||||
parse_args(argparser, sys.argv[1:])
|
||||
|
46
bin/install-wal-theme
Normal file
46
bin/install-wal-theme
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is simply an additional reloading script in addition to Pywal's own.
|
||||
# This code is specific machine-to-machine so you better make sure to update it to suit your need.
|
||||
|
||||
readonly cache=${XDG_CACHE_HOME:-"$HOME/.cache"}
|
||||
readonly config=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||
|
||||
readonly pywal_cache=$cache/wal
|
||||
|
||||
# Copying the Pywal color scheme JSON into the theme list.
|
||||
# This file suffix removal is based on the linked code:
|
||||
# https://stackoverflow.com/a/32584935
|
||||
readonly pywal_json=$pywal_cache/colors.json
|
||||
readonly theme=$(jq -r ".wallpaper" "$pywal_json" | xargs basename | rev | cut -f 2- -d '.' | rev)
|
||||
readonly theme_dir="$config/wal/colorschemes/dark"
|
||||
mkdir -p "$theme_dir"
|
||||
cp "$pywal_json" "$theme_dir/$theme.json"
|
||||
|
||||
# Copying the dynamically crerated rofi themes.
|
||||
cp "$pywal_cache/fds-mini-sidebar.rasi" "$XDG_CONFIG_HOME/rofi"
|
||||
cp "$pywal_cache/dmenu.rasi" "$XDG_CONFIG_HOME/rofi"
|
||||
|
||||
# Copying bspwm config and reloading it.
|
||||
cp "$pywal_cache/bspwmrc" "$XDG_CONFIG_HOME/bspwm" && bspc wm -r
|
||||
|
||||
# Reloading polybar.
|
||||
# pkill -USR1 polybar
|
||||
|
||||
# Copying dunst config and reloading it.
|
||||
# The reload mechanism feels very hacky and the maintainers warn about it.
|
||||
# See more at the Arch Wiki entry (https://wiki.archlinux.org/index.php/Dunst) and the linked issue (https://github.com/dunst-project/dunst/issues/63).
|
||||
cp "$pywal_cache/dunstrc" "$XDG_CONFIG_HOME/dunst" && pkill dunst && dunst &
|
||||
|
||||
# Creating a Doom Emacs theme.
|
||||
# Unlike the previous templates, this is stored on another directory.
|
||||
# Unfortunately, this requires installing some crap I made.
|
||||
# You can find the Doom Emacs generator here: https://gitlab.com/foo-dogsquared/doom-theme-generator/-/blob/master/doom-theme-generator.py .
|
||||
(
|
||||
cd ~/projects/doom-theme-generator
|
||||
./doom-theme-generator.py --name fds
|
||||
mv doom-fds-theme.el "$XDG_CONFIG_HOME/doom/themes/"
|
||||
)
|
||||
|
||||
notify-send "The theme has been installed."
|
||||
|
367
bin/rofi-screen
367
bin/rofi-screen
@ -1,367 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is a modified script of the original rofi-screenshot script by @ceuk on GitHub.
|
||||
# This simply removes the ffcast dependency and replaced it with MORE dependencies.
|
||||
# I did this so I can call this a 'productive' day.
|
||||
# The original script is in https://github.com/ceuk/rofi-screenshot.
|
||||
# (Seriously though, ffcast is cool.)
|
||||
|
||||
# This script basically creates an applet through Rofi for all of your screenshotting and screencasting needs.
|
||||
|
||||
# This script is licensed with Do What The F*ck You Want To Public License (WTFPL).
|
||||
# Feel free to steal it, copy it, cook it, teach it, marry it, whatever it.
|
||||
|
||||
# Dependencies (or at least at the time of updating this script):
|
||||
# * bash 5.0.16
|
||||
# * GNU coreutils 8.31
|
||||
# * ffmpeg 4.2.2 - Mainly for converting files and video capture.
|
||||
# * maim 5.5.3 - Screen capture tool.
|
||||
# * dunst 1.4.1 - A desktop notification daemon.
|
||||
# * xclip 0.13 - X-based clipboard manager.
|
||||
# * xdg-user-dir 0.17 - Basically lists directory according to the XDG directory standard or smth; this dependency is the least important.
|
||||
# * util-linux 2.35
|
||||
|
||||
# Feel free to change these.
|
||||
readonly _script_name="$(basename $0)"
|
||||
|
||||
readonly screenshots_directory=$(xdg-user-dir PICTURES)
|
||||
readonly videos_directory=$(xdg-user-dir VIDEOS)
|
||||
|
||||
readonly lockfile="/tmp/rofi-screen.lock"
|
||||
|
||||
|
||||
|
||||
#####################
|
||||
# UTILITY FUNCTIONS #
|
||||
#####################
|
||||
|
||||
# Toggle running of a program.
|
||||
# If a process that is stored on a specific file exists, it prompts the user to kill it.
|
||||
# $1 - The command to run when there is no active processes.
|
||||
# $2 - The prompt message when the prompt is active.
|
||||
# $3 - The command to run when the prompt is accepted.
|
||||
_toggle() {
|
||||
local cmd="$1"
|
||||
local prompt_msg="$2"
|
||||
local prompt_cmd="$3"
|
||||
|
||||
if [[ ! -f "$lockfile" ]] && touch "$lockfile";
|
||||
then
|
||||
# Delete the lockfile when the script has exited successfully.
|
||||
trap "rm -f $lockfile" 0
|
||||
trap "rm -f $lockfile" ERR
|
||||
|
||||
$("$cmd")
|
||||
else
|
||||
_prompt "$prompt_msg" "$prompt_cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
_unlock() {
|
||||
pid="$(cat $lockfile)"
|
||||
kill -SIGTERM "$pid"
|
||||
rm -f "$lockfile"
|
||||
}
|
||||
|
||||
# Prompts the user.
|
||||
# $1 - The prompt message.
|
||||
# $@ - The command to be executed in case the user agrees.
|
||||
_prompt() {
|
||||
local prompt_msg="$1"
|
||||
shift
|
||||
[ "$(printf "No\\nYes" | rofi -dmenu -p "$prompt_msg")" = "Yes" ] && "$@"
|
||||
}
|
||||
|
||||
# Converts a video to GIF with ffmpeg.
|
||||
# $1 - The input file to be converted.
|
||||
# $2 - The output file.
|
||||
_video_to_gif() {
|
||||
local input_file="$1"
|
||||
local output_file="$2"
|
||||
ffmpeg -i "$input_file" -vf palettegen -f image2 -c:v png - |
|
||||
ffmpeg -i "$input_file" -i - -filter_complex paletteuse "$output_file"
|
||||
}
|
||||
|
||||
# It just counts down with desktop notifications.
|
||||
# $1 - The duration of the countdown.
|
||||
_countdown() {
|
||||
local counter="$((${1:-3}))"
|
||||
local msg="${2:-Countdown}"
|
||||
while [[ counter -ne 0 ]];
|
||||
do
|
||||
notify-send "$msg" "Recording in $counter seconds" --expire-time 1000 --urgency low
|
||||
sleep 1
|
||||
counter=$((counter - 1))
|
||||
done
|
||||
}
|
||||
|
||||
# Prints the screen size dynamically.
|
||||
_screen_size() {
|
||||
# We're using xrandr to know the list of available resolutions.
|
||||
# Conveniently, the current resolution is marked with an asterisk (*).
|
||||
xrandr | awk '/*/ { print $1 }'
|
||||
}
|
||||
|
||||
# Basically the built-in `wait` command with some additional stuff going on.
|
||||
# $@ - The command to be executed in the background.
|
||||
_wait() {
|
||||
$@ &
|
||||
local pid=$!
|
||||
echo $pid >> "$lockfile"
|
||||
wait $pid
|
||||
}
|
||||
|
||||
# Create a desktop notification and exit.
|
||||
# This is mostly used for failure messages.
|
||||
# $1 - Notification header message.
|
||||
# $2 - Notification body message.
|
||||
# $3 - Exit code.
|
||||
_notify_and_exit() {
|
||||
local notif_header="$1"
|
||||
local notif_body="$2"
|
||||
local exit_code="${3:-1}"
|
||||
|
||||
notify-send "$notif_header" "$notif_body"
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# COMMAND DEFAULTS #
|
||||
####################
|
||||
|
||||
ffmpeg() {
|
||||
exec ffmpeg -nostdin "$@"
|
||||
}
|
||||
|
||||
maim() {
|
||||
exec maim --hidecursor "$@"
|
||||
}
|
||||
|
||||
slop() {
|
||||
exec slop --highlight --tolerance=0 --color=0.0,0.0,0.0,0.4 "$@"
|
||||
}
|
||||
|
||||
|
||||
|
||||
#############
|
||||
# FUNCTIONS #
|
||||
#############
|
||||
|
||||
# Most of the commands are only specific to my setup.
|
||||
# Adjust the script to fit with yours, alright?
|
||||
|
||||
# Capture region to clipboard.
|
||||
capture_region_to_clipboard() {
|
||||
notify-send "Screenshot" "Select a region to capture"
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
notify-send "Screenshot" "Region copied to Clipboard"
|
||||
}
|
||||
|
||||
# Capture region to file.
|
||||
# $1 - The output file.
|
||||
capture_region_to_file() {
|
||||
file=${1:-"$screenshots_directory/$(date '+%F-%H-%M-%S').png"}
|
||||
notify-send "Screenshot" "Select a region to capture"
|
||||
maim -s "$file"
|
||||
notify-send "Screenshot" "File saved to $file"
|
||||
}
|
||||
|
||||
# Capture screen to clipboard.
|
||||
capture_screen_to_clipboard() {
|
||||
maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
|
||||
notify-send "Screenshot" "Screen image copied to clipboard"
|
||||
}
|
||||
|
||||
# Capture screen to file.
|
||||
# $1 - The output file. A default value is provided.
|
||||
capture_screen_to_file() {
|
||||
file=${1:-"$screenshots_directory/$(date '+%F-%H-%M-%S-screen').png"}
|
||||
maim -i $(xdotool getactivewindow) "$file"
|
||||
notify-send "Screenshot" "Screen image saved to $file"
|
||||
}
|
||||
|
||||
|
||||
# Unlike screenshot functions, screencast functions check for another instance of it running.
|
||||
# If there is another instance of recording, the user will be prompted to kill it before recording a new one.
|
||||
|
||||
# Record a region to a video file.
|
||||
# $1 - The path of the output.
|
||||
record_region_to_mkv() {
|
||||
notify-send "Screen cast" "Select a region to record"
|
||||
|
||||
# Storing all of the relevant data.
|
||||
# We're separating the declaration and the initialization since it expands to the exit status.
|
||||
local region;
|
||||
region=$(slop -f "%x %y %w %h %g %i") || _notify_and_exit "Screen capture failed" "Selection mode has been exited. Cancelling the recording."
|
||||
read -r pos_x pos_y width height grid id <<< "$region"
|
||||
|
||||
# Setting the file name.
|
||||
local file=${1:-"$videos_directory/$(date '+%F-%H-%M-%S')-${pos_x}-${pos_y}.mkv"}
|
||||
|
||||
# Notifying the user about the ongoing recording session.
|
||||
_countdown
|
||||
notify-send "Screen cast" "Selected region currently recording. To be saved at $file"
|
||||
|
||||
# Executing the recording process in the background and waiting for it.
|
||||
_wait ffmpeg -f x11grab -s "${width}x${height}" -i ":0.0+${pos_x},${pos_y}" -f pulse -ac 2 -i default "$file"
|
||||
|
||||
# And notifying the user about the new video file.
|
||||
notify-send "Screen cast" "Recording saved to $file"
|
||||
}
|
||||
|
||||
# Record video to screen.
|
||||
# $1 - The path to the output file.
|
||||
# Will default to the $videos_directory
|
||||
record_screen_to_mkv() {
|
||||
# Setting the file name.
|
||||
local file=${1:-"$videos_directory/$(date '+%F-%H-%M-%S')-$(_screen_size).mkv"}
|
||||
|
||||
# Just notifying the user about the recording session.
|
||||
_countdown
|
||||
notify-send "Screen cast" "Screen currently recording. To be saved at $file"
|
||||
|
||||
# Executing the recording process in the background and waiting for it.
|
||||
_wait ffmpeg -f x11grab -s "$(_screen_size)" -i ":0.0+0+0" "$file"
|
||||
|
||||
# And notifying the user about the new video file.
|
||||
notify-send "Screen cast" "Recording saved to $file"
|
||||
}
|
||||
|
||||
# Record region to GIF file.
|
||||
# $1 - The output file.
|
||||
record_region_to_gif() {
|
||||
# It is more recommended to have the live recording file that is not MP4.
|
||||
# In my tests, MP4 files have more chances to fail than other formats so we'll change the format to MKV.
|
||||
local temp_screencast="/tmp/screenshot_gif.mkv"
|
||||
|
||||
record_region_to_mkv $temp_screencast
|
||||
|
||||
notify-send "Screenshot" "Converting to gif... (this can take a while)"
|
||||
_video_to_gif "$temp_screencast" "$file" \
|
||||
&& notify-send "Screen cast" "Recording saved to $file" \
|
||||
|| _notify_and_exit "Screen cast has failed to be converted" "Some things go like that, I guess..."
|
||||
|
||||
rm "$temp_screencast" 2>/dev/null
|
||||
}
|
||||
|
||||
# Record screen to GIF file.
|
||||
# $1 - The location of the output file.
|
||||
record_screen_to_gif() {
|
||||
local readonly temp_screencast="/tmp/screenshot_gif.mkv"
|
||||
|
||||
record_screen_to_mkv $temp_screencast
|
||||
|
||||
notify-send "Screenshot" "Converting to gif... (this can take a while)"
|
||||
_video_to_gif $temp_screencast "$screenshot_directory/$dt.gif"
|
||||
rm $temp_screencast
|
||||
notify-send "Screenshot" "Recording saved to $screenshot_directory"
|
||||
}
|
||||
|
||||
_get_options() {
|
||||
echo " Capture Region Clip"
|
||||
echo " Capture Region File"
|
||||
echo " Capture Screen Clip"
|
||||
echo " Capture Screen File"
|
||||
echo " Record Region File (GIF)"
|
||||
echo " Record Screen File (GIF)"
|
||||
echo " Record Region File (MKV)"
|
||||
echo " Record Screen File (MKV)"
|
||||
}
|
||||
|
||||
# Simply checks if the given script is available.
|
||||
# $1 - The script to be checked.
|
||||
_check_deps() {
|
||||
local script=$1
|
||||
if ! hash $script 2>/dev/null; then
|
||||
echo "Error: This script requires $script"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# The help section string.
|
||||
_help="Usage: $_script_name [OPTIONS]
|
||||
|
||||
Launches a menu for your screenshoting and screencasting needs.
|
||||
|
||||
Options:
|
||||
-h, --help Prints the help section.
|
||||
--stop Stop if there's an active process.
|
||||
--check Exits successfully if there's an active process.
|
||||
--prompt Prompts if there's an active process.
|
||||
"
|
||||
|
||||
main() {
|
||||
# Check the dependencies.
|
||||
# I think this is a bit overkill, I'll probably refactor this later on.
|
||||
_check_deps xdg-user-dir
|
||||
_check_deps xclip
|
||||
_check_deps slop
|
||||
_check_deps dunst
|
||||
_check_deps maim
|
||||
_check_deps ffmpeg
|
||||
_check_deps rofi
|
||||
|
||||
# Parsing the arguments.
|
||||
# Since getopts does not support long options so we'll have to roll our own.
|
||||
while [[ $# -gt 0 ]];
|
||||
do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
printf "$_help" && exit 0
|
||||
;;
|
||||
--stop)
|
||||
set -e
|
||||
_unlock
|
||||
exit 0
|
||||
;;
|
||||
--check)
|
||||
[[ -f "$lockfile" ]] || exit 1
|
||||
exit 0
|
||||
;;
|
||||
--prompt)
|
||||
[[ -f "$lockfile" ]] && _prompt "Cancel the active process?" _unlock || exit 1
|
||||
exit 0
|
||||
esac
|
||||
done
|
||||
|
||||
# Get choice from rofi
|
||||
choice=$( (_get_options) | rofi -theme fds-sidebar-dark -dmenu -i -fuzzy -p "Choose your action" )
|
||||
|
||||
# If user has not picked anything, exit
|
||||
if [[ -z "${choice// }" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run the selected command
|
||||
case $choice in
|
||||
' Capture Region Clip')
|
||||
capture_region_to_clipboard
|
||||
;;
|
||||
' Capture Region File')
|
||||
capture_region_to_file
|
||||
;;
|
||||
' Capture Screen Clip')
|
||||
capture_screen_to_clipboard
|
||||
;;
|
||||
' Capture Screen File')
|
||||
capture_screen_to_file
|
||||
;;
|
||||
' Record Region File (GIF)')
|
||||
_toggle record_region_to_gif "Cancel the recording?" _unlock
|
||||
;;
|
||||
' Record Screen File (GIF)')
|
||||
_toggle record_screen_to_gif "Cancel the recording?" _unlock
|
||||
;;
|
||||
' Record Region File (MKV)')
|
||||
_toggle record_region_to_mkv "Cancel the recording?" _unlock
|
||||
;;
|
||||
' Record Screen File (MKV)')
|
||||
_toggle record_screen_to_mkv "Cancel the recording?" _unlock
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main $@
|
||||
|
267
bin/rofi-screenshot
Normal file
267
bin/rofi-screenshot
Normal file
@ -0,0 +1,267 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is a fork of rofi-screenshot (original at https://github.com/ceuk/rofi-screenshot/), basically a menu for all of your screenshoting and screencasting needs using rofi as the frontend.
|
||||
# This script is meant to be modified for your specific need so feel free to do that.
|
||||
|
||||
|
||||
#############
|
||||
# CONSTANTS #
|
||||
#############
|
||||
|
||||
readonly _script_name="rofi-screenshot"
|
||||
readonly _record_process_name='(/\S+)*ffmpeg\s.*\sx11grab\s.*'
|
||||
readonly _process_id="$$"
|
||||
|
||||
readonly screenshot_directory="$(xdg-user-dir PICTURES)/screenshots"
|
||||
readonly screenshot_msg_header="Screenshot"
|
||||
|
||||
readonly video_directory="$(xdg-user-dir VIDEOS)/recordings"
|
||||
readonly video_msg_header="Screencast"
|
||||
|
||||
readonly date_filename_format="+%F-%H-%M-%S"
|
||||
|
||||
# Exit the script on USR1 signal.
|
||||
trap 'exit 1' 10
|
||||
|
||||
|
||||
#####################
|
||||
# UTILITY FUNCTIONS #
|
||||
#####################
|
||||
|
||||
# Setting the default command for ffmpeg.
|
||||
ffmpeg() {
|
||||
command ffmpeg -hide_banner -loglevel error -nostdin "$@"
|
||||
}
|
||||
|
||||
# Convert a video to GIF.
|
||||
# $1 - The input file.
|
||||
# $2 - The output file.
|
||||
video_to_gif() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
ffmpeg -i "$input" -vf palettegen -f image2 -c:v png - |
|
||||
ffmpeg -i "$input" -i - -filter_complex paletteuse "$output"
|
||||
}
|
||||
|
||||
# Create a countdown with desktop notifications.
|
||||
# $1 - The duration of the countdown.
|
||||
# $2 - The header of the notification.
|
||||
_countdown() {
|
||||
local counter="$((${1:-3}))"
|
||||
local msg="${2:-Countdown}"
|
||||
while [[ counter -ne 0 ]];
|
||||
do
|
||||
notify-send "$msg" "Recording in $counter seconds" --expire-time 1000 --urgency low
|
||||
sleep 1
|
||||
counter=$((counter - 1))
|
||||
done
|
||||
}
|
||||
|
||||
# Prompts the user.
|
||||
# $1 - The prompt message.
|
||||
# $@ - The command to be executed in case the user agrees.
|
||||
_prompt() {
|
||||
local prompt_msg="$1"
|
||||
shift
|
||||
[ "$(printf "No\\nYes" | rofi -dmenu -p "$prompt_msg")" = "Yes" ] && "$@"
|
||||
}
|
||||
|
||||
# Check for the recording process.
|
||||
_check() {
|
||||
pgrep --full --exact --newest "$_record_process_name" 1>/dev/null
|
||||
}
|
||||
|
||||
# Kill the recording process.
|
||||
_kill() {
|
||||
pkill --full --exact --newest "$_record_process_name"
|
||||
}
|
||||
|
||||
|
||||
######################
|
||||
# SCREENSHOT OPTIONS #
|
||||
######################
|
||||
|
||||
capture_region_to_clipboard() {
|
||||
notify-send "$screenshot_msg_header" "Select a region to capture"
|
||||
ffcast -q $(slop -n -f '-g %g ') png /tmp/screenshot_clip.png
|
||||
xclip -selection clipboard -t image/png /tmp/screenshot_clip.png && \
|
||||
notify-send "$screenshot_msg_header" "Region copied to clipboard"
|
||||
rm /tmp/screenshot_clip.png
|
||||
}
|
||||
|
||||
capture_region_to_file() {
|
||||
notify-send "$screenshot_msg_header" "Select a region to capture"
|
||||
dt=$(date "$date_filename_format")
|
||||
|
||||
local image_file="$screenshot_directory/$dt.png"
|
||||
local geometry=$(slop -n -f '-g %g ' || kill -USR1 "$_process_id")
|
||||
ffcast -q "$geometry" png "$image_file"
|
||||
notify-send "$screenshot_msg_header" "Region saved as $image_file"
|
||||
}
|
||||
|
||||
capture_screen_to_clipboard() {
|
||||
ffcast -q png /tmp/screenshot_clip.png
|
||||
xclip -selection clipboard -t image/png /tmp/screenshot_clip.png
|
||||
rm /tmp/screenshot_clip.png
|
||||
notify-send "$screenshot_msg_header" "Screenshot copied to clipboard"
|
||||
}
|
||||
|
||||
capture_screen_to_file() {
|
||||
dt=$(date "$date_filename_format")
|
||||
|
||||
local image_file="$screenshot_directory/$dt.png"
|
||||
ffcast -q png "$image_file"
|
||||
notify-send "Screenshot" "Screenshot saved as $image_file"
|
||||
}
|
||||
|
||||
|
||||
######################
|
||||
# SCREENCAST OPTIONS #
|
||||
######################
|
||||
|
||||
record_region_to_gif() {
|
||||
notify-send "$video_msg_header" "Select a region to record"
|
||||
dt=$(date "$date_filename_format")
|
||||
|
||||
local geometry=$(slop -n -f '-g %g ' && _countdown || kill -USR1 "$_process_id")
|
||||
ffcast -q rec /tmp/screenshot_gif.mkv
|
||||
notify-send "$video_msg_header" "Converting to gif... (this can take a while)"
|
||||
|
||||
local recording_file="$video_directory/$dt.gif"
|
||||
video_to_gif /tmp/screenshot_gif.mp4 $recording_file
|
||||
rm /tmp/screenshot_gif.mp4
|
||||
notify-send "$video_msg_header" "Recording saved as $recording_file"
|
||||
}
|
||||
|
||||
record_screen_to_gif() {
|
||||
_countdown
|
||||
dt=$(date "$date_filename_format")
|
||||
ffcast -q rec /tmp/screenshot_gif.mp4
|
||||
notify-send "$video_msg_header" "Converting to GIF... (this can take a while)"
|
||||
|
||||
local recording_file="$video_directory/$dt.gif"
|
||||
video_to_gif /tmp/screenshot_gif.mp4 "$screenshot_directory/$dt.gif"
|
||||
rm /tmp/screenshot_gif.mp4
|
||||
notify-send "$video_msg_header" "Recording saved to $screenshot_directory"
|
||||
}
|
||||
|
||||
record_region_to_mkv() {
|
||||
notify-send "$video_msg_header" "Select a region to record"
|
||||
dt=$(date "$date_filename_format")
|
||||
|
||||
local geometry=$(slop -n -f '-g %g ' && _countdown || kill -USR1 "$_process_id")
|
||||
local video_file="$video_directory/$dt.mkv"
|
||||
ffcast -q "$geometry" rec "$video_file"
|
||||
notify-send "$video_msg_header" "Recording saved as $video_file"
|
||||
}
|
||||
|
||||
record_screen_to_mkv() {
|
||||
countdown
|
||||
dt=$(date "$date_filename_format")
|
||||
|
||||
local video_file="$video_directory/$dt.mkv"
|
||||
ffcast -q rec "$video_file"
|
||||
notify-send "$video_msg_header" "Recording saved as $video_file"
|
||||
}
|
||||
|
||||
get_options() {
|
||||
echo "Capture Region Clip"
|
||||
echo "Capture Region File"
|
||||
echo "Capture Screen Clip"
|
||||
echo "Capture Screen File"
|
||||
echo "Record Region File (GIF)"
|
||||
echo "Record Screen File (GIF)"
|
||||
echo "Record Region File (MKV)"
|
||||
echo "Record Screen File (MKV)"
|
||||
}
|
||||
|
||||
check_deps() {
|
||||
if ! hash $1 2>/dev/null; then
|
||||
echo "Error: This script requires $1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
_help="Usage: $_script_name [OPTIONS]
|
||||
|
||||
Launches a Rofi menu for your screenshoting and screencasting needs.
|
||||
|
||||
Options:
|
||||
-h, --help Prints the help section.
|
||||
--stop Stop if there's an active process.
|
||||
--check Exits successfully if there's an active process.
|
||||
The 'algorithm' for checking is very naive as it
|
||||
checks for a specific name so be sure to check the
|
||||
source code for yourself and update it accordingly.
|
||||
--prompt Prompts if there's an active process.
|
||||
"
|
||||
|
||||
main() {
|
||||
# check dependencies
|
||||
check_deps slop
|
||||
check_deps ffcast
|
||||
check_deps ffmpeg
|
||||
check_deps xclip
|
||||
check_deps rofi
|
||||
|
||||
# Parsing the arguments.
|
||||
# Since getopts does not support long options so we'll have to roll our own.
|
||||
while [[ $# -gt 0 ]];
|
||||
do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
printf "$_help" && exit 0
|
||||
;;
|
||||
--stop)
|
||||
_kill
|
||||
exit $!
|
||||
;;
|
||||
--check)
|
||||
_check
|
||||
exit $!
|
||||
;;
|
||||
--prompt)
|
||||
_check && _prompt "There's an active recording process; want to KILL it? :)" "_kill"
|
||||
exit $!
|
||||
esac
|
||||
done
|
||||
|
||||
# Get choice from Rofi.
|
||||
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "Screenshot" )
|
||||
|
||||
# If user has not picked anything, exit.
|
||||
if [[ -z "${choice// }" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the selected command.
|
||||
case $choice in
|
||||
'Capture Region Clip')
|
||||
capture_region_to_clipboard
|
||||
;;
|
||||
'Capture Region File')
|
||||
capture_region_to_file
|
||||
;;
|
||||
'Capture Screen Clip')
|
||||
capture_screen_to_clipboard
|
||||
;;
|
||||
'Capture Screen File')
|
||||
capture_screen_to_file
|
||||
;;
|
||||
'Record Region File (GIF)')
|
||||
record_region_to_gif
|
||||
;;
|
||||
'Record Screen File (GIF)')
|
||||
record_screen_to_gif
|
||||
;;
|
||||
'Record Region File (MKV)')
|
||||
record_region_to_mkv
|
||||
;;
|
||||
'Record Screen File (MKV)')
|
||||
record_screen_to_mkv
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main $1
|
||||
|
22
bin/select-wal-theme
Normal file
22
bin/select-wal-theme
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Creates an theme selection with sxiv and generates a colorscheme with pywal.
|
||||
# It also reloads additional some beyond what Pywal can reload (like dunst and rofi themes).
|
||||
|
||||
# Dependencies needed are sxiv (v26), pywal (v3.3.0), xdg-user-dirs, and GNU Bash (>=v5.0, I guess?).
|
||||
# This script is setup-specific so be sure to modify it first.
|
||||
# The `install-wal-theme` is at https://github.com/foo-dogsquared/dotfiles/blob/master/bin/install-wal-theme.
|
||||
|
||||
# Arguments:
|
||||
# $1 - The directory of wallpapers.
|
||||
|
||||
# Feel free to change this variable as you see fit.
|
||||
# This is set specifically for my setup, anyways.
|
||||
wallpapers=${1:-$(xdg-user-dir PICTURES)/wallpapers}
|
||||
|
||||
# Since sxiv is configurable af
|
||||
# and has the ability to select more than one picture,
|
||||
# it will shuffle the choices and choose only one of them (lol).
|
||||
# If you're feeling lucky, go ahead and play a game of random themes from your selections.
|
||||
sxiv -otbf "$wallpapers" | shuf | tail -n 1 | xargs wal --saturate 0.6 -i && install-wal-theme
|
||||
|
@ -3,4 +3,4 @@
|
||||
# Based from Luke Smith's prompt script.
|
||||
# https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/prompt
|
||||
|
||||
[ "$(printf "No\\nYes" | rofi -dmenu -p "$1")" = "Yes" ] && $2
|
||||
[ "$(printf "No\\nYes" | rofi -theme dmenu -dmenu -p "$1")" = "Yes" ] && $2
|
@ -6,19 +6,16 @@ bspc rule -r "*"
|
||||
# Set up the desktops (workspaces) for the monitor
|
||||
bspc monitor -d I II III IV V
|
||||
|
||||
bspc config border_width 5
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 9
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config focused_border_color "#d59783"
|
||||
bspc config focused_border_color "#3b4252"
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
# Rules
|
||||
bspc rule -a code-oss desktop=^2
|
||||
bspc rule -a firefox desktop=^1
|
||||
|
||||
# Startup applications
|
||||
$HOME/.config/polybar/launch.sh
|
||||
exec wal -R
|
||||
|
@ -29,7 +29,7 @@
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "300x50-30+20"
|
||||
geometry = "350x50-10+50"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
@ -41,7 +41,7 @@
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 0
|
||||
transparency = 10
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
@ -61,10 +61,10 @@
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 3
|
||||
frame_width = 2
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#383437"
|
||||
frame_color = "#e5e9f0"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
@ -84,8 +84,9 @@
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
|
||||
### Text ###
|
||||
font = Iosevka 12
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
@ -157,16 +158,19 @@
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
|
||||
### Icons ###
|
||||
# Align icons left/right/off
|
||||
icon_position = off
|
||||
icon_position = left
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
|
||||
|
||||
|
||||
|
||||
### History ###
|
||||
|
||||
@ -215,6 +219,8 @@
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
@ -240,6 +246,8 @@
|
||||
mouse_middle_click = do_action
|
||||
mouse_right_click = close_all
|
||||
|
||||
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
@ -250,8 +258,9 @@
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[shortcuts]
|
||||
|
||||
|
||||
[shortcuts]
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
@ -272,30 +281,38 @@
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#383437"
|
||||
foreground = "#eeeeee"
|
||||
background = "#2e3440"
|
||||
foreground = "#3b4252"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
[urgency_normal]
|
||||
background = "#383437"
|
||||
foreground = "#eeeeee"
|
||||
background = "#2e3440"
|
||||
foreground = "#e5e9f0"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
background = "#2e3440"
|
||||
foreground = "#434c5e"
|
||||
frame_color = "#d8dee9"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
|
72
emacs/config.el
Normal file
72
emacs/config.el
Normal file
@ -0,0 +1,72 @@
|
||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||||
;; sync' after modifying this file!
|
||||
|
||||
|
||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||
;; clients, file templates and snippets.
|
||||
(setq user-full-name "Gabriel Arazas"
|
||||
user-mail-address "foo.dogsquared@gmail.com")
|
||||
|
||||
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
||||
;; are the three important ones:
|
||||
;;
|
||||
;; + `doom-font'
|
||||
;; + `doom-variable-pitch-font'
|
||||
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||
;; presentations or streaming.
|
||||
;;
|
||||
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
||||
;; font string. You generally only need these two:
|
||||
(setq doom-font (font-spec :family "Iosevka" :size 16)
|
||||
doom-variable-pitch-font (font-spec :family "Source Serif Pro")
|
||||
doom-serif-font (font-spec :family "Source Serif Pro"))
|
||||
|
||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
(setq doom-theme 'doom-nord)
|
||||
|
||||
;; If you use `org' and don't want your org files in the default location below,
|
||||
;; change `org-directory'. It must be set before org loads!
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
(setq global-display-line-numbers-mode t)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
|
||||
|
||||
;; Here are some additional functions/macros that could help you configure Doom:
|
||||
;;
|
||||
;; - `load!' for loading external *.el files relative to this one
|
||||
;; - `use-package' for configuring packages
|
||||
;; - `after!' for running code after a package has loaded
|
||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
||||
;; this file. Emacs searches the `load-path' when you load packages with
|
||||
;; `require' or `use-package'.
|
||||
;; - `map!' for binding new keys
|
||||
;;
|
||||
;; To get information about any of these functions/macros, move the cursor over
|
||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c g k').
|
||||
;; This will open documentation for it, including demos of how they are used.
|
||||
;;
|
||||
;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; CUSTOM PACKAGES CONFIGURATIONS ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;(use-package! ewal
|
||||
;; :init (setq ewal-json-file "~/.cache/wal/colors.json"
|
||||
;; ewal-use-built-in-always-p nil
|
||||
;; ewal-use-built-in-on-failure-p nil
|
||||
;; ewal-built-in-palette "sexy-material")
|
||||
;;
|
||||
;; ;; This loading of theme is required in order for ewal to work.
|
||||
;; ;; See jjzmajic/ewal Issue #11 (https://gitlab.com/jjzmajic/ewal/-/issues/11).
|
||||
;; :init (load-theme 'doom-fds t))
|
175
emacs/init.el
Normal file
175
emacs/init.el
Normal file
@ -0,0 +1,175 @@
|
||||
;;; 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 information about all 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 g 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 g d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;chinese
|
||||
;;japanese
|
||||
|
||||
:completion
|
||||
companyj ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
ivy ; 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
|
||||
;;fill-column ; a `fill-column' indicator
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
indent-guides ; highlighted indent columns
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
nav-flash ; blink the current line after jumping
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
pretty-code ; ligatures or substitute text with pretty symbols
|
||||
;;tabs ; an 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 +ranger) ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; 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 ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
(debugger +lsp) ; 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
|
||||
;;macos ; MacOS-specific commands
|
||||
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
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;assembly ; assembly for fun or debugging
|
||||
(cc +lsp) ; 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
|
||||
(go +lsp) ; the hipster dialect
|
||||
;;(haskell +dante) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ;
|
||||
;;(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 +latexmk) ; 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 ; organize your plain life in plain text
|
||||
;;perl ; write code no one else can comprehend
|
||||
;;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
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp) ; 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
|
||||
|
||||
:email
|
||||
;;(mu4e +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
60
emacs/packages.el
Normal file
60
emacs/packages.el
Normal file
@ -0,0 +1,60 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here, run 'doom sync' on
|
||||
;; the command line, then restart Emacs for the changes to take effect.
|
||||
;; Alternatively, use M-x doom/reload.
|
||||
|
||||
;; 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)
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
|
||||
;; To install a package directly from a particular repo, you'll need to 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, for whatever reason,
|
||||
;; 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"))
|
||||
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;
|
||||
; PACKAGES ;
|
||||
;;;;;;;;;;;;
|
||||
|
||||
(package! ewal)
|
||||
|
||||
(package! org-brain)
|
||||
(package! modus-operandi-theme)
|
||||
(package! modus-vivendi-theme)
|
||||
;;(package! org-roam)
|
16
lf/lfrc
16
lf/lfrc
@ -2,6 +2,9 @@
|
||||
# Based on the given example configuration at https://github.com/gokcehan/lf/blob/master/etc/lfrc.example.
|
||||
# https://godoc.org/github.com/gokcehan/lf for documentation.
|
||||
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# BEHAVIOR TOGGLES #
|
||||
####################
|
||||
@ -128,6 +131,15 @@ map x $$f
|
||||
map X !$f
|
||||
|
||||
# dedicated keys for file opener actions
|
||||
map o open $f
|
||||
map O open --ask $f
|
||||
map oo open $f
|
||||
map oO open --ask $f
|
||||
|
||||
# dedicated keys for usual application suite
|
||||
# feel free to replace this accordingly to your needs
|
||||
map oz !nvim $f
|
||||
map ox !code $f
|
||||
map oc !inkscape $f
|
||||
map ov !gimp $f
|
||||
map ob !blender $f
|
||||
map of !firefox $f
|
||||
|
||||
|
@ -3,11 +3,13 @@
|
||||
"bin": "$HOME/bin/",
|
||||
"bspwm": "$HOME/.config/bspwm/",
|
||||
"dunst": "$HOME/.config/dunst/",
|
||||
"emacs": "$HOME/.config/doom",
|
||||
"lf": "$HOME/.config/lf",
|
||||
"nvim": "$HOME/.config/nvim/",
|
||||
"picom": "$HOME/.config/picom",
|
||||
"polybar": "$HOME/.config/polybar",
|
||||
"rofi": "$HOME/.config/rofi/",
|
||||
"sxiv": "$HOME/.config/sxiv",
|
||||
"sxhkd": "$HOME/.config/sxhkd/",
|
||||
"xorg": "$HOME",
|
||||
"zsh": "$HOME"
|
||||
|
83
manager.py
83
manager.py
@ -1,21 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# A simple setup script for the packages.
|
||||
# There should be a file named `locations.json` in this setup where it contains a top-level hash map with the packages and their target path.
|
||||
# Feel free to modify it accordingly.
|
||||
# A simple setup script for the packages.
|
||||
# There should be a file named `locations.json` in this setup where it contains a top-level associative array with the packages as the key and their target path as the value.
|
||||
# Feel free to modify it accordingly.
|
||||
|
||||
# This script is tailored to my specific needs.
|
||||
# It also strives to only rely on the standard library so further no installation needed.
|
||||
# Feel free to modify this script as well.
|
||||
# This script is tailored to my specific needs.
|
||||
# It also strives to only rely on the standard library so further no installation needed.
|
||||
# Feel free to modify this script as well.
|
||||
|
||||
# For future references, the Python version when creating for this script is v3.8.2.
|
||||
# If there's any reason why stuff is not working, it might be because it is different on the older versions or just my bad code lol.
|
||||
# For future references, the Python version when creating for this script is v3.8.2.
|
||||
# If there's any reason why stuff is not working, it might be because it is different on the older versions or just my bad code lol.
|
||||
|
||||
# Anyway, I feel like this script should be only up to half the size.
|
||||
# Hell, I think this should be simpler but no... I pushed for a more complex setup or something.
|
||||
# What am I doing?
|
||||
# Is this what ricing is all about?
|
||||
# Why are you reading this?
|
||||
# Anyway, I feel like this script should be only up to half the size.
|
||||
# Hell, I think this should be simpler but no... I pushed for a more complex setup or something.
|
||||
# What am I doing?
|
||||
# Is this what ricing is all about?
|
||||
# Why are you reading this?
|
||||
|
||||
import argparse
|
||||
import json
|
||||
@ -53,10 +53,10 @@ class PackageDir:
|
||||
|
||||
|
||||
def add_package(self, package, target):
|
||||
"""
|
||||
Add the package to the list.
|
||||
"""
|
||||
Add the package to the list.
|
||||
|
||||
:param: package - the name of the package
|
||||
:param: package - the name of the package
|
||||
:param: target - the target path of the package
|
||||
"""
|
||||
package_path = self.path / package
|
||||
@ -65,9 +65,9 @@ class PackageDir:
|
||||
|
||||
|
||||
def remove_package(self, package):
|
||||
"""
|
||||
Remove the package in the list.
|
||||
Although this function is quite simple, this is only meant as an official API.
|
||||
"""
|
||||
Remove the package in the list.
|
||||
Although this function is quite simple, this is only meant as an official API.
|
||||
|
||||
:param: package - the package to be removed
|
||||
"""
|
||||
@ -93,13 +93,13 @@ class PackageDir:
|
||||
"""
|
||||
Execute a set of commands with the packages.
|
||||
|
||||
:param: commands - A list of strings that'll be used as a template.
|
||||
The template string uses the `string.format` syntax.
|
||||
:param: commands - A list of strings that'll be used as a template.
|
||||
The template string uses the `string.format` syntax.
|
||||
(https://docs.python.org/3/library/string.html?highlight=template#format-string-syntax)
|
||||
It should contain a binding to the keywords `package` and `location` (e.g., `stow --restow {package} --target {location}`).
|
||||
It should contain a binding to the keywords `package` and `location` (e.g., `stow --restow {package} --target {location}`).
|
||||
"""
|
||||
for package, location in self.packages.items():
|
||||
# Making sure the location is expanded.
|
||||
# Making sure the location is expanded.
|
||||
location = os.path.expanduser(location)
|
||||
target_cwd = os.path.realpath(self.path)
|
||||
|
||||
@ -110,7 +110,7 @@ class PackageDir:
|
||||
if process_status.returncode == 0:
|
||||
logging.info(f"{command}: successfully ran")
|
||||
else:
|
||||
logging.error(f"{command}: {process_status.stderr.strip()}")
|
||||
logging.error(f"{command}: returned with following error\n{process_status.stderr.strip()}")
|
||||
|
||||
|
||||
@property
|
||||
@ -120,22 +120,22 @@ class PackageDir:
|
||||
|
||||
|
||||
def setup_logging():
|
||||
"""
|
||||
Setup the logger instance.
|
||||
"""
|
||||
Setup the logger instance.
|
||||
"""
|
||||
logging.basicConfig(format="[%(levelname)s] %(module)s: %(message)s", level=logging.INFO, stream=sys.stdout)
|
||||
|
||||
|
||||
def setup_args():
|
||||
"""
|
||||
Setup the argument parser.
|
||||
|
||||
:returns: An ArgumentParser object.
|
||||
"""
|
||||
description = """A quick installation script for this setup. Take note this is tailored to my specific needs."""
|
||||
Setup the argument parser.
|
||||
|
||||
:returns: An ArgumentParser object.
|
||||
"""
|
||||
description = """A quick installation script for this setup. Take note this is tailored to my specific needs but I tried to make this script generic."""
|
||||
argparser = argparse.ArgumentParser(description=description)
|
||||
|
||||
argparser.add_argument("-c", "--commands", metavar = "command", help = "Executing the specified commands. All of the commands are treated as they were entered in the shell.", nargs = "*", default = ["echo {package}"])
|
||||
argparser.add_argument("-c", "--commands", metavar = "command", help = "Executing the specified commands. All of the commands are treated as they were entered in the shell.", nargs = "*", default = ["echo {package} is set at {location}"])
|
||||
argparser.add_argument("-d", "--directory", metavar = "path", help = "Set the directory of the package data file.", type = Path, nargs = "?", default = Path(os.getcwd()))
|
||||
argparser.add_argument("--exclude", metavar = "package", help = "Exclude the given packages.", type = str, nargs = "+", default = [])
|
||||
argparser.add_argument("--include", metavar = ("package", "location"), help = "Include with the following packages.", type = str, nargs = 2, action = "append", default = [])
|
||||
@ -145,28 +145,28 @@ def setup_args():
|
||||
|
||||
|
||||
def parse_args(parser, argv):
|
||||
"""
|
||||
Parse the arguments.
|
||||
"""
|
||||
Parse the arguments.
|
||||
|
||||
This is also the main function to pay attention to.
|
||||
This is also the main function to pay attention to.
|
||||
|
||||
:param: parser - An instance of the argument parser.
|
||||
:param: argv - A list of arguments to be parsed.
|
||||
:param: parser - An instance of the argument parser.
|
||||
:param: argv - A list of arguments to be parsed.
|
||||
"""
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
try:
|
||||
package_dir = PackageDir(args.directory)
|
||||
|
||||
# Include the following packages.
|
||||
# Include the following packages.
|
||||
for package, target in args.include:
|
||||
try:
|
||||
package_dir.add_package(package, target)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
|
||||
# Exclude the following packages.
|
||||
# We don't need the value here so we'll let it pass.
|
||||
# Exclude the following packages.
|
||||
# We don't need the value here so we'll let it pass.
|
||||
for package in args.exclude:
|
||||
package_dir.remove_package(package)
|
||||
|
||||
@ -181,8 +181,7 @@ def parse_args(parser, argv):
|
||||
package_dir.packages.clear()
|
||||
package_dir.packages = items
|
||||
|
||||
|
||||
# Execute the commands with the packages.
|
||||
# Execute the commands with the packages.
|
||||
package_dir.execute_packages(args.commands)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
|
@ -1,5 +1,5 @@
|
||||
"""""""""""
|
||||
" Plugins "
|
||||
" PLUGINS "
|
||||
"""""""""""
|
||||
|
||||
" This configuration uses vim-plug (https://github.com/junegunn/vim-plug) as
|
||||
@ -8,6 +8,9 @@
|
||||
" And run ':PlugUpgrade' for upgrading the plugins.
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
|
||||
" Nord Vim color scheme.
|
||||
Plug 'arcticicestudio/nord-vim'
|
||||
|
||||
" A snippets engine.
|
||||
" One of the must-haves for me.
|
||||
Plug 'sirver/ultisnips'
|
||||
@ -86,11 +89,12 @@ call plug#end()
|
||||
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
" Editor configurations "
|
||||
" EDITOR CONFIGURATIONS "
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
" Setting number lines in the gutter.
|
||||
set number relativenumber
|
||||
highlight CursorLineNr ctermfg=cyan
|
||||
|
||||
" Setting line highlighting based on the position of the cursor.
|
||||
set cursorline
|
||||
@ -113,21 +117,27 @@ inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
inoremap jk <Esc>
|
||||
|
||||
" Instant Goyo toggle.
|
||||
map <leader>w :Goyo \| set linebreak<Enter>
|
||||
map <leader>w :Goyo<Enter>
|
||||
|
||||
" Trim all trailing whitespaces.
|
||||
map <leader>s :%s/\s\+$/<Enter>
|
||||
|
||||
" File explorer toggle.
|
||||
" Turns out vim (and nvim) has a native file explorer with :Explore.
|
||||
map <leader>f :Lexplore<Return>:vertical resize 40<Return><C-w><C-w>
|
||||
|
||||
" Changing style of words.
|
||||
hi clear SpellBad
|
||||
hi SpellBad ctermfg=red
|
||||
highlight clear SpellBad
|
||||
highlight SpellBad ctermfg=red
|
||||
|
||||
hi clear SpellLocal
|
||||
hi SpellLocal cterm=underline ctermfg=cyan
|
||||
highlight clear SpellLocal
|
||||
highlight SpellLocal cterm=underline ctermfg=cyan
|
||||
|
||||
hi clear SpellRare
|
||||
hi SpellRare ctermfg=white
|
||||
highlight clear SpellCap
|
||||
highlight SpellCap cterm=underline ctermfg=magenta
|
||||
|
||||
highlight clear SpellRare
|
||||
highlight SpellRare ctermfg=white
|
||||
|
||||
|
||||
|
||||
|
@ -30,22 +30,6 @@ snip.rv += "=" * header_level if legit_header_level else ""
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet ch "Chapter header" bi
|
||||
|
||||
|
||||
|
||||
|
||||
== $1
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet "sh(\d)" "Section header" bir
|
||||
|
||||
|
||||
`!p snip.rv = "=" * int(match.group(1))`
|
||||
endsnippet
|
||||
|
||||
snippet bf "Boldface" iw
|
||||
**$1** $0
|
||||
endsnippet
|
||||
@ -66,6 +50,10 @@ snippet a "Hyperlink" iw
|
||||
${1:<url>}[${2:<text>}] $0
|
||||
endsnippet
|
||||
|
||||
snippet link "Link for files" iw
|
||||
link:${1:<url>}[`$1`]
|
||||
endsnippet
|
||||
|
||||
snippet sp "Superscript" iw
|
||||
^$1^ $0
|
||||
endsnippet
|
||||
@ -209,7 +197,7 @@ $0
|
||||
endsnippet
|
||||
|
||||
snippet bibres "Bibliographical resource in a definition block" bi
|
||||
${1:<link>}[${2:<title>}] (retrieved ${3:date})::
|
||||
${1:<link>}[${2:<title>}] (retrieved ${3:date})::
|
||||
${4:<description>}
|
||||
endsnippet
|
||||
|
||||
|
@ -105,13 +105,13 @@ shadow-ignore-shaped = false;
|
||||
#
|
||||
#################################
|
||||
|
||||
inactive-opacity = 0.5;
|
||||
inactive-opacity = 0.85;
|
||||
active-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
inactive-opacity-override = true;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0)
|
||||
inactive-dim = 0.2;
|
||||
inactive-dim = 0.6;
|
||||
# Do not let dimness adjust based on window opacity.
|
||||
# inactive-dim-fixed = true;
|
||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||
|
@ -2,19 +2,19 @@
|
||||
; However, formats in RGB is fine.
|
||||
; This is where all of the colors should be placed for those who are lazy to scroll down (like me).
|
||||
[colors]
|
||||
background = #000
|
||||
foreground = #eee
|
||||
background = ${xrdb:color0:#000}
|
||||
foreground = ${xrdb:color7:#eee}
|
||||
|
||||
; Picked one of the popular palettes from colors.co
|
||||
primary = ${xrdb:color1:#ef476f}
|
||||
secondary = ${xrdb:color2:#ffd166}
|
||||
tertiary = ${xrdb:color3:#06d6a0}
|
||||
|
||||
module_prefix_bg = ${xrdb:color1:#ccc}
|
||||
module_prefix_fg = ${xrdb:color15:#000}
|
||||
module_bg = ${xrdb:color15:#fff}
|
||||
module_fg = ${xrdb:color0:#000}
|
||||
|
||||
vol_module_bg = #ff9f1c
|
||||
network_module_bg = #2ec4b6
|
||||
date_module_bg = #99d122
|
||||
memory_module_bg = #1a1b41
|
||||
|
||||
|
||||
; The common style between bars.
|
||||
[bar-common-style]
|
||||
@ -33,7 +33,11 @@
|
||||
|
||||
font-0 = "Iosevka"
|
||||
font-1 = "Fira Code"
|
||||
font-2 = "Noto Color Emoji:style=Regular:scale=10;1"
|
||||
|
||||
; Our fallback fonts are mostly used as icon fonts.
|
||||
; For future references, the version of Font Awesome used here is at v5.13.0.
|
||||
; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/).
|
||||
font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid"
|
||||
|
||||
; This creates the illusion as if the modules are in the center.
|
||||
__border-size = 5
|
||||
@ -50,11 +54,12 @@
|
||||
; Common style between modules.
|
||||
[module-common-style]
|
||||
label-padding = 1
|
||||
format-foreground = ${colors.background}
|
||||
format-background = ${colors.foreground}
|
||||
format-prefix-padding = 1
|
||||
format-prefix-foreground = ${colors.module_prefix_fg}
|
||||
format-prefix-background = ${colors.module_prefix_bg}
|
||||
|
||||
|
||||
[module-button-style]
|
||||
format-padding = 2
|
||||
format-background = ${colors.primary}
|
||||
format-foreground = ${colors.foreground}
|
||||
|
||||
|
||||
; The main bar.
|
||||
@ -65,16 +70,24 @@
|
||||
inherit = bar-common-style
|
||||
enable-ipc = true
|
||||
|
||||
modules-left = bspwm
|
||||
modules-center = xwindow
|
||||
modules-right = pulseaudio memory eth date menu-apps counter
|
||||
modules-left = start-menu bspwm
|
||||
modules-right = pulseaudio memory eth date
|
||||
|
||||
|
||||
[module/xwindow]
|
||||
y-offset = 10
|
||||
type = internal/xwindow
|
||||
format = <label>
|
||||
label = %title:0:50:%
|
||||
[module/start-menu]
|
||||
inherit = module-button-style
|
||||
type = custom/script
|
||||
exec = echo ';'
|
||||
click-left = rofi -show drun -sidebar-mode -theme fds-mini-sidebar
|
||||
label = ""
|
||||
|
||||
|
||||
[module/power-menu]
|
||||
inherit = module-button-style
|
||||
type = custom/script
|
||||
exec = echo ';'
|
||||
click-left = $HOME/bin/prompt "Proceed to shutdown?" "sudo -A shutdown 0"
|
||||
label = ""
|
||||
|
||||
|
||||
[module/bspwm]
|
||||
@ -101,9 +114,7 @@
|
||||
inherit = module-common-style
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "MEM"
|
||||
format-prefix-background = ${colors.memory_module_bg}
|
||||
format-prefix-foreground = ${colors.foreground}
|
||||
format-prefix = ""
|
||||
label = %gb_used%
|
||||
|
||||
|
||||
@ -115,7 +126,7 @@
|
||||
|
||||
format-connected = <label-connected>
|
||||
format-connected-underline = #9f78e1
|
||||
format-prefix = "NET "
|
||||
format-prefix = "NET"
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected = <label-disconnected>
|
||||
@ -128,24 +139,13 @@
|
||||
interface = enp4s0
|
||||
interval = 3
|
||||
|
||||
format-connected-prefix = "ETH"
|
||||
format-connected-prefix-padding = 1
|
||||
format-connected-prefix-foreground = ${colors.foreground}
|
||||
format-connected-prefix-background = ${colors.network_module_bg}
|
||||
format-connected-background = ${colors.foreground}
|
||||
format-connected-foreground = ${colors.background}
|
||||
format-connected-prefix = ""
|
||||
label-connected = "OK"
|
||||
label-connected-padding = 1
|
||||
|
||||
format-disconnected-prefix = "ETH"
|
||||
format-disconnected-prefix-padding = 1
|
||||
format-disconnected-prefix-foreground = ${colors.background}
|
||||
format-disconnected-prefix-background = ${colors.network_module_bg}
|
||||
format-disconnected-background = ${colors.foreground}
|
||||
format-disconnected-foreground = ${colors.background}
|
||||
format-disconnected-prefix = ""
|
||||
label-disconnected-padding = 1
|
||||
label-disconnected = "N/A"
|
||||
label-disconnected-foreground = ${colors.foreground}
|
||||
|
||||
|
||||
[module/date]
|
||||
@ -160,9 +160,7 @@
|
||||
time = %T
|
||||
time-alt = %F
|
||||
|
||||
format-prefix = "DATE"
|
||||
format-prefix-background = ${colors.date_module_bg}
|
||||
format-prefix-foreground = ${colors.background}
|
||||
format-prefix = ""
|
||||
label = %time%
|
||||
|
||||
|
||||
@ -170,22 +168,12 @@
|
||||
inherit = module-common-style
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume-prefix = "VOL"
|
||||
format-volume-prefix-padding = 1
|
||||
format-volume-prefix-foreground = ${colors.foreground}
|
||||
format-volume-prefix-background = ${colors.vol_module_bg}
|
||||
format-volume-foreground = ${colors.background}
|
||||
format-volume-background = ${colors.foreground}
|
||||
format-volume-prefix = ""
|
||||
format-volume = <label-volume>
|
||||
label-volume = %percentage%%
|
||||
label-volume-padding = 1
|
||||
|
||||
format-muted-prefix = "VOL"
|
||||
format-muted-prefix-padding = 1
|
||||
format-muted-prefix-foreground = ${colors.foreground}
|
||||
format-muted-prefix-background = ${colors.vol_module_bg}
|
||||
format-muted-foreground = ${colors.background}
|
||||
format-muted-background = ${colors.foreground}
|
||||
format-muted-prefix = ""
|
||||
label-muted = muted
|
||||
label-muted-padding = 1
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
configuration {
|
||||
display-drun: "Activate";
|
||||
display-drun: "Application";
|
||||
display-run: "Execute";
|
||||
display-window: "Window";
|
||||
display-ssh: "SSH";
|
||||
font: "Iosevka 14";
|
||||
show-icons: true;
|
||||
theme: "dmenu";
|
||||
theme: "fds-mini-sidebar";
|
||||
}
|
||||
|
@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
* {
|
||||
background-color: Black;
|
||||
border-color: White;
|
||||
text-color: White;
|
||||
background-color: #2e3440;
|
||||
border-color: #e5e9f0;
|
||||
text-color: #e5e9f0;
|
||||
font: "Iosevka 14";
|
||||
}
|
||||
|
||||
@ -40,5 +40,5 @@ element {
|
||||
padding: 0px 2px;
|
||||
}
|
||||
element.selected {
|
||||
background-color: #d59783;
|
||||
background-color: #3b4252;
|
||||
}
|
||||
|
@ -9,31 +9,35 @@
|
||||
/* Theme settings */
|
||||
highlight: bold italic;
|
||||
scrollbar: true;
|
||||
|
||||
|
||||
/* Style */
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
text-color: #dfcedc;
|
||||
background-color: #0A080C;
|
||||
font: "Iosevka 14";
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: transparent;
|
||||
|
||||
height: 100%;
|
||||
width: 40%;
|
||||
position: northwest;
|
||||
location: northwest;
|
||||
text-color: @foreground;
|
||||
height: 65%;
|
||||
width: 35%;
|
||||
position: southwest;
|
||||
location: southwest;
|
||||
text-color: #e0f5f5;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
background-color: #0A080C;
|
||||
border: 2;
|
||||
border-color: #dfcedc;
|
||||
children: [ inputbar, listview, mode-switcher ];
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
inputbar,
|
||||
listview {
|
||||
background: #0A080C;
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
@ -48,24 +52,24 @@ prompt {
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @background-light;
|
||||
background-color: #705994;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 5;
|
||||
background-color: @background-light;
|
||||
background-color: #705994;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @foreground;
|
||||
text-color: @background;
|
||||
background-color: #dfcedc;
|
||||
text-color: #0A080C;
|
||||
}
|
||||
|
||||
scrollbar {
|
||||
width: 10px;
|
||||
background-color: @background-light;
|
||||
handle-color: @scrollbar-handle;
|
||||
background-color: #705994;
|
||||
handle-color: #dfcedc;
|
||||
handle-width: 15px;
|
||||
height: 100%;
|
||||
border-radius: 30%;
|
||||
@ -97,5 +101,5 @@ button {
|
||||
}
|
||||
|
||||
button.selected {
|
||||
background-color: @background-light;
|
||||
background-color: #705994;
|
||||
}
|
||||
|
@ -1,18 +1,14 @@
|
||||
# Basic binds (inspired from the previous i3 config).
|
||||
super + Return
|
||||
# Basic binds (inspired from the previous i3 config).
|
||||
super + Return
|
||||
$TERMINAL
|
||||
|
||||
# A dropdown terminal.
|
||||
# Requires tmux and tdrop for this to work.
|
||||
# A dropdown terminal.
|
||||
# Requires tmux and tdrop for this to work.
|
||||
super + shift + Return
|
||||
tdrop -ma -w -4 -y "$PANEL_HEIGHT" -s dropterm $TERMINAL
|
||||
|
||||
super + t
|
||||
$HOME/bin/toggle-bin screenkey
|
||||
|
||||
# Kill the focused window.
|
||||
super + {_, shift +} + q
|
||||
bspc node -{c,k}
|
||||
toggle-bin screenkey
|
||||
|
||||
|
||||
|
||||
@ -20,53 +16,52 @@ super + {_, shift +} + q
|
||||
|
||||
# Application launcher.
|
||||
super + d
|
||||
rofi -show drun -sidebar-mode -theme fds-sidebar-dark
|
||||
rofi -show drun -sidebar-mode -theme fds-mini-sidebar
|
||||
|
||||
# User action shortcuts.
|
||||
super + F10
|
||||
$HOME/bin/prompt "Proceed to shutdown?" "sudo -A shutdown 0"
|
||||
user-prompt "Proceed to shutdown?" "sudo -A shutdown 0"
|
||||
|
||||
super + F11
|
||||
$HOME/bin/prompt "Proceed to reboot?" "sudo -A reboot"
|
||||
user-prompt "Proceed to reboot?" "sudo -A reboot"
|
||||
|
||||
super + F12
|
||||
$HOME/bin/prompt "Exit from X session?" "killall Xorg"
|
||||
user-prompt "Exit from X session?" "killall Xorg"
|
||||
|
||||
# Screenshot and screencast launcher.
|
||||
# Screenshot and screencast launcher.
|
||||
Print
|
||||
$HOME/bin/rofi-screen --prompt || $HOME/bin/rofi-screen
|
||||
rofi-screenshot --prompt || rofi-screenshot
|
||||
|
||||
# Screenshot with OCR capability
|
||||
super + shift + w
|
||||
$HOME/bin/ocr
|
||||
ocr
|
||||
|
||||
# Screen record shortcuts.
|
||||
{_,shift +} {_,control +} super + Print
|
||||
$HOME/bin/record --output $\{VIDEOS_DIRECTORY:-$HOME/recordings\} {_,--disable-cursor} {_,--follow-mouse}
|
||||
record --output $\{VIDEOS_DIRECTORY:-$HOME/recordings\} {_,--disable-cursor} {_,--follow-mouse}
|
||||
|
||||
# Miscellaneous shortcuts.
|
||||
super + shift + d
|
||||
$HOME/bin/rofi-user-action-menu.sh
|
||||
|
||||
super + shift + m
|
||||
~/bin/choose-manual --viewpdf
|
||||
choose-manual --viewpdf
|
||||
|
||||
super + shift + e
|
||||
~/bin/choose-emoji
|
||||
choose-emoji
|
||||
|
||||
super + shift + t
|
||||
select-wal-theme
|
||||
|
||||
# Reloads the Simple X Hotkey Daemon config and Polybar.
|
||||
shift + super + r
|
||||
pkill -USR1 sxhkd && notify-send "SXHKD config has successfully reloaded."
|
||||
pkill -USR1 sxhkd && notify-send "SXHKD config has successfully reloaded."
|
||||
|
||||
|
||||
|
||||
# The usual application suite shortcuts.
|
||||
# I'm separating them according to the keyboard row (in the QWERTY layout anyway).
|
||||
super + a ; {z, x, c, v, b, n}
|
||||
{ zathura, vim, code, inkscape, blender, lmms }
|
||||
# The usual application suite shortcuts.
|
||||
# I'm separating them according to the keyboard row (in the QWERTY layout anyway).
|
||||
super + a ; {z, x, c, v, b, n, m}
|
||||
{ nvim, code, inkscape, gimp, blender, kdenlive, lmms }
|
||||
|
||||
super + a ; {f}
|
||||
{ firefox }
|
||||
super + a ; {f, a, d}
|
||||
{ firefox, $TERMINAL -e lf, krita }
|
||||
|
||||
super + a ; {t, r}
|
||||
{ thunderbird, thunar }
|
||||
@ -75,23 +70,27 @@ super + a ; {t, r}
|
||||
|
||||
# bspwm exclusive shortcuts.
|
||||
# Feel free to replace these if you're working with another WM/DE.
|
||||
# Over time, I may replace one of the usual shortcut
|
||||
# with something more generally applied (with `xdotool` for example).
|
||||
# Over time, I may replace one of the usual shortcut
|
||||
# with something more generally applied (with `xdotool` for example).
|
||||
|
||||
# Move desktop/node view to the specified desktop.
|
||||
# Kill the focused window.
|
||||
super + {_, shift +} + q
|
||||
bspc node -{c,k}
|
||||
|
||||
# Move desktop/node view to the specified desktop.
|
||||
super + {_,shift + }{1-9,0}
|
||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||
|
||||
super + z
|
||||
bspc node -t '~floating'
|
||||
|
||||
super + x
|
||||
super + x
|
||||
bspc node -t '~fullscreen'
|
||||
|
||||
super + c
|
||||
super + c
|
||||
bspc node -t '~tiled'
|
||||
|
||||
# Desktop and node movements.
|
||||
# Desktop and node movements.
|
||||
super + {_, shift + } Tab
|
||||
bspc desktop {next, prev} --focus
|
||||
|
||||
|
17
sxiv/exec/image-info
Normal file
17
sxiv/exec/image-info
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example for ~/.config/sxiv/exec/image-info
|
||||
# Called by sxiv(1) whenever an image gets loaded,
|
||||
# with the name of the image file as its first argument.
|
||||
# The output is displayed in sxiv's status bar.
|
||||
|
||||
s=" | " # field separator
|
||||
|
||||
filename=$(basename "$1")
|
||||
filesize=$(du -Hh "$1" | cut -f 1)
|
||||
|
||||
# The '[0]' stands for the first frame of a multi-frame file, e.g. gif.
|
||||
geometry=$(identify -format '%wx%h' "$1[0]")
|
||||
|
||||
echo "${filename}${s}${filesize}${s}${geometry}"
|
||||
|
37
sxiv/exec/key-handler
Normal file
37
sxiv/exec/key-handler
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
# The keyboard shortcuts (prepended with <C-x>).
|
||||
|
||||
while read file
|
||||
do
|
||||
case "$1" in
|
||||
|
||||
# Prompt and delete the file.
|
||||
"d")
|
||||
[ "$(printf 'No\nYes' | rofi -dmenu -p 'Delete all of the selected image(s)?')" = "Yes" ] && rm "$file" && notify-send "$file deleted" ;;
|
||||
|
||||
# Rotate 90 degrees.
|
||||
"r")
|
||||
convert -rotate 90 "$file" "$file" ;;
|
||||
|
||||
# Rotate -90 degrees.
|
||||
"R")
|
||||
convert -rotate -90 "$file" "$file" ;;
|
||||
|
||||
# Copy the path of the image (relative to the present working directory).
|
||||
"y")
|
||||
echo -n "$file" | xclip -selection clipboard && notify-send "'$file' name copied to clipboard" ;;
|
||||
|
||||
# Copy the absolute path of the image.
|
||||
"Y")
|
||||
readlink --canonicalize "$file" | xclip -selection clipboard && notify-send "Absolute path of '$file' copied to clipboard" ;;
|
||||
|
||||
# Activate Pywal to the selected image.
|
||||
"w")
|
||||
rofi -dmenu -p "Add some arguments for executing pywal? ('wal -i \$file') " | xargs wal -i "$file" ;;
|
||||
|
||||
# Activate `select-theme` script which is basically pywal with additional things.
|
||||
"C-w")
|
||||
select-theme "$file" ;;
|
||||
esac
|
||||
done
|
21
wal/templates/bspwmrc
Normal file
21
wal/templates/bspwmrc
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Removing all rules at startup to prevent duplicating rules.
|
||||
bspc rule -r "*"
|
||||
|
||||
# Set up the desktops (workspaces) for the monitor
|
||||
bspc monitor -d I II III IV V
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 9
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config focused_border_color "{color1}"
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
# Rules
|
||||
bspc rule -a code-oss desktop=^2
|
||||
bspc rule -a firefox desktop=^1
|
||||
|
44
wal/templates/dmenu.rasi
Normal file
44
wal/templates/dmenu.rasi
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* ROFI Color theme
|
||||
* User: Qball
|
||||
* Copyright: Dave Davenport
|
||||
* Modified by: Gabriel Arazas (foo-dogsquared)
|
||||
*/
|
||||
|
||||
* {{
|
||||
background-color: {background};
|
||||
border-color: {foreground};
|
||||
text-color: {foreground};
|
||||
font: "Iosevka 14";
|
||||
}}
|
||||
|
||||
window {{
|
||||
anchor: north;
|
||||
location: north;
|
||||
width: 100%;
|
||||
padding: 7px;
|
||||
children: [ horibox ];
|
||||
}}
|
||||
|
||||
horibox {{
|
||||
orientation: horizontal;
|
||||
children: [ prompt, entry, listview ];
|
||||
}}
|
||||
|
||||
listview {{
|
||||
layout: horizontal;
|
||||
spacing: 5px;
|
||||
lines: 100;
|
||||
}}
|
||||
|
||||
entry {{
|
||||
expand: false;
|
||||
width: 10em;
|
||||
}}
|
||||
|
||||
element {{
|
||||
padding: 0px 2px;
|
||||
}}
|
||||
element.selected {{
|
||||
background-color: {color1};
|
||||
}}
|
435
wal/templates/dunstrc
Normal file
435
wal/templates/dunstrc
Normal file
@ -0,0 +1,435 @@
|
||||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = mouse
|
||||
|
||||
# The geometry of the window:
|
||||
# [{{width}}]x{{height}}[+/-{{x}}+/-{{y}}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "350x50-10+50"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 10
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 2
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "{foreground}"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120
|
||||
|
||||
|
||||
|
||||
### Text ###
|
||||
font = Iosevka 12
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = left
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
|
||||
|
||||
### Icons ###
|
||||
# Align icons left/right/off
|
||||
icon_position = left
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
|
||||
|
||||
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/firefox -new-tab
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false
|
||||
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = mesg
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines action of mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action
|
||||
mouse_right_click = close_all
|
||||
|
||||
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
|
||||
|
||||
[shortcuts]
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "{background}"
|
||||
foreground = "{color1}"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
[urgency_normal]
|
||||
background = "{background}"
|
||||
foreground = "{foreground}"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
[urgency_critical]
|
||||
background = "{background}"
|
||||
foreground = "{color2}"
|
||||
frame_color = "{color4}"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# timeout
|
||||
# urgency
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: if you don't want a notification to be displayed, set the format
|
||||
# to "".
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
|
||||
[screenshot]
|
||||
appname = "maim"
|
||||
desktop_entry = "maim"
|
||||
# vim: ft=cfg
|
105
wal/templates/fds-mini-sidebar.rasi
Normal file
105
wal/templates/fds-mini-sidebar.rasi
Normal file
@ -0,0 +1,105 @@
|
||||
/**
|
||||
This is the actual styling of the 'foo-dogsquared Sidebar' theme.
|
||||
Though, it needs to be imported from another Rofi theme file to color it.
|
||||
|
||||
See the 'fds-sidebar-dark` Rofi theme file for an example.
|
||||
**/
|
||||
|
||||
* {{
|
||||
/* Theme settings */
|
||||
highlight: bold italic;
|
||||
scrollbar: true;
|
||||
|
||||
/* Style */
|
||||
text-color: {foreground};
|
||||
background-color: {background};
|
||||
font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14";
|
||||
font: "Iosevka 14";
|
||||
}}
|
||||
|
||||
window {{
|
||||
background-color: transparent;
|
||||
|
||||
height: 65%;
|
||||
width: 35%;
|
||||
position: southwest;
|
||||
location: southwest;
|
||||
text-color: #e0f5f5;
|
||||
}}
|
||||
|
||||
mainbox {{
|
||||
background-color: {background};
|
||||
border: 2;
|
||||
border-color: {color1};
|
||||
children: [ inputbar, listview, mode-switcher ];
|
||||
padding: 0.5em;
|
||||
}}
|
||||
|
||||
inputbar,
|
||||
listview {{
|
||||
background: {background};
|
||||
margin: 0 0 0.5em 0;
|
||||
}}
|
||||
|
||||
inputbar {{
|
||||
orientation: vertical;
|
||||
children: [ prompt, entry ];
|
||||
}}
|
||||
|
||||
prompt {{
|
||||
width: 100%;
|
||||
text-style: underline;
|
||||
}}
|
||||
|
||||
entry {{
|
||||
background-color: {color1};
|
||||
margin: 0 1em 0 0;
|
||||
}}
|
||||
|
||||
element {{
|
||||
padding: 5;
|
||||
background-color: {color1};
|
||||
}}
|
||||
|
||||
element selected.normal {{
|
||||
background-color: {foreground};
|
||||
text-color: {background};
|
||||
}}
|
||||
|
||||
scrollbar {{
|
||||
width: 10px;
|
||||
background-color: {color1};
|
||||
handle-color: {foreground};
|
||||
handle-width: 15px;
|
||||
height: 100%;
|
||||
border-radius: 30%;
|
||||
}}
|
||||
|
||||
listview {{
|
||||
cyclic: true;
|
||||
spacing: 0.6em;
|
||||
}}
|
||||
|
||||
element, button {{
|
||||
border-radius: 30%;
|
||||
}}
|
||||
|
||||
button,
|
||||
inputbar,
|
||||
case-indicator,
|
||||
entry {{
|
||||
padding: 5;
|
||||
}}
|
||||
|
||||
sidebar {{
|
||||
padding: 5;
|
||||
margin: 5;
|
||||
}}
|
||||
|
||||
button {{
|
||||
margin: 0.25em;
|
||||
}}
|
||||
|
||||
button.selected {{
|
||||
background-color: {color1};
|
||||
}}
|
@ -1,18 +1,25 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Activate the LXSessions for mounting external filesystems.
|
||||
# This is pretty much only used for accessing external filesystems
|
||||
# from Thunar as far as practical application is concerned.
|
||||
# Activate the LXSessions for mounting external filesystems.
|
||||
# This is pretty much only used for accessing external filesystems
|
||||
# from Thunar as far as practical application is concerned.
|
||||
/usr/bin/lxsession &
|
||||
|
||||
# Run the compositor and enable more advanced graphical effects.
|
||||
# Run the compositor and enable more advanced graphical effects.
|
||||
picom &
|
||||
|
||||
# Activate the notification server.
|
||||
# Activate the notification server.
|
||||
dunst &
|
||||
|
||||
# Boot the mount filesystem helper.
|
||||
# Boot the mount filesystem helper.
|
||||
udiskie &
|
||||
|
||||
# Run the hotkey daemon.
|
||||
sxhkd &
|
||||
# Run the hotkey daemon.
|
||||
sxhkd &
|
||||
|
||||
# Launch the status bar.
|
||||
$HOME/.config/polybar/launch.sh &
|
||||
|
||||
# Run wal with the recent theme.
|
||||
wal -R &
|
||||
|
||||
|
11
zsh/.profile
11
zsh/.profile
@ -5,6 +5,12 @@
|
||||
# Or the Arch Linux Wiki on zsh (https://wiki.archlinux.org/index.php/Zsh#Startup/Shutdown_files).
|
||||
# Also check the manual pages for `zshall` (i.e., `man zshall`).
|
||||
|
||||
# My XDG Base Directory spec configuration.
|
||||
# Check it out at https://wiki.archlinux.org/index.php/XDG_Base_Directory for more information.
|
||||
export XDG_CACHE_HOME=$HOME/.cache
|
||||
export XDG_CONFIG_HOME=$HOME/.config
|
||||
export XDG_DATA_HOME=$HOME/.local/share
|
||||
|
||||
# My custom variables (only applicable at user level)
|
||||
export PICTURES_DIRECTORY=$HOME/Pictures
|
||||
export DOCUMENTS_DIRECTORY=$HOME/Documents
|
||||
@ -12,7 +18,7 @@ export BIN_DIRECTORY=$HOME/bin
|
||||
export VIDEO_DIRECTORY=$HOME/recordings
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH="$BIN_DIRECTORY:/usr/local/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$PATH"
|
||||
export PATH="$BIN_DIRECTORY:/usr/local/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$PATH"
|
||||
# export MANPATH="$MANPATH:$HOME/.local/share/man"
|
||||
|
||||
# Common environmental variables.
|
||||
@ -21,4 +27,5 @@ export EDITOR="nvim"
|
||||
export TERMINAL="alacritty"
|
||||
export BROWSER="firefox"
|
||||
export READ="zathura"
|
||||
export FILE="ranger"
|
||||
export FILE="lf"
|
||||
|
||||
|
21
zsh/.zshrc
21
zsh/.zshrc
@ -12,7 +12,8 @@ precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:*' formats '[%s] (%b)'
|
||||
autoload -U colors && colors
|
||||
PS1="%F%{${fg[white]}%}%(0?.√.%?) %B%{$fg[magenta]%}%1~%{$reset_color%} \$vcs_info_msg_0_ $%f%b "
|
||||
PROMPT="%F%{${fg[white]}%}%(0?.√.%?) %B%{$fg[magenta]%}%1~%{$reset_color%} \$vcs_info_msg_0_ $%f%b "
|
||||
RPROMPT="[%D %*]"
|
||||
|
||||
# Configuring the command history.
|
||||
HISTSIZE=1000
|
||||
@ -57,15 +58,15 @@ key[ShiftTab]="${terminfo[kcbt]}"
|
||||
# Finally, make sure the terminal is in application mode, when zle is
|
||||
# active. Only then are the values from $terminfo valid.
|
||||
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
||||
autoload -Uz add-zle-hook-widget
|
||||
function zle_application_mode_start {
|
||||
echoti smkx
|
||||
}
|
||||
function zle_application_mode_stop {
|
||||
echoti rmkx
|
||||
}
|
||||
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
|
||||
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
|
||||
autoload -Uz add-zle-hook-widget
|
||||
function zle_application_mode_start {
|
||||
echoti smkx
|
||||
}
|
||||
function zle_application_mode_stop {
|
||||
echoti rmkx
|
||||
}
|
||||
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
|
||||
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
|
||||
fi
|
||||
|
||||
# History searching.
|
||||
|
Loading…
Reference in New Issue
Block a user