1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00

added pre-commit

This commit is contained in:
eoli3n 2022-10-30 01:22:54 +02:00
parent 80a9cc85cf
commit ef93c0ccd7
3 changed files with 22 additions and 31 deletions

19
.pre-commit-config.yaml Normal file

@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.2.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: ansible-syntax-check
name: Ansible syntax check
entry: "ansible-playbook --syntax-check install.yml"
pass_filenames: no
types_or: [yaml, jinja]
language: system

@ -1,28 +0,0 @@
#!/usr/bin/env bash
action=$(echo -e "suspend\nlock\nlogout\nshutdown\nreboot" | wofi -d -p "power:" -L 5)
if [[ "$action" == "lock" ]]
then
swaylock-fancy
fi
if [[ "$action" == "suspend" ]]
then
swaylock-fancy && systemctl suspend && echo '*/reconnect' >~/.weechat/weechat_fifo
fi
if [[ "$action" == "logout" ]]
then
swaymsg exit
fi
if [[ "$action" == "shutdown" ]]
then
shutdown now
fi
if [[ "$action" == "reboot" ]]
then
reboot
fi

@ -15,7 +15,7 @@
dest: ~/.config/wofi/ dest: ~/.config/wofi/
- name: copy wofi powermenu - name: copy wofi powermenu
copy: template:
src: powermenu.sh src: powermenu.sh.j2
dest: ~/.config/wofi/ dest: ~/.config/wofi/powermenu.sh
mode: 0755 mode: 0755