136 |
137 | -Options
138 | help # Show this help
139 | rescan [auto|yes|no] # Specify rescan behaviour (Default: yes)
140 |
141 | - Abbreviations
142 | r = rescan
143 | "
144 | }
145 | ###############################################################################
146 |
147 | case "$1" in
148 | rescan | r) promptSelection "${2:-yes}" ;;
149 | help) printUsage ;;
150 | *) promptSelection
151 | esac
152 |
153 |
--------------------------------------------------------------------------------
/.zshrc:
--------------------------------------------------------------------------------
1 | ###########################################
2 | # Made by
3 | # _ _
4 | # (_) (_)
5 | # ___ _ ____ ___ ____ _ _ _ ____
6 | # /___)| || \ / _ \ | _ \ | | | || | / ___)
7 | #|___ || || | | || |_| || | | | \ V / | |( (___
8 | #(___/ |_||_|_|_| \___/ |_| |_| \_/ |_| \____)
9 |
10 | # Check updates and give a look at my dotfiles here:
11 | # https://github.com/simonvic/dotfiles
12 |
13 | ###########################################
14 |
15 |
16 | ######################################
17 | # HISTORY
18 |
19 | mkdir -p ~/.local/share/zsh
20 |
21 | HISTFILE=~/.local/share/zsh/.histfile
22 | HISTSIZE=10000
23 | SAVEHIST=10000
24 | setopt \
25 | BEEP \
26 | NO_MATCH \
27 | PROMPT_SUBST \
28 | EXTENDED_GLOB \
29 | NO_FLOW_CONTROL \
30 | COMPLETE_IN_WORD \
31 | EXTENDED_HISTORY \
32 | HIST_EXPIRE_DUPS_FIRST \
33 | HIST_IGNORE_SPACE \
34 | HIST_VERIFY \
35 | PUSHD_IGNORE_DUPS
36 |
37 | ######################################
38 | # COLORS
39 | export LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
40 |
41 | ######################################
42 | # ENVIROMENT VARIABLES
43 | export EDITOR="nvim"
44 |
45 | ######################################
46 | # KEY BINDING
47 | autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
48 | zle -N up-line-or-beginning-search
49 | zle -N down-line-or-beginning-search
50 |
51 | bindkey -e
52 | typeset -g -A key=(
53 | [Home]="${terminfo[khome]}"
54 | [End]="${terminfo[kend]}"
55 | [Insert]="${terminfo[kich1]}"
56 | [Backspace]="${terminfo[kbs]}"
57 | [Control-Backspace]="^H"
58 | [Delete]="${terminfo[kdch1]}"
59 | [Control-Delete]="^[[3;5~"
60 | [Up]="${terminfo[kcuu1]}"
61 | [Down]="${terminfo[kcud1]}"
62 | [Left]="${terminfo[kcub1]}"
63 | [Control-Left]="${terminfo[kLFT5]}"
64 | [Right]="${terminfo[kcuf1]}"
65 | [Control-Right]="${terminfo[kRIT5]}"
66 | [PageUp]="${terminfo[kpp]}"
67 | [PageDown]="${terminfo[knp]}"
68 | [Shift-Tab]="${terminfo[kcbt]}"
69 | )
70 |
71 |
72 | bindkey "${key[Home]}" beginning-of-line
73 | bindkey "${key[End]}" end-of-line
74 | bindkey "${key[Insert]}" overwrite-mode
75 | bindkey "${key[Backspace]}" backward-delete-char
76 | bindkey "${key[Control-Backspace]}" backward-delete-word
77 | bindkey "${key[Delete]}" delete-char
78 | bindkey "${key[Control-Delete]}" delete-word
79 | bindkey "${key[Up]}" up-line-or-beginning-search
80 | bindkey "${key[Down]}" down-line-or-beginning-search
81 | bindkey "${key[Left]}" backward-char
82 | bindkey "${key[Control-Left]}" backward-word
83 | bindkey "${key[Right]}" forward-char
84 | bindkey "${key[Control-Right]}" forward-word
85 | bindkey "${key[PageUp]}" beginning-of-buffer-or-history
86 | bindkey "${key[PageDown]}" end-of-buffer-or-history
87 | bindkey "${key[Shift-Tab]}" reverse-menu-complete
88 |
89 | if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
90 | autoload -Uz add-zle-hook-widget
91 | function zle_application_mode_start { echoti smkx }
92 | function zle_application_mode_stop { echoti rmkx }
93 | add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
94 | add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
95 | fi
96 |
97 | # Change word style to alphanumeric only (better when deleting in paths)
98 | autoload -U select-word-style
99 | select-word-style bash
100 |
101 | ######################################
102 | # COMPLETITION
103 | zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' # Set completition to be case insensitive
104 | zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
105 | zstyle ':completion:*' format '%F{245}[ %d ]%f'
106 | zstyle ':completion:*' group-name ''
107 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
108 | zstyle ':completion:*' max-errors 2
109 | zstyle ':completion:*' menu select=2
110 | zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
111 | zstyle ':completion:*' special-dirs true
112 | zstyle :compinstall filename '$HOME/.zshrc'
113 |
114 |
115 | autoload -Uz compinit
116 | # .zcompdump custom location
117 | compinit -d ~/.local/share/zsh/.zcompdump
118 |
119 |
120 | ######################################
121 | # GIT
122 | autoload -Uz vcs_info
123 | zstyle ':vcs_info:*' enable git
124 | precmd() {
125 | vcs_info
126 | }
127 |
128 | ######################################
129 | # THEME
130 | fpath+=(${XDG_CONFIG_HOME:-$HOME/.config}/zsh/custom/themes)
131 |
132 | autoload -Uz promptinit
133 | promptinit
134 | prompt simonvic-minimal
135 |
136 |
137 | ######################################
138 | # ALIASES
139 | function xo() { xdg-open $1 &! }
140 | function t() { tree -h -F -D -L ${1:-1} }
141 | alias ls="ls --color=auto"
142 | alias l="ls -Al --human-readable"
143 | alias grep="grep --color"
144 | alias Cp="xclip -r -selection clipboard"
145 | alias todo='sTodo'
146 | alias dotfiles='/usr/bin/git --git-dir=${XDG_DATA_HOME:-$HOME/.local/share}/.dotfiles/ --work-tree=$HOME'
147 | alias lazydotfiles='/usr/bin/lazygit --git-dir=${XDG_DATA_HOME:-$HOME/.local/share}/.dotfiles/ --work-tree=$HOME'
148 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020-2022 simonvic
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | # Getting started
23 | This repository is not just a rice. In `./local/bin/` you can find many utilities (written completely in *sh*)
24 | which make the **everyday** usage of your Linux environment ***easier*** and ***faster***, while getting the most out of
25 | popular softwares among Linux rices (e.g. Polybar, Rofi, Dunst, i3 etc.).
26 |
27 | These utilities have been made to be easily configurable.
28 | For a more in-depth guide visit the [scripts wiki](https://github.com/simonvic/dotfiles/wiki/Scripts)
29 |
30 | For a guide on how to use them either check the [wiki](https://github.com/simonvic/dotfiles/wiki/Scripts)
31 | or just launch them with the `help` option. Example:
32 | ```shell-session
33 | $ sPolybarctl help
34 | ```
35 |
36 |
37 | > Make sure to visit the [Wiki](https://github.com/simonvic/dotfiles/wiki) to have a full overview of what my workflow can offer
38 |
39 |
40 |
41 |
42 | # Requirements
43 | Main requirements:
44 | * i3: the tiling window manager with gaps
45 | * i3lock-color : Used to lock the screen
46 | * Polybar : show bars with various information
47 | * Dunst : notifications daemon
48 | * Rofi : application launcher
49 | * more...
50 |
51 | Visit the [installation guide](https://github.com/simonvic/dotfiles/wiki/Installation-and-Configuration) for a more in-depth explanation
52 |
53 |
54 |
55 |
56 | # Showcase
57 | Lockscreen (sLockscreenctl)
58 |
59 |
60 | [sLockscreenctl](https://github.com/simonvic/dotfiles/wiki/Scripts#slockscreenctl) has plenty of options to tweak as you like
61 |
62 |
63 | Other themes preview
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | Application launcher, window switcher and calculator (Rofi)
72 |
73 |
74 | [Rofi](https://github.com/simonvic/dotfiles/wiki/Installation-and-Configuration#rofi) themes have been made to be
75 | easily configurable and expansible. The config file and thems are structured like this:
76 | ```
77 | |_ config (defines rofi behaviour, components and default base UI layout/structure)
78 | |_ Theme (defines UI layout and structure)
79 | |_ Style (defines UI components color and text font)
80 | |_ Fonts (defines a set of fonts)
81 | |_ Palette (defines a color palette)
82 | ```
83 | A `Theme` (e.g. fullscreen.rasi, reverse.rasi, window_reverse.rasi etc) only takes care
84 | of how the UI components are structured and arranged. It imports a `Style`.
85 |
86 | A `Style` defines text fonts, imported from a `Fonts`, and the colors of the components, imported from a `Palette`
87 |
88 |
89 |
90 |
91 | Polybar
92 |
93 |
94 | [sPolybarctl](https://github.com/simonvic/dotfiles/wiki/Scripts#spolybarctl) will manage your polybars.
95 | It can `launch`, `show`, `hide` or `toggle` them. It also serves as a wrapper for polybar-msg for `ipc` calls.
96 |
97 | The main feature is that you can interact with polybars using their name, like so:
98 | ```shell-session
99 | $ sPolybarctl show myFirstBar # make visible "myFirstBar"
100 | $ sPolybarctl toggle mySecondBar # toggle visibility state for "mySecondBar"
101 | $ sPolybarctl hide # if no polybar name specified, the command will be issued to all polybars
102 | $ sPolybarctl message "action #date.toggle" # simulate the toggle action on date modules
103 | ```
104 |
105 |
106 |
107 |
108 | TODO manager,Notifications and more (Dunst)
109 |
110 | Music control (sPlayerctl) + custom Spotify notification
111 |
112 |
113 | [sPlayerctl](https://github.com/simonvic/dotfiles/wiki/Scripts#splayerctl) will help you manage your *music*! It also supports custom icon arts (album icon, youtube thumbnail, etc.)
114 |
115 | The coolest feature is that you can select the player you wish to control via cli
116 | ```shell-session
117 | $ sPlayerctl select-player set spotify
118 | ```
119 | ... or even better with `Dunst` and `Rofi`
120 |
121 |
122 |
123 |
124 | App notifications
125 |
126 |
127 |
128 |
129 | WiFi
130 |
131 |
132 | With [sWifi](https://github.com/simonvic/dotfiles/wiki/Scripts#swifi) you can quickly scan for WiFi signals, filter and connect to them with few keystrokes.
133 |
134 |
135 |
136 | sScreenshot
137 |
138 |
139 | [sScreenshot](https://github.com/simonvic/dotfiles/wiki/Scripts#sscreenshot) allows you to take area or full screenshot, copy it to clipboard and paste it anywhere.
140 |
141 |
142 |
143 | Speaker and microphone control
144 |
145 |
146 | Nothing special here. [sVolumectl](https://github.com/simonvic/dotfiles/wiki/Scripts#svolumectl) and [sMicrophonectl](https://github.com/simonvic/dotfiles/wiki/Scripts#smicrophonectl)
147 | allows you to change the volume of the speakers and microphone while showing a dunst notification with a [personalizable bar](https://github.com/simonvic/dotfiles/wiki/Scripts#drawbarsh)
148 |
149 |
150 |
151 | Brightness and Redshift control
152 |
153 |
154 | [sBrightnessctl](https://github.com/simonvic/dotfiles/wiki/Scripts#sbrightnessctl) will adjust the brightness and manage `redshift` temperature.
155 |
156 |
157 |
158 | ToDo popup with context action
159 |
160 |
161 |
162 |
163 |
164 | [sTodo](https://github.com/simonvic/dotfiles/wiki/Scripts#stodo) is a minimal TODO list manager, which can also show a popup with dunst
165 |
166 |
167 | # Keybindings
168 | My workflow is 100% keyboard-driven as I have everything at the tip of my fingers.
169 |
170 | Check out my [default keybindings](https://github.com/simonvic/dotfiles/wiki/Keybindings) for more
171 |
172 | # About me
173 |
174 |
175 |
176 |
177 |
178 |
179 | # Contact me
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 | ---
197 |
198 | Buy me a coffee :)
199 |
200 |
201 |
202 |
203 |
204 |
205 |
--------------------------------------------------------------------------------