mirror of
https://github.com/roles-ansible/ansible_role_i3wm.git
synced 2024-08-16 10:09:53 +02:00
Merge pull request #10 from roles-ansible/dev
adding multiuser support, updating some values
This commit is contained in:
commit
abf94600b2
21 changed files with 586 additions and 221 deletions
18
.github/workflows/ansible-centos-centos7.yml
vendored
18
.github/workflows/ansible-centos-centos7.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check centos:centos7
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with ubuntu:centos7'
|
|
||||||
uses: roles-ansible/check-ansible-centos-centos7-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-centos-centos8.yml
vendored
18
.github/workflows/ansible-centos-centos8.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check centos:centos8
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with ubuntu:centos8'
|
|
||||||
uses: roles-ansible/check-ansible-centos-centos8-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-centos-centos9.yml
vendored
18
.github/workflows/ansible-centos-centos9.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check centos:stream9
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with quay.io/centos/centos:stream9'
|
|
||||||
uses: roles-ansible/check-ansible-centos-centos9-action@main
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-centos-latest.yml
vendored
18
.github/workflows/ansible-centos-latest.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check centos:latest
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with ubuntu:latest'
|
|
||||||
uses: roles-ansible/check-ansible-centos-latest-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-fedora-31.yml
vendored
18
.github/workflows/ansible-fedora-31.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check fedora:31
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with fedora:31'
|
|
||||||
uses: roles-ansible/check-ansible-fedora-31-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-fedora-32.yml
vendored
18
.github/workflows/ansible-fedora-32.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check fedora:32
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with fedora:32'
|
|
||||||
uses: roles-ansible/check-ansible-fedora-32-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
18
.github/workflows/ansible-fedora-33.yml
vendored
18
.github/workflows/ansible-fedora-33.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Ansible check fedora:33
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'checkout git repo'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 'ansible check with fedora:33'
|
|
||||||
uses: roles-ansible/check-ansible-fedora-33-action@master
|
|
||||||
with:
|
|
||||||
targets: "./"
|
|
14
.github/workflows/ansible-linting-check.yml
vendored
14
.github/workflows/ansible-linting-check.yml
vendored
|
@ -2,24 +2,22 @@
|
||||||
name: Ansible Lint check
|
name: Ansible Lint check
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Ansible Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout git repo'
|
- name: 'checkout git repo'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
lfs: true
|
||||||
|
submodules: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 'Lint Ansible Playbook'
|
- name: 'Lint Ansible Playbook'
|
||||||
uses: ansible/ansible-lint-action@v6
|
uses: ansible/ansible-lint-action@v6
|
||||||
with:
|
with:
|
||||||
targets: "."
|
path: "."
|
||||||
|
|
37
README.md
37
README.md
|
@ -9,12 +9,9 @@ Install and deploy a basic configuration of [I3 Window Manager](https://i3wm.org
|
||||||
Optionally configure your resolution, which applications will be bound to which screen and what will be included in the autostart.<br/>
|
Optionally configure your resolution, which applications will be bound to which screen and what will be included in the autostart.<br/>
|
||||||
If you want to use wayland instead of xorg, think about using [sway](https://swaywm.org/) as window manager. The corresponding ansible is located on [github.com/roles-ansible/role-sway](https://github.com/roles-ansible/role-sway.git).
|
If you want to use wayland instead of xorg, think about using [sway](https://swaywm.org/) as window manager. The corresponding ansible is located on [github.com/roles-ansible/role-sway](https://github.com/roles-ansible/role-sway.git).
|
||||||
|
|
||||||
[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role-i3wm/master/.github/license.svg?sanitize=true)](https://github.com/chaos-bodensee/role-i3wm/blob/master/LICENSE)
|
|
||||||
[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role-i3wm/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/i3wm)
|
|
||||||
|
|
||||||
### Get it directly from Ansible Galaxy
|
### Get it directly from Ansible Galaxy
|
||||||
```bash
|
```bash
|
||||||
$ ansible-galaxy install do1jlr.i3wm
|
$ ansible-galaxy install l3d.i3wm
|
||||||
```
|
```
|
||||||
|
|
||||||
Role Variables
|
Role Variables
|
||||||
|
@ -22,22 +19,25 @@ $ ansible-galaxy install do1jlr.i3wm
|
||||||
|
|
||||||
For a good overview about possible variables, please have a look into ``defaults/main.yml``.
|
For a good overview about possible variables, please have a look into ``defaults/main.yml``.
|
||||||
|
|
||||||
Example Playbook
|
## Example Usage
|
||||||
----------------
|
|
||||||
|
|
||||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: install i3wm on localhost
|
- name: install i3wm on localhost
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
vars_files:
|
vars_files:
|
||||||
- vars/main.yml
|
- vars/main.yml
|
||||||
roles:
|
roles:
|
||||||
- {role: do1jlr.i3wm, tags[i3,i3wm]}
|
- {role: l3d.i3wm, tags[i3, i3wm]}
|
||||||
```
|
```
|
||||||
*`vars/main.yml`*
|
*`vars/main.yml`*
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# User List for i3wm config
|
||||||
|
i3wm_user_list:
|
||||||
|
- user: "alice"
|
||||||
|
home: "/home/alice"
|
||||||
|
- user: "bob"
|
||||||
|
home: "/home/bob"
|
||||||
|
|
||||||
# background image
|
# background image
|
||||||
i3_desktop_background: "~/Bilder/wallpaper.jpg"
|
i3_desktop_background: "~/Bilder/wallpaper.jpg"
|
||||||
|
|
||||||
|
@ -82,6 +82,21 @@ Including an example of how to use your role (for instance, with variables passe
|
||||||
workspace: 7
|
workspace: 7
|
||||||
on_startup: true
|
on_startup: true
|
||||||
|
|
||||||
# lock your screen after 3 hours
|
# lock your screen after 90 min
|
||||||
enable_lock_after_time: true
|
enable_lock_after_time: true
|
||||||
|
|
||||||
|
files/rofi/dracula_dark.rasi
|
||||||
|
|
||||||
|
# enable multiple i3blocks options
|
||||||
|
i3_i3blocks_options:
|
||||||
|
weather: true
|
||||||
|
audio_volume: true
|
||||||
|
wifisignal: true
|
||||||
|
ipaddress: true
|
||||||
|
clock: true
|
||||||
|
battery: true
|
||||||
|
ddate: true
|
||||||
|
|
||||||
|
# choose rofi theme
|
||||||
|
i3_rofi_config_file: 'files/rofi/dracula_dark.rasi'
|
||||||
```
|
```
|
||||||
|
|
|
@ -7,7 +7,8 @@ i3_keybindings_extra: []
|
||||||
# key: $mod+Shift+F10
|
# key: $mod+Shift+F10
|
||||||
# exec: --no-startup-id touch /tmp/example.txt
|
# exec: --no-startup-id touch /tmp/example.txt
|
||||||
|
|
||||||
i3_monitors: [] # see: xrandr
|
i3_monitors: []
|
||||||
|
# see: xrandr
|
||||||
# - monitor:
|
# - monitor:
|
||||||
# id: 1
|
# id: 1
|
||||||
# output: "VGA-1"
|
# output: "VGA-1"
|
||||||
|
@ -27,30 +28,45 @@ i3_run_on_startup: []
|
||||||
# - foo
|
# - foo
|
||||||
# - bar
|
# - bar
|
||||||
|
|
||||||
# which user are we?
|
# deploy config to these users:
|
||||||
i3wm_user: "{{ ansible_user_id }}"
|
i3wm_user_list:
|
||||||
|
- user: "{{ ansible_user_id }}"
|
||||||
|
home: "{{ ansible_env.HOME | default('/home/{{ ansible_user_id }}') }}"
|
||||||
|
|
||||||
## set default font size
|
## set default font size
|
||||||
i3_font_size: 9
|
i3_font_size: 11
|
||||||
i3_focus_follows_mouse: true
|
i3_focus_follows_mouse: true
|
||||||
|
|
||||||
# set i3lock options
|
# set i3lock options
|
||||||
i3lock_options: "i3lock --image=/home/{{ i3wm_user }}/.config/lockscreen.png --color 000000"
|
i3lock_options: "i3lock --image={{ i3wm_usr.home }}/.config/lockscreen.png --color 000000"
|
||||||
|
|
||||||
# use fancy background
|
# use fancy background
|
||||||
i3_desktop_background: "/home/{{ i3wm_user }}/.config/background.png"
|
i3_desktop_background: "{{ i3wm_usr.home }}/.config/background.png"
|
||||||
|
|
||||||
|
# i3blocks options
|
||||||
|
i3_i3blocks_options:
|
||||||
|
weather: true
|
||||||
|
audio_volume: true
|
||||||
|
wifisignal: true
|
||||||
|
ipaddress: true
|
||||||
|
clock: true
|
||||||
|
battery: true
|
||||||
|
ddate: true
|
||||||
|
|
||||||
|
i3_rofi_config_file: 'files/rofi/dracula_dark.rasi'
|
||||||
|
|
||||||
i3_terminal: "terminator"
|
i3_terminal: "terminator"
|
||||||
|
|
||||||
# install additional packages
|
# install additional packages
|
||||||
i3_packages_extra:
|
i3_packages_extra:
|
||||||
- ranger
|
- ranger
|
||||||
|
- fonts-fork-awesome
|
||||||
|
|
||||||
i3wm_copy_wallpapers: true
|
i3wm_copy_wallpapers: true
|
||||||
|
|
||||||
disable_screensaver: true
|
disable_screensaver: true
|
||||||
enable_lock_after_time: false
|
enable_lock_after_time: false
|
||||||
lock_after_time: '200' # minutes to wait until your screen is locked
|
lock_after_time: '90' # minutes to wait until your screen is locked
|
||||||
|
|
||||||
# version check for this role?
|
# version check for this role?
|
||||||
submodules_versioncheck: true
|
submodules_versioncheck: true
|
||||||
|
|
84
files/i3blocks/battery.py
Normal file
84
files/i3blocks/battery.py
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
battery for i3blocks
|
||||||
|
"""
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def get_battery_info():
|
||||||
|
status = subprocess.check_output(['acpi'], universal_newlines=True)
|
||||||
|
|
||||||
|
if not status:
|
||||||
|
# -> keine Batterie gefunden
|
||||||
|
text_output = "<span color='red'><span font='FontAwesome'>\uf00d \uf240</span></span>"
|
||||||
|
battery_percent = 100
|
||||||
|
else:
|
||||||
|
# -> auswertung der batteriedaten
|
||||||
|
batteries = status.strip().split("\n")
|
||||||
|
state_batteries = []
|
||||||
|
battery_percent_batteries = []
|
||||||
|
|
||||||
|
for battery in batteries:
|
||||||
|
if battery:
|
||||||
|
state_batteries.append(battery.split(": ")[1].split(", ")[0])
|
||||||
|
commasplitstatus = battery.split(", ")
|
||||||
|
battery_percent_batteries.append(int(commasplitstatus[1].rstrip("%\n")))
|
||||||
|
|
||||||
|
state = state_batteries[0]
|
||||||
|
battery_percent = int(sum(battery_percent_batteries) / len(battery_percent_batteries))
|
||||||
|
|
||||||
|
# stands for charging
|
||||||
|
fa_lightning = "<span color='yellow'><span font='FontAwesome'>\uf0e7</span></span>"
|
||||||
|
|
||||||
|
# stands for plugged in
|
||||||
|
fa_plug = "<span font='FontAwesome'>\uf1e6</span>"
|
||||||
|
|
||||||
|
text_output = ""
|
||||||
|
battery_remaining_time = ""
|
||||||
|
|
||||||
|
if state == "Discharging":
|
||||||
|
battery_time = batteries[0].split()[-2]
|
||||||
|
battery_remaining_time = f" ({battery_time})"
|
||||||
|
elif state == "Full":
|
||||||
|
text_output = fa_plug + " "
|
||||||
|
elif state == "Unknown":
|
||||||
|
text_output = "<span font='FontAwesome'>\uf128</span> "
|
||||||
|
else:
|
||||||
|
text_output = fa_lightning + " " + fa_plug + " "
|
||||||
|
|
||||||
|
def get_color(percent):
|
||||||
|
"""
|
||||||
|
-> color based on battery state
|
||||||
|
"""
|
||||||
|
color_mapping = {
|
||||||
|
16: "#FFFFFF",
|
||||||
|
24: "#FF3300",
|
||||||
|
32: "#FF6600",
|
||||||
|
40: "#FF9900",
|
||||||
|
50: "#FFCC00",
|
||||||
|
60: "#FFFF00",
|
||||||
|
70: "#FFFF33",
|
||||||
|
80: "#FFFF66"
|
||||||
|
}
|
||||||
|
|
||||||
|
for threshold, color_code in color_mapping.items():
|
||||||
|
if percent < threshold:
|
||||||
|
return color_code
|
||||||
|
|
||||||
|
return "#FFFFFF"
|
||||||
|
|
||||||
|
battery_form_string = '<span color="{}">{}%</span>'
|
||||||
|
text_output += battery_form_string.format(get_color(battery_percent), battery_percent)
|
||||||
|
text_output += battery_remaining_time
|
||||||
|
|
||||||
|
return text_output
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
text_output = get_battery_info()
|
||||||
|
print(text_output)
|
||||||
|
print(text_output)
|
||||||
|
|
||||||
|
if "battery_percent" in locals() and battery_percent < 16:
|
||||||
|
sys.exit(33)
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
command=~/.config/i3blocks/$BLOCK_NAME
|
|
||||||
separator_block_width=15
|
|
||||||
markup=pango
|
|
||||||
|
|
||||||
[weather]
|
|
||||||
command=curl -Ss 'https://wttr.in?format="%l:+%c%t+%w"' | xargs echo
|
|
||||||
interval=600
|
|
||||||
color=#A4C2F4
|
|
||||||
|
|
||||||
[volume]
|
|
||||||
interval=30
|
|
||||||
signal=10
|
|
||||||
|
|
||||||
[wlan]
|
|
||||||
interval=1
|
|
||||||
signal=10
|
|
||||||
|
|
||||||
[ip]
|
|
||||||
command=hostname -i | awk '{ print " IPv4: " $1 }'
|
|
||||||
interval=120
|
|
||||||
label=🖥️
|
|
||||||
color=#91E78B
|
|
||||||
|
|
||||||
[clock]
|
|
||||||
label=🕒
|
|
||||||
command=date --iso-8601=seconds
|
|
||||||
interval=1
|
|
||||||
|
|
||||||
[ddate]
|
|
||||||
label=🚀
|
|
||||||
command=ddate +'%{%A, %d %B%}, %Y%N, Celebrate %H'
|
|
||||||
interval=120
|
|
133
files/rofi/dracula_dark.rasi
Normal file
133
files/rofi/dracula_dark.rasi
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
/*Dracula theme based on the Purple official rofi theme*/
|
||||||
|
|
||||||
|
* {
|
||||||
|
font: "Jetbrains Mono 12";
|
||||||
|
foreground: #f8f8f2;
|
||||||
|
background-color: #282a36;
|
||||||
|
active-background: #6272a4;
|
||||||
|
urgent-background: #ff5555;
|
||||||
|
urgent-foreground: #282a36;
|
||||||
|
selected-background: @active-background;
|
||||||
|
selected-urgent-background: @urgent-background;
|
||||||
|
selected-active-background: @active-background;
|
||||||
|
separatorcolor: @active-background;
|
||||||
|
bordercolor: @active-background;
|
||||||
|
}
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
show-icons: true;
|
||||||
|
display-drun: "";
|
||||||
|
disable-history: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
background-color: @background-color;
|
||||||
|
border: 3;
|
||||||
|
border-radius: 6;
|
||||||
|
border-color: @bordercolor;
|
||||||
|
padding: 15;
|
||||||
|
}
|
||||||
|
#mainbox {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#message {
|
||||||
|
border: 0px;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
#textbox {
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#listview {
|
||||||
|
fixed-height: 0;
|
||||||
|
border: 0px;
|
||||||
|
border-color: @bordercolor;
|
||||||
|
spacing: 2px ;
|
||||||
|
scrollbar: false;
|
||||||
|
padding: 2px 0px 0px ;
|
||||||
|
}
|
||||||
|
#element {
|
||||||
|
border: 0;
|
||||||
|
padding: 3px ;
|
||||||
|
}
|
||||||
|
#element.normal.normal {
|
||||||
|
background-color: @background-color;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.normal.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @urgent-foreground;
|
||||||
|
}
|
||||||
|
#element.normal.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.selected.normal {
|
||||||
|
background-color: @selected-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.selected.urgent {
|
||||||
|
background-color: @selected-urgent-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.selected.active {
|
||||||
|
background-color: @selected-active-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.alternate.normal {
|
||||||
|
background-color: @background-color;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.alternate.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.alternate.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#scrollbar {
|
||||||
|
width: 2px ;
|
||||||
|
border: 0;
|
||||||
|
handle-width: 8px ;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#sidebar {
|
||||||
|
border: 2px dash 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
}
|
||||||
|
#button.selected {
|
||||||
|
background-color: @selected-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#inputbar {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
#case-indicator {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#entry {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#prompt {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#inputbar {
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
|
}
|
||||||
|
#textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ">";
|
||||||
|
margin: 0px 0.3em 0em 0em ;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element-text, element-icon {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
98
files/rofi/spotlight-dark.rasi
Normal file
98
files/rofi/spotlight-dark.rasi
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* MACOS SPOTLIGHT LIKE DARK THEME FOR ROFI
|
||||||
|
* User : LR-Tech
|
||||||
|
* Theme Repo : https://github.com/lr-tech/rofi-themes-collection
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
* {
|
||||||
|
font: "Montserrat 12";
|
||||||
|
|
||||||
|
bg0: #242424E6;
|
||||||
|
bg1: #7E7E7E80;
|
||||||
|
bg2: #0860f2E6;
|
||||||
|
|
||||||
|
fg0: #DEDEDE;
|
||||||
|
fg1: #FFFFFF;
|
||||||
|
fg2: #DEDEDE80;
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @fg0;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: @bg0;
|
||||||
|
|
||||||
|
location: center;
|
||||||
|
width: 640;
|
||||||
|
border-radius: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
font: "Montserrat 20";
|
||||||
|
padding: 12px;
|
||||||
|
spacing: 12px;
|
||||||
|
children: [ icon-search, entry ];
|
||||||
|
}
|
||||||
|
|
||||||
|
icon-search {
|
||||||
|
expand: false;
|
||||||
|
filename: "search";
|
||||||
|
size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
icon-search, entry, element-icon, element-text {
|
||||||
|
vertical-align: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
font: inherit;
|
||||||
|
|
||||||
|
placeholder : "Search";
|
||||||
|
placeholder-color : @fg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message {
|
||||||
|
border: 2px 0 0;
|
||||||
|
border-color: @bg1;
|
||||||
|
background-color: @bg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox {
|
||||||
|
padding: 8px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
lines: 10;
|
||||||
|
columns: 1;
|
||||||
|
|
||||||
|
fixed-height: false;
|
||||||
|
border: 1px 0 0;
|
||||||
|
border-color: @bg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
padding: 8px 16px;
|
||||||
|
spacing: 16px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal active {
|
||||||
|
text-color: @bg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected normal, element selected active {
|
||||||
|
background-color: @bg2;
|
||||||
|
text-color: @fg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
98
files/rofi/spotlight.rasi
Normal file
98
files/rofi/spotlight.rasi
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* MACOS SPOTLIGHT LIKE THEME FOR ROFI
|
||||||
|
* User : LR-Tech
|
||||||
|
* Theme Repo : https://github.com/lr-tech/rofi-themes-collection
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
* {
|
||||||
|
font: "Montserrat 12";
|
||||||
|
|
||||||
|
bg0: #F5F5F5BF;
|
||||||
|
bg1: #7E7E7E80;
|
||||||
|
bg2: #0860F2E6;
|
||||||
|
|
||||||
|
fg0: #242424;
|
||||||
|
fg1: #FFFFFF;
|
||||||
|
fg2: #24242480;
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @fg0;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: @bg0;
|
||||||
|
|
||||||
|
location: center;
|
||||||
|
width: 640;
|
||||||
|
border-radius: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
font: "Montserrat 20";
|
||||||
|
padding: 12px;
|
||||||
|
spacing: 12px;
|
||||||
|
children: [ icon-search, entry ];
|
||||||
|
}
|
||||||
|
|
||||||
|
icon-search {
|
||||||
|
expand: false;
|
||||||
|
filename: "search";
|
||||||
|
size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
icon-search, entry, element-icon, element-text {
|
||||||
|
vertical-align: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
font: inherit;
|
||||||
|
|
||||||
|
placeholder : "Search";
|
||||||
|
placeholder-color : @fg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message {
|
||||||
|
border: 2px 0 0;
|
||||||
|
border-color: @bg1;
|
||||||
|
background-color: @bg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox {
|
||||||
|
padding: 8px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
lines: 10;
|
||||||
|
columns: 1;
|
||||||
|
|
||||||
|
fixed-height: false;
|
||||||
|
border: 1px 0 0;
|
||||||
|
border-color: @bg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
padding: 8px 16px;
|
||||||
|
spacing: 16px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal active {
|
||||||
|
text-color: @bg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected normal, element selected active {
|
||||||
|
background-color: @bg2;
|
||||||
|
text-color: @fg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
|
@ -2,71 +2,90 @@
|
||||||
- name: Creates directory
|
- name: Creates directory
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: '/home/{{ i3wm_user }}/.config'
|
path: '{{ i3wm_usr.home }}/.config'
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: 0750
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
- name: Create i3 config folder
|
- name: Create i3 config folder
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: '/home/{{ i3wm_user }}/.config/i3/'
|
path: '{{ i3wm_usr.home }}/.config/i3/'
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0750
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
- name: Copy multiple images
|
- name: Copy multiple images
|
||||||
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'files/background.png', dest: "/home/{{ i3wm_user }}/.config/background.png" }
|
- { src: 'files/background.png', dest: "{{ i3wm_usr.home }}/.config/background.png" }
|
||||||
- { src: 'files/lockscreen.png', dest: '/home/{{ i3wm_user }}/.config/lockscreen.png' }
|
- { src: 'files/lockscreen.png', dest: '{{ i3wm_usr.home }}/.config/lockscreen.png' }
|
||||||
when: i3wm_copy_wallpapers | bool
|
when: i3wm_copy_wallpapers | bool
|
||||||
|
|
||||||
- name: Copy and validate i3wm config file
|
- name: Copy and validate i3wm config file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: templates/config.j2
|
src: templates/config.j2
|
||||||
dest: "/home/{{ i3wm_user }}/.config/i3/config"
|
dest: "{{ i3wm_usr.home }}/.config/i3/config"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
backup: true
|
backup: true
|
||||||
validate: i3 -C -c %s
|
validate: i3 -C -c %s
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
# todo: rewrite user stuff and support multiple users
|
- name: Create directory ~/.config/i3blocks/
|
||||||
- name: Mkdir ~/.config/i3blocks/
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/home/{{ i3wm_user }}/.config/i3blocks/"
|
path: "{{ i3wm_usr.home }}/.config/i3blocks/"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0750'
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
- name: Copy i3blocks config
|
- name: Generate i3blocks config
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "files/i3blocks/config"
|
src: 'templates/i3blocks_config.j2'
|
||||||
dest: "/home/{{ i3wm_user }}/.config/i3blocks/config"
|
dest: "{{ i3wm_usr.home }}/.config/i3blocks/config"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
- name: Copy i3blocks config
|
- name: Copy i3blocks config
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "files/i3blocks/{{ item }}"
|
src: "files/i3blocks/{{ item }}"
|
||||||
dest: "/home/{{ i3wm_user }}/.config/i3blocks/{{ item }}"
|
dest: "{{ i3wm_usr.home }}/.config/i3blocks/{{ item }}"
|
||||||
mode: 0750
|
mode: 0750
|
||||||
owner: "{{ i3wm_user }}"
|
owner: "{{ i3wm_usr.user }}"
|
||||||
group: "{{ i3wm_user }}"
|
group: "{{ i3wm_usr.user }}"
|
||||||
with_items:
|
with_items:
|
||||||
- 'volume'
|
- 'volume.sh'
|
||||||
- 'wlan'
|
- 'wlan.sh'
|
||||||
|
- 'battery.py'
|
||||||
|
|
||||||
|
- name: Create rofi config folder
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '{{ i3wm_usr.home }}/.config/rofi/'
|
||||||
|
state: directory
|
||||||
|
mode: 0750
|
||||||
|
owner: "{{ i3wm_usr.user }}"
|
||||||
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
||||||
|
- name: Copy rofi config
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ i3_rofi_config_file }}"
|
||||||
|
dest: "{{ i3wm_usr.home }}/.config/rofi/config.rasi"
|
||||||
|
mode: 0640
|
||||||
|
owner: "{{ i3wm_usr.user }}"
|
||||||
|
group: "{{ i3wm_usr.user }}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Run optional versionscheck
|
- name: Run optional versionscheck
|
||||||
ansible.builtin.include_tasks: versioncheck.yml
|
ansible.builtin.include_tasks: versioncheck.yml
|
||||||
when: submodules_versionchecki | bool
|
when: submodules_versioncheck | bool
|
||||||
|
|
||||||
- name: Register variables
|
- name: Register variables
|
||||||
ansible.builtin.import_tasks: variables.yml
|
ansible.builtin.import_tasks: variables.yml
|
||||||
|
@ -20,3 +20,6 @@
|
||||||
|
|
||||||
- name: Create i3 config file
|
- name: Create i3 config file
|
||||||
ansible.builtin.include_tasks: config.yml
|
ansible.builtin.include_tasks: config.yml
|
||||||
|
loop: "{{ i3wm_user_list | flatten(1) }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: i3wm_usr
|
||||||
|
|
|
@ -10,6 +10,13 @@ focus_follows_mouse {% if i3_focus_follows_mouse | bool %}yes{% else %}no{% endi
|
||||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# startup apps and window decs
|
||||||
|
default_orientation horizontal
|
||||||
|
workspace_layout tabbed
|
||||||
|
|
||||||
|
# Hide borders
|
||||||
|
hide_edge_borders smart
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
bindsym $mod+Shift+Return exec $term -e tmux
|
bindsym $mod+Shift+Return exec $term -e tmux
|
||||||
|
|
52
templates/i3blocks_config.j2
Normal file
52
templates/i3blocks_config.j2
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
command=~/.config/i3blocks/$BLOCK_NAME
|
||||||
|
separator_block_width=18
|
||||||
|
markup=pango
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.weather | bool %}
|
||||||
|
[weather]
|
||||||
|
command=curl -Ss 'https://wttr.in?format="%l:+%c%t+%w"' | xargs echo
|
||||||
|
interval=600
|
||||||
|
color=#A4C2F4
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.audio_volume | bool %}
|
||||||
|
[volume]
|
||||||
|
command={{ i3wm_usr.home }}/.config/i3blocks/volume.sh
|
||||||
|
interval=30
|
||||||
|
signal=10
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.wifisignal | bool %}
|
||||||
|
[wlan]
|
||||||
|
command={{ i3wm_usr.home }}/.config/i3blocks/wlan.sh
|
||||||
|
interval=1
|
||||||
|
signal=10
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.ipaddress | bool %}
|
||||||
|
[ip]
|
||||||
|
command=hostname -i | awk '{ print " IPv4: " $1 }'
|
||||||
|
interval=120
|
||||||
|
label=🖥️
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.clock | bool %}
|
||||||
|
[clock]
|
||||||
|
command=date --rfc-3339=seconds
|
||||||
|
color=#88ff0a
|
||||||
|
interval=1
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.battery | bool %}
|
||||||
|
[battery]
|
||||||
|
command={{ i3wm_usr.home }}/.config/i3blocks/battery.py
|
||||||
|
markup=pango
|
||||||
|
interval=30
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if i3_i3blocks_options.ddate | bool %}
|
||||||
|
[ddate]
|
||||||
|
label=🚀
|
||||||
|
command=ddate +'%A, %d %B, %Y%N, Celebrate %H'
|
||||||
|
interval=120
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue