From 09b0d0e13069bf9d7427359fdcb36701314a281f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Mon, 14 Jun 2021 23:55:57 +0200 Subject: [PATCH 1/6] Add i3status-rs config file --- roles/core/templates/.i3/config.toml | 78 ++++- roles/core/templates/.i3/mine_config | 449 +++++++++++++++++++++++++++ 2 files changed, 514 insertions(+), 13 deletions(-) create mode 100644 roles/core/templates/.i3/mine_config diff --git a/roles/core/templates/.i3/config.toml b/roles/core/templates/.i3/config.toml index fe7f35f..34a3d80 100644 --- a/roles/core/templates/.i3/config.toml +++ b/roles/core/templates/.i3/config.toml @@ -1,27 +1,79 @@ -icons_format = "{icon}" - -[theme] -theme = "semi-native" - -[icons] +theme = "solarized-dark" icons = "awesome5" +[[block]] +block = "memory" +format_mem = "{mem_used;M}/{mem_total;M}" +format_swap = "{swap_used;M}/{swap_total;M}" +display_type = "memory" +icons = true +clickable = true +interval = 5 +warning_mem = 80 +warning_swap = 80 +critical_mem = 95 +critical_swap = 95 + [[block]] block = "cpu" +interval = 1 +format = "{utilization}" [[block]] -block = "memory" -format = " $icon $mem_total_used_percents.eng(w:2) " -format_alt = " $icon_swap $swap_used_percents.eng(w:2) " +block = "nvidia_gpu" +label = "GPU" +show_memory = false +show_clocks = false +interval = 1 [[block]] -block = "battery" +block = "temperature" +collapsed = false +interval = 10 +format = "CPU {average}C" +chip = "dell_smm-virtual-0" +inputs = ["CPU"] + +[[block]] +block = "weather" +format = "{weather} (Cocurès) {temp}C" +service = { name = "openweathermap", api_key = "APIKEY", city_id = "2997288", units = "metric" } + +[[block]] +block = "pacman" +interval = 600 +format = "{aur} updates available" +format_singular = "{aur} update available" +format_up_to_date = "system up to date" +critical_updates_regex = "(linux |linux-lts|linux-zen)" +# aur_command should output available updates to stdout (ie behave as echo -ne "update\n") +aur_command = "pamac checkupdates -qa" +on_click = "pamac-manager --updates" [[block]] block = "music" -format = " $icon {$combo.str(max_w:20) $play $next |}" +buttons = ["play", "next"] + +[[block]] +block = "sound" +step_width = 3 +on_click = "pavucontrol" + +[[block]] +block = "networkmanager" +device_format = "{icon}{ap} {ips}" +on_click = "alacritty -e nmtui" +interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"] +interface_name_include = ["wlp60s0","enp59s0","proton0"] +ap_format = "{ssid^10}" [[block]] block = "time" -interval = 5 -format = " $timestamp.datetime(f:'%a %d/%m %R') " \ No newline at end of file +interval = 60 +format = "%d/%m %R" +timezone = "Europe/Paris" + +[[block]] +block = "battery" +interval = 10 +format = "{percentage}% {time}" \ No newline at end of file diff --git a/roles/core/templates/.i3/mine_config b/roles/core/templates/.i3/mine_config new file mode 100644 index 0000000..d661e48 --- /dev/null +++ b/roles/core/templates/.i3/mine_config @@ -0,0 +1,449 @@ +# i3 config file (v4) +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +# Set mod key (Mod1=, Mod4=) +set $mod Mod4 + +# set default desktop layout (default is tiling) +# workspace_layout tabbed + +# Configure border style +new_window pixel 1 +new_float normal + +# Hide borders +hide_edge_borders none + +# change borders +bindsym $mod+u border none +bindsym $mod+y border pixel 1 +bindsym $mod+n border normal + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font xft:URWGothic-Book 11 + +# Use Mouse+$mod to drag floating windows +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start program launcher +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# launch categorized menu +bindsym $mod+z exec --no-startup-id morc_menu + +################################################################################################ +## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## +################################################################################################ + +#exec --no-startup-id volumeicon +#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' +#exec --no-startup-id "pulseaudio --start" +#exec --no-startup-id pa-applet +bindsym $mod+Ctrl+m exec pavucontrol + +################################################################################################ + +# Screen brightness controls +# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" +# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'" + +# Start Applications +bindsym $mod+Ctrl+b exec terminal -e 'bmenu' +bindsym $mod+F2 exec firefox +bindsym $mod+F3 exec pcmanfm +# bindsym $mod+F3 exec ranger +bindsym $mod+Shift+F3 exec gksu pcmanfm +bindsym $mod+F5 exec terminal -e 'mocp' +bindsym $mod+t exec --no-startup-id pkill compton +bindsym $mod+Ctrl+t exec --no-startup-id compton -b +bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" +bindsym Print exec --no-startup-id i3-scrot +bindsym $mod+Print --release exec --no-startup-id i3-scrot -w +bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s +bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf +bindsym $mod+Ctrl+x --release exec --no-startup-id xkill + +# focus_follows_mouse no + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+m focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +# bindsym $mod+Shift+j move left +# bindsym $mod+Shift+k move down +# bindsym $mod+Shift+l move up +# bindsym $mod+Shift+m move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# workspace back and forth (with/without active container) +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +# split orientation +bindsym $mod+h split h;exec notify-send 'tile horizontally' +bindsym $mod+v split v;exec notify-send 'tile vertically' +bindsym $mod+q split toggle + +# toggle fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# toggle sticky +#bindsym $mod+Shift+s sticky toggle + +# focus the parent container +bindsym $mod+a focus parent + +# move the currently focused window to the scratchpad +# bindsym $mod+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +# bindsym $mod+minus scratchpad show + +#navigate workspaces next / previous +bindsym $mod+Tab workspace next +bindsym $mod+Ctrl+Right workspace next +bindsym $mod+Ctrl+Left workspace prev + +bindsym $mod+Shift+i move workspace to output left +bindsym $mod+Shift+o move workspace to output right +bindsym $mod+Shift+p move workspace to output up +bindsym $mod+Shift+m move workspace to output down + +# Workspace names +# to display names or symbols instead of plain workspace numbers you can use +# something like: set $ws1 1:mail +# set $ws2 2: +set $ws1 1 +set $ws2 2 +set $ws3 3 +set $ws4 4 +set $ws5 5 +set $ws6 6 +set $ws7 7 +set $ws8 8 +set $ws9 9 + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+minus workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 + +# Move focused container to workspace +bindsym $mod+Ctrl+1 move container to workspace $ws1 +bindsym $mod+Ctrl+2 move container to workspace $ws2 +bindsym $mod+Ctrl+3 move container to workspace $ws3 +bindsym $mod+Ctrl+4 move container to workspace $ws4 +bindsym $mod+Ctrl+5 move container to workspace $ws5 +bindsym $mod+Ctrl+minus move container to workspace $ws6 +bindsym $mod+Ctrl+7 move container to workspace $ws7 +bindsym $mod+Ctrl+8 move container to workspace $ws8 +bindsym $mod+Ctrl+9 move container to workspace $ws9 + +# Move to workspace with focused container +bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+62 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 + +# Open applications on specific workspaces +# assign [class="Thunderbird"] $ws1 +# assign [class="Pale moon"] $ws2 +# assign [class="Pcmanfm"] $ws3 +# assign [class="Skype"] $ws5 + +# Open specific applications in floating mode +for_window [title="alsamixer"] floating enable border pixel 1 +for_window [class="calamares"] floating enable border normal +for_window [class="Clipgrab"] floating enable +for_window [title="File Transfer*"] floating enable +for_window [class="Galculator"] floating enable border pixel 1 +for_window [class="GParted"] floating enable border normal +for_window [title="i3_help"] floating enable sticky enable border normal +for_window [class="Lightdm-settings"] floating enable +for_window [class="Lxappearance"] floating enable sticky enable border normal +for_window [class="Manjaro-hello"] floating enable +for_window [class="Manjaro Settings Manager"] floating enable border normal +for_window [title="MuseScore: Play Panel"] floating enable +for_window [class="Nitrogen"] floating enable sticky enable border normal +for_window [class="Oblogout"] fullscreen enable +for_window [class="octopi"] floating enable +for_window [title="About Pale Moon"] floating enable +for_window [class="Pamac-manager"] floating enable +for_window [class="Pavucontrol"] floating enable +for_window [class="qt5ct"] floating enable sticky enable border normal +for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal +for_window [class="Simple-scan"] floating enable border normal +for_window [class="(?i)System-config-printer.py"] floating enable border normal +#for_window [class="Skype"] floating enable border normal +for_window [class="Timeset-gui"] floating enable border normal +for_window [class="Oracle VM Virtualbox Manager"] floating enable border normal +for_window [class="Xfburn"] floating enable +for_window [title="Android Emulator - *"] floating enable border normal + +# switch to workspace with urgent window automatically +for_window [urgent=latest] focus + +# reload the configuration file +bindsym $mod+Shift+c reload + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r exec "nitrogen --restore && i3-msg restart" + +bindsym $mod+Shift+z exec "~/.bin/switch.sh; nitrogen --restore && i3-msg restart" + +bindsym $mod+Shift+s exec "~/.bin/switch_mono_screen.sh; nitrogen --restore && i3-msg restart" + +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# Set shut down, restart and locking features +bindsym $mod+0 mode "$mode_system" +set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown +mode "$mode_system" { + bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym s exec --no-startup-id i3exit suspend, mode "default" + bindsym u exec --no-startup-id i3exit switch_user, mode "default" + bindsym e exec --no-startup-id i3exit logout, mode "default" + bindsym h exec --no-startup-id i3exit hibernate, mode "default" + bindsym r exec --no-startup-id i3exit reboot, mode "default" + bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" + + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# Resize window (you can also use the mouse for that) +bindsym $mod+r mode "resize" +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 5 px or 5 ppt + bindsym k resize grow height 5 px or 5 ppt + bindsym l resize shrink height 5 px or 5 ppt + bindsym semicolon resize grow width 5 px or 5 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # exit resize mode: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# Lock screen +#bindsym $mod+l exec --no-startup-id blurlockm +# Autostart applications +exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec --no-startup-id nitrogen --restore; +#exec --no-startup-id nitrogen --restore; sleep 1; compton -b +#exec --no-startup-id manjaro-hello +#exec --no-startup-id nm-applet +exec --no-startup-id xfce4-power-manager +# exec --no-startup-id pamac-tray +# exec --no-startup-id blueman-applet +# exec_alwa#ys --no-startup-id sbxkb +exec --no-startup-id start_conky_maia +# exec --no-startup-id start_conky_green +# exec --no-startup-id xautolock -time 10 -locker blurlock +exec_always --no-startup-id ff-theme-util +exec_always --no-startup-id fix_xcursor + +# Color palette used for the terminal ( ~/.Xresources file ) +# Colors are gathered based on the documentation: +# https://i3wm.org/docs/userguide.html#xresources +# Change the variable name at the place you want to match the color +# of your terminal like this: +# [example] +# If you want your bar to have the same background color as your +# terminal background change the line 362 from: +# background #14191D +# to: +# background $term_background +# Same logic applied to everything else. +set_from_resource $term_background background +set_from_resource $term_foreground foreground +set_from_resource $term_color0 color0 +set_from_resource $term_color1 color1 +set_from_resource $term_color2 color2 +set_from_resource $term_color3 color3 +set_from_resource $term_color4 color4 +set_from_resource $term_color5 color5 +set_from_resource $term_color6 color6 +set_from_resource $term_color7 color7 +set_from_resource $term_color8 color8 +set_from_resource $term_color9 color9 +set_from_resource $term_color10 color10 +set_from_resource $term_color11 color11 +set_from_resource $term_color12 color12 +set_from_resource $term_color13 color13 +set_from_resource $term_color14 color14 +set_from_resource $term_color15 color15 + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Start i3bar to display a workspace bar (plus the system information i3status if available) +#bar { +# i3bar_command i3bar +# status_command i3status +# position bottom +## please set your primary output first. Example: 'xrandr --output eDP1 --primary' +# tray_output primary +# tray_output eDP1 +# bindsym button4 nop +# bindsym button5 nop +# font xft:URWGothic-Book, Icons 11 +# strip_workspace_numbers yes +# colors { +# background #222D31 +# statusline #F9FAF9 +# separator #454947 +# border backgr. text +# focused_workspace #3498db #3498db #292F34 +# active_workspace #595B5B #353836 #FDF6E3 +# inactive_workspace #595B5B #222D31 #EEE8D5 +# binding_mode #3498db #2C2C2C #F9FAF9 +# urgent_workspace #3498db #FDF6E3 #E5201D +# } +#} + +bar { + font pango:DejaVu Sans Mono, Font Awesome 5 Free 13px + position bottom + status_command i3status-rs ~/.i3/config.toml + colors { + separator #666666 + background #222222 + statusline #dddddd + focused_workspace #0088CC #0088CC #ffffff + active_workspace #333333 #333333 #ffffff + inactive_workspace #333333 #333333 #888888 + urgent_workspace #2f343a #900000 #ffffff + } +} + +# hide/unhide i3status bar +# bindsym $mod+m bar mode toggle + +# Theme colors +# class border backgr. text indic. child_border + client.focused #496d86 #496d86 #FDF6E3 #FDF6E3 + client.focused_inactive #2F3D44 #2F3D44 #3498db #454948 + client.unfocused #2F3D44 #2F3D44 #3498db #454948 + client.urgent #CB4B16 #FDF6E3 #3498db #268BD2 + client.placeholder #000000 #0c0c0c #ffffff #000000 + + client.background #2B2C2B + +############################# +### settings for i3-gaps: ### +############################# + +# Set inner/outer gaps +gaps inner 10 +gaps outer -2 + +# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. +# gaps inner|outer current|all set|plus|minus +# gaps inner all set 10 +# gaps outer all plus 5 + +# Smart gaps (gaps used if only more than one container on the workspace) +smart_gaps on + +# Smart borders (draw borders around container only if it is not the only container on this workspace) +# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) +smart_borders on + +# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. +set $mode_gaps Gaps: (o) outer, (i) inner +set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) +bindsym $mod+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "default" + bindsym Escape mode "default" +} +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} From 1f285063e26e285f28a7ad106d63dd2b3a2098d2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Tue, 15 Jun 2021 22:16:09 +0200 Subject: [PATCH 2/6] Add precision for Memory block --- roles/core/templates/.i3/config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/core/templates/.i3/config.toml b/roles/core/templates/.i3/config.toml index 34a3d80..31e3fcd 100644 --- a/roles/core/templates/.i3/config.toml +++ b/roles/core/templates/.i3/config.toml @@ -3,8 +3,8 @@ icons = "awesome5" [[block]] block = "memory" -format_mem = "{mem_used;M}/{mem_total;M}" -format_swap = "{swap_used;M}/{swap_total;M}" +format_mem = "{mem_used;M:6}/{mem_total;M:6}" +format_swap = "{swap_used;M:6}/{swap_total;M:6}" display_type = "memory" icons = true clickable = true From 63ae8d5fbef2d7cb54fea2ea9915d04c4c34d083 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Sun, 20 Jun 2021 12:13:01 +0200 Subject: [PATCH 3/6] :sparkles: Add scripts Switch_display and disable/enable touchpad --- roles/core/templates/.bin/switch_display.sh | 55 +++++++++++++++++++++ roles/core/templates/.bin/touchpad.sh | 8 +++ 2 files changed, 63 insertions(+) create mode 100755 roles/core/templates/.bin/switch_display.sh create mode 100755 roles/core/templates/.bin/touchpad.sh diff --git a/roles/core/templates/.bin/switch_display.sh b/roles/core/templates/.bin/switch_display.sh new file mode 100755 index 0000000..bdd24e5 --- /dev/null +++ b/roles/core/templates/.bin/switch_display.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +getBashVersion() { + echo $(echo ${BASH_VERSION} | sed -E 's|([0-9])\..*|\1|') +} + +bash_version="$(getBashVersion)" + +switchDisplay() { + if [ $bash_version -ge 4 ] #$1 contains bash version, we check that it is >=4 to use mapfile + then + mapfile -t activeOutputs < <(xrandr | grep -E " connected (primary )?[1-9]+" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + mapfile -t connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + else + IFS=$'\n' read -r -d '' -a activeOutputs < <(xrandr | grep -E " connected (primary )?[1-9]+" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + IFS=$'\n' read -r -d '' -a connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + fi + + outputToActivate=$(echo ${activeOutputs[@]} ${activeOutputs[@]} ${connectedOutputs[@]} | tr ' ' '\n' | sort | uniq -u) + + if [ ! -z "$outputToActivate" ] + then + xrandr --output "${activeOutputs[0]}" --off --output "$outputToActivate" --auto + else + xrandr --output "${activeOutputs[1]}" --off --output "${activeOutputs[0]}" --auto + fi +} + +activeAll() { + if [ $bash_version -ge 4 ] #$1 contains bash version, we check that it is >=4 to use mapfile + then + mapfile -t connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + else + IFS=$'\n' read -r -d '' -a connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/") + fi + execute="xrandr " + for display in ${connectedOutputs[@]} + do + execute=$execute"--output $display --auto " + done + `$execute` +} + +if [ -z "$1" ] +then + switchDisplay "${activeOutputs[@]}" "${connectedOutputs[@]}" +elif [ "$1" == "-a" ] || [ "$1" == "--all" ] +then + activeAll $connectedOutputs +else + echo "Unknow given argument \"$1\"" + echo "How to use this script =>" + echo "\"switch_display\" will swap your displays" + echo "\"switch_display -a\" or \"switch_display --all\" will switch all your displays on" +fi \ No newline at end of file diff --git a/roles/core/templates/.bin/touchpad.sh b/roles/core/templates/.bin/touchpad.sh new file mode 100755 index 0000000..43158d8 --- /dev/null +++ b/roles/core/templates/.bin/touchpad.sh @@ -0,0 +1,8 @@ +#!/bin/bash +id=$(xinput | sed '/Touchpad/s/.*id=\([0-9]*\).*/\1/;t;d') +status=$(xinput --list-props $id | grep "Device Enabled" | cut -f 3) +if [ $status -eq 1 ]; then + xinput --disable $id +else + xinput --enable $id +fi \ No newline at end of file From d6211d873ccd903783e4c4f9a3ee72fa486963e5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Thu, 17 Mar 2022 12:11:48 +0100 Subject: [PATCH 4/6] :package: Update configuration - i3status theme and blocks - workspace (name and bindings) --- roles/core/templates/.i3/config | 58 ++++++++++++------- roles/core/templates/.i3/config.toml | 30 +++++----- .../.i3/{mine_config => template_config} | 43 +++----------- 3 files changed, 60 insertions(+), 71 deletions(-) rename roles/core/templates/.i3/{mine_config => template_config} (92%) diff --git a/roles/core/templates/.i3/config b/roles/core/templates/.i3/config index 5bfe529..f1853cb 100644 --- a/roles/core/templates/.i3/config +++ b/roles/core/templates/.i3/config @@ -42,8 +42,8 @@ bindsym $mod+z exec --no-startup-id morc_menu ## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## ################################################################################################ -exec --no-startup-id volumeicon -##bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' +#exec --no-startup-id volumeicon +#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' #exec --no-startup-id "pulseaudio --start" #exec --no-startup-id pa-applet bindsym $mod+Ctrl+m exec pavucontrol @@ -67,7 +67,7 @@ bindsym XF86AudioPrev exec playerctl previous # Start Applications bindsym $mod+Ctrl+b exec terminal -e 'bmenu' -bindsym $mod+F2 exec palemoon +bindsym $mod+F2 exec firefox bindsym $mod+F3 exec pcmanfm # bindsym $mod+F3 exec ranger bindsym $mod+Shift+F3 exec gksu pcmanfm @@ -81,7 +81,7 @@ bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf bindsym $mod+Ctrl+x --release exec --no-startup-id xkill -# focus_follows_mouse no +focus_follows_mouse no # change focus bindsym $mod+j focus left @@ -190,15 +190,15 @@ bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+- move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 # Open applications on specific workspaces -# assign [class="Thunderbird"] $ws1 -# assign [class="Pale moon"] $ws2 -# assign [class="Pcmanfm"] $ws3 +assign [class="Thunderbird"] $ws1 +assign [class="firefox"] $ws2 +assign [class="Pcmanfm"] $ws9 # assign [class="Skype"] $ws5 # Open specific applications in floating mode @@ -225,7 +225,7 @@ for_window [class="qt5ct"] floating enable sticky enable border normal for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal for_window [class="Simple-scan"] floating enable border normal for_window [class="(?i)System-config-printer.py"] floating enable border normal -for_window [class="Skype"] floating enable border normal +#for_window [class="Skype"] floating enable border normal for_window [class="Timeset-gui"] floating enable border normal for_window [class="Oracle VM Virtualbox Manager"] floating enable border normal for_window [class="Xfburn"] floating enable @@ -248,7 +248,7 @@ bindsym $mod+Shift+s exec "~/.bin/switch_mono_screen.sh; nitrogen --restore && i bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # Set shut down, restart and locking features -bindsym $mod+0 mode "$mode_system" +bindsym $mod+Delete mode "$mode_system" set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown mode "$mode_system" { bindsym l exec --no-startup-id i3exit lock, mode "default" @@ -295,11 +295,11 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id nitrogen --restore; #exec --no-startup-id nitrogen --restore; sleep 1; compton -b #exec --no-startup-id manjaro-hello -exec --no-startup-id nm-applet +#exec --no-startup-id nm-applet exec --no-startup-id xfce4-power-manager -exec --no-startup-id pamac-tray +# exec --no-startup-id pamac-tray # exec --no-startup-id blueman-applet -# exec_always --no-startup-id sbxkb +# exec_alwa#ys --no-startup-id sbxkb exec --no-startup-id start_conky_maia # exec --no-startup-id start_conky_green # exec --no-startup-id xautolock -time 10 -locker blurlock @@ -337,6 +337,13 @@ set_from_resource $term_color13 color13 set_from_resource $term_color14 color14 set_from_resource $term_color15 color15 +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + bar { font pango: Inconsolata, FontAwesome, Icons 14 @@ -361,18 +368,29 @@ bar { inactive_workspace #595B5B #222D31 #EEE8D5 binding_mode {{ theme.color.normal.highlight }} #2C2C2C #F9FAF9 urgent_workspace {{ theme.color.normal.highlight }} #FDF6E3 #E5201D - } -} +# Start i3bar to display a workspace bar (plus the system information i3status if available) +# bar { +# font pango:Inconsolata, Font Awesome 6 Free 14px +# position bottom +# status_command i3status-rs ~/.i3/config.toml +# colors { +# background #2e3440 +# focused_workspace #0088CC #0088CC #ffffff +# active_workspace #333333 #333333 #ffffff +# inactive_workspace #333333 #2e3440 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# } +# } # hide/unhide i3status bar # bindsym $mod+m bar mode toggle # Theme colors # class border backgr. text indic. child_border - client.focused {{ theme.color.focus.background }} {{ theme.color.focus.background }} {{ theme.color.focus.highlight }} #FDF6E3 - client.focused_inactive {{ theme.color.normal.background }} {{ theme.color.normal.background }} {{ theme.color.normal.highlight }} #454948 - client.unfocused {{ theme.color.normal.background }} {{ theme.color.normal.background }} {{ theme.color.normal.highlight }} #454948 - client.urgent #CB4B16 #FDF6E3 {{ theme.color.normal.highlight }} #268BD2 + client.focused #496d86 #496d86 #FDF6E3 #FDF6E3 + client.focused_inactive #2F3D44 #2F3D44 #3498db #454948 + client.unfocused #2F3D44 #2F3D44 #3498db #454948 + client.urgent #CB4B16 #FDF6E3 #3498db #268BD2 client.placeholder #000000 #0c0c0c #ffffff #000000 client.background #2B2C2B @@ -432,4 +450,4 @@ mode "$mode_gaps_outer" { bindsym Return mode "default" bindsym Escape mode "default" -} +} \ No newline at end of file diff --git a/roles/core/templates/.i3/config.toml b/roles/core/templates/.i3/config.toml index 31e3fcd..2d436c9 100644 --- a/roles/core/templates/.i3/config.toml +++ b/roles/core/templates/.i3/config.toml @@ -1,10 +1,10 @@ -theme = "solarized-dark" +theme = "nord-dark" icons = "awesome5" [[block]] block = "memory" -format_mem = "{mem_used;M:6}/{mem_total;M:6}" -format_swap = "{swap_used;M:6}/{swap_total;M:6}" +format_mem = "{mem_used:6}/{mem_total:6}" +format_swap = "{swap_used:6}/{swap_total:6}" display_type = "memory" icons = true clickable = true @@ -19,25 +19,23 @@ block = "cpu" interval = 1 format = "{utilization}" -[[block]] -block = "nvidia_gpu" -label = "GPU" -show_memory = false -show_clocks = false -interval = 1 - [[block]] block = "temperature" collapsed = false interval = 10 format = "CPU {average}C" -chip = "dell_smm-virtual-0" -inputs = ["CPU"] +chip = "pch_cannonlake-virtual-0" + + +[[block]] +block = "weather" +format = "{weather} (Mende) {temp}C" +service = { name = "openweathermap", api_key = "1ee37fef2e1668e418c3cebd62e6ccd2", city_id = "2994617", units = "metric" } [[block]] block = "weather" format = "{weather} (Cocurès) {temp}C" -service = { name = "openweathermap", api_key = "APIKEY", city_id = "2997288", units = "metric" } +service = { name = "openweathermap", api_key = "1ee37fef2e1668e418c3cebd62e6ccd2", city_id = "2997288", units = "metric" } [[block]] block = "pacman" @@ -64,13 +62,13 @@ block = "networkmanager" device_format = "{icon}{ap} {ips}" on_click = "alacritty -e nmtui" interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"] -interface_name_include = ["wlp60s0","enp59s0","proton0"] +interface_name_include = ["wlo1","eno2","tun0"] ap_format = "{ssid^10}" [[block]] block = "time" -interval = 60 -format = "%d/%m %R" +interval = 1 +format = "%d/%m/%Y %T" timezone = "Europe/Paris" [[block]] diff --git a/roles/core/templates/.i3/mine_config b/roles/core/templates/.i3/template_config similarity index 92% rename from roles/core/templates/.i3/mine_config rename to roles/core/templates/.i3/template_config index d661e48..e25cf75 100644 --- a/roles/core/templates/.i3/mine_config +++ b/roles/core/templates/.i3/template_config @@ -56,7 +56,7 @@ bindsym $mod+Ctrl+m exec pavucontrol # Start Applications bindsym $mod+Ctrl+b exec terminal -e 'bmenu' -bindsym $mod+F2 exec firefox +bindsym $mod+F2 exec palemoon bindsym $mod+F3 exec pcmanfm # bindsym $mod+F3 exec ranger bindsym $mod+Shift+F3 exec gksu pcmanfm @@ -185,7 +185,7 @@ bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+62 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 @@ -219,7 +219,7 @@ for_window [class="qt5ct"] floating enable sticky enable border normal for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal for_window [class="Simple-scan"] floating enable border normal for_window [class="(?i)System-config-printer.py"] floating enable border normal -#for_window [class="Skype"] floating enable border normal +for_window [class="Skype"] floating enable border normal for_window [class="Timeset-gui"] floating enable border normal for_window [class="Oracle VM Virtualbox Manager"] floating enable border normal for_window [class="Xfburn"] floating enable @@ -242,7 +242,7 @@ bindsym $mod+Shift+s exec "~/.bin/switch_mono_screen.sh; nitrogen --restore && i bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # Set shut down, restart and locking features -bindsym $mod+0 mode "$mode_system" +bindsym $mod+Delete mode "$mode_system" set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown mode "$mode_system" { bindsym l exec --no-startup-id i3exit lock, mode "default" @@ -338,42 +338,15 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -# Start i3bar to display a workspace bar (plus the system information i3status if available) -#bar { -# i3bar_command i3bar -# status_command i3status -# position bottom -## please set your primary output first. Example: 'xrandr --output eDP1 --primary' -# tray_output primary -# tray_output eDP1 -# bindsym button4 nop -# bindsym button5 nop -# font xft:URWGothic-Book, Icons 11 -# strip_workspace_numbers yes -# colors { -# background #222D31 -# statusline #F9FAF9 -# separator #454947 -# border backgr. text -# focused_workspace #3498db #3498db #292F34 -# active_workspace #595B5B #353836 #FDF6E3 -# inactive_workspace #595B5B #222D31 #EEE8D5 -# binding_mode #3498db #2C2C2C #F9FAF9 -# urgent_workspace #3498db #FDF6E3 #E5201D -# } -#} - bar { - font pango:DejaVu Sans Mono, Font Awesome 5 Free 13px + font pango:Inconsolata, Font Awesome 6 Free 14px position bottom status_command i3status-rs ~/.i3/config.toml colors { - separator #666666 - background #222222 - statusline #dddddd + background #2e3440 focused_workspace #0088CC #0088CC #ffffff active_workspace #333333 #333333 #ffffff - inactive_workspace #333333 #333333 #888888 + inactive_workspace #333333 #2e3440 #888888 urgent_workspace #2f343a #900000 #ffffff } } @@ -446,4 +419,4 @@ mode "$mode_gaps_outer" { bindsym Return mode "default" bindsym Escape mode "default" -} +} \ No newline at end of file From 087321881754a29640e82e770a17ef8d625de5e6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Tue, 10 Oct 2023 08:59:16 +0200 Subject: [PATCH 5/6] Merge incoming agjini changes --- install.yml | 18 +- roles/core/templates/.i3/config | 39 +-- roles/core/templates/.i3/template_config | 422 ----------------------- roles/core/templates/.i3/vol.sh | 56 --- 4 files changed, 27 insertions(+), 508 deletions(-) delete mode 100644 roles/core/templates/.i3/template_config delete mode 100755 roles/core/templates/.i3/vol.sh diff --git a/install.yml b/install.yml index bde9258..5204fef 100644 --- a/install.yml +++ b/install.yml @@ -6,15 +6,15 @@ egpu: false theme: "blue" workspaces: - - "1:" - - "2:" - - "3:" - - "4:" - - "5:" - - "6:" - - "7" - - "8" - - "9" + - "1:Mail:" + - "2:Browser:" + - "3:Dev:" + - "4:Misc.1:" + - "5:Misc.2:" + - "6:Misc.3:" + - "7:Misc.4:" + - "8:Misc.5:" + - "9:Spotify:" roles: - core vars_files: diff --git a/roles/core/templates/.i3/config b/roles/core/templates/.i3/config index f1853cb..b695fcc 100644 --- a/roles/core/templates/.i3/config +++ b/roles/core/templates/.i3/config @@ -48,10 +48,12 @@ bindsym $mod+z exec --no-startup-id morc_menu #exec --no-startup-id pa-applet bindsym $mod+Ctrl+m exec pavucontrol -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec --no-startup-id "~/.i3/vol.sh up" -bindsym XF86AudioLowerVolume exec --no-startup-id "~/.i3/vol.sh down" -bindsym XF86AudioMute exec "~/.i3/vol.sh toggle" +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status # Media player controls bindsym XF86AudioPlay exec playerctl play-pause @@ -198,7 +200,7 @@ bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 # Open applications on specific workspaces assign [class="Thunderbird"] $ws1 assign [class="firefox"] $ws2 -assign [class="Pcmanfm"] $ws9 +assign [class="Pcmanfm"] $ws8 # assign [class="Skype"] $ws5 # Open specific applications in floating mode @@ -337,13 +339,6 @@ set_from_resource $term_color13 color13 set_from_resource $term_color14 color14 set_from_resource $term_color15 color15 -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - bar { font pango: Inconsolata, FontAwesome, Icons 14 @@ -359,15 +354,17 @@ bar { padding 2 - colors { - background #222D31 - statusline #F9FAF9 - separator #454947 - focused_workspace {{ theme.color.normal.highlight }} {{ theme.color.normal.highlight }} #292F34 - active_workspace #595B5B #353836 #FDF6E3 - inactive_workspace #595B5B #222D31 #EEE8D5 - binding_mode {{ theme.color.normal.highlight }} #2C2C2C #F9FAF9 - urgent_workspace {{ theme.color.normal.highlight }} #FDF6E3 #E5201D + colors { + background #222D31 + statusline #F9FAF9 + separator #454947 + focused_workspace {{ theme.color.normal.highlight }} {{ theme.color.normal.highlight }} #292F34 + active_workspace #595B5B #353836 #FDF6E3 + inactive_workspace #595B5B #222D31 #EEE8D5 + binding_mode {{ theme.color.normal.highlight }} #2C2C2C #F9FAF9 + urgent_workspace {{ theme.color.normal.highlight }} #FDF6E3 #E5201D + } +} # Start i3bar to display a workspace bar (plus the system information i3status if available) # bar { # font pango:Inconsolata, Font Awesome 6 Free 14px diff --git a/roles/core/templates/.i3/template_config b/roles/core/templates/.i3/template_config deleted file mode 100644 index e25cf75..0000000 --- a/roles/core/templates/.i3/template_config +++ /dev/null @@ -1,422 +0,0 @@ -# i3 config file (v4) -# Please see http://i3wm.org/docs/userguide.html for a complete reference! - -# Set mod key (Mod1=, Mod4=) -set $mod Mod4 - -# set default desktop layout (default is tiling) -# workspace_layout tabbed - -# Configure border style -new_window pixel 1 -new_float normal - -# Hide borders -hide_edge_borders none - -# change borders -bindsym $mod+u border none -bindsym $mod+y border pixel 1 -bindsym $mod+n border normal - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font xft:URWGothic-Book 11 - -# Use Mouse+$mod to drag floating windows -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec terminal - -# kill focused window -bindsym $mod+Shift+q kill - -# start program launcher -bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - -# launch categorized menu -bindsym $mod+z exec --no-startup-id morc_menu - -################################################################################################ -## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## -################################################################################################ - -#exec --no-startup-id volumeicon -#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' -#exec --no-startup-id "pulseaudio --start" -#exec --no-startup-id pa-applet -bindsym $mod+Ctrl+m exec pavucontrol - -################################################################################################ - -# Screen brightness controls -# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" -# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'" - -# Start Applications -bindsym $mod+Ctrl+b exec terminal -e 'bmenu' -bindsym $mod+F2 exec palemoon -bindsym $mod+F3 exec pcmanfm -# bindsym $mod+F3 exec ranger -bindsym $mod+Shift+F3 exec gksu pcmanfm -bindsym $mod+F5 exec terminal -e 'mocp' -bindsym $mod+t exec --no-startup-id pkill compton -bindsym $mod+Ctrl+t exec --no-startup-id compton -b -bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" -bindsym Print exec --no-startup-id i3-scrot -bindsym $mod+Print --release exec --no-startup-id i3-scrot -w -bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s -bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf -bindsym $mod+Ctrl+x --release exec --no-startup-id xkill - -# focus_follows_mouse no - -# change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+m focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -# bindsym $mod+Shift+j move left -# bindsym $mod+Shift+k move down -# bindsym $mod+Shift+l move up -# bindsym $mod+Shift+m move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# workspace back and forth (with/without active container) -workspace_auto_back_and_forth yes -bindsym $mod+b workspace back_and_forth -bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth - -# split orientation -bindsym $mod+h split h;exec notify-send 'tile horizontally' -bindsym $mod+v split v;exec notify-send 'tile vertically' -bindsym $mod+q split toggle - -# toggle fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# toggle sticky -#bindsym $mod+Shift+s sticky toggle - -# focus the parent container -bindsym $mod+a focus parent - -# move the currently focused window to the scratchpad -# bindsym $mod+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. -# bindsym $mod+minus scratchpad show - -#navigate workspaces next / previous -bindsym $mod+Tab workspace next -bindsym $mod+Ctrl+Right workspace next -bindsym $mod+Ctrl+Left workspace prev - -bindsym $mod+Shift+i move workspace to output left -bindsym $mod+Shift+o move workspace to output right -bindsym $mod+Shift+p move workspace to output up -bindsym $mod+Shift+m move workspace to output down - -# Workspace names -# to display names or symbols instead of plain workspace numbers you can use -# something like: set $ws1 1:mail -# set $ws2 2: -set $ws1 1 -set $ws2 2 -set $ws3 3 -set $ws4 4 -set $ws5 5 -set $ws6 6 -set $ws7 7 -set $ws8 8 -set $ws9 9 - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+minus workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 - -# Move focused container to workspace -bindsym $mod+Ctrl+1 move container to workspace $ws1 -bindsym $mod+Ctrl+2 move container to workspace $ws2 -bindsym $mod+Ctrl+3 move container to workspace $ws3 -bindsym $mod+Ctrl+4 move container to workspace $ws4 -bindsym $mod+Ctrl+5 move container to workspace $ws5 -bindsym $mod+Ctrl+minus move container to workspace $ws6 -bindsym $mod+Ctrl+7 move container to workspace $ws7 -bindsym $mod+Ctrl+8 move container to workspace $ws8 -bindsym $mod+Ctrl+9 move container to workspace $ws9 - -# Move to workspace with focused container -bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 - -# Open applications on specific workspaces -# assign [class="Thunderbird"] $ws1 -# assign [class="Pale moon"] $ws2 -# assign [class="Pcmanfm"] $ws3 -# assign [class="Skype"] $ws5 - -# Open specific applications in floating mode -for_window [title="alsamixer"] floating enable border pixel 1 -for_window [class="calamares"] floating enable border normal -for_window [class="Clipgrab"] floating enable -for_window [title="File Transfer*"] floating enable -for_window [class="Galculator"] floating enable border pixel 1 -for_window [class="GParted"] floating enable border normal -for_window [title="i3_help"] floating enable sticky enable border normal -for_window [class="Lightdm-settings"] floating enable -for_window [class="Lxappearance"] floating enable sticky enable border normal -for_window [class="Manjaro-hello"] floating enable -for_window [class="Manjaro Settings Manager"] floating enable border normal -for_window [title="MuseScore: Play Panel"] floating enable -for_window [class="Nitrogen"] floating enable sticky enable border normal -for_window [class="Oblogout"] fullscreen enable -for_window [class="octopi"] floating enable -for_window [title="About Pale Moon"] floating enable -for_window [class="Pamac-manager"] floating enable -for_window [class="Pavucontrol"] floating enable -for_window [class="qt5ct"] floating enable sticky enable border normal -for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal -for_window [class="Simple-scan"] floating enable border normal -for_window [class="(?i)System-config-printer.py"] floating enable border normal -for_window [class="Skype"] floating enable border normal -for_window [class="Timeset-gui"] floating enable border normal -for_window [class="Oracle VM Virtualbox Manager"] floating enable border normal -for_window [class="Xfburn"] floating enable -for_window [title="Android Emulator - *"] floating enable border normal - -# switch to workspace with urgent window automatically -for_window [urgent=latest] focus - -# reload the configuration file -bindsym $mod+Shift+c reload - -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r exec "nitrogen --restore && i3-msg restart" - -bindsym $mod+Shift+z exec "~/.bin/switch.sh; nitrogen --restore && i3-msg restart" - -bindsym $mod+Shift+s exec "~/.bin/switch_mono_screen.sh; nitrogen --restore && i3-msg restart" - -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# Set shut down, restart and locking features -bindsym $mod+Delete mode "$mode_system" -set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown -mode "$mode_system" { - bindsym l exec --no-startup-id i3exit lock, mode "default" - bindsym s exec --no-startup-id i3exit suspend, mode "default" - bindsym u exec --no-startup-id i3exit switch_user, mode "default" - bindsym e exec --no-startup-id i3exit logout, mode "default" - bindsym h exec --no-startup-id i3exit hibernate, mode "default" - bindsym r exec --no-startup-id i3exit reboot, mode "default" - bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" - - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Resize window (you can also use the mouse for that) -bindsym $mod+r mode "resize" -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 5 px or 5 ppt - bindsym k resize grow height 5 px or 5 ppt - bindsym l resize shrink height 5 px or 5 ppt - bindsym semicolon resize grow width 5 px or 5 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # exit resize mode: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Lock screen -#bindsym $mod+l exec --no-startup-id blurlockm -# Autostart applications -exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec --no-startup-id nitrogen --restore; -#exec --no-startup-id nitrogen --restore; sleep 1; compton -b -#exec --no-startup-id manjaro-hello -#exec --no-startup-id nm-applet -exec --no-startup-id xfce4-power-manager -# exec --no-startup-id pamac-tray -# exec --no-startup-id blueman-applet -# exec_alwa#ys --no-startup-id sbxkb -exec --no-startup-id start_conky_maia -# exec --no-startup-id start_conky_green -# exec --no-startup-id xautolock -time 10 -locker blurlock -exec_always --no-startup-id ff-theme-util -exec_always --no-startup-id fix_xcursor - -# Color palette used for the terminal ( ~/.Xresources file ) -# Colors are gathered based on the documentation: -# https://i3wm.org/docs/userguide.html#xresources -# Change the variable name at the place you want to match the color -# of your terminal like this: -# [example] -# If you want your bar to have the same background color as your -# terminal background change the line 362 from: -# background #14191D -# to: -# background $term_background -# Same logic applied to everything else. -set_from_resource $term_background background -set_from_resource $term_foreground foreground -set_from_resource $term_color0 color0 -set_from_resource $term_color1 color1 -set_from_resource $term_color2 color2 -set_from_resource $term_color3 color3 -set_from_resource $term_color4 color4 -set_from_resource $term_color5 color5 -set_from_resource $term_color6 color6 -set_from_resource $term_color7 color7 -set_from_resource $term_color8 color8 -set_from_resource $term_color9 color9 -set_from_resource $term_color10 color10 -set_from_resource $term_color11 color11 -set_from_resource $term_color12 color12 -set_from_resource $term_color13 color13 -set_from_resource $term_color14 color14 -set_from_resource $term_color15 color15 - -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - -bar { - font pango:Inconsolata, Font Awesome 6 Free 14px - position bottom - status_command i3status-rs ~/.i3/config.toml - colors { - background #2e3440 - focused_workspace #0088CC #0088CC #ffffff - active_workspace #333333 #333333 #ffffff - inactive_workspace #333333 #2e3440 #888888 - urgent_workspace #2f343a #900000 #ffffff - } -} - -# hide/unhide i3status bar -# bindsym $mod+m bar mode toggle - -# Theme colors -# class border backgr. text indic. child_border - client.focused #496d86 #496d86 #FDF6E3 #FDF6E3 - client.focused_inactive #2F3D44 #2F3D44 #3498db #454948 - client.unfocused #2F3D44 #2F3D44 #3498db #454948 - client.urgent #CB4B16 #FDF6E3 #3498db #268BD2 - client.placeholder #000000 #0c0c0c #ffffff #000000 - - client.background #2B2C2B - -############################# -### settings for i3-gaps: ### -############################# - -# Set inner/outer gaps -gaps inner 10 -gaps outer -2 - -# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. -# gaps inner|outer current|all set|plus|minus -# gaps inner all set 10 -# gaps outer all plus 5 - -# Smart gaps (gaps used if only more than one container on the workspace) -smart_gaps on - -# Smart borders (draw borders around container only if it is not the only container on this workspace) -# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) -smart_borders on - -# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. -set $mode_gaps Gaps: (o) outer, (i) inner -set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) -bindsym $mod+Shift+g mode "$mode_gaps" - -mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym Return mode "default" - bindsym Escape mode "default" -} -mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} -mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} \ No newline at end of file diff --git a/roles/core/templates/.i3/vol.sh b/roles/core/templates/.i3/vol.sh deleted file mode 100755 index f6d7f33..0000000 --- a/roles/core/templates/.i3/vol.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -VOL_STEPS=5 - -vol() { - pamixer --get-volume -} - -inc() { - [[ -n "$1" ]] && VOL_STEPS=$1 - pamixer --unmute --allow-boost --increase $VOL_STEPS - [[ -z "$2" ]] && notifyVolume -} - -dec() { - [[ -n "$1" ]] && VOL_STEPS=$1 - pamixer --unmute --allow-boost --decrease $VOL_STEPS - [[ -z "$2" ]] && notifyVolume -} - -mute() { - pamixer -t - - local m=$(pamixer --get-mute) - if [[ "$m" == "true" ]] - then - notify-send "Mute" -i "audio-subwoofer" -t 2000 -h string:synchronous:"─" - else - notify-send "Unmute" -i "audio-subwoofer-testing" -t 2000 -h string:synchronous:"─" - fi; -} - -notifyVolume() { - local v=$(pamixer --get-volume) - [[ "$v" -gt 100 ]] && v=100 # max value - - notify-send "Volume $v" -i "audio-subwoofer-testing" -t 2000 -h int:value:"$v" -h string:synchronous:"─" -} - -case "$1" in - up) - inc "$2" "$3" - ;; - down) - dec "$2" "$3" - ;; - toggle) - mute - ;; - n|noti|notify) - noti - ;; - *) - vol - ;; -esac \ No newline at end of file From 42c8775ecc3a821da1826d9490a5c177f1b09243 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Regazzoni Date: Tue, 10 Oct 2023 12:19:56 +0200 Subject: [PATCH 6/6] :package: feat(i3): improvements - add scripts - improve i3status bar --- roles/core/templates/.i3/config | 3 +- roles/core/templates/.i3/config.toml | 142 ++++++++++++++---- roles/core/templates/.i3/scripts/connect.sh | 7 + .../.i3/scripts/switch_bluetooth_device.sh | 13 ++ 4 files changed, 134 insertions(+), 31 deletions(-) create mode 100755 roles/core/templates/.i3/scripts/connect.sh create mode 100755 roles/core/templates/.i3/scripts/switch_bluetooth_device.sh diff --git a/roles/core/templates/.i3/config b/roles/core/templates/.i3/config index b695fcc..c5c0304 100644 --- a/roles/core/templates/.i3/config +++ b/roles/core/templates/.i3/config @@ -77,7 +77,7 @@ bindsym $mod+F5 exec terminal -e 'mocp' bindsym $mod+t exec --no-startup-id pkill compton bindsym $mod+Ctrl+t exec --no-startup-id compton -b bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" -bindsym Print exec --no-startup-id flameshot gui +bindsym Print exec --no-startup-id i3-scrot bindsym $mod+Print --release exec --no-startup-id i3-scrot -w bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf @@ -370,6 +370,7 @@ bar { # font pango:Inconsolata, Font Awesome 6 Free 14px # position bottom # status_command i3status-rs ~/.i3/config.toml +# strip_workspace_numbers yes # colors { # background #2e3440 # focused_workspace #0088CC #0088CC #ffffff diff --git a/roles/core/templates/.i3/config.toml b/roles/core/templates/.i3/config.toml index 2d436c9..1278ce1 100644 --- a/roles/core/templates/.i3/config.toml +++ b/roles/core/templates/.i3/config.toml @@ -1,13 +1,14 @@ -theme = "nord-dark" -icons = "awesome5" +[theme] +#theme = "nord-dark" +theme = "dracula" + +[icons] +icons = "awesome6" [[block]] block = "memory" -format_mem = "{mem_used:6}/{mem_total:6}" -format_swap = "{swap_used:6}/{swap_total:6}" -display_type = "memory" -icons = true -clickable = true +format = " $icon $mem_used.eng(prefix:M)/$mem_total.eng(prefix:M) " +format_alt = " $icon_swap $swap_used.eng(prefix:M)/$swap_total.eng(prefix:M) " interval = 5 warning_mem = 80 warning_swap = 80 @@ -17,61 +18,142 @@ critical_swap = 95 [[block]] block = "cpu" interval = 1 -format = "{utilization}" +format = " $icon $utilization " [[block]] block = "temperature" -collapsed = false +format_alt = "$icon " interval = 10 -format = "CPU {average}C" -chip = "pch_cannonlake-virtual-0" - +format = " $icon $average " [[block]] block = "weather" -format = "{weather} (Mende) {temp}C" -service = { name = "openweathermap", api_key = "1ee37fef2e1668e418c3cebd62e6ccd2", city_id = "2994617", units = "metric" } +format = " $icon $weather (Mende) $temp " +[block.service] +name = "openweathermap" +api_key = "1ee37fef2e1668e418c3cebd62e6ccd2" +city_id = "2994617" +units = "metric" [[block]] block = "weather" -format = "{weather} (Cocurès) {temp}C" -service = { name = "openweathermap", api_key = "1ee37fef2e1668e418c3cebd62e6ccd2", city_id = "2997288", units = "metric" } +format = " $icon $weather (Cocurès) $temp " +[block.service] +name = "openweathermap" +api_key = "1ee37fef2e1668e418c3cebd62e6ccd2" +city_id = "2997288" +units = "metric" [[block]] block = "pacman" interval = 600 -format = "{aur} updates available" -format_singular = "{aur} update available" -format_up_to_date = "system up to date" +format = " $icon $aur updates available " +format_singular = " $icon $aur update available " +format_up_to_date = " $icon System up-to-date " critical_updates_regex = "(linux |linux-lts|linux-zen)" # aur_command should output available updates to stdout (ie behave as echo -ne "update\n") aur_command = "pamac checkupdates -qa" -on_click = "pamac-manager --updates" +signal = 1 +[[block.click]] +button = "left" +cmd = "pamac-manager --updates" +[[block.click]] +button = "right" +update = true [[block]] block = "music" -buttons = ["play", "next"] +format = " $icon {$combo.str(max_w:25,rot_interval:0.5) $play $next |}" +[[block.click]] +button = "left" +action = "play_pause" +[[block.click]] +button = "up" +action = "volume_up" +[[block.click]] +button = "down" +action = "volume_down" +[[block.click]] +button = "forward" +action = "seek_forward" +[[block.click]] +button = "back" +action = "seek_backward" [[block]] block = "sound" step_width = 3 -on_click = "pavucontrol" +[[block.click]] +button = "left" +cmd = "pavucontrol" + +[[block]] +block = "bluetooth" +mac = "00:00:AB:BD:8E:8B" +disconnected_format = " $icon Not connected " +format = " $icon $name{ $percentage|} " +[block.battery_state] +"0..20" = "critical" +"21..70" = "warning" +"71..100" = "good" +[[block.click]] +button = "left" +cmd = "~/.i3/scripts/switch_bluetooth_device.sh bluez_card.00_00_AB_BD_8E_8B" +[[block.click]] +button = "double_left" +cmd = "~/.i3/scripts/connect.sh 00_00_AB_BD_8E_8B" + +[[block]] +block = "net" +format = " $icon $ssid $ip " +inactive_format = "" +missing_format = "" +device = "wlo1" +[[block.click]] +button = "left" +cmd = "alacritty -e nmtui" +[[block.click]] +button = "right" +cmd = "protonvpn" + +[[block]] +block = "net" +format = " $icon $ip " +inactive_format = "" +missing_format = "" +device = "eno2" +[[block.click]] +button = "left" +cmd = "alacritty -e nmtui" +[[block.click]] +button = "right" +cmd = "protonvpn" + +[[block]] +block = "net" +format = " $icon $ip " +missing_format = "" +device = "tun0" +[[block.click]] +button = "left" +cmd = "alacritty -e nmtui" [[block]] -block = "networkmanager" -device_format = "{icon}{ap} {ips}" -on_click = "alacritty -e nmtui" -interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"] -interface_name_include = ["wlo1","eno2","tun0"] -ap_format = "{ssid^10}" +block = "net" +format = " $icon $ip " +missing_format = "" +device = "proton0" +[[block.click]] +button = "left" +cmd = "protonvpn" [[block]] block = "time" interval = 1 -format = "%d/%m/%Y %T" +format = " $icon $timestamp.datetime(f:'%d/%m/%Y %T %Z') " timezone = "Europe/Paris" [[block]] block = "battery" interval = 10 -format = "{percentage}% {time}" \ No newline at end of file +format = " $icon $percentage {$time |} " \ No newline at end of file diff --git a/roles/core/templates/.i3/scripts/connect.sh b/roles/core/templates/.i3/scripts/connect.sh new file mode 100755 index 0000000..b6cdb58 --- /dev/null +++ b/roles/core/templates/.i3/scripts/connect.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +device_mac_address=$1 + +bluetoothctl -- pair ${device_mac_address} && sleep 5 +bluetoothctl -- trust ${device_mac_address} +bluetoothctl -- connect ${device_mac_address} \ No newline at end of file diff --git a/roles/core/templates/.i3/scripts/switch_bluetooth_device.sh b/roles/core/templates/.i3/scripts/switch_bluetooth_device.sh new file mode 100755 index 0000000..7b0357f --- /dev/null +++ b/roles/core/templates/.i3/scripts/switch_bluetooth_device.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +device_mac_address=$1 + +if [[ $(pacmd list-cards | grep -c "name: <${device_mac_address}>") -eq 0 ]]; then + exit 0; +elif [[ $(pacmd list-cards | grep -c "active profile: ") -eq 1 ]]; then + echo "Enable \"handsfree_head_unit\" profile for device \"${device_mac_address}\""; + pacmd set-card-profile ${device_mac_address} handsfree_head_unit; +else + echo "Enable \"a2dp_sink\" profile for device \"${device_mac_address}\""; + pacmd set-card-profile ${device_mac_address} a2dp_sink; +fi \ No newline at end of file