Skip to content

Commit

Permalink
Improve linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Oct 23, 2023
1 parent 63b8d13 commit 527825f
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 43 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ansible-linting-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: 'checkout git repo'
- name: Checkout git repo
uses: actions/checkout@v4
with:
lfs: true
submodules: false
submodules: true
fetch-depth: 0

- name: 'Lint Ansible Playbook'
uses: ansible/ansible-lint-action@v6
- name: Run ansible-lint
uses: ansible-actions/ansible-lint-action@v1.0.2
with:
path: "."
target: "./"
16 changes: 9 additions & 7 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
---
name: Galaxy release
name: Galaxy-NG Roles Import

# yamllint disable-line rule:truthy
on:
push:
branches: ['main']
release:
types: ['created']

jobs:
build:
name: Galaxy Role Importer
runs-on: ubuntu-latest

steps:
- name: 'checkout git repo'
- name: 'Checkout git repo'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: 'release on galaxy'
uses: robertdebock/galaxy-action@1.2.1
- name: 'Release on galaxy'
uses: ansible-actions/ansible-galaxy-action@v1.0.1
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: 'main'
22 changes: 22 additions & 0 deletions .github/workflows/j2lint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Jinja2 Linting check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
build:
name: Jinja2 Linting
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Run j2lint
uses: ansible-actions/j2lint-action@v0.0.1
with:
target: "./"
22 changes: 22 additions & 0 deletions .github/workflows/yamllint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Yamllint check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
build:
name: Yamllint
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Run yamllint
uses: ansible-actions/yamllint-action@v0.0.1
with:
target: "./"
23 changes: 0 additions & 23 deletions .github/workflows/yamllint.yaml

This file was deleted.

19 changes: 12 additions & 7 deletions templates/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set $term {{ i3_terminal }}
# 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 {{ i3_font_size }}
focus_follows_mouse {% if i3_focus_follows_mouse | bool %}yes{% else %}no{% endif %}
focus_follows_mouse {{ i3_focus_follows_mouse | tenary('yes', 'no' ) }}

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
Expand All @@ -27,7 +27,7 @@ bindsym $mod+Shift+q kill
{% if ansible_distribution == 'Redhat' or ansible_distribution == 'CentOS' %}
# bindsym $mod+d exec dmenu_run (a program launcher)
bindsym $mod+d exec dmenu_run
{%- else -%}
{% else %}
bindsym $mod+d exec rofi -show run
# bindsym $mod+d exec rofi (a program launcher)
bindsym $mod+Shift+d exec rofi -show drun
Expand Down Expand Up @@ -114,9 +114,9 @@ bindsym $mod+Shift+{{ workspace.id }} move container to workspace $workspace{{ w
{% endfor %}

{% for monitor in i3_monitors %}
{% for workspace in monitor.workspaces %}
{% for workspace in monitor.workspaces %}
workspace $workspace{{ workspace }} output {{ monitor.output }}
{% endfor %}
{% endfor %}
{% endfor %}

{% for application in i3_applications %}
Expand Down Expand Up @@ -170,7 +170,13 @@ bar {
}

# Setup Monitors
exec_always sleep 1 && xrandr {% for monitor in i3_monitors %} --output {{ monitor.output }} --mode {{ monitor.mode }} --pos {{ monitor.pos }} --rotate {{ monitor.rotate }} {% endfor %}
exec_always sleep 1 && xrandr \
{% for monitor in i3_monitors %} \
--output {{ monitor.output }} \
--mode {{ monitor.mode }} \
--pos {{ monitor.pos }} \
--rotate {{ monitor.rotate }}
{% endfor %}

# Background
{% if i3_desktop_background is defined %}
Expand Down Expand Up @@ -199,5 +205,4 @@ exec sleep 4 && {{ app }}
# Register Keybindings
{% for keybinding in i3_keybindings %}
bindsym {{ keybinding.key }} exec {{ keybinding.exec }}
{% endfor%}

{% endfor %}

0 comments on commit 527825f

Please sign in to comment.