Skip to content

Commit

Permalink
add checkfiles with pre-commit-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pad92 committed Jul 6, 2022
1 parent 921a0c5 commit dc02a36
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 57 deletions.
62 changes: 30 additions & 32 deletions .config/picom.conf
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,16 @@ detect-client-leader = true;
#
#################################

wintypes :
wintypes :
{
tooltip :
tooltip :
{
fade = true;
shadow = false;
opacity = 0.85;
focus = true;
};
fullscreen :
fullscreen :
{
fade = true;
shadow = false;
Expand All @@ -234,35 +234,33 @@ wintypes :
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

#opacity-rule = [
#"99:name *?= 'Call'",
#"99:class_g = 'Chromium'",
#"99:name *?= 'Conky'",
#"99:class_g = 'Darktable'",
#"50:class_g = 'Dmenu'",
#"99:name *?= 'Event'",
#"99:class_g = 'Firefox'",
#"99:class_g = 'GIMP'",
#opacity-rule = [
#"99:name *?= 'Call'",
#"99:class_g = 'Chromium'",
#"99:name *?= 'Conky'",
#"99:class_g = 'Darktable'",
#"50:class_g = 'Dmenu'",
#"99:name *?= 'Event'",
#"99:class_g = 'Firefox'",
#"99:class_g = 'GIMP'",
#"99:name *?= 'Image'",
#"99:class_g = 'Lazpaint'",
#"99:class_g = 'Midori'",
#"99:name *?= 'Minitube'",
#"99:class_g = 'Lazpaint'",
#"99:class_g = 'Midori'",
#"99:name *?= 'Minitube'",
#"99:class_g = 'Mousepad'",
#"99:name *?= 'MuseScore'",
#"90:name *?= 'Page Info'",
#"99:name *?= 'Pale Moon'",
#"90:name *?= 'Panel'",
#"99:class_g = 'Pinta'",
#"90:name *?= 'Restart'",
#"99:name *?= 'sudo'",
#"99:name *?= 'Screenshot'",
#"99:class_g = 'Viewnior'",
#"99:class_g = 'VirtualBox'",
#"99:name *?= 'VLC'",
#"99:name *?= 'Write'",
#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
#"99:name *?= 'MuseScore'",
#"90:name *?= 'Page Info'",
#"99:name *?= 'Pale Moon'",
#"90:name *?= 'Panel'",
#"99:class_g = 'Pinta'",
#"90:name *?= 'Restart'",
#"99:name *?= 'sudo'",
#"99:name *?= 'Screenshot'",
#"99:class_g = 'Viewnior'",
#"99:class_g = 'VirtualBox'",
#"99:name *?= 'VLC'",
#"99:name *?= 'Write'",
#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
#];


2 changes: 1 addition & 1 deletion .config/sway/config.d/20_inputs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ input * {
input "1739:30383:DELL07E6:00_06CB:76AF_Touchpad" {
tap enabled
natural_scroll enabled
}
}
1 change: 0 additions & 1 deletion .config/sway/config.d/50_workspace.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8

1 change: 0 additions & 1 deletion .config/sway/scripts/autoname-workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,3 @@ def window_event_handler(ipc, e):
rename_workspaces(ipc)

ipc.main()

14 changes: 7 additions & 7 deletions .config/sway/scripts/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def lock(blur_radius=15, scale=1, lock_img="", swaylock_args=""):
swaylock = ["swaylock"]
for i,(o, (w,h), (x,y)) in enumerate(get_outputs()):
screenshot_path = "/tmp/swaylock-python%d.png" % i

im = make_screenshot(screenshot_path, (x,y), (w,h), scale)
im = im.filter(ImageFilter.GaussianBlur(blur_radius))

Expand All @@ -47,7 +47,7 @@ def lock(blur_radius=15, scale=1, lock_img="", swaylock_args=""):
lock_im = lock_im.resize((lw, lh))
lock_box = (int(w * scale) - lw) // 2, (int(h * scale) - lh) // 2
im.paste(lock_im, box=lock_box, mask=lock_im)

im.save(screenshot_path)

swaylock.extend(["-i", "%s:%s" % (o, screenshot_path)])
Expand All @@ -60,17 +60,17 @@ def lock(blur_radius=15, scale=1, lock_img="", swaylock_args=""):
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Fancy screen locking for sway.')
parser.add_argument('-r', '--radius', type=int, default=15,
parser.add_argument('-r', '--radius', type=int, default=15,
help='Blur radius of the Gaussian filter in px.')
parser.add_argument('-s', '--scale', type=float, default=1,
help='Screenshot scale.'),
parser.add_argument('-l', '--lock-image', type=str,
parser.add_argument('-l', '--lock-image', type=str,
help='Image to be displayed in the center of each output.')
parser.add_argument('--swaylock-args', type=str,
parser.add_argument('--swaylock-args', type=str,
help='Additional arguments that are passed to swaylock.')
args = parser.parse_args()

lock(lock_img=args.lock_image,
blur_radius=args.radius,
lock(lock_img=args.lock_image,
blur_radius=args.radius,
scale=args.scale,
swaylock_args=args.swaylock_args)
Empty file modified .gitconfig
100755 → 100644
Empty file.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: check-json
- id: check-xml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
2 changes: 1 addition & 1 deletion dist/backup_excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,4 @@ go/pkg/mod/cache
.ICAClient/cache/zlcache

# Geany IDE - socket file
.config/geany/geany_socket_*
.config/geany/geany_socket_*
1 change: 0 additions & 1 deletion dist/ubuntu/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ git clone \
fc-cache -f -v "$FONT_HOME/adobe-fonts/source-code-pro"

wget -qO /tmp/1password.deb https://downloads.1password.com/linux/debian/amd64/stable/1password-latest.deb && sudo dpkg -i /tmp/1password.deb && rm /tmp/1password.deb

2 changes: 0 additions & 2 deletions zsh/completions/_extract
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
"*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0


7 changes: 3 additions & 4 deletions zsh/completions/_socat
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (( ! $+_socat_params || ! $+_socat_groups )); then

if _cache_invalid socat-params || _cache_invalid socat-groups \
|| ! _retrieve_cache socat-params || ! _retrieve_cache socat-groups ; then
() {
() {
setopt localoptions rematchpcre
local line

Expand Down Expand Up @@ -70,7 +70,7 @@ fi

if (( ! $+_socat_param_handler )); then
typeset -gHA _socat_param_handler
# bunch of manually extracted parameter handlers. names work as both
# bunch of manually extracted parameter handlers. names work as both
_socat_param_handler=(
create _files
gopen _files
Expand Down Expand Up @@ -149,7 +149,7 @@ _socat_address_head() {

if compset -P '*,'; then
lastop=','
elif (( $#params_left == 0 )); then
elif (( $#params_left == 0 )); then
_message -e parameters "No more parameters for $socket_type" && return 0
else
# do we have a handler? this works either by typename or socket type
Expand Down Expand Up @@ -230,4 +230,3 @@ _arguments \
'(-6)'-4'[prefer IPv4 if version is not explicitly specified]' \
'(-4)'-6'[prefer IPv6 if version is not explicitly specified]' \
'*:socket:_socat_address_head' && return 0

2 changes: 1 addition & 1 deletion zsh/functions/http_checks.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ http_check_d3() {
}

http_check_android () {
curl -s https://developers.google.com/android/nexus/images | sed -e 's/<[^>]*>//g' | grep -B2 \"Android \" | sed -e 's/^[ \t]*//' | sed '/^$/d'
curl -s https://developers.google.com/android/nexus/images | sed -e 's/<[^>]*>//g' | grep -B2 \"Android \" | sed -e 's/^[ \t]*//' | sed '/^$/d'
}

http_check () {
Expand Down
4 changes: 2 additions & 2 deletions zsh/functions/rambox.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ rambox_update(){
rambox_LATEST=$(curl -Ls https://api.github.com/repos/saenzramiro/rambox/releases/latest)
rambox_LATEST_VERSION=$(echo -e ${rambox_LATEST} | grep -m 1 '"name"' | cut -d '"' -f 4)
rambox_RPM=$(echo -e ${rambox_LATEST} | grep -E 'browser_download_url(.*)\.rpm' | cut -d '"' -f 4 | grep x86_64)
rambox_DEB=$(echo -e ${rambox_LATEST} | grep -E 'browser_download_url(.*)\.deb' | cut -d '"' -f 4 | grep amd64)
rambox_DEB=$(echo -e ${rambox_LATEST} | grep -E 'browser_download_url(.*)\.deb' | cut -d '"' -f 4 | grep amd64)

if [ "${rambox_LATEST_VERSION}" != "${rambox_CURRENT}" ]; then
echo "upgrade rambox ${rambox_CURRENT} to ${rambox_LATEST_VERSION}"

case ${ID} in
fedora|centos)
fedora|centos)
pkill rambox
if [[ $UID == 0 || $EUID == 0 ]]; then
dnf -y install --nogpgcheck ${rambox_RPM}
Expand Down
2 changes: 1 addition & 1 deletion zsh/init/termsupport.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function set-title-by-command() {
cmd="${cmd[1,15]}..."
fi


for kind in window tab screen; do
set-${kind}-title "${USER}@${HOST}: $cmd"
done
Expand Down
2 changes: 1 addition & 1 deletion zsh/plugins/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ plugins=(... ansible)

## Maintainer

### [Deepankumar](https://github.com/deepan10)
### [Deepankumar](https://github.com/deepan10)

[https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin](https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin)
1 change: 0 additions & 1 deletion zsh/plugins/github/github.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ git.io() {
}

# End Functions #############################################################

2 changes: 1 addition & 1 deletion zsh/plugins/httpie/httpie.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ function _httpie_completion() {
'*: :->args' && ret=0
}

compdef _httpie_completion http
compdef _httpie_completion http

0 comments on commit dc02a36

Please sign in to comment.