1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_i3wm.git synced 2024-08-16 10:09:53 +02:00

Improve monitor, bar and config

This commit is contained in:
L3D 2024-07-23 22:07:05 +02:00
parent 425993da85
commit 5a357a7357
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 40 additions and 13 deletions

View file

@ -18,7 +18,10 @@ sway__keyboard_settings: true
sway__keyboard_lang: 'de'
sway__lock: 'swaylock --color 000000 --image /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png'
sway__waybar: true
sway__waybar_modules_right: ["idle_inhibitor", "custom/weather", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "clock", "tray"]
sway__waybar_modules_left: ["sway/workspaces", "sway/mode", "sway/scratchpad"]
sway__waybar_modules_center: ["sway/window"]
sway__waybar_modules_right: ["idle_inhibitor", "custom/weather", "pulseaudio", "network", "cpu", "memory", "disk", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "clock", "tray"]
sway__waybar_font_size: '13px'
sway__wlsunset: true
sway__keybindings:
@ -62,6 +65,10 @@ sway__keybindings:
name: lighter
key: XF86MonBrightnessUp
exec: --no-startup-id light -A 6
- keybinding:
name: display settings
key: XF86WakeUp
exec: wdisplay
sway__keybindings_extra: []

View file

@ -6,6 +6,7 @@
become: true
with_items:
- 'waybar'
- 'wlogout'
- name: Create waybar config folder
become: true

View file

@ -227,6 +227,7 @@ bindsym $mod+r mode "resize"
# Register default keybindings
{% for keybinding in sway__keybindings %}
# keybinding {{ keybinding.name }}
bindsym {{ keybinding.key }} exec {{ keybinding.exec }}
{% endfor %}

View file

@ -1,9 +1,9 @@
*/ {{ ansible_managed }} */
/* {{ ansible_managed }} */
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
font-size: {{ sway__waybar_font_size }};
}
window#waybar {

View file

@ -6,8 +6,8 @@
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
"modules-center": ["sway/window"],
"modules-left": {{ sway__waybar_modules_left | tojson }},
"modules-center": {{ sway__waybar_modules_center | tojson }},
"modules-right": {{ sway__waybar_modules_right | tojson }},
// Modules configuration
"sway/workspaces": {
@ -75,6 +75,18 @@
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d %H:%M %Z}"
},
"disk": {
"interval": 30,
"format": "{path}: {percentage_used}%",
"format-alt": "{used}/{total}",
"path": "/"
},
"sway/language": {
"format": "{shortDescription}",
"tooltip-format": "{long} {variant}",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
"on-click-right": "gnome-control-center region"
},
"cpu": {
"format": "{usage}% ",
@ -102,7 +114,7 @@
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-charging": "{capacity}% 🗲",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
@ -115,11 +127,12 @@
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-ethernet": "{ipaddr}/{cidr} 🖧",
"tooltip-format": "{ifname} via {gwaddr} 🔗",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"on-click": "gnome-control-center network"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
@ -131,8 +144,8 @@
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"hands-free": "🤙",
"headset": "🎧",
"phone": "",
"portable": "",
"car": "",
@ -147,5 +160,10 @@
"exec": "{{ swayusr.home }}/.config/waybar/wttr.py",
"return-type": "json"
},
"custom/power": {
"format": "",
"on-click": "wlogout",
"tooltip": false
}
}

View file

@ -1,3 +1,3 @@
---
playbook_version_number: 6 # should be int
playbook_version_number: 7 # should be int
playbook_version_path: 'role-roles-ansible.sway.version'