Compare commits
217
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
068dd8fe25 | ||
|
|
1b9b98c424 | ||
|
|
fe27e8178e | ||
|
|
3cbe6b31b2 | ||
|
|
bd8cb97548 | ||
|
|
a53f854095 | ||
|
|
889e51f10d | ||
|
|
55a5d7ab01 | ||
|
|
99634aadc1 | ||
|
|
792e2a1940 | ||
|
|
dc03a79f70 | ||
|
|
b360904421 | ||
|
|
621bc28f7a | ||
|
|
5fef8dcf90 | ||
|
|
6b833bd222 | ||
|
|
075f4b2ba4 | ||
|
|
46f57624e6 | ||
|
|
df3399b0d3 | ||
|
|
7267e1ca77 | ||
|
|
7249da8fc3 | ||
|
|
0c3c3aacad | ||
|
|
0b7857eb3f | ||
|
|
832aaef3d8 | ||
|
|
d7858d9579 | ||
|
|
0f3e2c8362 | ||
|
|
a86fefc663 | ||
|
|
5294e72a32 | ||
|
|
07926638d4 | ||
|
|
04c1b1e1f4 | ||
|
|
b4d22b97c0 | ||
|
|
4551dc5a59 | ||
|
|
ca76b46750 | ||
|
|
373655963a | ||
|
|
fae504043e | ||
|
|
bdb8c8b149 | ||
|
|
d76d2f4b3a | ||
|
|
08a2ae52f1 | ||
|
|
718f6b7600 | ||
|
|
18e111b00c | ||
|
|
a2be0e5678 | ||
|
|
b5e18a1b29 | ||
|
|
e0ce0e79fc | ||
|
|
bcc0d4ab14 | ||
|
|
37e77a4c30 | ||
|
|
93b93b30b8 | ||
|
|
49c638cda8 | ||
|
|
efd1ddebd9 | ||
|
|
ea5a2b77d4 | ||
|
|
bd4d579a90 | ||
|
|
0ba29f8d89 | ||
|
|
25dcfc6802 | ||
|
|
a56e04a0aa | ||
|
|
1ec5e0258d | ||
|
|
1caa1be1d2 | ||
|
|
aa71eebf0b | ||
|
|
9987dcacd8 | ||
|
|
58a3512c28 | ||
|
|
7b61fde6e9 | ||
|
|
db267226a8 | ||
|
|
521c1b1c4d | ||
|
|
a94e283e98 | ||
|
|
b26e564672 | ||
|
|
1deb25008f | ||
|
|
9ffe754410 | ||
|
|
d0a4cb0db7 | ||
|
|
46ca53e0c0 | ||
|
|
ddd7f6bf2c | ||
|
|
06e60bda8c | ||
|
|
567d0a1718 | ||
|
|
eec71b5f82 | ||
|
|
4e8c3c6269 | ||
|
|
8badfdb9b8 | ||
|
|
1eb4ee50d8 | ||
|
|
5bf98d5b1d | ||
|
|
90d67c5a4a | ||
|
|
ad9a5072d3 | ||
|
|
c6c51c81ef | ||
|
|
f318cd953f | ||
|
|
f75adf42ae | ||
|
|
192b457c61 | ||
|
|
0d3260dab1 | ||
|
|
e8f6eeb8fb | ||
|
|
3f420bf740 | ||
|
|
30effbb474 | ||
|
|
cbda5efd3c | ||
|
|
baf24a5198 | ||
|
|
69a3dfed30 | ||
|
|
b650051b81 | ||
|
|
a0b6b93831 | ||
|
|
e4a76e28e9 | ||
|
|
a6a9b44784 | ||
|
|
535b6dc8f9 | ||
|
|
99b90050ae | ||
|
|
3e40b07e76 | ||
|
|
f849865294 | ||
|
|
b4ee1e28ef | ||
|
|
2e3f837cbb | ||
|
|
54fee7544b | ||
|
|
1e121a3ece | ||
|
|
d1bbe70964 | ||
|
|
4bc636f494 | ||
|
|
340d9b725a | ||
|
|
80ced6b8f0 | ||
|
|
54494ca8ac | ||
|
|
40b2710bad | ||
|
|
cc7c6227d0 | ||
|
|
93a8c07a5a | ||
|
|
dfa080ebb4 | ||
|
|
94fdec8f41 | ||
|
|
ddf6a180cd | ||
|
|
e638cd74ae | ||
|
|
72022f3940 | ||
|
|
ff607b428e | ||
|
|
0e8cfb9670 | ||
|
|
4d2082994c | ||
|
|
2ad1035ddd | ||
|
|
2a4453ac35 | ||
|
|
ac59b7b305 | ||
|
|
f58a2ac4d3 | ||
|
|
9927dc903e | ||
|
|
5409a9140f | ||
|
|
6f929ee958 | ||
|
|
4fe6c591f2 | ||
|
|
39fd88d207 | ||
|
|
9cedb773a6 | ||
|
|
a2a5666d75 | ||
|
|
b47a893e4b | ||
|
|
fb1eea31ae | ||
|
|
372ebf45a1 | ||
|
|
7134b55487 | ||
|
|
cb5e2ced19 | ||
|
|
7cc0ece887 | ||
|
|
874db62c5f | ||
|
|
b6c656ce94 | ||
|
|
3381b9e54d | ||
|
|
481bf28d44 | ||
|
|
ca2f0e18b4 | ||
|
|
d7c60e2f7b | ||
|
|
8f2cbb62aa | ||
|
|
eb6633fc7e | ||
|
|
1ea4bcc0e4 | ||
|
|
bf7621b151 | ||
|
|
46d487fe32 | ||
|
|
7d31673399 | ||
|
|
13d19cb8fc | ||
|
|
ff49aba967 | ||
|
|
ec7c0acadc | ||
|
|
0ec2d1f6ce | ||
|
|
54db5b59be | ||
|
|
388ec2ef7f | ||
|
|
e6444f9f86 | ||
|
|
91318a32ad | ||
|
|
2df4cc4c30 | ||
|
|
095da7e302 | ||
|
|
2dda647ba6 | ||
|
|
d82f92d52c | ||
|
|
6b91a5053b | ||
|
|
f9890fb2bd | ||
|
|
d2c73a5b48 | ||
|
|
5f8d9c1047 | ||
|
|
a6d895dedf | ||
|
|
cde4f66571 | ||
|
|
233378d20c | ||
|
|
7217ce8a41 | ||
|
|
6d8f3594d7 | ||
|
|
48111eecbd | ||
|
|
cced83f09b | ||
|
|
c20eeab2cc | ||
|
|
bb1c607a29 | ||
|
|
6dc3dc7b2d | ||
|
|
ca009bc794 | ||
|
|
72d1fbcd16 | ||
|
|
0a75d65f01 | ||
|
|
8fc175077c | ||
|
|
dd60653474 | ||
|
|
8382c423f0 | ||
|
|
a26151086d | ||
|
|
cd8aaae817 | ||
|
|
b434313676 | ||
|
|
8b79f58be4 | ||
|
|
caa3d4a286 | ||
|
|
6d43be3029 | ||
|
|
ba6d9aeefd | ||
|
|
fdcb5de550 | ||
|
|
e4421bb2f0 | ||
|
|
27296ea69f | ||
|
|
0d854ac137 | ||
|
|
a7101ebab8 | ||
|
|
c9f242178b | ||
|
|
7c765d0cf0 | ||
|
|
0d9eafcaab | ||
|
|
2a8051c68b | ||
|
|
60b126a4d1 | ||
|
|
85c649acab | ||
|
|
a7d521917a | ||
|
|
506a85843d | ||
|
|
a31646fcd5 | ||
|
|
f5679802d5 | ||
|
|
950231154b | ||
|
|
0276ace6df | ||
|
|
1267a1eb17 | ||
|
|
ee34303cb0 | ||
|
|
0277d42a7b | ||
|
|
b3fa0242b0 | ||
|
|
324716c7bd | ||
|
|
259b10c061 | ||
|
|
59cfcb76e2 | ||
|
|
40192af6e2 | ||
|
|
793d8579a3 | ||
|
|
d22a3219b3 | ||
|
|
e472ba97c1 | ||
|
|
f8154e0c68 | ||
|
|
f150ed379b | ||
|
|
77921790ca | ||
|
|
edd01d0a8c | ||
|
|
14b60aa369 | ||
|
|
e5090fdc89 |
+16
-26
@@ -1,26 +1,16 @@
|
||||
.DS_Store
|
||||
*/.DS_Store
|
||||
bin/*.app
|
||||
*/*.log*
|
||||
*/*/*/*.log*
|
||||
*/gimpswap.*
|
||||
gimp-2.8
|
||||
cinnamon
|
||||
cinnamon/spices.cache
|
||||
cowfiles
|
||||
mednafen
|
||||
PyCharm40/system
|
||||
pyenv
|
||||
pyenv/plugins
|
||||
racer
|
||||
ssh/known_host*
|
||||
vim/bundle
|
||||
vim/plugged
|
||||
vlc
|
||||
z
|
||||
node_modules
|
||||
tmuxinator
|
||||
themes
|
||||
ssh
|
||||
|
||||
dotfile_overrides
|
||||
existing
|
||||
minimal
|
||||
install_local.sh
|
||||
bin/dotfiles-install
|
||||
config/dejima
|
||||
config/i3/config.de
|
||||
config/i3/config.local
|
||||
config/gtk-3.0/bookmarks
|
||||
config/xfce4/xfconf/xfce-perchannel-xml
|
||||
config/xfce4/terminal
|
||||
config/themes
|
||||
config/icons
|
||||
config/VSCodium
|
||||
dependencies/dotfiles-local
|
||||
packages/*.local
|
||||
.claude
|
||||
|
||||
+26
-8
@@ -1,9 +1,27 @@
|
||||
[submodule "gruvbox"]
|
||||
path = gruvbox
|
||||
[submodule "config/alacritty/themes"]
|
||||
path = config/alacritty/themes
|
||||
url = https://github.com/alacritty/alacritty-theme
|
||||
[submodule "dependencies/Gruvbox-GTK-Theme"]
|
||||
path = dependencies/Gruvbox-GTK-Theme
|
||||
url = https://github.com/Fausto-Korpsvart/Gruvbox-GTK-Theme
|
||||
[submodule "dependencies/tmux-powerline-gruvbox-colorscheme"]
|
||||
path = dependencies/tmux-powerline-gruvbox-colorscheme
|
||||
url = https://github.com/PetrusZ/tmux-powerline-gruvbox-colorscheme
|
||||
[submodule "dependencies/ohmyzsh"]
|
||||
path = dependencies/ohmyzsh
|
||||
url = https://github.com/ohmyzsh/ohmyzsh
|
||||
[submodule "dependencies/gruvbox-contrib"]
|
||||
path = dependencies/gruvbox-contrib
|
||||
url = https://github.com/gruvbox-community/gruvbox-contrib
|
||||
[submodule "dependencies/gruvbox"]
|
||||
path = dependencies/gruvbox
|
||||
url = https://github.com/morhetz/gruvbox
|
||||
[submodule "oh-my-zsh"]
|
||||
path = oh-my-zsh
|
||||
url = https://github.com/robbyrussell/oh-my-zsh
|
||||
[submodule "gruvbox-contrib"]
|
||||
path = gruvbox-contrib
|
||||
url = https://github.com/morhetz/gruvbox-contrib
|
||||
[submodule "config/tmux/plugins/tpm"]
|
||||
path = config/tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm
|
||||
[submodule "dependencies/fzf"]
|
||||
path = dependencies/fzf
|
||||
url = https://github.com/junegunn/fzf.git
|
||||
[submodule "config/tmux/plugins/tmux-fzf"]
|
||||
path = config/tmux/plugins/tmux-fzf
|
||||
url = https://github.com/sainnhe/tmux-fzf
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
# Generated by YCM Generator at 2015-09-29 15:22:06.720195
|
||||
|
||||
# This file is NOT licensed under the GPLv3, which is the license for the rest
|
||||
# of YouCompleteMe.
|
||||
#
|
||||
# Here's the license text for this file:
|
||||
#
|
||||
# This is free and unencumbered software released into the public domain.
|
||||
#
|
||||
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
# distribute this software, either in source code form or as a compiled
|
||||
# binary, for any purpose, commercial or non-commercial, and by any
|
||||
# means.
|
||||
#
|
||||
# In jurisdictions that recognize copyright laws, the author or authors
|
||||
# of this software dedicate any and all copyright interest in the
|
||||
# software to the public domain. We make this dedication for the benefit
|
||||
# of the public at large and to the detriment of our heirs and
|
||||
# successors. We intend this dedication to be an overt act of
|
||||
# relinquishment in perpetuity of all present and future rights to this
|
||||
# software under copyright law.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
import os
|
||||
import ycm_core
|
||||
|
||||
flags = [
|
||||
'-x',
|
||||
'c',
|
||||
]
|
||||
|
||||
|
||||
# Set this to the absolute path to the folder (NOT the file!) containing the
|
||||
# compile_commands.json file to use that instead of 'flags'. See here for
|
||||
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
|
||||
#
|
||||
# You can get CMake to generate this file for you by adding:
|
||||
# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
|
||||
# to your CMakeLists.txt file.
|
||||
#
|
||||
# Most projects will NOT need to set this to anything; you can just change the
|
||||
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
|
||||
compilation_database_folder = ''
|
||||
|
||||
if os.path.exists( compilation_database_folder ):
|
||||
database = ycm_core.CompilationDatabase( compilation_database_folder )
|
||||
else:
|
||||
database = None
|
||||
|
||||
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
|
||||
|
||||
def DirectoryOfThisScript():
|
||||
return os.path.dirname( os.path.abspath( __file__ ) )
|
||||
|
||||
|
||||
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
|
||||
if not working_directory:
|
||||
return list( flags )
|
||||
new_flags = []
|
||||
make_next_absolute = False
|
||||
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
|
||||
for flag in flags:
|
||||
new_flag = flag
|
||||
|
||||
if make_next_absolute:
|
||||
make_next_absolute = False
|
||||
if not flag.startswith( '/' ):
|
||||
new_flag = os.path.join( working_directory, flag )
|
||||
|
||||
for path_flag in path_flags:
|
||||
if flag == path_flag:
|
||||
make_next_absolute = True
|
||||
break
|
||||
|
||||
if flag.startswith( path_flag ):
|
||||
path = flag[ len( path_flag ): ]
|
||||
new_flag = path_flag + os.path.join( working_directory, path )
|
||||
break
|
||||
|
||||
if new_flag:
|
||||
new_flags.append( new_flag )
|
||||
return new_flags
|
||||
|
||||
|
||||
def IsHeaderFile( filename ):
|
||||
extension = os.path.splitext( filename )[ 1 ]
|
||||
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
|
||||
|
||||
|
||||
def GetCompilationInfoForFile( filename ):
|
||||
# The compilation_commands.json file generated by CMake does not have entries
|
||||
# for header files. So we do our best by asking the db for flags for a
|
||||
# corresponding source file, if any. If one exists, the flags for that file
|
||||
# should be good enough.
|
||||
if IsHeaderFile( filename ):
|
||||
basename = os.path.splitext( filename )[ 0 ]
|
||||
for extension in SOURCE_EXTENSIONS:
|
||||
replacement_file = basename + extension
|
||||
if os.path.exists( replacement_file ):
|
||||
compilation_info = database.GetCompilationInfoForFile(
|
||||
replacement_file )
|
||||
if compilation_info.compiler_flags_:
|
||||
return compilation_info
|
||||
return None
|
||||
return database.GetCompilationInfoForFile( filename )
|
||||
|
||||
|
||||
def FlagsForFile( filename, **kwargs ):
|
||||
if database:
|
||||
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
|
||||
# python list, but a "list-like" StringVec object
|
||||
compilation_info = GetCompilationInfoForFile( filename )
|
||||
if not compilation_info:
|
||||
return None
|
||||
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute(
|
||||
compilation_info.compiler_flags_,
|
||||
compilation_info.compiler_working_dir_ )
|
||||
|
||||
else:
|
||||
relative_to = DirectoryOfThisScript()
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
|
||||
|
||||
return {
|
||||
'flags': final_flags,
|
||||
'do_cache': True
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,63 +0,0 @@
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
E = @true
|
||||
else
|
||||
Q = @
|
||||
E = @echo
|
||||
endif
|
||||
|
||||
CFILES := $(shell find src -mindepth 1 -maxdepth 4 -name "*.c")
|
||||
CXXFILES := $(shell find src -mindepth 1 -maxdepth 4 -name "*.cpp")
|
||||
|
||||
INFILES := $(CFILES) $(CXXFILES)
|
||||
|
||||
OBJFILES := $(CXXFILES:src/%.cpp=%) $(CFILES:src/%.c=%)
|
||||
DEPFILES := $(CXXFILES:src/%.cpp=%) $(CFILES:src/%.c=%)
|
||||
OFILES := $(OBJFILES:%=obj/%.o)
|
||||
|
||||
BINFILE = projectname
|
||||
|
||||
COMMONFLAGS = -Wall -Wextra -pedantic
|
||||
LDFLAGS =
|
||||
|
||||
ifdef DEBUG
|
||||
COMMONFLAGS := $(COMMONFLAGS) -g
|
||||
endif
|
||||
CFLAGS = $(COMMONFLAGS) --std=c99
|
||||
CXXFLAGS = $(COMMONFLAGS) --std=c++0x
|
||||
DEPDIR = deps
|
||||
all: $(BINFILE)
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
-include Makefile.dep
|
||||
endif
|
||||
ifneq ($(filter-out clean, $(MAKECMDGOALS)),)
|
||||
-include Makefile.dep
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
|
||||
-include Makefile.local
|
||||
|
||||
.PHONY: clean all depend
|
||||
.SUFFIXES:
|
||||
obj/%.o: src/%.c
|
||||
$(E)C-compiling $<
|
||||
$(Q)if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi
|
||||
$(Q)$(CC) -o $@ -c $< $(CFLAGS)
|
||||
obj/%.o: src/%.cpp
|
||||
$(E)C++-compiling $<
|
||||
$(Q)if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi
|
||||
$(Q)$(CXX) -o $@ -c $< $(CXXFLAGS)
|
||||
Makefile.dep: $(CFILES) $(CXXFILES)
|
||||
$(E)Depend
|
||||
$(Q)for i in $(^); do $(CXX) $(CXXFLAGS) -MM "$${i}" -MT obj/`basename $${i%.*}`.o; done > $@
|
||||
|
||||
|
||||
$(BINFILE): $(OFILES)
|
||||
$(E)Linking $@
|
||||
$(Q)$(CXX) -o $@ $(OFILES) $(LDFLAGS)
|
||||
clean:
|
||||
$(E)Removing files
|
||||
$(Q)rm -f $(BINFILE) obj/* Makefile.dep
|
||||
@@ -1,116 +0,0 @@
|
||||
Dotfiles
|
||||
|
||||
## Installation:
|
||||
```
|
||||
git clone git://github.com/branderson/dotfiles.git
|
||||
cd ~/dotfiles
|
||||
./install.sh
|
||||
|
||||
# To install middle click functionality for urxvt:
|
||||
cp bin/osc-xterm-clipboard /usr/lib/urxvt/perl/
|
||||
|
||||
# Configuration environment variables (set in ~/.profile.local)
|
||||
WALLPAPER_DIR
|
||||
POWERLINE_ROOT (/usr/lib/python3.10/site-packages/powerline)
|
||||
```
|
||||
|
||||
## About:
|
||||
OS: Arch Linux
|
||||
|
||||
WM: i3-gaps
|
||||
|
||||
Editor: vim
|
||||
|
||||
Shell: zsh/tmux
|
||||
|
||||
Terminal: urxvt
|
||||
|
||||
## Usage:
|
||||
### Basics
|
||||
```
|
||||
Alt is for i3 commands
|
||||
Ctrl is left for programs except for Ctrl-a
|
||||
Ctrl-a is for tmux commands
|
||||
Comma is for vim commands
|
||||
```
|
||||
|
||||
### i3
|
||||
```
|
||||
# Open programs
|
||||
Alt-Enter: Open terminal as new session targeting main tmux
|
||||
Alt-t: Open terminal with new tmux session
|
||||
Alt-i: Open browser
|
||||
Alt-o: Open ranger terminal
|
||||
Alt-d: Open Rofi launcher
|
||||
Alt-v: Open volume mixer
|
||||
|
||||
# Workspaces
|
||||
Alt-Shift-Minus: Send to scratchpad
|
||||
Alt-Ctrl-Minus: Show from scratchpad
|
||||
Alt-<number>: Switch to <number> workspace
|
||||
Alt-Shift-<number>: Move to <number> workspace
|
||||
Alt-Tab: Switch to most recent workspace
|
||||
Alt-Shift-Tab: Switch to next workspace
|
||||
|
||||
# Layout
|
||||
Alt-Minus: Split next horizontally
|
||||
Alt-Bar/Backslash: Split next vertically
|
||||
Alt-Space: Toggle focus between floating and tiling
|
||||
Alt-Shift-Space: Toggle window between floating and tiling
|
||||
Alt-Ctrl-<dir>: Move <dir>
|
||||
Alt-s: Change layout to stacking
|
||||
Alt-w: Change layout to tabbed
|
||||
Alt-e: Change layout to split
|
||||
Alt-g: Enable/Disable gaps
|
||||
Alt-Shift-g: Resize gaps
|
||||
Alt-r: Resize windows
|
||||
|
||||
# Focus
|
||||
Alt-a: Focus parent
|
||||
Alt-c: Focus child
|
||||
Alt-<dir>: Focus <dir>
|
||||
Alt-f: Window fullscreen toggle
|
||||
|
||||
# Other
|
||||
Alt-Shift-q: Close application
|
||||
Alt-Shift-c: Reload configuration
|
||||
Alt-Shift-r: Restart i3
|
||||
Alt-Shift-e: Exit i3
|
||||
Alt-Escape: Lock screen
|
||||
```
|
||||
|
||||
### tmux
|
||||
All commands prefixed by Ctrl-a
|
||||
```
|
||||
Ctrl-a: Send Ctrl-a through to application
|
||||
r: Reload tmux config
|
||||
|: Open new horizontal split
|
||||
-: Open new vertical split
|
||||
c: Open new window at current directory
|
||||
C: Display calendar
|
||||
T: Make current window index 1
|
||||
h, j, k, l: Vim style movement between panes
|
||||
<num>: Switch to <num> window
|
||||
q: Display split numbers (follow with <num> to switch)
|
||||
z: Toggle pane zoom
|
||||
t: Toggle pane clock
|
||||
s: Switch tmux session
|
||||
a: Toggle synchronize keyboard input across panes
|
||||
```
|
||||
|
||||
### zsh
|
||||
```
|
||||
Ctrl-o: Open ranger and cd to exit directory
|
||||
Ctrl-t: Display pretty clock
|
||||
K: Open man page (from command mode)
|
||||
commands: Open list of useful commands
|
||||
sc: Open list of aliases
|
||||
pyinit: Initialize new python repository
|
||||
xo: Alias to xdg-open
|
||||
crontab-e: Make changes to crontab (use instead of crontab -e)
|
||||
```
|
||||
|
||||
### Other
|
||||
```
|
||||
Alt-Ctrl-Bksp: Kill X-Server
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
Xft.dpi: 92
|
||||
xterm*termName: xterm-256color
|
||||
|
||||
! --- URxvt Configuration ---
|
||||
@@ -1,131 +0,0 @@
|
||||
filetype off
|
||||
|
||||
set rtp+=~/vim/bundle/vundle
|
||||
|
||||
" let Vundle manage Vundle
|
||||
" required!
|
||||
Bundle 'gmarik/vundle'
|
||||
|
||||
" The bundles you install will be listed here
|
||||
Bundle 'scrooloose/nerdtree'
|
||||
Bundle 'klen/python-mode'
|
||||
Bundle 'davidhalter/jedi-vim'
|
||||
Bundle 'jlanzarotta/bufexplorer'
|
||||
Bundle 'msanders/snipmate.vim'
|
||||
|
||||
Bundle 'L9'
|
||||
Bundle 'FuzzyFinder'
|
||||
" Bundle 'taglist.vim'
|
||||
|
||||
" Run in python using F9
|
||||
autocmd FileType python nnoremap <buffer> <F9> :exec '!python' shellescape(@%, 1)<cr>
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
" Plugins
|
||||
" FuzzyFinder
|
||||
" Leader-f opens buffer mode
|
||||
" :FufFile - file mode
|
||||
"
|
||||
" BufferExplorer
|
||||
" leader-be - Open explorer
|
||||
" leader-bs - Open horizontal split
|
||||
" leader-bv - Open vertical split
|
||||
" t or Shift-Enter - Open in new tab
|
||||
"
|
||||
" Snippets
|
||||
" type keywords, press tab, get shit done
|
||||
"
|
||||
" Tag List
|
||||
" Leader-t opens tag list
|
||||
"
|
||||
" SuperTab
|
||||
" I think I just press tab and magic happens
|
||||
"
|
||||
" C-VIm
|
||||
" I should get this when I have time to learn it
|
||||
"
|
||||
" The rest of your config follows here
|
||||
" Keybindings
|
||||
noremap <space> :
|
||||
inoremap ,, <ESC>
|
||||
cnoremap ,, <ESC><ESC>
|
||||
let mapleader=","
|
||||
map <leader>w :w<CR>
|
||||
map <leader>d :NERDTreeToggle<CR>
|
||||
map <leader>fc :FufFileWithCurrentBufferDir<CR>
|
||||
map <leader>fb :FufBuffer<CR>
|
||||
map <leader>ft :FufTag<CR>
|
||||
" map <leader>t :TlistToggle<CR>
|
||||
map <leader>v :e ~/_vsvimrc<CR>
|
||||
|
||||
" Update vimrc
|
||||
map <leader>rr :source ~/_vimrc<CR>
|
||||
|
||||
" Documentation
|
||||
let g:pymode_doc = 1
|
||||
let g:pymode_doc_key = 'K'
|
||||
|
||||
" Linting
|
||||
let g:pymode_lint = 1
|
||||
let g:pymode_lint_checker = "pyflakes,pep8"
|
||||
|
||||
" Auto check on save
|
||||
let g:pymode_lint_write = 1
|
||||
|
||||
" Support virtualenv
|
||||
let g:pymode_virtualenv = 1
|
||||
|
||||
" Enable breakpoints plugin
|
||||
let g:pymode_breakpoint = 1
|
||||
let g:pymode_breakpoint_key = '<leader>b'
|
||||
|
||||
" Syntax highlighting
|
||||
syntax enable
|
||||
let g:pymode_syntax = 1
|
||||
let g:pymode_syntax_all = 1
|
||||
let g:pymode_syntax_indent_errors = g:pymode_syntax_all
|
||||
let g:pymode_syntax_space_errors = g:pymode_syntax_all
|
||||
|
||||
" Don't autofold code
|
||||
let g:pymode_folding = 0
|
||||
|
||||
colorscheme desert
|
||||
set number " Show line numbers
|
||||
|
||||
" Allow backspacing over everything
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" Keep longer history
|
||||
set history=700
|
||||
|
||||
" Incremental search
|
||||
set incsearch
|
||||
|
||||
" Smart case insensitive search
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Maintain context around cursor
|
||||
set scrolloff=7
|
||||
|
||||
|
||||
" Configure tab behavior
|
||||
set tabstop=8 softtabstop=4 expandtab shiftwidth=4
|
||||
|
||||
" Move between windows
|
||||
map <C-j> <C-W>j
|
||||
map <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" Return to last edit position when opening files (You want this!)
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
" Remember info about open buffers on close
|
||||
" set viminfo=%
|
||||
|
||||
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 169 KiB |
@@ -1,5 +0,0 @@
|
||||
export SHELL=/bin/zsh
|
||||
eval "$(aactivator init)"
|
||||
exec /bin/zsh -l
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
source ~/.profile
|
||||
source ~/.profile.local
|
||||
# pyenv-virtualenv for managing virtualenvs for different python versions
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
@@ -1,6 +0,0 @@
|
||||
lc3*
|
||||
gibo
|
||||
Ascolorii
|
||||
brown_noise.sh
|
||||
brownnoise.plt
|
||||
guitar.sh
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Update all locally existing PGP keys in pacman's gnupg keyring, that are
|
||||
# relevant for Arch Linux packaging using the distribution's Web Key Directory
|
||||
# (WKD).
|
||||
# This ensures, that new signatures on already existing keys are fetched before
|
||||
# a new version of archlinux-keyring is installed. Fetching signatures early
|
||||
# prevents marginal trust issues with packages that are signed by keys which
|
||||
# only gain full trust when updating to a new version of archlinux-keyring in
|
||||
# that same system upgrade action.
|
||||
|
||||
set -eu
|
||||
|
||||
readonly main_key_domain_match="@master-key.archlinux.org$"
|
||||
readonly packager_domain_match="@archlinux.org$"
|
||||
readonly homedir="$(pacman-conf GPGDir)"
|
||||
|
||||
domain_match=""
|
||||
uid=""
|
||||
gpg_locate_external=(
|
||||
# force update a key using WKD
|
||||
gpg
|
||||
--homedir
|
||||
"$homedir"
|
||||
--quiet
|
||||
--no-permission-warning
|
||||
--auto-key-locate
|
||||
"clear,nodefault,wkd"
|
||||
--locate-external-keys
|
||||
)
|
||||
# a list of <fingerprint> <mbox> tuples of all keys in the keyring
|
||||
# e.g.:
|
||||
# C7E7849466FE2358343588377258734B41C31549 dvzrv@archlinux.org
|
||||
# 8FC15A064950A99DD1BD14DD39E4B877E62EB915 svenstaro@gmail.com
|
||||
fingerprint_mboxes="$(
|
||||
gpg --homedir "$homedir" --no-permission-warning --list-keys --list-options show-only-fpr-mbox
|
||||
)"
|
||||
|
||||
# a list of <fingerprints> of all revoked keys and keys that have no valid main
|
||||
# key signatures
|
||||
old_fingerprints="$(
|
||||
gpg --homedir "$homedir" --no-permission-warning --list-keys --with-colons |
|
||||
awk -F: '$1 == "pub" && $2 ~ /-|q|r/ { getline; print $10 }'
|
||||
)"
|
||||
|
||||
if (( EUID != 0 )); then
|
||||
printf "This script must be run as root.\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# first update the main signing keys, then the packager keys
|
||||
for domain_match in "$main_key_domain_match" "$packager_domain_match"; do
|
||||
while read -ra fpr_email; do
|
||||
if [[ ${fpr_email[1]} =~ $domain_match && ! "$old_fingerprints" =~ ${fpr_email[0]} ]]; then
|
||||
printf "Refreshing key %s with UID %s...\n" "${fpr_email[0]}" "${fpr_email[1]}"
|
||||
"${gpg_locate_external[@]}" "${fpr_email[1]}"
|
||||
else
|
||||
printf "Skipping key %s with UID %s...\n" "${fpr_email[0]}" "${fpr_email[1]}"
|
||||
fi
|
||||
done <<< "$fingerprint_mboxes"
|
||||
done
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# Copy stdin to the system clipboard, regardless of platform or how deep in
|
||||
# ssh/tmux this shell is: prefer a local clipboard tool for the current
|
||||
# display server, and fall back to a single plain OSC 52 write when no local
|
||||
# tool is available (e.g. a headless remote host). Any tmux hops in between
|
||||
# here and the real terminal relay that onward themselves, recursively, via
|
||||
# the pane-set-clipboard hook in tmux.conf -- this doesn't need to know or
|
||||
# guess how many hops there are.
|
||||
if command -v pbcopy >/dev/null 2>&1; then
|
||||
exec pbcopy
|
||||
elif [ -n "$WAYLAND_DISPLAY" ] && command -v wl-copy >/dev/null 2>&1; then
|
||||
# wl-copy/xclip both hold the selection by staying alive as a background
|
||||
# process (X11/Wayland selections have no central store -- the owner has
|
||||
# to serve paste requests live). setsid -f detaches that process from
|
||||
# our session so tmux's copy-pipe job cleanup can't kill it right after.
|
||||
setsid -f wl-copy
|
||||
elif [ -n "$DISPLAY" ] && command -v xclip >/dev/null 2>&1; then
|
||||
setsid -f xclip -selection clipboard
|
||||
else
|
||||
data=$(base64 | tr -d '\n')
|
||||
# /dev/tty needs this process's own session to have a controlling
|
||||
# terminal, but a job spawned by nvim's clipboard provider doesn't get
|
||||
# one (nvim's job-spawning doesn't establish a ctty for children). Nvim
|
||||
# itself also isn't a single process: the one actually spawning jobs is
|
||||
# a `nvim --embed` core process with no tty of its own (shown as `?` in
|
||||
# ps) -- the real terminal belongs to a separate parent UI process. Walk
|
||||
# up the process tree past any tty-less ancestors to find it.
|
||||
real_tty=""
|
||||
pid="$PPID"
|
||||
i=0
|
||||
while [ "$i" -lt 10 ] && [ -n "$pid" ] && [ "$pid" != "0" ]; do
|
||||
t=$(ps -o tty= -p "$pid" 2>/dev/null | tr -d ' ')
|
||||
if [ -n "$t" ] && [ "$t" != "?" ]; then
|
||||
real_tty="/dev/$t"
|
||||
break
|
||||
fi
|
||||
pid=$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ')
|
||||
i=$((i + 1))
|
||||
done
|
||||
if [ -n "$real_tty" ] && [ -w "$real_tty" ]; then
|
||||
printf '\033]52;c;%s\a' "$data" > "$real_tty"
|
||||
else
|
||||
printf '\033]52;c;%s\a' "$data" > /dev/tty
|
||||
fi
|
||||
fi
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker compose pull
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
find . -type f -name "docker-compose.y*ml" -exec dirname {} \; | while read dir
|
||||
do
|
||||
if [[ "$dir" != *"DEPRECATED"* ]] && [[ "$dir" != *"MIGRATED"* ]] ; then
|
||||
pushd "$dir"
|
||||
docker compose down
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
popd
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/home/brad/.pyenv/versions/neovim3/bin/flake8
|
||||
Executable
+255
@@ -0,0 +1,255 @@
|
||||
#!/bin/bash
|
||||
# Read and write Gitea issues from a shell - the issue-side counterpart to
|
||||
# gitea-pr, and deliberately its twin rather than its sibling: both are
|
||||
# copied into the sandbox image as single self-contained files, and gitea-pr
|
||||
# also lives in a dotfiles checkout, so a shared library would be a third
|
||||
# thing to keep in step across three places. The duplicated config/token/curl
|
||||
# preamble is pinned in both files by test/static.bats instead.
|
||||
set -euo pipefail
|
||||
|
||||
GITEA_TOKEN_FILE="${GITEA_TOKEN_FILE:-$HOME/.config/gitea/token}"
|
||||
|
||||
function usage() {
|
||||
echo "Usage: gitea-issue list [--state open|closed|all] [--limit N]"
|
||||
echo " gitea-issue view NUMBER"
|
||||
echo " gitea-issue create --title TITLE [--body BODY | --body-file FILE]"
|
||||
echo " gitea-issue comment NUMBER (--body BODY | --body-file FILE)"
|
||||
echo " gitea-issue close NUMBER"
|
||||
echo " gitea-issue reopen NUMBER"
|
||||
echo ""
|
||||
echo "--body-file reads the body from FILE, or from stdin when FILE is '-'."
|
||||
echo "Prefer it over --body for anything with quotes, backticks or newlines."
|
||||
echo ""
|
||||
echo "Requires GITEA_SSH_HOST and GITEA_API set in the environment (e.g. in" \
|
||||
"your shell profile), and a token at $GITEA_TOKEN_FILE (or GITEA_TOKEN" \
|
||||
"set for this invocation only)."
|
||||
}
|
||||
|
||||
function require_config() {
|
||||
if [ -z "${GITEA_SSH_HOST:-}" ]; then
|
||||
echo "GITEA_SSH_HOST is not set. Add 'export GITEA_SSH_HOST=<gitea ssh hostname>'" \
|
||||
"(e.g. gitea.example.com) to ~/.profile.local" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${GITEA_API:-}" ]; then
|
||||
echo "GITEA_API is not set. Add 'export GITEA_API=https://<gitea host>/api/v1'" \
|
||||
"(e.g. https://gitea.example.com/api/v1) to ~/.profile.local" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function require_token() {
|
||||
if [ -z "${GITEA_TOKEN:-}" ] && [ -f "$GITEA_TOKEN_FILE" ]; then
|
||||
GITEA_TOKEN=$(<"$GITEA_TOKEN_FILE")
|
||||
fi
|
||||
if [ -z "${GITEA_TOKEN:-}" ]; then
|
||||
echo "No Gitea token found. Generate one in the Gitea web UI" \
|
||||
"(Settings > Applications, scopes write:repository + write:issue)" \
|
||||
"and save it to $GITEA_TOKEN_FILE (chmod 600), or set GITEA_TOKEN" \
|
||||
"in the environment for this invocation only." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Feeds the auth header to curl as a config on stdin rather than as an
|
||||
# argument. Command lines are world-readable through /proc, so `-H
|
||||
# "Authorization: token $GITEA_TOKEN"` exposes the token to every other
|
||||
# process on the host for as long as the request runs - and to anything that
|
||||
# scrapes `ps` output, including the agents this repo exists to sandbox.
|
||||
# printf is a bash builtin, so the token never lands in another argv.
|
||||
function gitea_api() {
|
||||
printf 'header = "Authorization: token %s"\n' "$GITEA_TOKEN" |
|
||||
curl -sS -w '\n%{http_code}' -K - "$@"
|
||||
}
|
||||
|
||||
# Splits gitea_api's combined output into the globals `json` and `http_code`
|
||||
# and fails with the body on any non-2xx. Every call site did this by hand in
|
||||
# gitea-pr; there are six of them here, and six hand-rolled copies is where
|
||||
# one of them quietly stops checking.
|
||||
function api_or_die() {
|
||||
local what="$1"; shift
|
||||
local response
|
||||
response=$(gitea_api "$@")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to $what (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Reads a body from a file, or from stdin for '-'. The point is to keep prose
|
||||
# out of argv: a body composed on a command line has to survive shell quoting,
|
||||
# and the things that break it - an apostrophe, a backtick, a $ - are exactly
|
||||
# what English and code fences are made of. A file (or a heredoc into '-') has
|
||||
# no such layer.
|
||||
function read_body_file() {
|
||||
local file="$1"
|
||||
if [ "$file" = "-" ]; then
|
||||
cat
|
||||
return
|
||||
fi
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "No such body file: $file" >&2
|
||||
exit 1
|
||||
fi
|
||||
cat "$file"
|
||||
}
|
||||
|
||||
function gitea_owner_repo() {
|
||||
local remote_url host owner_repo
|
||||
remote_url=$(git remote get-url origin 2>/dev/null) || {
|
||||
echo "No 'origin' remote found in this repository" >&2
|
||||
exit 1
|
||||
}
|
||||
host=$(echo "$remote_url" | sed -E 's#^[^@]+@([^:]+):.*#\1#')
|
||||
if [ "$host" != "$GITEA_SSH_HOST" ]; then
|
||||
echo "origin remote ($remote_url) is not on $GITEA_SSH_HOST; gitea-issue only supports this host" >&2
|
||||
exit 1
|
||||
fi
|
||||
owner_repo=$(echo "$remote_url" | sed -E 's#^[^@]+@[^:]+:##; s#\.git$##')
|
||||
echo "$owner_repo"
|
||||
}
|
||||
|
||||
function require_number() {
|
||||
if ! [[ "${1:-}" =~ ^[0-9]+$ ]]; then
|
||||
echo "Expected an issue number, got '${1:-}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Sets `body` from --body/--body-file, rejecting both. Shared by create and
|
||||
# comment so the two cannot drift into disagreeing about which one wins.
|
||||
function parse_body_args() {
|
||||
body=""
|
||||
local body_file=""
|
||||
parsed_title=""
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--title) parsed_title="$2"; shift 2 ;;
|
||||
--body) body="$2"; shift 2 ;;
|
||||
--body-file) body_file="$2"; shift 2 ;;
|
||||
*) echo "Unknown option: $1" >&2; usage; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
# Rejected rather than ranked: silently preferring one would make a caller
|
||||
# that passed both ship a body it didn't mean to.
|
||||
if [ -n "$body" ] && [ -n "$body_file" ]; then
|
||||
echo "Pass --body or --body-file, not both" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "$body_file" ]; then
|
||||
body="$(read_body_file "$body_file")"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
subcommand="$1"
|
||||
shift
|
||||
|
||||
case "$subcommand" in
|
||||
list|view|create|comment|close|reopen)
|
||||
require_config
|
||||
require_token
|
||||
owner_repo=$(gitea_owner_repo)
|
||||
owner="${owner_repo%%/*}"
|
||||
repo="${owner_repo##*/}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
issues_api="${GITEA_API}/repos/${owner}/${repo}/issues"
|
||||
|
||||
case "$subcommand" in
|
||||
list)
|
||||
state="open"
|
||||
limit="30"
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--state) state="$2"; shift 2 ;;
|
||||
--limit) limit="$2"; shift 2 ;;
|
||||
*) echo "Unknown option: $1" >&2; usage; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
case "$state" in
|
||||
open|closed|all) ;;
|
||||
*) echo "--state must be open, closed or all" >&2; exit 1 ;;
|
||||
esac
|
||||
if ! [[ "$limit" =~ ^[0-9]+$ ]]; then
|
||||
echo "--limit must be a number" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# type=issues is load-bearing: Gitea's issues endpoint returns pull
|
||||
# requests too, since a PR *is* an issue with a branch attached.
|
||||
# Without it every open PR shows up here as an issue, which reads as
|
||||
# a work list that is quietly twice as long as the real one.
|
||||
api_or_die "list issues" \
|
||||
"${issues_api}?state=${state}&type=issues&limit=${limit}"
|
||||
echo "$json" | jq -r '.[] | "#\(.number)\t[\(.state)]\t\(.title)\t(\(.comments) comments)"'
|
||||
;;
|
||||
view)
|
||||
require_number "${1:-}"
|
||||
number="$1"
|
||||
|
||||
api_or_die "fetch issue #${number}" "${issues_api}/${number}"
|
||||
echo "$json" | jq -r '"#\(.number) [\(.state)] \(.title)\n[\(.user.login) @ \(.created_at)]\n\(.body // "(no description)")\n"'
|
||||
|
||||
echo "=== Comments ==="
|
||||
api_or_die "fetch comments for issue #${number}" "${issues_api}/${number}/comments"
|
||||
echo "$json" | jq -r '.[] | "[\(.user.login) @ \(.created_at)]\n\(.body)\n"'
|
||||
;;
|
||||
create)
|
||||
parse_body_args "$@"
|
||||
if [ -z "$parsed_title" ]; then
|
||||
echo "gitea-issue create requires --title" >&2
|
||||
exit 1
|
||||
fi
|
||||
body="**Filed by LLM agent**
|
||||
|
||||
${body}"
|
||||
|
||||
api_or_die "create issue" -X POST "$issues_api" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg title "$parsed_title" --arg body "$body" \
|
||||
'{title: $title, body: $body}')"
|
||||
echo "$json" | jq -r '.html_url'
|
||||
;;
|
||||
comment)
|
||||
require_number "${1:-}"
|
||||
number="$1"
|
||||
shift
|
||||
parse_body_args "$@"
|
||||
if [ -z "$body" ]; then
|
||||
echo "gitea-issue comment requires --body or --body-file" >&2
|
||||
exit 1
|
||||
fi
|
||||
body="**Comment by LLM agent**
|
||||
|
||||
${body}"
|
||||
|
||||
api_or_die "comment on issue #${number}" -X POST "${issues_api}/${number}/comments" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg body "$body" '{body: $body}')"
|
||||
echo "$json" | jq -r '.html_url'
|
||||
;;
|
||||
close|reopen)
|
||||
require_number "${1:-}"
|
||||
number="$1"
|
||||
new_state="closed"
|
||||
[ "$subcommand" = "reopen" ] && new_state="open"
|
||||
|
||||
api_or_die "${subcommand} issue #${number}" -X PATCH "${issues_api}/${number}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg state "$new_state" '{state: $state}')"
|
||||
echo "$json" | jq -r '"#\(.number) is now \(.state): \(.html_url)"'
|
||||
;;
|
||||
esac
|
||||
Executable
+246
@@ -0,0 +1,246 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
GITEA_TOKEN_FILE="${GITEA_TOKEN_FILE:-$HOME/.config/gitea/token}"
|
||||
|
||||
function usage() {
|
||||
echo "Usage: gitea-pr create [--title TITLE] [--body BODY | --body-file FILE] [--base BRANCH]"
|
||||
echo " gitea-pr comments PR_NUMBER"
|
||||
echo " gitea-pr merge PR_NUMBER"
|
||||
echo ""
|
||||
echo "--body-file reads the body from FILE, or from stdin when FILE is '-'."
|
||||
echo "Prefer it over --body for anything with quotes, backticks or newlines."
|
||||
echo ""
|
||||
echo "Requires GITEA_SSH_HOST and GITEA_API set in the environment (e.g. in" \
|
||||
"your shell profile), and a token at $GITEA_TOKEN_FILE (or GITEA_TOKEN" \
|
||||
"set for this invocation only)."
|
||||
}
|
||||
|
||||
function require_config() {
|
||||
if [ -z "${GITEA_SSH_HOST:-}" ]; then
|
||||
echo "GITEA_SSH_HOST is not set. Add 'export GITEA_SSH_HOST=<gitea ssh hostname>'" \
|
||||
"(e.g. gitea.example.com) to ~/.profile.local" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${GITEA_API:-}" ]; then
|
||||
echo "GITEA_API is not set. Add 'export GITEA_API=https://<gitea host>/api/v1'" \
|
||||
"(e.g. https://gitea.example.com/api/v1) to ~/.profile.local" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function require_token() {
|
||||
if [ -z "${GITEA_TOKEN:-}" ] && [ -f "$GITEA_TOKEN_FILE" ]; then
|
||||
GITEA_TOKEN=$(<"$GITEA_TOKEN_FILE")
|
||||
fi
|
||||
if [ -z "${GITEA_TOKEN:-}" ]; then
|
||||
echo "No Gitea token found. Generate one in the Gitea web UI" \
|
||||
"(Settings > Applications, scopes write:repository + write:issue)" \
|
||||
"and save it to $GITEA_TOKEN_FILE (chmod 600), or set GITEA_TOKEN" \
|
||||
"in the environment for this invocation only." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Feeds the auth header to curl as a config on stdin rather than as an
|
||||
# argument. Command lines are world-readable through /proc, so `-H
|
||||
# "Authorization: token $GITEA_TOKEN"` exposes the token to every other
|
||||
# process on the host for as long as the request runs - and to anything that
|
||||
# scrapes `ps` output, including the agents this repo exists to sandbox.
|
||||
# printf is a bash builtin, so the token never lands in another argv.
|
||||
function gitea_api() {
|
||||
printf 'header = "Authorization: token %s"\n' "$GITEA_TOKEN" |
|
||||
curl -sS -w '\n%{http_code}' -K - "$@"
|
||||
}
|
||||
|
||||
# Reads a body from a file, or from stdin for '-'. The point is to keep prose
|
||||
# out of argv: a body composed on a command line has to survive shell quoting,
|
||||
# and the things that break it - an apostrophe, a backtick, a $ - are exactly
|
||||
# what English and code fences are made of. A file (or a heredoc into '-') has
|
||||
# no such layer.
|
||||
function read_body_file() {
|
||||
local file="$1"
|
||||
if [ "$file" = "-" ]; then
|
||||
cat
|
||||
return
|
||||
fi
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "No such body file: $file" >&2
|
||||
exit 1
|
||||
fi
|
||||
cat "$file"
|
||||
}
|
||||
|
||||
function gitea_owner_repo() {
|
||||
local remote_url host owner_repo
|
||||
remote_url=$(git remote get-url origin 2>/dev/null) || {
|
||||
echo "No 'origin' remote found in this repository" >&2
|
||||
exit 1
|
||||
}
|
||||
host=$(echo "$remote_url" | sed -E 's#^[^@]+@([^:]+):.*#\1#')
|
||||
if [ "$host" != "$GITEA_SSH_HOST" ]; then
|
||||
echo "origin remote ($remote_url) is not on $GITEA_SSH_HOST; gitea-pr only supports this host" >&2
|
||||
exit 1
|
||||
fi
|
||||
owner_repo=$(echo "$remote_url" | sed -E 's#^[^@]+@[^:]+:##; s#\.git$##')
|
||||
echo "$owner_repo"
|
||||
}
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
subcommand="$1"
|
||||
shift
|
||||
|
||||
case "$subcommand" in
|
||||
create|comments|merge)
|
||||
require_config
|
||||
require_token
|
||||
owner_repo=$(gitea_owner_repo)
|
||||
owner="${owner_repo%%/*}"
|
||||
repo="${owner_repo##*/}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$subcommand" in
|
||||
create)
|
||||
title=""
|
||||
body=""
|
||||
body_file=""
|
||||
base=""
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--title) title="$2"; shift 2 ;;
|
||||
--body) body="$2"; shift 2 ;;
|
||||
--body-file) body_file="$2"; shift 2 ;;
|
||||
--base) base="$2"; shift 2 ;;
|
||||
*) echo "Unknown option: $1" >&2; usage; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
# Rejected rather than ranked: silently preferring one would make a
|
||||
# caller that passed both ship a body it didn't mean to.
|
||||
if [ -n "$body" ] && [ -n "$body_file" ]; then
|
||||
echo "Pass --body or --body-file, not both" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "$body_file" ]; then
|
||||
body="$(read_body_file "$body_file")"
|
||||
fi
|
||||
body="**Summary generated by LLM agent**
|
||||
|
||||
${body}"
|
||||
|
||||
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ "$current_branch" = "HEAD" ]; then
|
||||
echo "Detached HEAD: check out the feature branch before creating a PR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$base" ]; then
|
||||
base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's#refs/remotes/origin/##' || true)
|
||||
base="${base:-main}"
|
||||
fi
|
||||
|
||||
response=$(gitea_api "${GITEA_API}/repos/${owner}/${repo}/pulls?state=open")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to check for an existing PR (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
existing_url=$(echo "$json" | jq -r --arg head "$current_branch" --arg base "$base" \
|
||||
'.[] | select(.head.ref == $head and .base.ref == $base) | .html_url' | head -1)
|
||||
if [ -n "$existing_url" ]; then
|
||||
echo "$existing_url"
|
||||
exit 0
|
||||
fi
|
||||
if [ -z "$title" ]; then
|
||||
title="$current_branch"
|
||||
fi
|
||||
|
||||
response=$(gitea_api -X POST "${GITEA_API}/repos/${owner}/${repo}/pulls" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg head "$current_branch" --arg base "$base" --arg title "$title" --arg body "$body" \
|
||||
'{head: $head, base: $base, title: $title, body: $body}')")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to create PR (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "$json" | jq -r '.html_url'
|
||||
;;
|
||||
comments)
|
||||
pr_number="${1:-}"
|
||||
if [ -z "$pr_number" ]; then
|
||||
echo "Usage: gitea-pr comments PR_NUMBER" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=== Issue comments ==="
|
||||
response=$(gitea_api "${GITEA_API}/repos/${owner}/${repo}/issues/${pr_number}/comments")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to fetch issue comments (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "$json" | jq -r '.[] | "[\(.user.login) @ \(.created_at)]\n\(.body)\n"'
|
||||
|
||||
echo "=== Reviews ==="
|
||||
response=$(gitea_api "${GITEA_API}/repos/${owner}/${repo}/pulls/${pr_number}/reviews")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
reviews_json=$(echo "$response" | sed '$d')
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to fetch reviews (HTTP $http_code):" >&2
|
||||
echo "$reviews_json" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "$reviews_json" | jq -r '.[] | select(.body != "") | "[\(.user.login) @ \(.submitted_at) — \(.state)]\n\(.body)\n"'
|
||||
|
||||
echo "=== Inline review comments ==="
|
||||
review_ids=$(echo "$reviews_json" | jq -r '.[] | select(.comments_count > 0) | .id')
|
||||
for review_id in $review_ids; do
|
||||
response=$(gitea_api \
|
||||
"${GITEA_API}/repos/${owner}/${repo}/pulls/${pr_number}/reviews/${review_id}/comments")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to fetch comments for review ${review_id} (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "$json" | jq -r '.[] | "[\(.user.login) @ \(.path):\(.line // "?")]\n\(.body)\n"'
|
||||
done
|
||||
;;
|
||||
merge)
|
||||
pr_number="${1:-}"
|
||||
if [ -z "$pr_number" ]; then
|
||||
echo "Usage: gitea-pr merge PR_NUMBER" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
response=$(gitea_api -X POST "${GITEA_API}/repos/${owner}/${repo}/pulls/${pr_number}/merge" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"Do": "merge"}')
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
json=$(echo "$response" | sed '$d')
|
||||
|
||||
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
|
||||
echo "Failed to merge PR #${pr_number} (HTTP $http_code):" >&2
|
||||
echo "$json" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Merged PR #${pr_number}"
|
||||
;;
|
||||
esac
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Fetches the current i3 wm colors and provides an options string to color rofi
|
||||
# Usage: rofi <your-options> $(i3-color-rofi)
|
||||
# by Oliver Kraitschy - http://okraits.de
|
||||
|
||||
from os import getenv
|
||||
|
||||
# SETTINGS
|
||||
config_path = getenv("HOME") + "/.config/i3/config"
|
||||
|
||||
# variables
|
||||
config_file = None
|
||||
lines = None
|
||||
normal_bg = None
|
||||
normal_fg = None
|
||||
selected_bg = None
|
||||
selected_fg = None
|
||||
normal_bg_var = False
|
||||
normal_fg_var = False
|
||||
selected_bg_var = False
|
||||
selected_fg_var = False
|
||||
cmd_string = ""
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
# open config file
|
||||
try:
|
||||
config_file = open(config_path, "r")
|
||||
except IOError:
|
||||
print("Error: i3 config file could not be opened.")
|
||||
exit(1)
|
||||
# read all lines into a list
|
||||
lines = config_file.readlines()
|
||||
config_file.close()
|
||||
|
||||
# loop over lines and find matches
|
||||
for line in lines:
|
||||
cols = line.split()
|
||||
|
||||
# for all lines not empty
|
||||
if len(cols) > 0:
|
||||
# normal background
|
||||
if cols[0] == "client.unfocused":
|
||||
normal_bg = cols[2]
|
||||
if normal_bg[0] == "$":
|
||||
normal_bg_var = True
|
||||
# normal foreground
|
||||
normal_fg = cols[3]
|
||||
if normal_fg[0] == "$":
|
||||
normal_fg_var = True
|
||||
# selected background
|
||||
if cols[0] == "client.focused":
|
||||
selected_bg = cols[2]
|
||||
if selected_bg[0] == "$":
|
||||
selected_bg_var = True
|
||||
# selected foreground
|
||||
selected_fg = cols[3]
|
||||
if selected_fg[0] == "$":
|
||||
selected_fg_var = True
|
||||
|
||||
# at least one variable was used, we need to find the real values
|
||||
if normal_bg_var or normal_fg_var or selected_bg_var or selected_fg_var:
|
||||
for line in lines:
|
||||
cols = line.split()
|
||||
|
||||
# for all lines starting with "set"
|
||||
if len(cols) > 0 and cols[0] == "set":
|
||||
if normal_bg_var and cols[1] == normal_bg:
|
||||
normal_bg = cols[2]
|
||||
if normal_fg_var and cols[1] == normal_fg:
|
||||
normal_fg = cols[2]
|
||||
if selected_bg_var and cols[1] == selected_bg:
|
||||
selected_bg = cols[2]
|
||||
if selected_fg_var and cols[1] == selected_fg:
|
||||
selected_fg = cols[2]
|
||||
|
||||
if normal_bg is not None:
|
||||
cmd_string += "-bg " + normal_bg + " "
|
||||
if normal_fg is not None:
|
||||
cmd_string += "-fg " + normal_fg + " "
|
||||
if selected_bg is not None:
|
||||
cmd_string += "-hlbg " + selected_bg + " "
|
||||
if selected_fg is not None:
|
||||
cmd_string += "-hlfg " + selected_fg + " "
|
||||
print(cmd_string)
|
||||
exit(0)
|
||||
@@ -1,31 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
pacman_repos="
|
||||
[infinality-bundle]
|
||||
Server = http://bohoomil.com/repo/\$arch
|
||||
|
||||
[infinality-bundle-multilib]
|
||||
Server = http://bohoomil.com/repo/multilib/\$arch
|
||||
|
||||
[infinality-bundle-fonts]
|
||||
Server = http://bohoomil.com/repo/fonts"
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f /etc/pacman.conf ]]; then
|
||||
echo "No pacman.conf found. Nothing changed"
|
||||
elif grep -q infinality /etc/pacman.conf; then
|
||||
echo "Infinality repository already present in pacman.conf. Nothing changed"
|
||||
else
|
||||
echo "Installing Infinality repository to pacman.conf"
|
||||
sudo echo "$pacman_repos" >> /etc/pacman.conf
|
||||
sudo pacman-key -r 962DDE58
|
||||
pacman-key --lsign-key 962DDE58
|
||||
|
||||
pacman -Syu
|
||||
pacman -S infinality-bundle
|
||||
pacman -S infinality-bundle-multilib
|
||||
pacman -S infinality-bundle-fonts
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
icon="$HOME/dotfiles/assets/lock_icon.png"
|
||||
tmpbg='/tmp/screen.png'
|
||||
|
||||
(( $# )) && { icon=$1; }
|
||||
|
||||
scrot "$tmpbg"
|
||||
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
||||
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
||||
i3lock -u -i "$tmpbg"
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This temporarily remaps the CapsLock key to a Control key.
|
||||
# The keyboard will return to the previous settings after a
|
||||
# reboot. The Linux console and the X Window system each
|
||||
# handles keypresses separately, so each must be remapped
|
||||
# separately. First remap the X keyboard since this does not
|
||||
# require root access.
|
||||
|
||||
# Remap the CapsLock key to a Control key for
|
||||
# the X Window system.
|
||||
if type setxkbmap >/dev/null 2>&1; then
|
||||
setxkbmap -layout us -option ctrl:nocaps 2>/dev/null
|
||||
fi
|
||||
|
||||
# You have to be root to remap the console keyboard.
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script is not running as root so"
|
||||
echo "the console CapsLock cannot be remapped."
|
||||
echo "Perhaps you forgot to run this under sudo."
|
||||
echo "Note that this problem does not effect X."
|
||||
echo "This only effects the consoles running on"
|
||||
echo "Alt-f1 through Alt-f6."
|
||||
exit 2
|
||||
fi
|
||||
# Remap the CapsLock key to a Control key for the console.
|
||||
(dumpkeys | grep keymaps; echo "keycode 58 = Control") | loadkeys
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/zsh
|
||||
[ -f "$HOME/.zsh_profile" ] && source "$HOME/.zsh_profile"
|
||||
launchctl setenv PATH "$PATH"
|
||||
killall Dock
|
||||
killall Finder
|
||||
|
||||
# Kill Android Studio if open
|
||||
ANDROID_STUDIO_PID=$(ps -A | grep "[A]ndroid Studio" -m1 | awk '{print $1}')
|
||||
while kill -9 $ANDROID_STUDIO_PID 2> /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Reopen Android Studio if we killed it
|
||||
if [ -n $ANDROID_STUDIO_PID ]; then
|
||||
open "/Applications/Android Studio.app"
|
||||
fi
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
use MIME::Base64;
|
||||
use Encode;
|
||||
|
||||
sub on_osc_seq {
|
||||
my ($term, $op, $args) = @_;
|
||||
return () unless $op eq 52;
|
||||
my ($clip, $data) = split ';', $args, 2;
|
||||
if ($data eq '?') {
|
||||
my $data_free = $term->selection();
|
||||
Encode::_utf8_off($data_free); # XXX
|
||||
$term->tt_write("\e]52;$clip;".encode_base64($data_free, '')."\a");
|
||||
}
|
||||
else {
|
||||
my $data_decoded = decode_base64($data);
|
||||
Encode::_utf8_on($data_decoded); # XXX
|
||||
$term->selection($data_decoded, $clip =~ /c/);
|
||||
$term->selection_grab(urxvt::CurrentTime, $clip =~ /c/);
|
||||
$term->exec_async('xdg-open', $data_decoded)
|
||||
if $clip =~ /x/; # some test extension
|
||||
}
|
||||
()
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
function usage() {
|
||||
echo "Usage: postgres-docker-backup container_name db_user dump_file"
|
||||
}
|
||||
|
||||
if [[ ! "$#" == 3 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
container_name="$1"
|
||||
db_user="$2"
|
||||
dump_file="$3"
|
||||
if [ -z "$container_name" ] || [ -z "$db_user" ] || [ -z "$dump_file" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker exec "$container_name" '/bin/sh' -c "pg_dumpall -U $db_user" > $dump_file
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage() {
|
||||
echo "Usage: postgres-docker-restore container_name db_user"
|
||||
}
|
||||
|
||||
if [[ ! "$#" == 2 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
container_name="$1"
|
||||
db_user="$2"
|
||||
if [ -z "$container_name" ] || [ -z "$db_user" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker exec -it "$container_name" '/bin/sh' -c "psql -U $db_user"
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage() {
|
||||
echo "Usage: postgres-docker-restore container_name db_user dump_file"
|
||||
echo " Note that dump_file is relative to docker filesystem and must be mounted"
|
||||
}
|
||||
|
||||
if [[ ! "$#" == 3 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
container_name="$1"
|
||||
db_user="$2"
|
||||
dump_file="$3"
|
||||
if [ -z "$container_name" ] || [ -z "$db_user" ] || [ -z "$dump_file" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker exec -it "$container_name" '/bin/sh' -c "psql -U $db_user < $dump_file"
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Store execution directory
|
||||
dir=$(pwd)
|
||||
|
||||
# Find and store script directory
|
||||
src="${BASH_SOURCE[0]}"
|
||||
while [ -h "$src" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
script_dir="$( cd -P "$( dirname "$src" )" && pwd )"
|
||||
src="$(readlink "$src")"
|
||||
# if $SOURCE was a relative symlink, resolve it relative to the path the symlink file was located
|
||||
[[ $src != /* ]] && SOURCE="$script_dir/$src"
|
||||
done
|
||||
script_dir="$( cd -P "$( dirname "$src" )" && pwd )"
|
||||
|
||||
# Return to execution directory
|
||||
cd $dir
|
||||
|
||||
# Ensure exactly one argument supplied
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Please supply a project name"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Make project directory and move to it
|
||||
mkdir "$1"
|
||||
cd "$1"
|
||||
|
||||
# Make project subdirectories
|
||||
mkdir bin "$1" tests docs
|
||||
|
||||
touch "$1"/__init__.py
|
||||
touch tests/__init__.py
|
||||
cp $script_dir/setup.py .
|
||||
cp $script_dir/tests.py tests/"$1"_tests.py
|
||||
@@ -1,19 +0,0 @@
|
||||
try:
|
||||
from setuptools import setup
|
||||
except ImportError:
|
||||
from distutils.core import setup
|
||||
|
||||
config = {
|
||||
'description': 'My Project',
|
||||
'author': 'My Name',
|
||||
'url': 'URL to get it at.',
|
||||
'download_url': 'Where to download it.',
|
||||
'author_email': 'brad.anderson1995@gmail.com',
|
||||
'version': '0.1',
|
||||
'install_requires': ['nose'],
|
||||
'packages': ['NAME'],
|
||||
'scripts': [],
|
||||
'name': 'projectname'
|
||||
}
|
||||
|
||||
setup(**config)
|
||||
@@ -1,11 +0,0 @@
|
||||
from nose.tools import *
|
||||
import NAME
|
||||
|
||||
def setup():
|
||||
print "SETUP!"
|
||||
|
||||
def teardown():
|
||||
print "TEAR DOWN!"
|
||||
|
||||
def test_basic():
|
||||
print "I RAN!"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/env bash
|
||||
res=`xrandr | head -n 1 | sed -r 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/g'`
|
||||
screen_width=`echo $res | cut -d 'x' -f 1`
|
||||
# screen_height=`echo $res | cut -d 'x' -f 2`
|
||||
width=30
|
||||
# pad=$((height / 5))
|
||||
pad=$((width*screen_width/600))
|
||||
opacity=100
|
||||
i3-dmenu-desktop --dmenu="rofi -dmenu -p 'run: ' -opacity $opacity -width $width -padding $pad -color-enabled $(i3-color-rofi)"
|
||||
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#!/bin/env bash
|
||||
feh --bg-scale --randomize $WALLPAPER_DIR
|
||||
@@ -1 +0,0 @@
|
||||
syncthing-resolve-conflicts
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Read clipboard content on stdin (e.g. from `tmux save-buffer -`) and write
|
||||
# it as a raw OSC 52 escape sequence directly to the given tty device path.
|
||||
# Intended to be called from tmux's pane-set-clipboard hook as:
|
||||
# tmux save-buffer - | tmux-clipboard-relay "#{client_tty}"
|
||||
tty_path="$1"
|
||||
data=$(base64 | tr -d '\n')
|
||||
printf '\033]52;c;%s\a' "$data" > "$tty_path"
|
||||
@@ -1,29 +0,0 @@
|
||||
_tmuxinator() {
|
||||
local commands projects
|
||||
commands=(${(f)"$(tmuxinator commands zsh)"})
|
||||
projects=(${(f)"$(tmuxinator completions start)"})
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_describe -t commands "tmuxinator subcommands" commands
|
||||
_describe -t projects "tmuxinator projects" projects
|
||||
elif (( CURRENT == 3)); then
|
||||
case $words[2] in
|
||||
copy|debug|delete|open|start)
|
||||
_arguments '*:projects:($projects)'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
compdef _tmuxinator tmuxinator mux
|
||||
alias mux="tmuxinator"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
# TODO: Dotfiles may be in a different place
|
||||
if [ ! -f "$HOME/.dotfiles-config" ]; then
|
||||
echo "$HOME/.dotfiles-config not found, please run dotfiles/install.sh to create it"
|
||||
exit 1
|
||||
fi
|
||||
source "$HOME/.dotfiles-config"
|
||||
source "$DOTFILES_DIR/functions.sh"
|
||||
|
||||
# XAUTHORITY file may be in /tmp or it may be ~/.XAUTHORITY
|
||||
if [ -f "$HOME/.Xauthority" ]; then
|
||||
export XAUTHORITY="$HOME/.Xauthority"
|
||||
else
|
||||
auth_path="$(find /tmp -maxdepth 1 -name "xauth_*")"
|
||||
if [ ! -z "$auth_path" ]; then
|
||||
export XAUTHORITY="$auth_path"
|
||||
else
|
||||
echo "No Xauthority file found. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
wallpapers_path="$HOME/wallpapers"
|
||||
wallpapers_vertical_path="$HOME/wallpapers-vertical"
|
||||
|
||||
if [ ! -d "$wallpapers_path" ]; then
|
||||
echo "ERROR: Wallpaper directory not found!"
|
||||
echo "Please create wallpapers directory in $wallpapers_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if program_installed xrandr; then
|
||||
display_count="$(xrandr | grep ' connected ' | wc -l)"
|
||||
display_order="$(xrandr --listmonitors | tail -n +2 | sed 's/[\+\*]//g' | awk '{ print $2}')"
|
||||
# Build feh command
|
||||
feh_args=("--bg-fill")
|
||||
for i in $(seq 1 "$display_count"); do
|
||||
display_name="$(echo "$display_order" | sed "${i}q;d")"
|
||||
# Get information about the current display, need verbose to always return rotation
|
||||
# and remove 'primary' for consistent column placement
|
||||
display_info="$(xrandr --query --verbose | grep "$display_name" | sed 's/primary //')"
|
||||
# Get the selected resolution for the display
|
||||
resolution="$(echo "$display_info" | awk '{ print $3 }' | sed 's/\+.*//')"
|
||||
# Get the rotation for each display
|
||||
rotation="$(echo "$display_info" | awk '{ print $5 }')"
|
||||
path="$wallpapers_path"
|
||||
resolution_segment=""
|
||||
if [ "$rotation" != "normal" ] && [ "$rotation" != "inverted" ]; then
|
||||
if [ ! -d "$wallpapers_vertical_path" ]; then
|
||||
echo "$rotation"
|
||||
echo "ERROR: Vertical display detected, but vertical wallpapers directory not found!"
|
||||
echo "Please create vertical wallpapers directory in $wallpapers_vertical_path"
|
||||
exit 1
|
||||
fi
|
||||
path="$wallpapers_vertical_path"
|
||||
fi
|
||||
# If we have a resolution-specific path for the display, use it
|
||||
if [ -d "$path/1080p" ]; then
|
||||
resolution_segment="/1080p"
|
||||
fi
|
||||
if [ -d "$path/4k" ]; then
|
||||
if [ "$resolution" = "3840x2160" ] || [ "$resolution" = "2160x3840" ]; then
|
||||
resolution_segment="/4k"
|
||||
fi
|
||||
fi
|
||||
display_wallpaper="$(shuf -en1 "$path$resolution_segment"/*)"
|
||||
feh_args+=("$display_wallpaper")
|
||||
done
|
||||
echo "feh ${feh_args[@]}"
|
||||
feh "${feh_args[@]}"
|
||||
else
|
||||
# Default to ~/wallpapers/1080p or ~/wallpapers for first display if no xrandr
|
||||
if [ -d "$path/1080p" ]; then
|
||||
feh --bg-fill "$(shuf -en1 $wallpapers_path/1080p/*)"
|
||||
else
|
||||
feh --bg-fill "$(shuf -en1 $wallpapers_path/*)"
|
||||
fi
|
||||
fi
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
# virtualenv-auto-activate.sh
|
||||
#
|
||||
# Installation:
|
||||
# Add this line to your .bashrc or .bash-profile:
|
||||
#
|
||||
# source /path/to/virtualenv-auto-activate.sh
|
||||
#
|
||||
# Go to your project folder, run "virtualenv .venv", so your project folder
|
||||
# has a .venv folder at the top level, next to your version control directory.
|
||||
# For example:
|
||||
# .
|
||||
# ├── .git
|
||||
# │ ├── HEAD
|
||||
# │ ├── config
|
||||
# │ ├── description
|
||||
# │ ├── hooks
|
||||
# │ ├── info
|
||||
# │ ├── objects
|
||||
# │ └── refs
|
||||
# └── .venv
|
||||
# ├── bin
|
||||
# ├── include
|
||||
# └── lib
|
||||
#
|
||||
# The virtualenv will be activated automatically when you enter the directory.
|
||||
_virtualenv_auto_activate() {
|
||||
if [ -e ".venv" ]; then
|
||||
# Check to see if already activated to avoid redundant activating
|
||||
if [ "$VIRTUAL_ENV" = "" ]; then
|
||||
_VENV_NAME=$(basename `pwd`)
|
||||
echo Activating virtualenv \"$_VENV_NAME\"...
|
||||
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
source .venv/bin/activate
|
||||
_OLD_VIRTUAL_PS1="$PS1"
|
||||
PS1="($_VENV_NAME)$PS1"
|
||||
export PS1
|
||||
fi
|
||||
else
|
||||
if [ "$VIRTUAL_ENV" != "" ]; then
|
||||
echo deactivating VirtualEnv
|
||||
deactivate
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
export PROMPT_COMMAND=_virtualenv_auto_activate
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
read -p 'CAM Push Ticket #: ' ticketnum
|
||||
git checkout -b u/`whoami`/CAM-${ticketnum}-cam-push
|
||||
vim ~/puppet/modules/redshift/data/ecosystem/prod.yaml
|
||||
@@ -1,56 +0,0 @@
|
||||
Atom
|
||||
autostart
|
||||
base16-shell
|
||||
bless
|
||||
bunkus.org
|
||||
caja
|
||||
chromium
|
||||
coc
|
||||
configstore
|
||||
dconf
|
||||
enchant
|
||||
expressvpn
|
||||
filezilla
|
||||
gconf
|
||||
gpicview
|
||||
gtk-2.0
|
||||
gtk-3.0
|
||||
gummi
|
||||
google-chrome
|
||||
hexchat
|
||||
htop
|
||||
iterm2
|
||||
inkscape
|
||||
jgit
|
||||
libreoffice
|
||||
LyX
|
||||
matplotlib
|
||||
menus
|
||||
mimeapps.list
|
||||
Mousepad
|
||||
NuGet
|
||||
orage
|
||||
gconf
|
||||
pavucontrol.ini
|
||||
powerline
|
||||
projectM
|
||||
pulse
|
||||
qmk
|
||||
QtProject.conf
|
||||
ranger/bookmarks
|
||||
ranger/history
|
||||
ranger/tagged
|
||||
ristretto
|
||||
spotify
|
||||
stetic
|
||||
syncthing
|
||||
Thunar
|
||||
transmission
|
||||
Trolltech.conf
|
||||
user-dirs.dirs
|
||||
user-dirs.locale
|
||||
xbuild
|
||||
xfce4
|
||||
xfce4/panel
|
||||
xfce4/desktop
|
||||
xfce4/xfconf
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"workbench.colorTheme": "Gruvbox Dark Medium",
|
||||
"vim.camelCaseMotion.enable": true,
|
||||
"vim.easymotion": true,
|
||||
"vim.enableNeovim": true,
|
||||
"vim.handleKeys": {
|
||||
"<C-a>": false,
|
||||
"<C-d>": true,
|
||||
"<C-f>": false,
|
||||
"<C-s>": false,
|
||||
"<C-z>": false
|
||||
},
|
||||
"vim.insertModeKeyBindingsNonRecursive": [
|
||||
{
|
||||
"before": [",", ","],
|
||||
"after": ["<Esc>"]
|
||||
}
|
||||
],
|
||||
"vim.normalModeKeyBindingsNonRecursive": [
|
||||
{
|
||||
"before": ["<leader>", "d"],
|
||||
"after": ["d", "d"]
|
||||
},
|
||||
{
|
||||
"before": ["<leader>", "d"],
|
||||
"after": ["d", "d"]
|
||||
},
|
||||
{
|
||||
"before": [",", ",", "<Esc>"],
|
||||
"commands": [":nohl"]
|
||||
},
|
||||
{
|
||||
"before": ["<leader>", "q"],
|
||||
"commands": [":bp"]
|
||||
},
|
||||
{
|
||||
"before": ["<leader>", "w"],
|
||||
"commands": [":bn"]
|
||||
},
|
||||
{
|
||||
"before": ["<leader>", "r", "r"],
|
||||
"commands": [":action "]
|
||||
},
|
||||
{
|
||||
"before": ["<leader>", "<leader>", "c"],
|
||||
"commands": [":Blose"],
|
||||
"silent": true
|
||||
}
|
||||
],
|
||||
"vim.leader": ",",
|
||||
// To improve performance
|
||||
"extensions.experimental.affinity": {
|
||||
"vscodevim.vim": 1
|
||||
},
|
||||
"vim.neovimUseConfigFile": true,
|
||||
"editor.fontFamily": "'Source Code Pro', regular",
|
||||
"vim.normalModeKeyBindings": [],
|
||||
"python.venvPath": "~/.pyenv"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
[font]
|
||||
size = 9.0
|
||||
|
||||
[font.bold]
|
||||
family = "Source Code Pro for Powerline"
|
||||
style = "Bold"
|
||||
|
||||
[font.bold_italic]
|
||||
family = "Source Code Pro for Powerline"
|
||||
style = "Bold Italic"
|
||||
|
||||
[font.italic]
|
||||
family = "Source Code Pro for Powerline"
|
||||
style = "Italic"
|
||||
|
||||
[font.normal]
|
||||
family = "Source Code Pro for Powerline"
|
||||
style = "Regular"
|
||||
|
||||
[general]
|
||||
import = [
|
||||
"~/.config/alacritty/themes/themes/gruvbox_dark.toml"
|
||||
]
|
||||
|
||||
[selection]
|
||||
# X11 always sets PRIMARY (middle-click paste) on text selection; that part
|
||||
# needs no config. CLIPBOARD (Ctrl+V / Ctrl+Shift+V) is a separate buffer
|
||||
# that nothing populates without this, so mirror every selection into it
|
||||
# too. This is handled by Alacritty itself, so it covers anything visible
|
||||
# on screen -- local shell, nested tmux, SSH'd remote shells -- regardless
|
||||
# of whether the app underneath knows how to talk to the clipboard.
|
||||
save_to_clipboard = true
|
||||
|
||||
[keyboard]
|
||||
# Alacritty doesn't implement the CSI-u/Kitty keyboard protocol that lets a
|
||||
# terminal report Shift+Enter as distinct from plain Enter, so it needs an
|
||||
# explicit binding. Sending a raw line feed makes Shift+Enter equivalent to
|
||||
# Ctrl+J, which Claude Code (and most other terminal apps) already treats
|
||||
# as "insert newline" with zero further configuration -- this works
|
||||
# unchanged through any depth of nested tmux, since it's just a literal
|
||||
# byte rather than an escape sequence that needs to be interpreted along
|
||||
# the way.
|
||||
bindings = [
|
||||
{ key = "Return", mods = "Shift", chars = "\n" },
|
||||
]
|
||||
Submodule
+1
Submodule config/alacritty/themes added at f03686afad
@@ -0,0 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=USDB Syncer
|
||||
Comment=Download karaoke songs
|
||||
Exec=usdb_syncer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Software;
|
||||
@@ -0,0 +1,47 @@
|
||||
##############
|
||||
# compositor #
|
||||
##############
|
||||
|
||||
# transparency
|
||||
# picom: https://wiki.archlinux.org/title/Picom
|
||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||
# Enable if not using compositor included with plasma
|
||||
exec_always --no-startup-id picom --experimental-backends -b --config ~/.config/picom.conf
|
||||
|
||||
##################
|
||||
# window manager #
|
||||
##################
|
||||
|
||||
# Only enable when using i3 without a DE (eg plasma)
|
||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
|
||||
################
|
||||
# applications #
|
||||
################
|
||||
|
||||
# set wallpaper
|
||||
exec --no-startup-id sleep 1 && ~/dotfiles/bin/update-wallpaper
|
||||
# exec --no-startup-id sleep 1 && systemctl start update-wallpaper.service
|
||||
|
||||
# start keyring
|
||||
exec --no-startup-id dbus-update-activation-environment --all
|
||||
|
||||
#exec_always --no-startup-id conky -c ~/.config/conky/conkyrc-stats
|
||||
|
||||
#exec --no-startup-id sleep 7 && firefox https://todo.bradina.haus/
|
||||
|
||||
#exec --no-startup-id sleep 7 && Plexamp.AppImage
|
||||
#assign [class="Plexamp"] 2
|
||||
|
||||
#exec --no-startup-id sleep 7 && element-desktop-nightly
|
||||
#assign [class="Element-Nightly"] 2
|
||||
|
||||
#exec --no-startup-id openrgb
|
||||
|
||||
# automatic set focus new window if it opens on another workspace than the current:
|
||||
#for_window [class=Alacritty] focus
|
||||
#for_window [class=(?i)firefox] focus
|
||||
#for_window [class=Thunar] focus
|
||||
#exec --no-startup-id sleep 3 && thunar
|
||||
@@ -0,0 +1,70 @@
|
||||
############################################
|
||||
# bar settings (input comes from i3blocks) #
|
||||
############################################
|
||||
|
||||
# Start i3bar to display a workspace bar
|
||||
# (plus the system information i3status finds out, if available)
|
||||
bar {
|
||||
# TODO: Figure out how to add an applications menu button on the left of bar
|
||||
# font pango: Source Code Pro (monospace) 10 #Noto Sans Regular 10
|
||||
font pango: Source Code Pro for Powerline 10
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position bottom
|
||||
output DP-0
|
||||
output DP-2
|
||||
#tray_padding 0
|
||||
|
||||
# When strip_workspace_numbers is set to yes,
|
||||
# any workspace that has a name of the form
|
||||
# “[n][:][NAME]” will display only the name.
|
||||
strip_workspace_numbers yes
|
||||
##strip_workspace_name no
|
||||
|
||||
colors {
|
||||
# gruvbox colors
|
||||
background $bg
|
||||
statusline $yellow
|
||||
# workspaces section
|
||||
# border bg txt
|
||||
focused_workspace $aqua $aqua $darkgray
|
||||
inactive_workspace $darkgray $darkgray $yellow
|
||||
active_workspace $darkgray $darkgray $yellow
|
||||
urgent_workspace $red $red $bg
|
||||
}
|
||||
}
|
||||
|
||||
# you can add different bars for multidisplay setups on each display:
|
||||
# set output HDMI-0 to the display you want the bar, --transparency can be set.
|
||||
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
|
||||
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
||||
# #08052be6 --> e6=90%
|
||||
|
||||
bar {
|
||||
font pango: Noto Sans Regular 10
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
|
||||
i3bar_command i3bar --transparency
|
||||
output HDMI-0
|
||||
position bottom
|
||||
|
||||
colors {
|
||||
# gruvbox colors
|
||||
background $bg
|
||||
statusline $yellow
|
||||
# workspaces section
|
||||
# border bg txt
|
||||
focused_workspace $aqua $aqua $darkgray
|
||||
inactive_workspace $darkgray $darkgray $yellow
|
||||
active_workspace $darkgray $darkgray $yellow
|
||||
urgent_workspace $red $red $bg
|
||||
}
|
||||
# colors {
|
||||
# separator $purple
|
||||
# background $darkbluetrans
|
||||
# statusline $white
|
||||
# border bg txt indicator
|
||||
# focused_workspace $lighterblue $lighterblue $darkblue $purple
|
||||
# active_workspace $lightdblue $lightdblue $darkblue $purple
|
||||
# inactive_workspace $darkblue $darkblue $lightdblue $purple
|
||||
# urgent_workspace $urgentred $urgentred $white $purple
|
||||
# }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# Volume
|
||||
|
||||
# use meta keys without showing osc
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_up
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_down
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
||||
|
||||
#bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_mute
|
||||
|
||||
# Backlight control
|
||||
# Backlight setting using dunst osc
|
||||
#bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
|
||||
#bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down
|
||||
|
||||
# mic mute toggle
|
||||
bindsym XF86AudioMicMute exec amixer sset Capture toggle
|
||||
|
||||
# exit-menu
|
||||
bindsym $mod+Shift+e exec --no-startup-id ~/.config/i3/scripts/powermenu
|
||||
|
||||
# Lock the system
|
||||
# lock by blurring the screen:
|
||||
bindsym $mod+Delete exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# applications
|
||||
bindsym $mod+n exec /usr/bin/thunar
|
||||
@@ -0,0 +1 @@
|
||||
alias vim=nvim
|
||||
@@ -0,0 +1,142 @@
|
||||
function program_installed {
|
||||
local return_=0
|
||||
|
||||
type $1 >/dev/null 2>&1 || { local return_=1; }
|
||||
|
||||
return "$return_"
|
||||
}
|
||||
|
||||
function list_processes() {
|
||||
# List all processes matching the given process name string
|
||||
ps aux | grep $(whoami) | grep -i "$1" | grep -v grep
|
||||
}
|
||||
|
||||
function kill_all() {
|
||||
# Kill all processes matching the given process name string
|
||||
if [ ! "$1" ]; then
|
||||
echo "kill_all requires a process name to kill all instances of"
|
||||
return 1
|
||||
fi
|
||||
kill_flag=15
|
||||
if [ "$15" ]; then
|
||||
kill_flag="$15"
|
||||
fi
|
||||
|
||||
count=$(list_processes "$1" | wc -l)
|
||||
|
||||
echo "Killing $count running processes matching $1"
|
||||
kill -"$kill_flag" $(list_processes "$1" | awk '{print $2}')
|
||||
|
||||
count=$(list_processes "$1" | wc -l)
|
||||
if [ $count -gt 0 ]; then
|
||||
echo "$count processes could not be killed"
|
||||
fi
|
||||
}
|
||||
|
||||
function ranger-cd() {
|
||||
# Make shell cd to ranger directory
|
||||
tempfile=$(mktemp)
|
||||
ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
|
||||
test -f "$tempfile" &&
|
||||
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
|
||||
cd $(cat $tempfile)
|
||||
fi
|
||||
zle reset-prompt
|
||||
printf '\n'
|
||||
rm -f -- "$tempfile"
|
||||
}
|
||||
|
||||
function terminal-clock() {
|
||||
tty-clock -tcb < $TTY
|
||||
zle reset-prompt
|
||||
printf '\n'
|
||||
}
|
||||
|
||||
function check_dotfiles_version {
|
||||
# Check if the version of the dotfiles directory is the latest version
|
||||
# Return 0 if repo is present and the latest version
|
||||
# Return 1 if the repo is not present
|
||||
# Return 2 if the repo is behind the remote
|
||||
# Return 3 if the repo is ahead of the remote
|
||||
# Return 4 if the repo has diverged from the remote
|
||||
# Return 5 if DOTFILES_DIR is not set
|
||||
if [ -z $DOTFILES_DIR ]; then
|
||||
return 5
|
||||
fi
|
||||
|
||||
if [ ! -d $DOTFILES_DIR ]; then
|
||||
return 2
|
||||
fi
|
||||
|
||||
pushd $DOTFILES_DIR > /dev/null
|
||||
|
||||
# TODO: This may be gitbox
|
||||
git fetch origin > /dev/null
|
||||
UPSTREAM=${1:-'@{u}'}
|
||||
LOCAL=$(git rev-parse @)
|
||||
REMOTE=$(git rev-parse "$UPSTREAM")
|
||||
BASE=$(git merge-base @ "$UPSTREAM")
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
if [[ $LOCAL = $REMOTE ]]; then
|
||||
return 0
|
||||
elif [[ $LOCAL = $BASE ]]; then
|
||||
return 2
|
||||
elif [[ $REMOTE = $BASE ]]; then
|
||||
return 3
|
||||
else
|
||||
return 4
|
||||
fi
|
||||
}
|
||||
|
||||
function python_roots {
|
||||
if [ -d $HOME/.local/lib/ ]; then
|
||||
for directory in $(echo $HOME/.local/lib/python*); do
|
||||
echo "$directory"
|
||||
done
|
||||
fi
|
||||
if [ -d $HOME/.local/share/pipx/venvs/powerline-status/lib/ ]; then
|
||||
for directory in $(echo $HOME/.local/share/pipx/venvs/powerline-status/lib/python*); do
|
||||
echo "$directory"
|
||||
done
|
||||
fi
|
||||
if [ -d $HOME/.local/pipx/venvs/powerline-status/lib/ ]; then
|
||||
for directory in $(echo $HOME/.local/pipx/venvs/powerline-status/lib/python*); do
|
||||
echo "$directory"
|
||||
done
|
||||
fi
|
||||
if [ -d /usr/lib/ ]; then
|
||||
for directory in $(echo /usr/lib/python*); do
|
||||
echo "$directory"
|
||||
done
|
||||
fi
|
||||
if [ -d /usr/local/lib/ ]; then
|
||||
# TODO: Make this not print warnings when the directory doesn't exit
|
||||
for directory in $(echo /usr/local/lib/python*); do
|
||||
echo "$directory"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function powerline_bash_sources {
|
||||
# To support bash 3.2 on macOS, can't use declare -ag so workaround with capturing output
|
||||
PYTHON_ROOTS=( $(python_roots) )
|
||||
# Powerline plugin from distribution agnostic install directory
|
||||
## Assemble list of possible sources
|
||||
if [[ -a $POWERLINE_ROOT/bindings/bash/powerline.sh ]]; then
|
||||
# Prefer user-set powerline directory
|
||||
echo "$POWERLINE_ROOT/bindings/bash/powerline.sh"
|
||||
fi
|
||||
if [ -d /usr/share/powerline ]; then
|
||||
# Apt installs here
|
||||
echo "/usr/share/powerline/bindings/bash/powerline.sh"
|
||||
fi
|
||||
# If $POWERLINE_ROOT not set or set incorrectly, try default locations
|
||||
for directory in "${PYTHON_ROOTS[@]}"; do
|
||||
if [ -d "$directory" ]; then
|
||||
echo "$directory"/site-packages/powerline/bindings/bash/powerline.sh
|
||||
echo "$directory"/dist-packages/powerline/bindings/bash/powerline.sh
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,84 @@
|
||||
#PATHs
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.bash_functions" ]; then
|
||||
source "$HOME/.bash_functions"
|
||||
fi
|
||||
|
||||
# User profiles
|
||||
source $HOME/.profile
|
||||
# Define $POWERLINE_ROOT
|
||||
if [ -f $HOME/.profile.local ]; then
|
||||
set -a
|
||||
source $HOME/.profile.local
|
||||
set +a
|
||||
fi
|
||||
|
||||
if [ -n "$DOTFILES_DIR" ] && [ -d "$DOTFILES_DIR" ]; then
|
||||
# Gruvbox colors
|
||||
[[ -f "$DOTFILES_DIR/dependencies/gruvbox/gruvbox_256palette.sh" ]] && source "$DOTFILES_DIR/dependencies/gruvbox/gruvbox_256palette.sh"
|
||||
fi
|
||||
|
||||
# Italic support
|
||||
if [ -f $HOME/.xterm-256color-italic.terminfo ]; then
|
||||
tic $HOME/.xterm-256color-italic.terminfo
|
||||
fi
|
||||
if [ -f $HOME/.screen-256color-italic.terminfo ]; then
|
||||
tic $HOME/.screen-256color-italic.terminfo
|
||||
fi
|
||||
|
||||
# Use neovim where available
|
||||
if program_installed neovim; then
|
||||
alias vim='nvim'
|
||||
fi
|
||||
|
||||
# fzf fuzzy finder
|
||||
if program_installed fzf; then
|
||||
# TODO: This is broken when fzf is old, should include a local copy
|
||||
eval "$(fzf --bash)"
|
||||
fi
|
||||
|
||||
# thefuck command correction
|
||||
if program_installed fuck; then
|
||||
eval "$(thefuck --alias)"
|
||||
fi
|
||||
|
||||
# aactivator
|
||||
if program_installed aactivator; then
|
||||
eval "$(aactivator init)"
|
||||
fi
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
export EDITOR='vim'
|
||||
|
||||
# Powerline
|
||||
if program_installed powerline; then
|
||||
if [ -n "$POWERLINE_ROOT" ] && \
|
||||
[ -f "$POWERLINE_ROOT" ] && \
|
||||
[ -f "$POWERLINE_ROOT/bindings/bash/powerline.sh" ]; then
|
||||
# Skip lookup if location is known
|
||||
source "$POWERLINE_ROOT/bindings/bash/powerline.sh"
|
||||
else
|
||||
POWERLINE_BASH_SOURCES=( $(powerline_bash_sources) )
|
||||
found=0
|
||||
for file in "${POWERLINE_BASH_SOURCES[@]}"; do
|
||||
if [[ -a $file ]]; then
|
||||
# TODO: Store the POWERLINE_ROOT in .profile.local if found
|
||||
source $file
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $found -eq 0 ]; then
|
||||
echo "Powerline binding not found."
|
||||
echo "Please set \$POWERLINE_ROOT in .profile.local"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Local overrides
|
||||
if [ -f $HOME/.bashrc_local ]; then
|
||||
source $HOME/.bashrc_local
|
||||
fi
|
||||
@@ -0,0 +1,39 @@
|
||||
# Global preferences
|
||||
|
||||
## Development Guidelines
|
||||
|
||||
- ALWAYS implement minimal changes to accomplish your task, nothing unecessary
|
||||
- NEVER introduce unecessary complexity or side-effects on other code
|
||||
- NEVER write unecessary comments, only minimal comments to describe functionality which isn't obvious from reading the code
|
||||
- ALWAYS respect the existing style of the repository
|
||||
- ALWAYS implement the best possible solution to a problem you can find
|
||||
- NEVER reinvent the wheel. if there's an established, accepted way to do something which doesn't introduce unecessary complexity, use it
|
||||
- NEVER include co-authorship lines in a git commit
|
||||
- NEVER commit to a git repository except when bootstrapping your own fresh repositories
|
||||
|
||||
|
||||
## Spec documents
|
||||
|
||||
When a skill or workflow (e.g. brainstorming) would write a design spec/plan document
|
||||
to a project-local path like `docs/superpowers/specs/`, write it to `~/specs/` instead,
|
||||
using the same `YYYY-MM-DD-<topic>-design.md` naming convention. Do not commit spec
|
||||
documents into project git repositories unless explicitly asked to.
|
||||
|
||||
## Gitea PR review workflow
|
||||
|
||||
For repos whose `origin` remote is on `gitbox.bradina.localdomain`: when the
|
||||
finishing-a-development-branch skill's "Push and create PR" option is chosen,
|
||||
after pushing, also run `gitea-pr create` (from dotfiles `bin/`) to actually
|
||||
open the PR, and report the printed URL back. Always pass `--title`/`--body`
|
||||
with a real summary of the changes, the reasoning behind them, and what was
|
||||
tested — never placeholder or throwaway text, even for a call made mainly to
|
||||
test other behavior (e.g. testing that a duplicate-PR check short-circuits):
|
||||
if it turns out to actually create a PR, that text ships as the PR
|
||||
description.
|
||||
|
||||
When asked to check or address PR feedback, run `gitea-pr comments <PR#>`,
|
||||
make the requested changes, commit, push, and report back. Repeat for as many
|
||||
rounds as needed. Only check feedback when explicitly asked — do not poll
|
||||
proactively.
|
||||
|
||||
Never run `gitea-pr merge` unless explicitly instructed to merge in that turn.
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# PreToolUse hook: block obviously destructive Bash commands regardless of permission mode.
|
||||
# Exit 2 blocks the tool call and returns stderr to Claude as feedback.
|
||||
|
||||
command=$(jq -r '.tool_input.command // empty')
|
||||
|
||||
deny_patterns=(
|
||||
'rm[[:space:]]+(-[a-zA-Z]*[rR][a-zA-Z]*f|-[a-zA-Z]*f[a-zA-Z]*[rR])[[:space:]]+/($|[[:space:]])'
|
||||
'rm[[:space:]]+(-[a-zA-Z]*[rR][a-zA-Z]*f|-[a-zA-Z]*f[a-zA-Z]*[rR])[[:space:]]+(--no-preserve-root|~($|/)|\*)'
|
||||
':\(\)[[:space:]]*\{[[:space:]]*:.*\|.*:.*&.*\}[[:space:]]*;[[:space:]]*:'
|
||||
'dd[[:space:]].*of=/dev/(sd|nvme|vd|hd)'
|
||||
'mkfs(\.[a-zA-Z0-9]+)?[[:space:]]'
|
||||
'>[[:space:]]*/dev/(sd|nvme|vd|hd)[a-z0-9]*($|[[:space:]])'
|
||||
'chmod[[:space:]]+-R[[:space:]]+[0-7]{3,4}[[:space:]]+/($|[[:space:]])'
|
||||
'chown[[:space:]]+-R[[:space:]].*[[:space:]]+/($|[[:space:]])'
|
||||
'(^|[[:space:]])(shutdown|reboot|poweroff|halt)([[:space:]]|$)'
|
||||
'wipefs[[:space:]]'
|
||||
'shred[[:space:]].*/dev/'
|
||||
'curl[[:space:]].*\|[[:space:]]*(sudo[[:space:]]+)?(sh|bash|zsh)($|[[:space:]])'
|
||||
'wget[[:space:]].*-O-.*\|[[:space:]]*(sudo[[:space:]]+)?(sh|bash|zsh)($|[[:space:]])'
|
||||
)
|
||||
|
||||
for pattern in "${deny_patterns[@]}"; do
|
||||
if [[ "$command" =~ $pattern ]]; then
|
||||
echo "Blocked by local denylist hook (~/.claude/hooks/deny-dangerous-bash.sh): command matches pattern '$pattern'" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
# Claude Code statusLine command: model, dir/branch, context usage, rate limits.
|
||||
# See: https://code.claude.com/docs/en/statusline
|
||||
|
||||
input=$(cat)
|
||||
|
||||
MODEL=$(echo "$input" | jq -r '.model.display_name')
|
||||
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
|
||||
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
|
||||
FIVE_H=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
|
||||
WEEK=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')
|
||||
|
||||
# Claude Code omits rate_limits when ANTHROPIC_BASE_URL isn't the literal
|
||||
# api.anthropic.com host (e.g. the dejima sandbox's credential-injecting
|
||||
# loopback proxy), even though the usage endpoint itself works fine through
|
||||
# it. Fetch it ourselves in that case, cached briefly to avoid a network
|
||||
# round-trip on every render.
|
||||
if [ -z "$FIVE_H" ] && [ -n "${ANTHROPIC_BASE_URL:-}" ] && [ -n "${ANTHROPIC_AUTH_TOKEN:-}" ]; then
|
||||
CACHE="${TMPDIR:-/tmp}/claude-statusline-usage-${UID}.json"
|
||||
if [ ! -s "$CACHE" ] || [ -n "$(find "$CACHE" -mmin +1 2>/dev/null)" ]; then
|
||||
if curl -fsS --max-time 3 "$ANTHROPIC_BASE_URL/api/oauth/usage" \
|
||||
-H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
|
||||
-H "anthropic-beta: oauth-2025-04-20" \
|
||||
-o "$CACHE.tmp" 2>/dev/null; then
|
||||
mv "$CACHE.tmp" "$CACHE"
|
||||
fi
|
||||
fi
|
||||
FIVE_H=$(jq -r '.five_hour.utilization // empty' "$CACHE" 2>/dev/null)
|
||||
WEEK=$(jq -r '.seven_day.utilization // empty' "$CACHE" 2>/dev/null)
|
||||
fi
|
||||
|
||||
GREEN='\033[32m'; YELLOW='\033[33m'; RED='\033[31m'; RESET='\033[0m'
|
||||
|
||||
if [ "$PCT" -ge 90 ]; then BAR_COLOR="$RED"
|
||||
elif [ "$PCT" -ge 70 ]; then BAR_COLOR="$YELLOW"
|
||||
else BAR_COLOR="$GREEN"; fi
|
||||
|
||||
BAR_WIDTH=10
|
||||
FILLED=$((PCT * BAR_WIDTH / 100))
|
||||
EMPTY=$((BAR_WIDTH - FILLED))
|
||||
BAR=""
|
||||
[ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /▓}"
|
||||
[ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /░}"
|
||||
|
||||
BRANCH=""
|
||||
git -C "$DIR" rev-parse --git-dir > /dev/null 2>&1 && BRANCH=" | 🌿 $(git -C "$DIR" branch --show-current 2>/dev/null)"
|
||||
|
||||
LIMITS=""
|
||||
[ -n "$FIVE_H" ] && LIMITS="5h: $(printf '%.0f' "$FIVE_H")%"
|
||||
[ -n "$WEEK" ] && LIMITS="${LIMITS:+$LIMITS }7d: $(printf '%.0f' "$WEEK")%"
|
||||
|
||||
echo -e "[$MODEL] 📁 ${DIR##*/}${BRANCH}"
|
||||
if [ -n "$LIMITS" ]; then
|
||||
echo -e "${BAR_COLOR}${BAR}${RESET} ${PCT}% | ${LIMITS}"
|
||||
else
|
||||
echo -e "${BAR_COLOR}${BAR}${RESET} ${PCT}%"
|
||||
fi
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "Gruvbox Dark",
|
||||
"base": "dark",
|
||||
"overrides": {
|
||||
"claude": "#d3869b",
|
||||
"text": "#ebdbb2",
|
||||
"inactive": "#665c54",
|
||||
"subtle": "#7c6f64",
|
||||
"muted": "#928374",
|
||||
"success": "#b8bb26",
|
||||
"error": "#fb4934",
|
||||
"warning": "#fabd2f",
|
||||
"link": "#83a598",
|
||||
"highlight": "#fabd2f",
|
||||
"selection": "#504945",
|
||||
"diffAdded": "#b8bb26",
|
||||
"diffRemoved": "#fb4934",
|
||||
"promptBorder": "#504945",
|
||||
"bashBorder": "#504945",
|
||||
"mcpBorder": "#504945",
|
||||
"planMode": "#83a598",
|
||||
"spinner": "#d3869b",
|
||||
"header": "#8ec07c",
|
||||
"separator": "#3c3836",
|
||||
"badge": "#fe8019",
|
||||
"permission": "#fe8019",
|
||||
"suggestion": "#8ec07c",
|
||||
"fastMode": "#fabd2f"
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
# Shadow
|
||||
shadow = true;
|
||||
|
||||
# Fading
|
||||
# fading = true;
|
||||
# fade-in-step = 0.03;
|
||||
# fad-out-step = 0.03;
|
||||
|
||||
# Opacity
|
||||
inactive-dim = 0.2;
|
||||
inactive-dim-fixed = true;
|
||||
# blur-background = true;
|
||||
# blur-background-frame = true;
|
||||
# blur-background-fixed = true;
|
||||
# blur-kern = "3x3box"
|
||||
opacity-rule = [ "80:class_g = 'xfce4-terminal'" ];
|
||||
|
||||
# Other
|
||||
backend = "xrender"
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
detect-client-opacity = true;
|
||||
refresh-rate = 0;
|
||||
vsync = "none"
|
||||
paint-on-overlay = true;
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = "undefined";
|
||||
@@ -0,0 +1,70 @@
|
||||
use_xft yes
|
||||
xftfont 123:size=8
|
||||
xftalpha 0.1
|
||||
update_interval 5
|
||||
total_run_times 0
|
||||
|
||||
own_window_class Conky
|
||||
own_window_type override
|
||||
own_window yes
|
||||
|
||||
own_window_transparent yes
|
||||
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
|
||||
own_window_colour 000000
|
||||
own_window_argb_visual no
|
||||
own_window_argb_value 0
|
||||
|
||||
double_buffer yes
|
||||
#minimum_size 250 5
|
||||
#maximum_width 500
|
||||
draw_shades no
|
||||
draw_outline no
|
||||
draw_borders no
|
||||
draw_graph_borders no
|
||||
default_color white
|
||||
default_shade_color red
|
||||
default_outline_color green
|
||||
alignment top_left
|
||||
gap_x 2000
|
||||
gap_y 0
|
||||
no_buffers yes
|
||||
uppercase no
|
||||
cpu_avg_samples 2
|
||||
net_avg_samples 1
|
||||
override_utf8_locale yes
|
||||
use_spacer left
|
||||
|
||||
|
||||
|
||||
minimum_size 0 0
|
||||
|
||||
# For those who may be hacking into this, positioning is not very fun in conky.
|
||||
# or maybe I just don't get it!?
|
||||
#
|
||||
# The way this works here is every line is a line painted on the screen!
|
||||
# For example, to remove the 4 lines about disk space entirely, you would need to remove
|
||||
# only half of each of the 4 lines, because the lines are being shared
|
||||
# with the processes/CPU information!
|
||||
#
|
||||
# And ${goto <number>} is a hard 'anchor' of where to display the text
|
||||
# that follows.
|
||||
#
|
||||
# And ${offset <number>} is a relative offset from whatever comes before it.
|
||||
# And the entire thing is relative to the 'alignment top_left' setting above!
|
||||
#
|
||||
# This seems like an insane method for position things on a screen.
|
||||
# I hope there is a better way of doing this in the future or
|
||||
# I may be unaware of it! If you use this and make any improvemenmts,
|
||||
# please share it with me! <sch@efers.org>
|
||||
#
|
||||
# (Remember, from the next line down, #WhiteSpaceMatters) ...
|
||||
TEXT
|
||||
|
||||
#conky sucks
|
||||
${voffset 105}
|
||||
${goto 12}${font Hack:pixelsize=12}${color D79921}CPU${offset 9}${color EDBBB2}${cpu cpu0}%${goto 112}${color D79921}RAM${offset 9}${color EDBBB2}$mem / $memmax${goto 301}${color D79921}HD${offset 9}${color EDBBB2}Avail / Total
|
||||
${font Hack:pixelsize=10}${goto 12}${color EDBBB2}01. ${color 98971A}${top name 1}${goto 120}${top cpu 1}% / ${top mem_res 1}${goto 301}${font Hack:pixelsize=10}${color EDBBB2}/${goto 340}${color 98971A}${fs_free /} ${goto 400}/ ${fs_size /}
|
||||
${goto 12}${color EDBBB2}02. ${color D79921}${top name 2}${goto 120}${top cpu 2}% / ${top mem_res 2}${goto 301}${font Hack:pixelsize=10}${color EDBBB2}/boot${goto 340}${color D79921}${fs_free /boot}${goto 400}/ ${fs_size /boot}
|
||||
${goto 12}${color EDBBB2}03. ${color CC241D}${top name 3}${goto 120}${top cpu 3}% / ${top mem_res 3}${goto 301}${font Hack:pixelsize=10}${color EDBBB2}/home${goto 340}${color CC241D}${fs_free /home}${goto 400}/ ${fs_size /home}
|
||||
${goto 12}${color EDBBB2}04. ${color 458588}${top name 4}${goto 120}${top cpu 4}% / ${top mem_res 4}
|
||||
${goto 12}${color EDBBB2}05. ${color B16286}${top name 5}${goto 120}${top cpu 5}% / ${top mem_res 5}
|
||||
@@ -0,0 +1,438 @@
|
||||
# See dunst(5) for all configuration options
|
||||
|
||||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = none
|
||||
|
||||
### Geometry ###
|
||||
|
||||
# dynamic width from 0 to 300
|
||||
# width = (0, 300)
|
||||
# constant width of 300
|
||||
width = 300
|
||||
|
||||
# The maximum height of a single notification, excluding the frame.
|
||||
height = 300
|
||||
|
||||
# Position the notification in the top right corner
|
||||
origin = bottom-right
|
||||
|
||||
# Offset from the origin
|
||||
offset = 30x40
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
|
||||
# Maximum number of notification (0 means no limit)
|
||||
notification_limit = 5
|
||||
|
||||
### Progress bar ###
|
||||
|
||||
# Turn on the progress bar. It appears when a progress hint is passed with
|
||||
# for example dunstify -h int:value:12
|
||||
progress_bar = true
|
||||
|
||||
# Set the progress bar height. This includes the frame, so make sure
|
||||
# it's at least twice as big as the frame width.
|
||||
progress_bar_height = 10
|
||||
|
||||
# Set the frame width of the progress bar
|
||||
progress_bar_frame_width = 1
|
||||
|
||||
# Set the minimum width for the progress bar
|
||||
progress_bar_min_width = 150
|
||||
|
||||
# Set the maximum width for the progress bar
|
||||
progress_bar_max_width = 300
|
||||
|
||||
|
||||
# Show how many messages are currently hidden (because of
|
||||
# notification_limit).
|
||||
indicate_hidden = yes
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||
transparency = 16
|
||||
|
||||
# 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
|
||||
|
||||
# Padding between text and icon.
|
||||
text_icon_padding = 0
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 1
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#83a598"
|
||||
|
||||
# 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 = auto
|
||||
|
||||
# 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 = 0
|
||||
|
||||
### Text ###
|
||||
|
||||
#font = Noto Sans Regular 9
|
||||
#font = Source Code Pro for Powerline 9
|
||||
font = Liberation Sans Regular 9
|
||||
|
||||
# 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
|
||||
# <https://docs.gtk.org/Pango/pango_markup.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
|
||||
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = center
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = true
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = left
|
||||
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
# max_icon_size takes precedence over this.
|
||||
min_icon_size = 0
|
||||
|
||||
# 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/Qogir/16/status:/usr/share/icons/Qogir/16/devices/:/usr/share/icons/Qogir/24/panel/:/usr/share/icons/Qogir/16/apps/:/usr/share/pixmaps/
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = false
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 0
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 7
|
||||
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||
# parameter, an application may close the notification sent before the
|
||||
# user defined timeout.
|
||||
ignore_dbusclose = false
|
||||
|
||||
### Wayland ###
|
||||
# These settings are Wayland-specific. They have no effect when using X11
|
||||
|
||||
# Uncomment this if you want to let notications appear under fullscreen
|
||||
# applications (default: overlay)
|
||||
# layer = top
|
||||
|
||||
# Set this to true to use X11 output on Wayland.
|
||||
force_xwayland = false
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||
# such action, open the context menu.
|
||||
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||
# ones, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# * context: Open context menu for the notification.
|
||||
# * context_all: Open context menu for all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action, close_current
|
||||
mouse_right_click = close_all
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#282828"
|
||||
foreground = "#ebdbb2"
|
||||
timeout = 5
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
icon = /usr/share/icons/Arc-X-D/status/16/dialog-information.png
|
||||
|
||||
[urgency_normal]
|
||||
background = "#282828"
|
||||
foreground = "#ebdbb2"
|
||||
timeout = 5
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
icon = /usr/share/icons/Arc-X-D/status/16/dialog-question.png
|
||||
|
||||
[urgency_critical]
|
||||
background = "#282828"
|
||||
foreground = "#ebdbb2"
|
||||
frame_color = "#cc241d"
|
||||
timeout = 120
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
icon = /usr/share/icons/Arc-X-D/status/16/dialog-warning.png
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# set_category
|
||||
# timeout
|
||||
# urgency
|
||||
# skip_display
|
||||
# history_ignore
|
||||
# action_name
|
||||
# word_wrap
|
||||
# ellipsize
|
||||
# alignment
|
||||
#
|
||||
# Shell-like globing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# skip_display = true
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
[stack-volumes]
|
||||
appname = "some_volume_notifiers"
|
||||
set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
||||
@@ -0,0 +1,84 @@
|
||||
@define-color borders_breeze #4c4e51;
|
||||
@define-color content_view_bg_breeze #141618;
|
||||
@define-color error_color_backdrop_breeze #da4453;
|
||||
@define-color error_color_breeze #da4453;
|
||||
@define-color error_color_insensitive_backdrop_breeze #55242b;
|
||||
@define-color error_color_insensitive_breeze #55242b;
|
||||
@define-color insensitive_base_color_breeze #131517;
|
||||
@define-color insensitive_base_fg_color_breeze #606263;
|
||||
@define-color insensitive_bg_color_breeze #1f2124;
|
||||
@define-color insensitive_borders_breeze #2d3033;
|
||||
@define-color insensitive_fg_color_breeze #686a6c;
|
||||
@define-color insensitive_selected_bg_color_breeze #1f2124;
|
||||
@define-color insensitive_selected_fg_color_breeze #686a6c;
|
||||
@define-color insensitive_unfocused_bg_color_breeze #1f2124;
|
||||
@define-color insensitive_unfocused_fg_color_breeze #686a6c;
|
||||
@define-color insensitive_unfocused_selected_bg_color_breeze #1f2124;
|
||||
@define-color insensitive_unfocused_selected_fg_color_breeze #686a6c;
|
||||
@define-color link_color_breeze #926ee4;
|
||||
@define-color link_visited_color_breeze #9b59b6;
|
||||
@define-color success_color_backdrop_breeze #27ae60;
|
||||
@define-color success_color_breeze #27ae60;
|
||||
@define-color success_color_insensitive_backdrop_breeze #19482f;
|
||||
@define-color success_color_insensitive_breeze #19482f;
|
||||
@define-color theme_base_color_breeze #141618;
|
||||
@define-color theme_bg_color_breeze #202326;
|
||||
@define-color theme_button_background_backdrop_breeze #292c30;
|
||||
@define-color theme_button_background_backdrop_insensitive_breeze #272a2e;
|
||||
@define-color theme_button_background_insensitive_breeze #272a2e;
|
||||
@define-color theme_button_background_normal_breeze #292c30;
|
||||
@define-color theme_button_decoration_focus_backdrop_breeze #926ee4;
|
||||
@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #4a406a;
|
||||
@define-color theme_button_decoration_focus_breeze #926ee4;
|
||||
@define-color theme_button_decoration_focus_insensitive_breeze #4a406a;
|
||||
@define-color theme_button_decoration_hover_backdrop_breeze #926ee4;
|
||||
@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #4a406a;
|
||||
@define-color theme_button_decoration_hover_breeze #926ee4;
|
||||
@define-color theme_button_decoration_hover_insensitive_breeze #4a406a;
|
||||
@define-color theme_button_foreground_active_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_button_foreground_active_backdrop_insensitive_breeze #686a6c;
|
||||
@define-color theme_button_foreground_active_breeze #ffffff;
|
||||
@define-color theme_button_foreground_active_insensitive_breeze #686a6c;
|
||||
@define-color theme_button_foreground_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_button_foreground_backdrop_insensitive_breeze #6d6f72;
|
||||
@define-color theme_button_foreground_insensitive_breeze #6d6f72;
|
||||
@define-color theme_button_foreground_normal_breeze #fcfcfc;
|
||||
@define-color theme_fg_color_breeze #fcfcfc;
|
||||
@define-color theme_header_background_backdrop_breeze #202326;
|
||||
@define-color theme_header_background_breeze #292c30;
|
||||
@define-color theme_header_background_light_breeze #202326;
|
||||
@define-color theme_header_foreground_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_header_foreground_breeze #fcfcfc;
|
||||
@define-color theme_header_foreground_insensitive_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_header_foreground_insensitive_breeze #fcfcfc;
|
||||
@define-color theme_hovering_selected_bg_color_breeze #926ee4;
|
||||
@define-color theme_selected_bg_color_breeze #6c53a6;
|
||||
@define-color theme_selected_fg_color_breeze #ffffff;
|
||||
@define-color theme_text_color_breeze #fcfcfc;
|
||||
@define-color theme_titlebar_background_backdrop_breeze #202326;
|
||||
@define-color theme_titlebar_background_breeze #292c30;
|
||||
@define-color theme_titlebar_background_light_breeze #202326;
|
||||
@define-color theme_titlebar_foreground_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_titlebar_foreground_breeze #fcfcfc;
|
||||
@define-color theme_titlebar_foreground_insensitive_backdrop_breeze #fcfcfc;
|
||||
@define-color theme_titlebar_foreground_insensitive_breeze #fcfcfc;
|
||||
@define-color theme_unfocused_base_color_breeze #141618;
|
||||
@define-color theme_unfocused_bg_color_breeze #202326;
|
||||
@define-color theme_unfocused_fg_color_breeze #fcfcfc;
|
||||
@define-color theme_unfocused_selected_bg_color_alt_breeze #362c50;
|
||||
@define-color theme_unfocused_selected_bg_color_breeze #362c50;
|
||||
@define-color theme_unfocused_selected_fg_color_breeze #fcfcfc;
|
||||
@define-color theme_unfocused_text_color_breeze #fcfcfc;
|
||||
@define-color theme_unfocused_view_bg_color_breeze #131517;
|
||||
@define-color theme_unfocused_view_text_color_breeze #606263;
|
||||
@define-color theme_view_active_decoration_color_breeze #926ee4;
|
||||
@define-color theme_view_hover_decoration_color_breeze #926ee4;
|
||||
@define-color tooltip_background_breeze #292c30;
|
||||
@define-color tooltip_border_breeze #535659;
|
||||
@define-color tooltip_text_breeze #fcfcfc;
|
||||
@define-color unfocused_borders_breeze #4c4e51;
|
||||
@define-color unfocused_insensitive_borders_breeze #2d3033;
|
||||
@define-color warning_color_backdrop_breeze #f67400;
|
||||
@define-color warning_color_breeze #f67400;
|
||||
@define-color warning_color_insensitive_backdrop_breeze #5e340f;
|
||||
@define-color warning_color_insensitive_breeze #5e340f;
|
||||
@@ -0,0 +1,4 @@
|
||||
VteTerminal, vte-terminal {
|
||||
padding: 13px;
|
||||
}
|
||||
@import 'colors.css';
|
||||
@@ -0,0 +1,25 @@
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-button-images=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-cursor-theme-name=breeze_cursors
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-enable-event-sounds=0
|
||||
gtk-enable-input-feedback-sounds=0
|
||||
gtk-font-name=Noto Sans, 10
|
||||
gtk-icon-theme-name=breeze-dark
|
||||
gtk-menu-images=true
|
||||
gtk-modules=colorreload-gtk-module
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=Gruvbox-Dark-BL
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-toolbar-style=3
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-dpi=122880
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintmedium
|
||||
gtk-xft-rgba=none
|
||||
@@ -0,0 +1 @@
|
||||
gtk-font-name="Liberation Sans Regular 10"
|
||||
+47
-307
@@ -1,312 +1,52 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
# iconic font icon search: https://fontawesome.com/v4.7/cheatsheet/
|
||||
# Please see http://i3wm.org/docs/userguide.html for the official i3 reference!
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
####################
|
||||
# Shared variables #
|
||||
####################
|
||||
|
||||
set $mod Mod1
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
#set $ws1 "1:"
|
||||
#set $ws2 "2:"
|
||||
#set $ws3 "3:"
|
||||
#set $ws4 "4:"
|
||||
#set $ws5 "5:"
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
set $ws11 "11"
|
||||
set $ws12 "12"
|
||||
set $ws13 "13"
|
||||
set $ws14 "14"
|
||||
set $ws15 "15"
|
||||
set $ws16 "16"
|
||||
set $ws17 "17"
|
||||
set $ws18 "18"
|
||||
set $ws19 "19"
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
# font pango:monospace 8
|
||||
# Define colors variables:
|
||||
# gruvbox colors
|
||||
set $bg #282828
|
||||
set $red #cc241d
|
||||
set $green #98971a
|
||||
set $yellow #d79921
|
||||
set $blue #458588
|
||||
set $purple #b16286
|
||||
set $aqua #689d6a
|
||||
set $gray #a89984
|
||||
set $darkgray #1d2021
|
||||
set $white #ebdbb2
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
# font pango:Droid Sans 15
|
||||
font pango:Droid Sans 10
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Autostart compton for transparency
|
||||
exec --no-startup-id compton --config ~/.config/compton.conf
|
||||
# exec feh --randomize --bg-fill ~/Dropbox/Wallpapers/3K
|
||||
# feh --randomize --bg-fill ~/Dropbox/Wallpapers/Pack1
|
||||
|
||||
# Start tmux server with base session
|
||||
# exec tmux -2 new-session
|
||||
|
||||
exec wait 1
|
||||
# Start volume mixer and hide it in scratchpad
|
||||
# exec --no-startup-id pavucontrol
|
||||
exec --no-startup-id urxvt -name scratchpad -e zsh -c 'source ~/.zshrc && (tmux attach -t scratchpad || tmux new-session -s scratchpad)'
|
||||
# for_window [class="Pavucontrol"] move scratchpad
|
||||
for_window [instance="^scratchpad$"] move scratchpad
|
||||
exec --no-startup-id urxvt -e zsh -c 'source ~/.zshrc && cd ~ && (tmux attach -f -q -t main || tmuxinator start main)'
|
||||
exec --no-startup-id ~/bin/switch_wallpaper.sh
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+u exec termite -e 'zsh -c "tmux -2 new-session"'
|
||||
bindsym $mod+t exec urxvt -e zsh -c 'source ~/.zshrc && tmux new-session' # -e 'tmux new-session'
|
||||
# attach to existing tmux session
|
||||
# bindsym $mod+Return exec urxvt -e zsh -c 'source ~/.zshrc && (tmux new-session -t main || tmux new-session -s main)'
|
||||
bindsym $mod+Return exec urxvt -e zsh -c 'source ~/.zshrc && cd ~ && (tmux attach -f -q -t main || tmuxinator start main)'
|
||||
# bindsym $mod+Return exec xfce4-terminal -e 'tmux -2 new-session -t main || tmux -2 new-session -s main'
|
||||
|
||||
# start ranger
|
||||
bindsym $mod+o exec urxvt -e zsh -c 'ranger'
|
||||
|
||||
# start thunar
|
||||
bindsym $mod+q exec thunar
|
||||
|
||||
# start firefox
|
||||
bindsym $mod+i exec firefox
|
||||
|
||||
# start volume mixer
|
||||
# bindsym $mod+v [class="Pavucontrol"] scratchpad show
|
||||
bindsym $mod+v exec pavucontrol
|
||||
# open new volume mixer to scratchpad in case of accidental closing
|
||||
# bindsym $mod+Control+v exec pavucontrol
|
||||
|
||||
# Show/hide scratchpad terminal
|
||||
bindsym $mod+y [instance="^scratchpad$"] scratchpad show
|
||||
|
||||
# take screenshot
|
||||
bindsym Print exec scrot -e 'mv $f ~/Downloads'
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# middle click over titlebar kills window
|
||||
bindsym --release button2 kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+d exec dmenu_run -fn "-*-droid sans-bold-*-*-*-*-*-*-100-p-0-adobe-standard"
|
||||
# bindsym $mod+d exec dmenu_run -fn "Droid Sans Mono-28" -p "Type Application" -dim 0
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -fn 'Droid Sans Mono-28' -p 'Type Application' -dim 0"
|
||||
bindsym $mod+d exec --no-startup-id ~/bin/rofi_start.sh
|
||||
# bindsym $mod+d exec dmenu_run -fn "Source Code Pro for Powerline-28"
|
||||
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Control+h move left
|
||||
bindsym $mod+Control+j move down
|
||||
bindsym $mod+Control+k move up
|
||||
bindsym $mod+Control+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+backslash split h
|
||||
bindsym $mod+Shift+bar split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+minus split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating bindsym
|
||||
bindsym $mod+shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
bindsym $mod+c focus child
|
||||
|
||||
# go back to previous worksapce with current workspace press
|
||||
workspace_auto_back_and_forth yes
|
||||
|
||||
# switch to next/previous worspace
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
# next_on_output
|
||||
bindsym $mod+Shift+Tab workspace next_on_output
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# move focused containter to next/(previous?) workspace
|
||||
bindsym $mod+Control+Tab move container to workspace next
|
||||
bindsym $mod+Shift+Control+Tab move container to workspace prev
|
||||
|
||||
# move focused window to scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# move scratchpad window to visible floating window
|
||||
bindsym $mod+Control+minus scratchpad show
|
||||
|
||||
# lock the screen
|
||||
bindsym $mod+Escape exec $HOME/bin/lock_screen.sh
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
mode dock
|
||||
modifier Mod1
|
||||
tray_output primary
|
||||
# font pango:Terminus 12
|
||||
font pango:Terminus 9
|
||||
separator_symbol ":|:"
|
||||
colors {
|
||||
background #353535
|
||||
separator #BCEE68
|
||||
}
|
||||
}
|
||||
|
||||
# Colors
|
||||
# class border backgr. text indicator
|
||||
client.focused #000000 #353535 #ffffff #2e9ef4
|
||||
client.focused_inactive #333333 #5f676a #ffffff #484e50
|
||||
client.unfocused #333333 #222222 #888888 #292d2e
|
||||
client.urgent #2f343a #900000 #ffffff #900000
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
|
||||
client.background #ffffff
|
||||
|
||||
# Border styles
|
||||
new_window normal
|
||||
new_float normal
|
||||
|
||||
# Gaps specific
|
||||
# Disable titlebars for i3-gaps
|
||||
for_window [class="^.*"] border pixel 1
|
||||
|
||||
# Global gap size
|
||||
# smart_gaps on
|
||||
gaps inner 20
|
||||
gaps outer 20
|
||||
|
||||
set $mode_toggle_gaps Gaps: (e) enable, (d) disable
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
bindsym $mod+g mode "$mode_toggle_gaps"
|
||||
|
||||
mode "$mode_toggle_gaps" {
|
||||
bindsym e gaps inner current set 20, gaps outer current set 50, mode "default"
|
||||
bindsym d gaps inner current set 0, gaps outer current set 0, mode "default"
|
||||
bindsym Shift+e gaps inner all set 20, gaps outer all set 50, mode "default"
|
||||
bindsym Shift+d gaps inner all set 0, gaps inner all set 0, mode "default"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym plus gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym Shift+plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym plus gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym Shift+plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
# Include configs
|
||||
include config.d/*.conf
|
||||
include config.de/*.conf
|
||||
include config.local/*.conf
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#############################################
|
||||
# autostart applications/services on login: #
|
||||
#############################################
|
||||
|
||||
#get auth work with polkit-gnome
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
# num lock activated
|
||||
exec --no-startup-id numlockx on
|
||||
|
||||
# start a script to setup displays
|
||||
# use arandr to setup displays and save the file as default:
|
||||
exec --no-startup-id ~/.screenlayout/default.sh
|
||||
|
||||
# set powersavings for display if not handled by DE:
|
||||
# Usage: xset dpms {standby_time} {suspend_time} {off_time}
|
||||
#exec --no-startup-id xset dpms 600 0 0
|
||||
|
||||
# disable power saving (for example if using xscreensaver)
|
||||
exec --no-startup-id xset -dpms
|
||||
|
||||
# use xautolock to use autosuspend rules for mobile devices
|
||||
# https://wiki.archlinux.org/title/Session_lock#xautolock
|
||||
#exec --no-startup-id xautolock -time 60 -locker "systemctl suspend"
|
||||
|
||||
# set wallpaper(s) on i3 start/restart
|
||||
exec_always --no-startup-id "[ -f ~/.dotfiles-config ] && source ~/.dotfiles-config && $DOTFILES_DIR/bin/update-wallpaper"
|
||||
|
||||
# xscreensaver
|
||||
# https://www.jwz.org/xscreensaver
|
||||
#exec --no-startup-id xscreensaver --no-splash
|
||||
|
||||
# Desktop notifications
|
||||
# dunst config used ~/.config/dunst/dunstrc
|
||||
# may need to run dbus-launch explicitly:
|
||||
#exec --no-startup-id dbus-launch /usr/bin/dunst
|
||||
exec --no-startup-id /usr/bin/dunst
|
||||
|
||||
# autotiling script
|
||||
# https://github.com/nwg-piotr/autotiling
|
||||
# `yay -S autotiling ;) (it is in AUR)
|
||||
# exec_always --no-startup-id autotiling
|
||||
|
||||
# Scratchpad with notes
|
||||
# `tmuxinator open notes` first for this to work
|
||||
exec --no-startup-id alacritty --title notebook -e zsh -c 'tmuxinator start notes'
|
||||
for_window [class="^Alacritty$" title="notebook"] move scratchpad
|
||||
#, scratchpad hide
|
||||
|
||||
# Performance monitor
|
||||
exec --no-startup-id alacritty --title monitoring -e zsh -c 'htop'
|
||||
for_window [class="^Alacritty$" title="monitoring"] move scratchpad
|
||||
#, scratchpad hide
|
||||
|
||||
# Remote connections
|
||||
# exec --no-startup-id alacritty --title servers -e zsh -c 'tmuxinator start servers'
|
||||
# for_window [class="^Alacritty$" title="servers"] move scratchpad, scratchpad hide
|
||||
|
||||
###############
|
||||
# system tray #
|
||||
###############
|
||||
# if you do not use dex: exec --no-startup-id dex --autostart --environment i3
|
||||
# you need to have tray apps started manually one by one:
|
||||
|
||||
# start blueberry app for managing bluetooth devices from tray:
|
||||
#exec --no-startup-id blueberry-tray
|
||||
|
||||
# networkmanager-applet
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# clipman-applet
|
||||
exec --no-startup-id xfce4-clipman
|
||||
@@ -0,0 +1,302 @@
|
||||
# set the mod key to the winkey:
|
||||
set $mod Mod4
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# switch/iterate between workspaces
|
||||
bindsym $mod+Tab workspace next
|
||||
bindsym $mod+Shift+Tab workspace prev
|
||||
bindsym $mod+c exec --no-startup-id ~/.config/i3/scripts/empty_workspace
|
||||
bindsym $mod+Shift+c exec --no-startup-id ~/.config/i3/scripts/move_container_empty_workspace
|
||||
|
||||
bindsym $mod+slash [class="^Alacritty$" title="notebook"] scratchpad show
|
||||
# bindsym $mod+slash scratchpad show
|
||||
bindsym $mod+m [class="^Alacritty$" title="monitoring"] scratchpad show
|
||||
# bindsym $mod+Shift+colon [class="^Alacritty$" title="servers"] scratchpad show
|
||||
bindsym $mod+Shift+slash move scratchpad
|
||||
bindsym $mod+Control+slash scratchpad show
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# switch to workspace with numpad keys
|
||||
bindcode $mod+87 workspace $ws1
|
||||
bindcode $mod+88 workspace $ws2
|
||||
bindcode $mod+89 workspace $ws3
|
||||
bindcode $mod+83 workspace $ws4
|
||||
bindcode $mod+84 workspace $ws5
|
||||
bindcode $mod+85 workspace $ws6
|
||||
bindcode $mod+79 workspace $ws7
|
||||
bindcode $mod+80 workspace $ws8
|
||||
bindcode $mod+81 workspace $ws9
|
||||
bindcode $mod+90 workspace $ws10
|
||||
|
||||
# switch to workspace with numlock numpad keys
|
||||
bindcode $mod+Mod2+87 workspace $ws1
|
||||
bindcode $mod+Mod2+88 workspace $ws2
|
||||
bindcode $mod+Mod2+89 workspace $ws3
|
||||
bindcode $mod+Mod2+83 workspace $ws4
|
||||
bindcode $mod+Mod2+84 workspace $ws5
|
||||
bindcode $mod+Mod2+85 workspace $ws6
|
||||
bindcode $mod+Mod2+79 workspace $ws7
|
||||
bindcode $mod+Mod2+80 workspace $ws8
|
||||
bindcode $mod+Mod2+81 workspace $ws9
|
||||
bindcode $mod+Mod2+90 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# move focused container to workspace with numpad keys
|
||||
bindcode $mod+Shift+Mod2+87 move container to workspace $ws1
|
||||
bindcode $mod+Shift+Mod2+88 move container to workspace $ws2
|
||||
bindcode $mod+Shift+Mod2+89 move container to workspace $ws3
|
||||
bindcode $mod+Shift+Mod2+83 move container to workspace $ws4
|
||||
bindcode $mod+Shift+Mod2+84 move container to workspace $ws5
|
||||
bindcode $mod+Shift+Mod2+85 move container to workspace $ws6
|
||||
bindcode $mod+Shift+Mod2+79 move container to workspace $ws7
|
||||
bindcode $mod+Shift+Mod2+80 move container to workspace $ws8
|
||||
bindcode $mod+Shift+Mod2+81 move container to workspace $ws9
|
||||
bindcode $mod+Shift+Mod2+90 move container to workspace $ws10
|
||||
|
||||
# move focused container to workspace with numpad keys
|
||||
bindcode $mod+Shift+87 move container to workspace $ws1
|
||||
bindcode $mod+Shift+88 move container to workspace $ws2
|
||||
bindcode $mod+Shift+89 move container to workspace $ws3
|
||||
bindcode $mod+Shift+83 move container to workspace $ws4
|
||||
bindcode $mod+Shift+84 move container to workspace $ws5
|
||||
bindcode $mod+Shift+85 move container to workspace $ws6
|
||||
bindcode $mod+Shift+79 move container to workspace $ws7
|
||||
bindcode $mod+Shift+80 move container to workspace $ws8
|
||||
bindcode $mod+Shift+81 move container to workspace $ws9
|
||||
bindcode $mod+Shift+90 move container to workspace $ws10
|
||||
|
||||
# resize window (you can also use the mouse for that):
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
# Pressing left will shrink the window's width.
|
||||
# Pressing right will grow the window's width.
|
||||
# Pressing up will shrink the window's height.
|
||||
# Pressing down will grow the window's height.
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym j resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
set $mode_toggle_gaps Gaps: (e) enable, (d) disable
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
bindsym $mod+Control+g mode "$mode_toggle_gaps"
|
||||
|
||||
mode "$mode_toggle_gaps" {
|
||||
bindsym e gaps inner current set 20, gaps outer current set 50, mode "default"
|
||||
bindsym d gaps inner current set 0, gaps outer current set 0, mode "default"
|
||||
bindsym Shift+e gaps inner all set 20, gaps outer all set 50, mode "default"
|
||||
bindsym Shift+d gaps inner all set 0, gaps inner all set 0, mode "default"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym plus gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym Shift+plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym plus gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym Shift+plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
######################################
|
||||
# keybindings for different actions: #
|
||||
######################################
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec --no-startup-id alacritty -e sh -c "tmux new-session"
|
||||
# bindsym $mod+Return exec --no-startup-id alacritty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# middle click over titlebar kills window
|
||||
#bindsym --release button2 kill
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Control+r reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# keybinding in fancy rofi (automated):
|
||||
bindsym F1 exec --no-startup-id ~/.config/i3/scripts/keyhint-2
|
||||
# alternative
|
||||
# keybinding list in editor:
|
||||
#bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# move focused workspace
|
||||
bindsym $mod+Control+h move workspace to output left
|
||||
bindsym $mod+Control+j move workspace to output down
|
||||
bindsym $mod+Control+k move workspace to output up
|
||||
bindsym $mod+Control+l move workspace to output right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Control+Left move workspace to output left
|
||||
bindsym $mod+Control+Down move workspace to output down
|
||||
bindsym $mod+Control+Up move workspace to output up
|
||||
bindsym $mod+Control+Right move workspace to output right
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+minus split v
|
||||
bindsym $mod+KP_Subtract split v
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+Shift+bar split h
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
# TODO: tigervnc can get stuck in fullscreen and swallow all the commands to escape it. F8 is for keyboard escape
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+g layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# open new empty workspace
|
||||
bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace
|
||||
|
||||
# Multimedia Keys
|
||||
|
||||
# audio control
|
||||
# TODO: Play pause doesn't work on desktop
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
||||
bindsym XF86AudioPause exec --no-startup-id playerctl pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||
|
||||
# mouse buttons
|
||||
# TODO: Anything based on the titlebar never really runs since titlebars are disabled
|
||||
bindsym --release button2 kill
|
||||
bindsym --whole-window $mod+button2 kill
|
||||
|
||||
# Redirect sound to headphones
|
||||
bindsym $mod+p exec --no-startup-id /usr/local/bin/switch-audio-port
|
||||
|
||||
## App shortcuts
|
||||
bindsym $mod+w exec /usr/bin/firefox
|
||||
bindsym Print exec scrot ~/Pictures/Screenshots/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/Pictures/Screenshots/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||
#bindsym Print exec spectactle --output ~/Pictures/Screenshots/%Y-%m-%d-%T-screenshot.png
|
||||
|
||||
# Power Profiles menu switcher (rofi)
|
||||
bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles
|
||||
|
||||
#####################################
|
||||
# Application menu handled by rofi: #
|
||||
#####################################
|
||||
|
||||
## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
|
||||
bindsym $mod+d exec --no-startup-id rofi -modi drun -show drun \
|
||||
-config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
## rofi bindings for window menu ($mod+t /F10 optional disabled)
|
||||
bindsym $mod+t exec --no-startup-id rofi -show window \
|
||||
-config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
## rofi bindings to manage clipboard (install rofi-greenclip from the AUR)
|
||||
exec --no-startup-id greenclip daemon>/dev/null
|
||||
bindsym $mod+b exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
|
||||
-config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
## autoclicker x 100
|
||||
bindsym $mod+Shift+o exec --no-startup-id xdotool click --repeat 1000 --delay 10 1
|
||||
bindsym $mod+Shift+i exec --no-startup-id xdotool click --repeat 10000 --delay 10 1
|
||||
|
||||
# calculator
|
||||
bindsym XF86Calculator exec --no-startup-id galculator
|
||||
@@ -0,0 +1,81 @@
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
#font pango: Noto Sans Regular 10
|
||||
font pango: Liberation Sans Regular 10
|
||||
|
||||
# border indicator on windows:
|
||||
# larger borders are helpful to resize windows with the mouse
|
||||
default_border pixel 5
|
||||
|
||||
# thin borders
|
||||
hide_edge_borders smart
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 10
|
||||
gaps outer 10
|
||||
|
||||
# show window title bars (not officially supported with i3gaps)
|
||||
#default_border normal
|
||||
|
||||
# window title alignment
|
||||
#title_align center
|
||||
|
||||
##################
|
||||
# floating rules #
|
||||
##################
|
||||
|
||||
# set floating (nontiling) for apps needing it
|
||||
for_window [class="Yad" instance="yad"] floating enable
|
||||
for_window [class="Galculator" instance="galculator"] floating enable
|
||||
for_window [class="Blueman-manager" instance="blueman-manager"] floating enable
|
||||
|
||||
# set floating (nontiling) for special apps
|
||||
for_window [class="Xsane" instance="xsane"] floating enable
|
||||
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
||||
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||
for_window [class="Pamac-manager"] floating enable
|
||||
for_window [window_role="About"] floating enable
|
||||
|
||||
# Plasma
|
||||
for_window [class="yakuake"] floating enable;
|
||||
for_window [class="systemsettings"] floating enable;
|
||||
for_window [class="plasmashell"] floating enable;
|
||||
for_window [class="Plasma"] floating enable; border none
|
||||
for_window [title="plasma-desktop"] floating enable; border none
|
||||
for_window [title="win7"] floating enable; border none
|
||||
for_window [class="krunner"] floating enable; border none
|
||||
for_window [class="Kmix"] floating enable; border none
|
||||
for_window [class="Klipper"] floating enable; border none
|
||||
for_window [class="Plasmoidviewer"] floating enable; border none
|
||||
for_window [class="plasmashell" window_type="notification"] floating enable, border none, move position 70 ppt 81 ppt
|
||||
no_focus [class="plasmashell" window_type="notification"]
|
||||
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="bubble"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
for_window [window_role="Preferences"] floating enable
|
||||
for_window [window_type="dialog"] floating enable
|
||||
for_window [window_type="menu"] floating enable
|
||||
for_window [instance="__scratchpad"] floating enable
|
||||
|
||||
# Kill existing Plasma desktop window if it exists
|
||||
for_window [title="Desktop @ QRect.*"] kill; floating enable; border none
|
||||
|
||||
# set size of floating window
|
||||
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
||||
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
||||
|
||||
# set position of floating window
|
||||
#for_window [class=".*"] move position center
|
||||
|
||||
######################################
|
||||
# color settings for bar and windows #
|
||||
######################################
|
||||
|
||||
# gruvbox
|
||||
# class border backgr text indicator child_border
|
||||
client.focused $blue $blue $darkgray $aqua $darkgray
|
||||
client.unfocused $darkgray $darkgray $yellow $aqua $darkgray
|
||||
client.focused_inactive $darkgray $darkgray $yellow $aqua $darkgray
|
||||
client.urgent $red $red $white $red $red
|
||||
@@ -0,0 +1,15 @@
|
||||
#####################
|
||||
# workspace layout: #
|
||||
#####################
|
||||
|
||||
# default i3 tiling mode:
|
||||
workspace_layout default
|
||||
|
||||
# i3 stacking layout:
|
||||
# Each window will be fullscreen and tabbed top to bottom.
|
||||
#workspace_layout stacking
|
||||
|
||||
# i3 tabbed layout:
|
||||
# Each new window will open fullscreen as a tab (left to right)
|
||||
#workspace_layout tabbed
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# i3blocks config file changed for EndeavourOS-i3 setup
|
||||
|
||||
# source is available here:
|
||||
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf
|
||||
# Maintainer: joekamprad [joekamprad //a_t// endeavouros.com]
|
||||
# Former Visual Designer: Florent Valetti [@FLVAL EndeavourOS]
|
||||
# created for i3wm setup on EndeavourOS
|
||||
# https://endeavouros.com
|
||||
|
||||
# cheatsheet for icon fonts used on the block-bar:
|
||||
# https://fontawesome.com/v4.7/cheatsheet/
|
||||
|
||||
# --> to update this run the following command:
|
||||
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf -P ~/.config/i3/
|
||||
|
||||
# Please see man i3blocks for a complete reference!
|
||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||
|
||||
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
separator=false
|
||||
markup=pango
|
||||
separator_block_width=15
|
||||
|
||||
#[Weather]
|
||||
#command=~/.config/i3/scripts/openweather
|
||||
# or:
|
||||
#command=~/.config/i3/scripts/openweather-city
|
||||
#interval=1800
|
||||
#color=#7275b3
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[pavucontrol]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
command=pavucontrol
|
||||
color=#689d6a
|
||||
|
||||
[volume-pulseaudio]
|
||||
command=~/.config/i3/scripts/volume
|
||||
instance=Master
|
||||
color=#689d6a
|
||||
interval=1
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[time]
|
||||
label=
|
||||
command=date '+%a %b %d %I:%M:%S %p'
|
||||
color=#98971a
|
||||
interval=1
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[keybindings]
|
||||
full_text=
|
||||
command=~/.config/i3/scripts/keyhint
|
||||
|
||||
[sleep_screen]
|
||||
full_text=🖵
|
||||
command=~/.config/i3/scripts/blur-lock
|
||||
|
||||
[shutdown_menu]
|
||||
full_text=
|
||||
command=~/.config/i3/scripts/powermenu
|
||||
|
||||
separator_block_width=15
|
||||
[simple-2]
|
||||
full_text=
|
||||
color=#b16286
|
||||
@@ -0,0 +1,250 @@
|
||||
# i3blocks config file changed for EndeavourOS-i3 setup
|
||||
|
||||
# source is available here:
|
||||
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf
|
||||
# Maintainer: joekamprad [joekamprad //a_t// endeavouros.com]
|
||||
# Former Visual Designer: Florent Valetti [@FLVAL EndeavourOS]
|
||||
# created for i3wm setup on EndeavourOS
|
||||
# https://endeavouros.com
|
||||
|
||||
# cheatsheet for icon fonts used on the block-bar:
|
||||
# https://fontawesome.com/v4.7/cheatsheet/
|
||||
|
||||
# --> to update this run the following command:
|
||||
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf -P ~/.config/i3/
|
||||
|
||||
# Please see man i3blocks for a complete reference!
|
||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||
|
||||
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
separator=false
|
||||
markup=pango
|
||||
separator_block_width=15
|
||||
|
||||
#[Weather]
|
||||
#command=~/.config/i3/scripts/openweather
|
||||
# or:
|
||||
#command=~/.config/i3/scripts/openweather-city
|
||||
#interval=1800
|
||||
#color=#7275b3
|
||||
|
||||
[terminal]
|
||||
full_text=
|
||||
color=#458588
|
||||
command=i3-msg -q exec alacritty
|
||||
#xfce4-terminal
|
||||
|
||||
[browser]
|
||||
full_text=
|
||||
color=#d65d0e
|
||||
command=i3-msg -q exec firefox
|
||||
|
||||
[files]
|
||||
full_text=
|
||||
color=#d79921
|
||||
command=i3-msg -q exec thunar ~/
|
||||
|
||||
#[mail]
|
||||
#full_text=
|
||||
#color=#dbcb75
|
||||
#command=i3-msg -q exec thunderbird
|
||||
|
||||
#[simple-2]
|
||||
#full_text=: :
|
||||
#color=#b16286
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
#label=
|
||||
label=SSD:
|
||||
instance=/
|
||||
command=~/.config/i3/scripts/disk
|
||||
color=#458588
|
||||
interval=30
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
# Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
#label=
|
||||
label=RAM:
|
||||
command=~/.config/i3/scripts/memory
|
||||
color=#458588
|
||||
interval=2
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[cpu_usage]
|
||||
#label=
|
||||
label=CPU:
|
||||
command=~/.config/i3/scripts/cpu_usage
|
||||
min_width=100%
|
||||
color=#458588
|
||||
#CPU: 100.00%
|
||||
interval=2
|
||||
|
||||
[CPU-temperature]
|
||||
label=
|
||||
command=~/.config/i3/scripts/temperature
|
||||
interval=30
|
||||
color=#458588
|
||||
T_WARN=70
|
||||
T_CRIT=90
|
||||
#SENSOR_CHIP=""
|
||||
# where SENSOR_CHIP can be find with sensors output
|
||||
# can be used also for GPU temperature or other temperature sensors lm-sensors detects.
|
||||
|
||||
# showing name of connected network (enable for wifi use)
|
||||
#[net]
|
||||
#label=
|
||||
#command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')"
|
||||
#interval=30
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[bandwidth]
|
||||
label=
|
||||
command=~/.config/i3/scripts/bandwidth2
|
||||
color=#98971a
|
||||
min_width=100/100 MB/s
|
||||
interval=persist
|
||||
|
||||
# Battery indicator
|
||||
#[battery]
|
||||
#command=~/.config/i3/scripts/battery2
|
||||
# for alternative battery script change to battery1
|
||||
# change this to battery-pinebook-pro if you are running on pinebook-pro
|
||||
#label=
|
||||
#interval=30
|
||||
|
||||
#[simple-2]
|
||||
#full_text=: :
|
||||
#color=#b16286
|
||||
|
||||
# display keyboard layout name
|
||||
# for keyboard layouts switcher
|
||||
# see i3 config file
|
||||
# this needs xkblayout-state installed from the AUR:
|
||||
# https://aur.archlinux.org/packages/xkblayout-state-git
|
||||
#[keyboard-layout]
|
||||
#command=~/.config/i3/scripts/keyboard-layout
|
||||
#interval=2
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
# power-profiles-daemon implementation:
|
||||
# needs package power-profiles-daemon installed and the service running see here:
|
||||
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||
|
||||
#set power-profile
|
||||
[ppd_menu]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
command=~/.config/i3/scripts/power-profiles
|
||||
color=#98971a
|
||||
|
||||
#Show the current power-profile
|
||||
[ppd-status]
|
||||
command=~/.config/i3/scripts/ppd-status
|
||||
interval=5
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[pavucontrol]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
command=pavucontrol
|
||||
color=#689d6a
|
||||
|
||||
[volume-pulseaudio]
|
||||
command=~/.config/i3/scripts/volume
|
||||
instance=Master
|
||||
color=#689d6a
|
||||
interval=1
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[time]
|
||||
label=
|
||||
command=date '+%a %b %d %I:%M:%S %p'
|
||||
color=#98971a
|
||||
interval=1
|
||||
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
|
||||
[keybindings]
|
||||
full_text=
|
||||
command=~/.config/i3/scripts/keyhint
|
||||
|
||||
[sleep_screen]
|
||||
full_text=🖵
|
||||
command=~/.config/i3/scripts/blur-lock
|
||||
|
||||
[shutdown_menu]
|
||||
full_text=
|
||||
command=~/.config/i3/scripts/powermenu
|
||||
|
||||
separator_block_width=15
|
||||
[simple-2]
|
||||
full_text=
|
||||
color=#b16286
|
||||
@@ -0,0 +1,106 @@
|
||||
EndeavourOS i3wm Keybindings cheat sheet:
|
||||
|
||||
--> to update this run the following command:
|
||||
wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/keybindings -P ~/.config/i3/
|
||||
|
||||
All sources and updates are available at GitHub:
|
||||
https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||
|
||||
For reference consult our WIKI:
|
||||
https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
|
||||
|
||||
= windows key
|
||||
|
||||
# start xfce4-terminal
|
||||
+Return
|
||||
|
||||
# kill focused window
|
||||
+q
|
||||
|
||||
# Application menu search by typing (fancy Rofi menu):
|
||||
+d
|
||||
|
||||
# Window switcher menu (fancy Rofi menu):
|
||||
+t
|
||||
|
||||
# fancy exit-menu on bottom right:
|
||||
+Shift+e
|
||||
|
||||
# Lock the system
|
||||
# lock with a picture or blurring the screen (options in config)
|
||||
+l
|
||||
|
||||
# reload the configuration file
|
||||
+Shift+c
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
+Shift+r
|
||||
|
||||
# keybinding in fancy rofi (automated)
|
||||
F1
|
||||
|
||||
# full keybinding list in editor:
|
||||
+F1
|
||||
|
||||
# change window focus
|
||||
+j focus left
|
||||
+k focus down
|
||||
+b focus up
|
||||
+o focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
+Left focus left
|
||||
+Down focus down
|
||||
+Up focus up
|
||||
+Right focus right
|
||||
|
||||
# move a focused window
|
||||
+Shift+j move left
|
||||
+Shift+k move down
|
||||
+Shift+b move up
|
||||
+Shift+o move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
+Shift+Left move left
|
||||
+Shift+Down move down
|
||||
+Shift+Up move up
|
||||
+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
+s layout stacking
|
||||
+g layout tabbed
|
||||
+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#+d focus child
|
||||
|
||||
# resize floating window
|
||||
+right mouse button
|
||||
|
||||
## Multimedia Keys
|
||||
|
||||
# Redirect sound to headphones
|
||||
+p
|
||||
|
||||
## App shortcuts
|
||||
+w starts Firefox
|
||||
+n starts Thunar
|
||||
Button screenshot
|
||||
Executable
+105
@@ -0,0 +1,105 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2015 James Murphy
|
||||
# Licensed under the terms of the GNU GPL v2 only.
|
||||
#
|
||||
# i3blocks blocklet script to monitor bandwidth usage
|
||||
|
||||
iface="${BLOCK_INSTANCE}"
|
||||
iface="${IFACE:-$iface}"
|
||||
dt="${DT:-3}"
|
||||
unit="${UNIT:-MB}"
|
||||
#LABEL="${LABEL:-<span font='FontAwesome'> </span>}" # down arrow up arrow
|
||||
LABEL="${LABEL:-}" # down arrow up arrow
|
||||
printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}"
|
||||
|
||||
function default_interface {
|
||||
ip route | awk '/^default via/ {print $5; exit}'
|
||||
}
|
||||
|
||||
function check_proc_net_dev {
|
||||
if [ ! -f "/proc/net/dev" ]; then
|
||||
echo "/proc/net/dev not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function list_interfaces {
|
||||
check_proc_net_dev
|
||||
echo "Interfaces in /proc/net/dev:"
|
||||
grep -o "^[^:]\\+:" /proc/net/dev | tr -d " :"
|
||||
}
|
||||
|
||||
while getopts i:t:u:p:lh opt; do
|
||||
case "$opt" in
|
||||
i) iface="$OPTARG" ;;
|
||||
t) dt="$OPTARG" ;;
|
||||
u) unit="$OPTARG" ;;
|
||||
p) printf_command="$OPTARG" ;;
|
||||
l) list_interfaces && exit 0 ;;
|
||||
h) printf \
|
||||
"Usage: bandwidth3 [-i interface] [-t time] [-u unit] [-p printf_command] [-l] [-h]
|
||||
Options:
|
||||
-i\tNetwork interface to measure. Default determined using \`ip route\`.
|
||||
-t\tTime interval in seconds between measurements. Default: 3
|
||||
-u\tUnits to measure bytes in. Default: Mb
|
||||
\tAllowed units: Kb, KB, Mb, MB, Gb, GB, Tb, TB
|
||||
\tUnits may have optional it/its/yte/ytes on the end, e.g. Mbits, KByte
|
||||
-p\tAwk command to be called after a measurement is made.
|
||||
\tDefault: printf \"<span font='FontAwesome'> </span>%%-5.1f/%%5.1f %%s/s\\\\n\", rx, wx, unit;
|
||||
\tExposed variables: rx, wx, tx, unit, iface
|
||||
-l\tList available interfaces in /proc/net/dev
|
||||
-h\tShow this help text
|
||||
" && exit 0;;
|
||||
esac
|
||||
done
|
||||
# 407437
|
||||
check_proc_net_dev
|
||||
|
||||
iface="${iface:-$(default_interface)}"
|
||||
while [ -z "$iface" ]; do
|
||||
echo No default interface
|
||||
sleep "$dt"
|
||||
iface=$(default_interface)
|
||||
done
|
||||
|
||||
case "$unit" in
|
||||
Kb|Kbit|Kbits) bytes_per_unit=$((1024 / 8));;
|
||||
KB|KByte|KBytes) bytes_per_unit=$((1024));;
|
||||
Mb|Mbit|Mbits) bytes_per_unit=$((1024 * 1024 / 8));;
|
||||
MB|MByte|MBytes) bytes_per_unit=$((1024 * 1024));;
|
||||
Gb|Gbit|Gbits) bytes_per_unit=$((1024 * 1024 * 1024 / 8));;
|
||||
GB|GByte|GBytes) bytes_per_unit=$((1024 * 1024 * 1024));;
|
||||
Tb|Tbit|Tbits) bytes_per_unit=$((1024 * 1024 * 1024 * 1024 / 8));;
|
||||
TB|TByte|TBytes) bytes_per_unit=$((1024 * 1024 * 1024 * 1024));;
|
||||
*) echo Bad unit "$unit" && exit 1;;
|
||||
esac
|
||||
|
||||
scalar=$((bytes_per_unit * dt))
|
||||
init_line=$(cat /proc/net/dev | grep "^[ ]*$iface:")
|
||||
if [ -z "$init_line" ]; then
|
||||
echo Interface not found in /proc/net/dev: "$iface"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
init_received=$(awk '{print $2}' <<< $init_line)
|
||||
init_sent=$(awk '{print $10}' <<< $init_line)
|
||||
|
||||
(while true; do cat /proc/net/dev; sleep "$dt"; done) |\
|
||||
stdbuf -oL grep "^[ ]*$iface:" |\
|
||||
awk -v scalar="$scalar" -v unit="$unit" -v iface="$iface" '
|
||||
BEGIN{old_received='"$init_received"';old_sent='"$init_sent"'}
|
||||
{
|
||||
received=$2
|
||||
sent=$10
|
||||
rx=(received-old_received)/scalar;
|
||||
wx=(sent-old_sent)/scalar;
|
||||
tx=rx+wr;
|
||||
old_received=received;
|
||||
old_sent=sent;
|
||||
if(rx >= 0 && wx >= 0){
|
||||
'"$printf_command"';
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
'
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#simple Shellscript for i3blocks on Pinebook pro
|
||||
#05012020 geri123@gmx.net Gerhard S.
|
||||
#battery-symbols: on Manjaro you need the awesome-terminal-fonts package installed!
|
||||
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
||||
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
||||
case $((
|
||||
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
||||
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
||||
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
||||
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
||||
#
|
||||
(1) echo $STATUS:"" :$PERCENT%;;
|
||||
(2) echo $STATUS:"" :$PERCENT%;;
|
||||
(3) echo $STATUS:"" :$PERCENT%;;
|
||||
(4) echo $STATUS:"" :$PERCENT%;;
|
||||
(5) echo $STATUS:"" :$PERCENT%;;
|
||||
esac
|
||||
Executable
+114
@@ -0,0 +1,114 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||
#
|
||||
# This script is meant to use with i3blocks. It parses the output of the "acpi"
|
||||
# command (often provided by a package of the same name) to read the status of
|
||||
# the battery, and eventually its remaining time (to full charge or discharge).
|
||||
#
|
||||
# The color will gradually change for a percentage below 85%, and the urgency
|
||||
# (exit code 33) is set if there is less that 5% remaining.
|
||||
|
||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
# otherwise we get in console "Wide character in print at"
|
||||
binmode(STDOUT, ':utf8');
|
||||
|
||||
# my $acpi;
|
||||
my $upower;
|
||||
my $percent;
|
||||
my $bat_state;
|
||||
my $status;
|
||||
my $ac_adapt;
|
||||
my $full_text;
|
||||
my $short_text;
|
||||
my $label = '😅';
|
||||
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
|
||||
|
||||
open (UPOWER, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'percentage' |") or die;
|
||||
$upower = <UPOWER>;
|
||||
close(UPOWER);
|
||||
|
||||
# fail on unexpected output
|
||||
if ($upower !~ /: (\d+)%/) {
|
||||
die "$upower\n";
|
||||
}
|
||||
|
||||
$percent = $1;
|
||||
$full_text = "$percent%";
|
||||
|
||||
open (BAT_STATE, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'state' |") or die;
|
||||
$bat_state = <BAT_STATE>;
|
||||
close(BAT_STATE);
|
||||
|
||||
if ($bat_state !~ /: (\w+)/) {
|
||||
die "$bat_state\n";
|
||||
}
|
||||
$status = $1;
|
||||
|
||||
if ($status eq 'discharging') {
|
||||
$full_text .= ' ';
|
||||
} elsif ($status eq 'charging') {
|
||||
$full_text .= ' ';
|
||||
} elsif ($status eq 'Unknown') {
|
||||
open (AC_ADAPTER, "acpi -a |") or die;
|
||||
$ac_adapt = <AC_ADAPTER>;
|
||||
close(AC_ADAPTER);
|
||||
|
||||
if ($ac_adapt =~ /: ([\w-]+)/) {
|
||||
$ac_adapt = $1;
|
||||
|
||||
if ($ac_adapt eq 'on-line') {
|
||||
$full_text .= ' CHR';
|
||||
} elsif ($ac_adapt eq 'off-line') {
|
||||
$full_text .= ' DIS';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$short_text = $full_text;
|
||||
|
||||
if ($percent < 20) {
|
||||
$label = '';
|
||||
} elsif ($percent < 45) {
|
||||
$label = '';
|
||||
} elsif ($percent < 70) {
|
||||
$label = '';
|
||||
} elsif ($percent < 95) {
|
||||
$label = '';
|
||||
} else {
|
||||
$label = '';
|
||||
}
|
||||
|
||||
# print text
|
||||
print " ${label}";
|
||||
print " $full_text\n";
|
||||
print " ${label}";
|
||||
print " $short_text\n";
|
||||
|
||||
# consider color and urgent flag only on discharge
|
||||
if ($status eq 'discharging') {
|
||||
|
||||
if ($percent < 20) {
|
||||
print "#FF0000\n";
|
||||
} elsif ($percent < 40) {
|
||||
print "#FFAE00\n";
|
||||
} elsif ($percent < 60) {
|
||||
print "#FFF600\n";
|
||||
} elsif ($percent < 85) {
|
||||
print "#A8FF00\n";
|
||||
}
|
||||
|
||||
if ($percent < 5) {
|
||||
exit(33);
|
||||
}
|
||||
}
|
||||
|
||||
exit(0);
|
||||
Executable
+106
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2016 James Murphy
|
||||
# Licensed under the GPL version 2 only
|
||||
#
|
||||
# A battery indicator blocklet script for i3blocks
|
||||
|
||||
from subprocess import check_output
|
||||
import os
|
||||
import re
|
||||
|
||||
config = dict(os.environ)
|
||||
status = check_output(['acpi'], universal_newlines=True)
|
||||
|
||||
if not status:
|
||||
# stands for no battery found
|
||||
color = config.get("color_10", "red")
|
||||
fulltext = "<span color='{}'><span font='FontAwesome'>\uf00d \uf240</span></span>".format(color)
|
||||
percentleft = 100
|
||||
else:
|
||||
# if there is more than one battery in one laptop, the percentage left is
|
||||
# available for each battery separately, although state and remaining
|
||||
# time for overall block is shown in the status of the first battery
|
||||
batteries = status.split("\n")
|
||||
state_batteries=[]
|
||||
commasplitstatus_batteries=[]
|
||||
percentleft_batteries=[]
|
||||
time = ""
|
||||
for battery in batteries:
|
||||
if battery!='':
|
||||
state_batteries.append(battery.split(": ")[1].split(", ")[0])
|
||||
commasplitstatus = battery.split(", ")
|
||||
if not time:
|
||||
time = commasplitstatus[-1].strip()
|
||||
# check if it matches a time
|
||||
time = re.match(r"(\d+):(\d+)", time)
|
||||
if time:
|
||||
time = ":".join(time.groups())
|
||||
timeleft = " ({})".format(time)
|
||||
else:
|
||||
timeleft = ""
|
||||
|
||||
p = int(commasplitstatus[1].rstrip("%\n"))
|
||||
if p>0:
|
||||
percentleft_batteries.append(p)
|
||||
commasplitstatus_batteries.append(commasplitstatus)
|
||||
state = state_batteries[0]
|
||||
commasplitstatus = commasplitstatus_batteries[0]
|
||||
if percentleft_batteries:
|
||||
percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries))
|
||||
else:
|
||||
percentleft = 0
|
||||
|
||||
# stands for charging
|
||||
color = config.get("color_charging", "yellow")
|
||||
FA_LIGHTNING = "<span color='{}'><span font='FontAwesome'>\uf0e7</span></span>".format(color)
|
||||
|
||||
# stands for plugged in
|
||||
FA_PLUG = "<span font='FontAwesome'>\uf1e6</span>"
|
||||
|
||||
# stands for using battery
|
||||
FA_BATTERY = "<span font='FontAwesome'>\uf240</span>"
|
||||
|
||||
# stands for unknown status of battery
|
||||
FA_QUESTION = "<span font='FontAwesome'>\uf128</span>"
|
||||
|
||||
|
||||
if state == "Discharging":
|
||||
fulltext = FA_BATTERY + " "
|
||||
elif state == "Full":
|
||||
fulltext = FA_PLUG + " "
|
||||
timeleft = ""
|
||||
elif state == "Unknown":
|
||||
fulltext = FA_QUESTION + " " + FA_BATTERY + " "
|
||||
timeleft = ""
|
||||
else:
|
||||
fulltext = FA_LIGHTNING + " " + FA_PLUG + " "
|
||||
|
||||
def color(percent):
|
||||
if percent < 10:
|
||||
# exit code 33 will turn background red
|
||||
return config.get("color_10", "#FFFFFF")
|
||||
if percent < 20:
|
||||
return config.get("color_20", "#FF3300")
|
||||
if percent < 30:
|
||||
return config.get("color_30", "#FF6600")
|
||||
if percent < 40:
|
||||
return config.get("color_40", "#FF9900")
|
||||
if percent < 50:
|
||||
return config.get("color_50", "#FFCC00")
|
||||
if percent < 60:
|
||||
return config.get("color_60", "#FFFF00")
|
||||
if percent < 70:
|
||||
return config.get("color_70", "#FFFF33")
|
||||
if percent < 80:
|
||||
return config.get("color_80", "#FFFF66")
|
||||
return config.get("color_full", "#FFFFFF")
|
||||
|
||||
form = '<span color="{}">{}%</span>'
|
||||
fulltext += form.format(color(percentleft), percentleft)
|
||||
#fulltext += timeleft
|
||||
|
||||
print(fulltext)
|
||||
print(fulltext)
|
||||
if percentleft < 10:
|
||||
exit(33)
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PICTURE=/tmp/i3lock.png
|
||||
SCREENSHOT="scrot -z $PICTURE"
|
||||
|
||||
BLUR="5x4"
|
||||
|
||||
$SCREENSHOT
|
||||
convert $PICTURE -blur $BLUR $PICTURE
|
||||
i3lock -i $PICTURE
|
||||
rm $PICTURE
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
|
||||
# default values
|
||||
my $t_warn = $ENV{T_WARN} // 50;
|
||||
my $t_crit = $ENV{T_CRIT} // 80;
|
||||
my $cpu_usage = -1;
|
||||
my $decimals = $ENV{DECIMALS} // 0;
|
||||
my $label = $ENV{LABEL} // "";
|
||||
|
||||
sub help {
|
||||
print "Usage: cpu_usage [-w <warning>] [-c <critical>] [-d <decimals>]\n";
|
||||
print "-w <percent>: warning threshold to become yellow\n";
|
||||
print "-c <percent>: critical threshold to become red\n";
|
||||
print "-d <decimals>: Use <decimals> decimals for percentage (default is $decimals) \n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
GetOptions("help|h" => \&help,
|
||||
"w=i" => \$t_warn,
|
||||
"c=i" => \$t_crit,
|
||||
"d=i" => \$decimals,
|
||||
);
|
||||
|
||||
# Get CPU usage
|
||||
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
|
||||
open (MPSTAT, 'mpstat 1 1 |') or die;
|
||||
while (<MPSTAT>) {
|
||||
if (/^.*\s+(\d+\.\d+)[\s\x00]?$/) {
|
||||
$cpu_usage = 100 - $1; # 100% - %idle
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(MPSTAT);
|
||||
|
||||
$cpu_usage eq -1 and die 'Can\'t find CPU information';
|
||||
|
||||
# Print short_text, full_text
|
||||
print "${label}";
|
||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||
print "${label}";
|
||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||
|
||||
# Print color, if needed
|
||||
if ($cpu_usage >= $t_crit) {
|
||||
print "#cc241d\n";
|
||||
exit 33;
|
||||
} elsif ($cpu_usage >= $t_warn) {
|
||||
print "#d65d0e\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
DIR="${DIR:-$BLOCK_INSTANCE}"
|
||||
DIR="${DIR:-$HOME}"
|
||||
ALERT_LOW="${ALERT_LOW:-$1}"
|
||||
ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%)
|
||||
|
||||
LOCAL_FLAG="-l"
|
||||
if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then
|
||||
LOCAL_FLAG=""
|
||||
fi
|
||||
|
||||
df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW '
|
||||
/\/.*/ {
|
||||
# full text
|
||||
print label $4
|
||||
|
||||
# short text
|
||||
print label $4
|
||||
|
||||
use=$5
|
||||
|
||||
# no need to continue parsing
|
||||
exit 0
|
||||
}
|
||||
|
||||
END {
|
||||
gsub(/%$/,"",use)
|
||||
if (100 - use < alert_low) {
|
||||
# color
|
||||
print "#cc241d"
|
||||
}
|
||||
}
|
||||
'
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MAX_DESKTOPS=20
|
||||
|
||||
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
|
||||
|
||||
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
|
||||
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
|
||||
|
||||
i3-msg workspace ${EMPTY_WORKSPACE}
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
KBD=$(/usr/bin/xkblayout-state print '%s')
|
||||
echo $KBD
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
Main() {
|
||||
source /usr/share/endeavouros/scripts/eos-script-lib-yad || return 1
|
||||
|
||||
local command=(
|
||||
eos_yad --title="EndeavourOS i3-wm keybindings:" --no-buttons --geometry=500x800-15-400 --list
|
||||
--column=key: --column=description: --column=command:
|
||||
"ESC" "close this app" ""
|
||||
"=" "modkey" "(set mod Mod4)"
|
||||
"+enter" "open a terminal" ""
|
||||
"+Shift+n" "new empty workspace" ""
|
||||
"+w" "open Browser" ""
|
||||
"+n" "open Filebrowser" ""
|
||||
"+/" "open notes scratchpad" "🗒"
|
||||
"+d" "app menu" ""
|
||||
"+t" "window menu" ""
|
||||
"+c" "clipboard menu" ""
|
||||
"+q" "close focused app" ""
|
||||
"+mid mouse" "close focused app" ""
|
||||
"Print-key" "screenshot" ""
|
||||
"+Shift+e" "logout menu" ""
|
||||
"+Shift+p" "power profiles menu" ""
|
||||
"+Delete" "lock screen" ""
|
||||
"F1" "open keybinding helper" ""
|
||||
"" "" ""
|
||||
"+{1,2,etc}" "switch to workspace" ""
|
||||
"+Shift+{1,2,etc}" "move focused app to workspace" ""
|
||||
"+tab" "next workspace" ""
|
||||
"+Shift+tab" "previous workspace" ""
|
||||
"+{hjkl}" "move focus" ""
|
||||
"+a" "focus parent" ""
|
||||
"+space" "focus tiling / floating windows" ""
|
||||
"+f" "fullscreen toggle" ""
|
||||
"+Shift+space" "floating toggle" ""
|
||||
"+e" "split (tiled) layout" ""
|
||||
"+s" "stacking layout" ""
|
||||
"+g" "tabbed layout" ""
|
||||
"+-" "split next window hortizontally" ""
|
||||
"+|" "split next window vertically" ""
|
||||
"+r" "resize window (hjkl)" ""
|
||||
"+Shift+g" "resize gaps (hjkl)" ""
|
||||
"+Ctrl+g" "toggle gaps" ""
|
||||
)
|
||||
|
||||
"${command[@]}"
|
||||
}
|
||||
|
||||
Main "$@"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
# TODO: Doesn't include keybindings in i3-keybindings.conf
|
||||
I3_CONFIG=$HOME/.config/i3/config.d/keybindings.conf
|
||||
mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
|
||||
grep "^bindsym" ${I3_CONFIG} \
|
||||
| sed "s/-\(-\w\+\)\+//g;s/\$mod/${mod_key}/g;s/Mod1/Alt/g;s/exec //;s/bindsym //;s/^\s\+//;s/^\([^ ]\+\) \(.\+\)$/\2: \1/;s/^\s\+//" \
|
||||
| tr -s ' ' \
|
||||
| rofi -dmenu -theme ~/.config/rofi/rofikeyhint.rasi
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
TYPE="${BLOCK_INSTANCE:-mem}"
|
||||
|
||||
awk -v type=$TYPE '
|
||||
/^MemTotal:/ {
|
||||
mem_total=$2
|
||||
}
|
||||
/^MemFree:/ {
|
||||
mem_free=$2
|
||||
}
|
||||
/^Buffers:/ {
|
||||
mem_free+=$2
|
||||
}
|
||||
/^Cached:/ {
|
||||
mem_free+=$2
|
||||
}
|
||||
/^SwapTotal:/ {
|
||||
swap_total=$2
|
||||
}
|
||||
/^SwapFree:/ {
|
||||
swap_free=$2
|
||||
}
|
||||
END {
|
||||
if (type == "swap") {
|
||||
free=swap_free/1024/1024
|
||||
used=(swap_total-swap_free)/1024/1024
|
||||
total=swap_total/1024/1024
|
||||
} else {
|
||||
free=mem_free/1024/1024
|
||||
used=(mem_total-mem_free)/1024/1024
|
||||
total=mem_total/1024/1024
|
||||
}
|
||||
|
||||
pct=0
|
||||
if (total > 0) {
|
||||
pct=used/total*100
|
||||
}
|
||||
|
||||
# full text
|
||||
# printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct)
|
||||
|
||||
# short text
|
||||
printf("%02.f%%\n", pct)
|
||||
|
||||
# color
|
||||
if (pct > 90) {
|
||||
print("#cc241d")
|
||||
} else if (pct > 80) {
|
||||
print("#d65d0e")
|
||||
} else if (pct > 70) {
|
||||
print("#d79921")
|
||||
}
|
||||
}
|
||||
' /proc/meminfo
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MAX_DESKTOPS=20
|
||||
|
||||
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
|
||||
|
||||
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
|
||||
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
|
||||
|
||||
i3-msg move container to workspace ${EMPTY_WORKSPACE}
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||
|
||||
temps=("#0600FF" "#0500FF" "#0400FF" "#0300FF" "#0200FF" "#0100FF" "#0000FF" "#0002FF" "#0012FF" "#0022FF" "#0032FF" "#0044FF" "#0054FF" "#0064FF" "#0074FF" "#0084FF" "#0094FF" "#00A4FF" "#00B4FF" "#00C4FF" "#00D4FF" "#00E4FF" "#00FFF4" "#00FFD0" "#00FFA8" "#00FF83" "#00FF5C" "#00FF36" "#00FF10" "#17FF00" "#3EFF00" "#65FF00" "#B0FF00" "#FDFF00" "#FFF000" "#FFDC00" "#FFC800" "#FFB400" "#FFA000" "#FF8C00" "#FF7800" "#FF6400" "#FF5000" "#FF3C00" "#FF2800" "#FF1400" "#FF0000")
|
||||
|
||||
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
||||
Aborting."; exit 1; }
|
||||
command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
|
||||
Aborting."; exit 1; }
|
||||
|
||||
# To use this script you need to create an API key here https://home.openweathermap.org
|
||||
# You need to put your Open Weather APIKEY here:
|
||||
APIKEY="keykeykey"
|
||||
# And get your Latitute and Longitudes to put in here:
|
||||
LAT="XX.XXXX"
|
||||
LON="XX.XXXX"
|
||||
URL="http://api.openweathermap.org/data/2.5/onecall?lat=${LAT}&lon=${LON}&units=metric&exclude=minutely,hourly,daily&APPID=${APIKEY}"
|
||||
WEATHER_RESPONSE=$(wget -qO- "${URL}")
|
||||
|
||||
WEATHER_CONDITION=$(echo "$WEATHER_RESPONSE" | jq '.current.weather[0].main' | sed 's/"//g')
|
||||
WEATHER_TEMP=$(echo "$WEATHER_RESPONSE" | jq '.current.feels_like')
|
||||
WEATHER_INT=${WEATHER_TEMP%.*}
|
||||
|
||||
TIME_NOW=$( echo "$WEATHER_RESPONSE" | jq '.current.dt')
|
||||
SUNRISE=$( echo "$WEATHER_RESPONSE" | jq '.current.sunrise')
|
||||
SUNSET=$( echo "$WEATHER_RESPONSE" | jq '.current.sunset')
|
||||
DESCRIPTION=$( echo "$WEATHER_RESPONSE" | jq '.current.weather[0].description' | sed 's/"//g')
|
||||
WEATHER_ALERT=$( echo "$WEATHER_RESPONSE" | jq '.alerts[0].event' | sed 's/"//g')
|
||||
DAYTIME="n"
|
||||
|
||||
if [[ "$TIME_NOW" > "$SUNRISE" ]] && [[ "$TIME_NOW" < "$SUNSET" ]]; then
|
||||
DAYTIME="d"
|
||||
fi
|
||||
|
||||
case $WEATHER_CONDITION in
|
||||
'Clouds')
|
||||
if [ "$DAYTIME" == "d" ]; then
|
||||
WEATHER_ICON=""
|
||||
else
|
||||
WEATHER_ICON=""
|
||||
fi
|
||||
;;
|
||||
'Rain')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
'Drizzle')
|
||||
if [ "$DAYTIME" == "d" ]; then
|
||||
WEATHER_ICON=""
|
||||
else
|
||||
WEATHER_ICON=""
|
||||
fi
|
||||
;;
|
||||
'Thunderstorm')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
'Snow')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
'Clear')
|
||||
if [ "$DAYTIME" == "d" ]; then
|
||||
WEATHER_ICON=""
|
||||
else
|
||||
WEATHER_ICON=""
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
WEATHER_ICON="🌫"
|
||||
;;
|
||||
esac
|
||||
|
||||
WEATHER_COLOR="#FFFFFF"
|
||||
if [ "$WEATHER_INT" -lt "-11" ]; then
|
||||
WEATHER_COLOR="#0000FF"
|
||||
elif [ "$WEATHER_INT" -gt 35 ]; then
|
||||
WEATHER_COLOR="#FF0000"
|
||||
else
|
||||
WEATHER_INT=$(( WEATHER_INT + 11 ))
|
||||
WEATHER_COLOR="${temps[$WEATHER_INT]}"
|
||||
fi
|
||||
|
||||
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} "
|
||||
if [ "$WEATHER_ALERT" != "null" ]; then
|
||||
WARN_START=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].start')
|
||||
WARN_END=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].end')
|
||||
WARN_START=$(date -d @"$WARN_START" +%a_%k:%M)
|
||||
WARN_END=$(date -d @"$WARN_END" +%a_%k:%M)
|
||||
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} ${WEATHER_ALERT} from ${WARN_START} to ${WARN_END} "
|
||||
fi
|
||||
|
||||
|
||||
echo "${full_text}"
|
||||
echo "${WEATHER_TEMP}°C "
|
||||
echo "${WEATHER_COLOR}"
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
||||
Aborting."; exit 1; }
|
||||
command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
|
||||
Aborting."; exit 1; }
|
||||
|
||||
# To use this script you need to create an API key here https://home.openweathermap.org
|
||||
# You need to put your Open Weather APIKEY here:
|
||||
APIKEY="keykey"
|
||||
# find your City ID here: https://openweathermap.org/
|
||||
# search for your city and copy the ID from the URL inside the browser.
|
||||
CITY_ID="idid"
|
||||
URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&units=metric&APPID=${APIKEY}"
|
||||
|
||||
WEATHER_RESPONSE=$(wget -qO- "${URL}")
|
||||
|
||||
WEATHER_CONDITION=$(echo $WEATHER_RESPONSE | jq '.weather[0].main' | sed 's/"//g')
|
||||
WEATHER_TEMP=$(echo $WEATHER_RESPONSE | jq '.main.temp')
|
||||
WIND_DIR=$( echo "$WEATHER_RESPONSE" | jq '.wind.deg')
|
||||
WIND_SPEED=$( echo "$WEATHER_RESPONSE" | jq '.wind.speed')
|
||||
|
||||
WIND_SPEED=$(awk "BEGIN {print 60*60*$WIND_SPEED/1000}")
|
||||
WIND_DIR=$(awk "BEGIN {print int(($WIND_DIR % 360)/22.5)}")
|
||||
DIR_ARRAY=( N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW N )
|
||||
WIND_DIR=${DIR_ARRAY[WIND_DIR]}
|
||||
|
||||
case $WEATHER_CONDITION in
|
||||
'Clouds')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
'Rain')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
'Snow')
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
*)
|
||||
WEATHER_ICON=""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${WEATHER_ICON} ${WEATHER_TEMP}°C: ${WIND_SPEED} km/h ${WIND_DIR}"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
# Weather
|
||||
[Weather]
|
||||
command=~/.config/i3/scripts/openweather
|
||||
interval=1800
|
||||
color=#7275b3
|
||||
Executable
+204
@@ -0,0 +1,204 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use rofi/zenity to change system runstate thanks to systemd.
|
||||
#
|
||||
# Note: this currently relies on associative array support in the shell.
|
||||
#
|
||||
# Inspired from i3pystatus wiki:
|
||||
# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
|
||||
#
|
||||
# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# power-profiles-daemon implementation:
|
||||
# needs package power-profiles-daemon installed and the service running see here:
|
||||
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||
# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/ppd-status
|
||||
|
||||
|
||||
#######################################################################
|
||||
# BEGIN CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Use a custom lock script
|
||||
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||
|
||||
# Colors: FG (foreground), BG (background), HL (highlighted)
|
||||
FG_COLOR="#bbbbbb"
|
||||
BG_COLOR="#111111"
|
||||
HLFG_COLOR="#111111"
|
||||
HLBG_COLOR="#bbbbbb"
|
||||
BORDER_COLOR="#222222"
|
||||
|
||||
# Options not related to colors
|
||||
#ROFI_TEXT=":"
|
||||
#ROFI_OPTIONS=(-width -11 -location 0 -hide-scrollbar -bw 30 -color-window "#dd310027,#dd0310027,#dd310027" -padding 5)
|
||||
#ROFI_OPTIONS=(-width -18 -location 4 -hide-scrollbar -color-window "#cc310027,#00a0009a,#cc310027" -padding 5 -font "Sourcecode Pro Regular 10, FontAwesome 9")
|
||||
ROFI_OPTIONS=(-theme ~/.config/rofi/power-profiles.rasi)
|
||||
# Zenity options
|
||||
ZENITY_TITLE="Power Profiles"
|
||||
ZENITY_TEXT="Set Profiles:"
|
||||
ZENITY_OPTIONS=(--column= --hide-header)
|
||||
|
||||
#######################################################################
|
||||
# END CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Whether to ask for user's confirmation
|
||||
enable_confirmation=false
|
||||
|
||||
# Preferred launcher if both are available
|
||||
preferred_launcher="rofi"
|
||||
|
||||
usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-c ask for user confirmation
|
||||
-p preferred launcher (rofi or zenity)
|
||||
|
||||
This script depends on:
|
||||
- systemd,
|
||||
- i3,
|
||||
- rofi or zenity."
|
||||
|
||||
# Check whether the user-defined launcher is valid
|
||||
launcher_list=(rofi zenity)
|
||||
function check_launcher() {
|
||||
if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
|
||||
echo "Supported launchers: ${launcher_list[*]}"
|
||||
exit 1
|
||||
else
|
||||
# Get array with unique elements and preferred launcher first
|
||||
# Note: uniq expects a sorted list, so we cannot use it
|
||||
i=1
|
||||
launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
|
||||
| sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse CLI arguments
|
||||
while getopts "hcp:" option; do
|
||||
case "${option}" in
|
||||
h) echo "${usage}"
|
||||
exit 0
|
||||
;;
|
||||
c) enable_confirmation=true
|
||||
;;
|
||||
p) preferred_launcher="${OPTARG}"
|
||||
check_launcher "${preferred_launcher}"
|
||||
;;
|
||||
*) exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check whether a command exists
|
||||
function command_exists() {
|
||||
command -v "$1" &> /dev/null 2>&1
|
||||
}
|
||||
|
||||
# systemctl required
|
||||
if ! command_exists systemctl ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# default_menu_options defined as an associative array
|
||||
typeset -A default_menu_options
|
||||
|
||||
# The default options with keys/commands
|
||||
|
||||
default_menu_options=(
|
||||
[ Performance]="powerprofilesctl set performance"
|
||||
[ Balanced]="powerprofilesctl set balanced"
|
||||
[ Power Saver]="powerprofilesctl set power-saver"
|
||||
[ Cancel]=""
|
||||
)
|
||||
|
||||
# The menu that will be displayed
|
||||
typeset -A menu
|
||||
menu=()
|
||||
|
||||
# Only add power profiles that are available to menu
|
||||
for key in "${!default_menu_options[@]}"; do
|
||||
grep_arg=${default_menu_options[${key}]##* }
|
||||
if powerprofilesctl list | grep -q "$grep_arg"; then
|
||||
menu[${key}]=${default_menu_options[${key}]}
|
||||
fi
|
||||
done
|
||||
unset grep_arg
|
||||
unset default_menu_options
|
||||
|
||||
menu_nrows=${#menu[@]}
|
||||
|
||||
# Menu entries that may trigger a confirmation message
|
||||
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||
|
||||
launcher_exe=""
|
||||
launcher_options=""
|
||||
rofi_colors=""
|
||||
|
||||
function prepare_launcher() {
|
||||
if [[ "$1" == "rofi" ]]; then
|
||||
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
|
||||
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
|
||||
launcher_exe="rofi"
|
||||
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
elif [[ "$1" == "zenity" ]]; then
|
||||
launcher_exe="zenity"
|
||||
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
|
||||
"${ZENITY_OPTIONS[@]}")
|
||||
fi
|
||||
}
|
||||
|
||||
for l in "${launcher_list[@]}"; do
|
||||
if command_exists "${l}" ; then
|
||||
prepare_launcher "${l}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# No launcher available
|
||||
if [[ -z "${launcher_exe}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
launcher=(${launcher_exe} "${launcher_options[@]}")
|
||||
selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
|
||||
|
||||
function ask_confirmation() {
|
||||
if [ "${launcher_exe}" == "rofi" ]; then
|
||||
confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
[ "${confirmed}" == "Yes" ] && confirmed=0
|
||||
elif [ "${launcher_exe}" == "zenity" ]; then
|
||||
zenity --question --text "Are you sure you want to ${selection,,}?"
|
||||
confirmed=$?
|
||||
fi
|
||||
|
||||
if [ "${confirmed}" == 0 ]; then
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $? -eq 0 && ! -z ${selection} ]]; then
|
||||
if [[ "${enable_confirmation}" = true && \
|
||||
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
|
||||
ask_confirmation
|
||||
else
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
fi
|
||||
Executable
+186
@@ -0,0 +1,186 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use rofi/zenity to change system runstate thanks to systemd.
|
||||
#
|
||||
# Note: this currently relies on associative array support in the shell.
|
||||
#
|
||||
# Inspired from i3pystatus wiki:
|
||||
# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
|
||||
#
|
||||
# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# modified to work with latest rofi update by joekamprad <joekamprad@endeavouros.com>
|
||||
|
||||
#######################################################################
|
||||
# BEGIN CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Use a custom lock script
|
||||
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||
|
||||
# Colors: FG (foreground), BG (background), HL (highlighted)
|
||||
FG_COLOR="#bbbbbb"
|
||||
BG_COLOR="#111111"
|
||||
HLFG_COLOR="#111111"
|
||||
HLBG_COLOR="#bbbbbb"
|
||||
BORDER_COLOR="#222222"
|
||||
|
||||
# Options not related to colors (most rofi options do not work anymore)
|
||||
ROFI_OPTIONS=(-theme ~/.config/rofi/powermenu.rasi)
|
||||
# Zenity options
|
||||
ZENITY_TITLE="Power Menu"
|
||||
ZENITY_TEXT="Action:"
|
||||
ZENITY_OPTIONS=(--column= --hide-header)
|
||||
|
||||
#######################################################################
|
||||
# END CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Whether to ask for user's confirmation
|
||||
enable_confirmation=false
|
||||
|
||||
# Preferred launcher if both are available
|
||||
preferred_launcher="rofi"
|
||||
|
||||
usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-c ask for user confirmation
|
||||
-p preferred launcher (rofi or zenity)
|
||||
|
||||
This script depends on:
|
||||
- systemd,
|
||||
- i3,
|
||||
- rofi or zenity."
|
||||
|
||||
# Check whether the user-defined launcher is valid
|
||||
launcher_list=(rofi zenity)
|
||||
function check_launcher() {
|
||||
if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
|
||||
echo "Supported launchers: ${launcher_list[*]}"
|
||||
exit 1
|
||||
else
|
||||
# Get array with unique elements and preferred launcher first
|
||||
# Note: uniq expects a sorted list, so we cannot use it
|
||||
i=1
|
||||
launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
|
||||
| sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse CLI arguments
|
||||
while getopts "hcp:" option; do
|
||||
case "${option}" in
|
||||
h) echo "${usage}"
|
||||
exit 0
|
||||
;;
|
||||
c) enable_confirmation=true
|
||||
;;
|
||||
p) preferred_launcher="${OPTARG}"
|
||||
check_launcher "${preferred_launcher}"
|
||||
;;
|
||||
*) exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check whether a command exists
|
||||
function command_exists() {
|
||||
command -v "$1" &> /dev/null 2>&1
|
||||
}
|
||||
|
||||
# systemctl required
|
||||
if ! command_exists systemctl ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# menu defined as an associative array
|
||||
typeset -A menu
|
||||
|
||||
# Menu with keys/commands
|
||||
|
||||
menu=(
|
||||
[ Shutdown]="systemctl poweroff"
|
||||
[ Reboot]="systemctl reboot"
|
||||
[ Suspend]="systemctl suspend"
|
||||
[ Hibernate]="systemctl hibernate"
|
||||
[ Lock]="~/.config/i3/scripts/blur-lock"
|
||||
[ Logout]="i3-msg exit"
|
||||
[ Cancel]=""
|
||||
)
|
||||
|
||||
menu_nrows=${#menu[@]}
|
||||
|
||||
# Menu entries that may trigger a confirmation message
|
||||
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||
|
||||
launcher_exe=""
|
||||
launcher_options=""
|
||||
rofi_colors=""
|
||||
|
||||
function prepare_launcher() {
|
||||
if [[ "$1" == "rofi" ]]; then
|
||||
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
|
||||
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
|
||||
launcher_exe="rofi"
|
||||
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
elif [[ "$1" == "zenity" ]]; then
|
||||
launcher_exe="zenity"
|
||||
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
|
||||
"${ZENITY_OPTIONS[@]}")
|
||||
fi
|
||||
}
|
||||
|
||||
for l in "${launcher_list[@]}"; do
|
||||
if command_exists "${l}" ; then
|
||||
prepare_launcher "${l}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# No launcher available
|
||||
if [[ -z "${launcher_exe}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
launcher=(${launcher_exe} "${launcher_options[@]}")
|
||||
selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
|
||||
|
||||
function ask_confirmation() {
|
||||
if [ "${launcher_exe}" == "rofi" ]; then
|
||||
confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
[ "${confirmed}" == "Yes" ] && confirmed=0
|
||||
elif [ "${launcher_exe}" == "zenity" ]; then
|
||||
zenity --question --text "Are you sure you want to ${selection,,}?"
|
||||
confirmed=$?
|
||||
fi
|
||||
|
||||
if [ "${confirmed}" == 0 ]; then
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $? -eq 0 && ! -z ${selection} ]]; then
|
||||
if [[ "${enable_confirmation}" = true && \
|
||||
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
|
||||
ask_confirmation
|
||||
else
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
fi
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# power-profiles-daemon implementation:
|
||||
# needs package power-profiles-daemon installed and the service running see here:
|
||||
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
||||
# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/power-profiles
|
||||
|
||||
# script to show current power profile
|
||||
|
||||
current_profile=$(/usr/bin/powerprofilesctl get)
|
||||
echo "$current_profile"
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
|
||||
binmode(STDOUT, ":utf8");
|
||||
|
||||
# default values
|
||||
my $t_warn = $ENV{T_WARN} || 70;
|
||||
my $t_crit = $ENV{T_CRIT} || 90;
|
||||
my $chip = $ENV{SENSOR_CHIP} || "";
|
||||
my $temperature = -9999;
|
||||
my $label = "😀 ";
|
||||
|
||||
sub help {
|
||||
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
|
||||
print "-w <percent>: warning threshold to become yellow\n";
|
||||
print "-c <percent>: critical threshold to become red\n";
|
||||
print "--chip <chip>: sensor chip\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
GetOptions("help|h" => \&help,
|
||||
"w=i" => \$t_warn,
|
||||
"c=i" => \$t_crit,
|
||||
"chip=s" => \$chip);
|
||||
|
||||
# Get chip temperature
|
||||
open (SENSORS, "sensors -u $chip |") or die;
|
||||
while (<SENSORS>) {
|
||||
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
|
||||
$temperature = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(SENSORS);
|
||||
|
||||
$temperature eq -9999 and die 'Cannot find temperature';
|
||||
|
||||
if ($temperature < 45) {
|
||||
$label = '';
|
||||
} elsif ($temperature < 55) {
|
||||
$label = '';
|
||||
} elsif ($temperature < 65) {
|
||||
$label = '';
|
||||
} elsif ($temperature < 75) {
|
||||
$label = '';
|
||||
} else {
|
||||
$label = '';
|
||||
}
|
||||
# Print short_text, full_text
|
||||
print "${label}";
|
||||
print " $temperature°C\n";
|
||||
print "${label}";
|
||||
print " $temperature°C\n";
|
||||
|
||||
# Print color, if needed
|
||||
if ($temperature >= $t_crit) {
|
||||
print "#cc241d\n";
|
||||
exit 33;
|
||||
} elsif ($temperature >= $t_warn) {
|
||||
print "#d65d0e\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# original source: https://github.com/vivien/i3blocks-contrib/tree/master/volume
|
||||
# check the readme: https://github.com/vivien/i3blocks-contrib/blob/master/volume/README.md
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# The second parameter overrides the mixer selection
|
||||
# For PulseAudio users, eventually use "pulse"
|
||||
# For Jack/Jack2 users, use "jackplug"
|
||||
# For ALSA users, you may use "default" for your primary card
|
||||
# or you may use hw:# where # is the number of the card desired
|
||||
if [[ -z "$MIXER" ]] ; then
|
||||
MIXER="default"
|
||||
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
|
||||
# pulseaudio is running, but not all installations use "pulse"
|
||||
if amixer -D pulse info >/dev/null 2>&1 ; then
|
||||
MIXER="pulse"
|
||||
fi
|
||||
fi
|
||||
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
||||
MIXER="${2:-$MIXER}"
|
||||
fi
|
||||
|
||||
# The instance option sets the control to report and configure
|
||||
# This defaults to the first control of your selected mixer
|
||||
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
||||
if [[ -z "$SCONTROL" ]] ; then
|
||||
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
|
||||
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
|
||||
head -n1
|
||||
)}"
|
||||
fi
|
||||
|
||||
# The first parameter sets the step to change the volume by (and units to display)
|
||||
# This may be in in % or dB (eg. 5% or 3dB)
|
||||
if [[ -z "$STEP" ]] ; then
|
||||
STEP="${1:-5%}"
|
||||
fi
|
||||
|
||||
# AMIXER(1):
|
||||
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
|
||||
# more natural for human ear."
|
||||
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
|
||||
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
|
||||
AMIXER_PARAMS="-M"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
capability() { # Return "Capture" if the device is a capture device
|
||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
|
||||
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
|
||||
}
|
||||
|
||||
volume() {
|
||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
|
||||
}
|
||||
|
||||
format() {
|
||||
|
||||
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
|
||||
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
|
||||
# If dB was selected, print that instead
|
||||
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
|
||||
perl_filter+='"; exit}'
|
||||
output=$(perl -ne "$perl_filter")
|
||||
echo "$LABEL$output"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
|
||||
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
|
||||
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
|
||||
esac
|
||||
|
||||
volume | format
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
# original source: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||
|
||||
# taken from here: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||
|
||||
# See README.md for usage instructions
|
||||
bar_color="#7f7fff"
|
||||
volume_step=1
|
||||
brightness_step=2.5
|
||||
max_volume=100
|
||||
|
||||
# Uses regex to get volume from pactl
|
||||
function get_volume {
|
||||
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
|
||||
}
|
||||
|
||||
# Uses regex to get mute status from pactl
|
||||
function get_mute {
|
||||
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
|
||||
}
|
||||
|
||||
# Uses regex to get brightness from xbacklight
|
||||
function get_brightness {
|
||||
xbacklight | grep -Po '[0-9]{1,3}' | head -n 1
|
||||
}
|
||||
|
||||
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
|
||||
function get_volume_icon {
|
||||
volume=$(get_volume)
|
||||
mute=$(get_mute)
|
||||
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then
|
||||
volume_icon=""
|
||||
elif [ "$volume" -lt 50 ]; then
|
||||
volume_icon=""
|
||||
else
|
||||
volume_icon=""
|
||||
fi
|
||||
}
|
||||
|
||||
# Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome
|
||||
function get_brightness_icon {
|
||||
brightness_icon=""
|
||||
}
|
||||
|
||||
# Displays a volume notification using dunstify
|
||||
function show_volume_notif {
|
||||
volume=$(get_mute)
|
||||
get_volume_icon
|
||||
dunstify -i audio-volume-muted-blocking -t 1000 -r 2593 -u normal "$volume_icon $volume%" -h int:value:$volume -h string:hlcolor:$bar_color
|
||||
}
|
||||
|
||||
# Displays a brightness notification using dunstify
|
||||
function show_brightness_notif {
|
||||
brightness=$(get_brightness)
|
||||
get_brightness_icon
|
||||
dunstify -t 1000 -r 2593 -u normal "$brightness_icon $brightness%" -h int:value:$brightness -h string:hlcolor:$bar_color
|
||||
}
|
||||
|
||||
# Main function - Takes user input, "volume_up", "volume_down", "brightness_up", or "brightness_down"
|
||||
case $1 in
|
||||
volume_up)
|
||||
# Unmutes and increases volume, then displays the notification
|
||||
pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||
volume=$(get_volume)
|
||||
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
|
||||
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
|
||||
else
|
||||
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
|
||||
fi
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
volume_down)
|
||||
# Raises volume and displays the notification
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
volume_mute)
|
||||
# Toggles mute and displays the notification
|
||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
brightness_up)
|
||||
# Increases brightness and displays the notification
|
||||
xbacklight -inc $brightness_step -time 0
|
||||
show_brightness_notif
|
||||
;;
|
||||
|
||||
brightness_down)
|
||||
# Decreases brightness and displays the notification
|
||||
xbacklight -dec $brightness_step -time 0
|
||||
show_brightness_notif
|
||||
;;
|
||||
esac
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2021 Andreas Lindlbauer
|
||||
# Licensed under the terms of EUPLv1.2.
|
||||
#
|
||||
# i3blocks blocklet script to monitor the (nord)vpn connection
|
||||
|
||||
vpnstatus="📢"
|
||||
nordvpn_output=$(nordvpn status | cat -v | head -1 | sed -e 's/\^M-^M ^M//g' )
|
||||
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
||||
vpnstatus="🥸"
|
||||
elif [ "${nordvpn_output}" = "A new version of NordVPN is available! Please update the application." ]; then
|
||||
nordvpn_output=$(nordvpn status | cat -v | head -2 | tail -1 | sed -e 's/\^M-^M ^M//g' )
|
||||
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
||||
vpnstatus="🥴"
|
||||
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
||||
vpnstatus="📢"
|
||||
fi
|
||||
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
||||
vpnstatus="📢"
|
||||
elif [[ "$nordvpn_output" == *\/* ]] || [[ "$nordvpn_output" == *\\* ]]; then
|
||||
vpnstatus="Something's very wrong"
|
||||
fi
|
||||
|
||||
echo "$vpnstatus"
|
||||
@@ -1,64 +0,0 @@
|
||||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
color_good = "#00FFFF"
|
||||
color_degraded = "#FF9933"
|
||||
color_bad = "#FF5050"
|
||||
output_format = i3bar
|
||||
interval = 1
|
||||
}
|
||||
|
||||
order += "disk /"
|
||||
order += "ethernet _first_"
|
||||
#order += "battery 0"
|
||||
order += "cpu_usage"
|
||||
order += "load"
|
||||
order += "volume master"
|
||||
order += "tztime local"
|
||||
|
||||
ethernet _first_ {
|
||||
# if you use %speed, i3status requires root privileges
|
||||
format_up = "E: %ip (%speed)"
|
||||
format_down = "E: down"
|
||||
}
|
||||
|
||||
# battery 0 {
|
||||
# format = "%status %percentage %remaining"
|
||||
# format_down = "No battery"
|
||||
# status_chr = '⚇ Charge'
|
||||
# status_bat = '⚡ Battery'
|
||||
# status_full = '☻ Full'
|
||||
# low_threshold = 30
|
||||
# threshold_type = "percentage"
|
||||
# }
|
||||
|
||||
volume master {
|
||||
format = "♪: %volume"
|
||||
format_muted = "♪: muted (%volume)"
|
||||
device = "default"
|
||||
mixer = "Master"
|
||||
mixer_idx = 0
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%m-%d-%Y %l:%M:%S"
|
||||
}
|
||||
|
||||
cpu_usage {
|
||||
format = "CPU: %usage"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "Load: %1min"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "Used %used/%total (%percentage_used)"
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
|
||||
" the same commands as the original .vimrc configuration.
|
||||
" You can find a list of commands here: https://jb.gg/h38q75
|
||||
" Find more examples here: https://jb.gg/share-ideavimrc
|
||||
|
||||
|
||||
"" -- Suggested options --
|
||||
" Show a few lines of context around the cursor. Note that this makes the
|
||||
" text scroll if you mouse-click near the start or end of the window.
|
||||
set scrolloff=5
|
||||
|
||||
" Do incremental searching.
|
||||
set incsearch
|
||||
|
||||
" Don't use Ex mode, use Q for formatting.
|
||||
map Q gq
|
||||
|
||||
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
|
||||
|
||||
" Highlight copied text
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
" Commentary plugin
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
|
||||
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
|
||||
"" Map \r to the Reformat Code action
|
||||
"map \r <Action>(ReformatCode)
|
||||
|
||||
"" Map <leader>d to start debug
|
||||
"map <leader>d <Action>(Debug)
|
||||
|
||||
"" Map \b to toggle the breakpoint on the current line
|
||||
"map \b <Action>(ToggleLineBreakpoint)
|
||||
|
||||
inoremap ,, <ESC>
|
||||
cnoremap ,, <ESC><ESC>
|
||||
nmap j gj
|
||||
nmap k gk
|
||||
" Only set on first run or it overwrites YCM behavior
|
||||
" if has('vim_starting')
|
||||
" imap <tab> <C-X><C-O>
|
||||
" endif
|
||||
let mapleader=","
|
||||
let maplocalleader="\\"
|
||||
|
||||
" Close buffer
|
||||
map <leader><leader>c :Bclose<CR>
|
||||
" Prev/next buffer
|
||||
map <leader>q :bp<CR>
|
||||
map <leader>w :bn<CR>
|
||||
|
||||
" System clipboard cut copy paste
|
||||
map <leader>y "+y
|
||||
map <leader>Y "+Y
|
||||
map <leader>p "+p
|
||||
map <leader>P "+P
|
||||
map <leader>x "+x
|
||||
map <leader>dd "+dd
|
||||
|
||||
" Update ideavimrc
|
||||
nnoremap <leader>v :e ~/.ideavimrc<CR>;
|
||||
nnoremap <leader>rr :action IdeaVim.ReloadVimRc.reload<CR>;
|
||||
@@ -0,0 +1,7 @@
|
||||
# Example / default config at /etc/libinput-gestures.conf
|
||||
gesture swipe up xdotool key super+f
|
||||
gesture swipe down xdotool key super+N
|
||||
gesture swipe left xdotool key super+shift+Tab
|
||||
gesture swipe right xdotool key super+Tab
|
||||
gesture pinch in xdotool key super+t
|
||||
gesture pinch out xdotool key super+d
|
||||
@@ -0,0 +1,4 @@
|
||||
NO_NEOFETCH=1
|
||||
NO_GIT_CHECK=1
|
||||
NO_ZSH_COWSAY=1
|
||||
LOAD_SSH_KEYS=0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user