From 363c18f966a924561b4a9835771aa995d8dbc9fd Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 24 Jan 2020 11:57:08 +0100 Subject: [PATCH 01/13] [i3] Improved resize mode --- .config/Cadence/GlobalSettings.conf | 1 + .config/i3/config_common | 8 ++++---- .init_config.sh | 4 ++++ README.md | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.config/Cadence/GlobalSettings.conf b/.config/Cadence/GlobalSettings.conf index a696d1c..c524bbc 100644 --- a/.config/Cadence/GlobalSettings.conf +++ b/.config/Cadence/GlobalSettings.conf @@ -1,4 +1,5 @@ [A2J] +AutoExport=true AutoStart=true ExportHW=true diff --git a/.config/i3/config_common b/.config/i3/config_common index 389f698..caac718 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -189,10 +189,10 @@ bindsym $mod+Shift+r restart # resize window (you can also use the mouse for that) mode "$resize_mode" { - bindsym Left resize grow 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 shrink width 10 px or 10 ppt + bindsym Left resize shrink width 40 px or 20 ppt; move position center + bindsym Down resize grow height 40 px or 20 ppt; move position center + bindsym Up resize shrink height 40 px or 20 ppt; move position center + bindsym Right resize grow width 40 px or 20 ppt; move position center bindsym Escape mode "default" } diff --git a/.init_config.sh b/.init_config.sh index d4276d6..443419b 100755 --- a/.init_config.sh +++ b/.init_config.sh @@ -82,3 +82,7 @@ done # Reload i3 configuration i3-msg reload && echo "Successfully reloaded i3 config" + +# Restart picom due to this bug https://github.com/yshui/picom/issues/166 +killall picom; picom &>/dev/null & + diff --git a/README.md b/README.md index 4fc33fa..2851815 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ I added to the classic Arch/i3 : * A notification daemon (urgency-aware), Dunst, controlled by shortcuts (but possibly with mouse). * A fancy lock screen, with optionnal suspend-to-RAM, either triggered by hotkey or when there is no activity for X minutes. * A Display Manager (LightDM), for login and X starting. -* A great File Explorer (SpaceFM), with hotkey / command-line / screen-split / protocol handlers / events support. +* A great File Explorer (Nemo), with hotkey / command-line / screen-split / protocol handlers / events support. * ZSH with Oh My ZSH and excellent community plugins (Git aliases, Docker autocomplete, FASD bindings, cat and man coloration...) * Some mappings to control ALSA volume from dedicated keyboards buttons, to play/plause players compatible with MPRIS D-Bus Interface spec ; some changes to key speed (X settings) ; Smooth and dark theme for GTK and for Sublime-Text... From f5ca30ba7c1c55adf9d440622bd85ce0ba04a097 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 4 May 2020 14:37:44 +0200 Subject: [PATCH 02/13] Update screen --- .config/i3/config.d/desk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index f048c8a..9adb790 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -3,11 +3,11 @@ ################################## # alterning workspace between each screen -workspace 1 output DVI-D-0 +workspace 1 output DVI-I-1 workspace 2 output HDMI-0 -workspace 3 output DVI-D-0 +workspace 3 output DVI-I-1 workspace 4 output HDMI-0 -workspace 5 output DVI-D-0 +workspace 5 output DVI-I-1 workspace 6 output HDMI-0 # ALSA key binding (media keys do not even have keycode...) From 7586f3c64ead038d9400ababd503d6af1580df05 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 4 May 2020 14:43:12 +0200 Subject: [PATCH 03/13] Use first screen for polybar --- .config/polybar/scripts/launch_polybar.sh.desk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/polybar/scripts/launch_polybar.sh.desk b/.config/polybar/scripts/launch_polybar.sh.desk index 12bd37a..c9f1c40 100755 --- a/.config/polybar/scripts/launch_polybar.sh.desk +++ b/.config/polybar/scripts/launch_polybar.sh.desk @@ -7,8 +7,8 @@ if type "xrandr"; then monitors=$(xrandr --query | grep " connected" | cut -d" " -f1) monarray=($monitors) for name in ${names[@]}; do - MONITOR=${monarray[1]} polybar -q --reload ${name} & + MONITOR=${monarray[0]} polybar -q --reload ${name} & done else polybar --reload ${name} & -fi \ No newline at end of file +fi From 17738f5827c2250fc4ea13c6b486ab19ffba15d5 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 4 May 2020 18:17:32 +0200 Subject: [PATCH 04/13] Screenshot : write in file mandatory by maim 5.6.3 --- .config/i3/scripts/screenshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/i3/scripts/screenshot.py b/.config/i3/scripts/screenshot.py index 5c3302d..cbcd27e 100755 --- a/.config/i3/scripts/screenshot.py +++ b/.config/i3/scripts/screenshot.py @@ -52,8 +52,10 @@ def read_args(argv): return (upload, save, path) def screenshot(img_format): - proc = subprocess.run(['maim', '-sl', '--color=0.6,0.4,0.2,0.2', '-f', img_format, '-u', '-m', '9', '-b', '5'], capture_output=True, check=True) - return proc.stdout + output = '/tmp/screenshot' + proc = subprocess.run(['maim', '-sl', '--color=0.6,0.4,0.2,0.2', '-f', img_format, '-u', '-m', '9', '-b', '5', output], check=True) + with open(output) as f: + return f.read() def save_img(path, img, img_format): # Create directory if needed From 3a151e044659874913de8f665be9835a4fefa53f Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 4 May 2020 18:40:00 +0200 Subject: [PATCH 05/13] open screenshot in binary mode --- .config/i3/scripts/screenshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/i3/scripts/screenshot.py b/.config/i3/scripts/screenshot.py index cbcd27e..cc2b68f 100755 --- a/.config/i3/scripts/screenshot.py +++ b/.config/i3/scripts/screenshot.py @@ -54,7 +54,7 @@ def read_args(argv): def screenshot(img_format): output = '/tmp/screenshot' proc = subprocess.run(['maim', '-sl', '--color=0.6,0.4,0.2,0.2', '-f', img_format, '-u', '-m', '9', '-b', '5', output], check=True) - with open(output) as f: + with open(output, 'rb') as f: return f.read() def save_img(path, img, img_format): From 4e7414c8099d81b8c4c7726aa9f9acda4b909d50 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:13:46 +0200 Subject: [PATCH 06/13] Add telegram in i3 config --- .config/Cadence/GlobalSettings.conf | 2 +- .config/i3/config_common | 12 +++++++++--- .config/i3/scripts/screenshot.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.config/Cadence/GlobalSettings.conf b/.config/Cadence/GlobalSettings.conf index c524bbc..baa13c2 100644 --- a/.config/Cadence/GlobalSettings.conf +++ b/.config/Cadence/GlobalSettings.conf @@ -5,7 +5,7 @@ ExportHW=true [ALSA-Audio] BridgeChannels=2 -BridgeIndexType=1 +BridgeIndexType=2 BridgeTool=alsa_in [JACK] diff --git a/.config/i3/config_common b/.config/i3/config_common index caac718..0e5543c 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -75,6 +75,7 @@ exec atom exec firefox exec thunderbird exec signal-desktop +exec telegram-desktop exec --no-startup-ip i3-msg 'workspace number 1; exec i3-sensible-terminal' @@ -111,10 +112,10 @@ mode "$film_mode" { bindsym $mod+Shift+f mode "$film_mode" # read 1 character and mark the current window with this character -bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: ' +bindsym $mod+n exec i3-input -F 'mark %s' -l 1 -P 'Mark: ' # read 1 character and go to the window with the character -bindsym $mod+Shift+m exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: ' +bindsym $mod+Shift+n exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: ' bindsym $mod+p exec picamenu @@ -211,15 +212,20 @@ for_window [title="^Terminator *"] floating enable for_window [window_role="pop-up"] floating enable for_window [window_role="task_dialog"] floating enable for_window [title="Preferences$"] floating enable +for_window [class="telegram-desktop"] floating enable for_window [class="Thunderbird"] move position center +for_window [class="Signal"] move position center +for_window [class="telegram-desktop"] move position center # scratchpad for_window [class="Signal"] move scratchpad +for_window [class="telegram-desktop"] move scratchpad # we don't use class="Thunderbird" to not move windows like "MsgCompose" to scratchpad : only the main window will be in scratchpad for_window [instance="Mail"] move scratchpad -bindsym $mod+Shift+t [instance="Mail"] scratchpad show, move position center +bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center +bindsym $mod+Shift+t [class="telegram-desktop] scratchpad show, move position center # automatic workspace assign [class="(?i)Atom"] → number 2 diff --git a/.config/i3/scripts/screenshot.py b/.config/i3/scripts/screenshot.py index cc2b68f..a70dcbe 100755 --- a/.config/i3/scripts/screenshot.py +++ b/.config/i3/scripts/screenshot.py @@ -87,7 +87,7 @@ def login(): if r.status_code != 200: raise RuntimeError("Cannot login to Lychee!") - + return s def get_album_id(session, name): From 282c10f9b2f19ee63c77f1d652361b340ff57a10 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:15:03 +0200 Subject: [PATCH 07/13] Adjust nonmixer shortcut i3 --- .config/i3/config.d/desk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index 9adb790..3fe7cce 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -50,7 +50,7 @@ exec --no-startup-id xinput set-prop 'pointer:Razer Razer DeathAdder Chroma' --t for_window [class="Non-Mixer"] mark "mixer", move scratchpad for_window [class="Catia*"] mark "jack", move scratchpad bindsym $mod+Shift+j [con_mark="jack"] scratchpad show -bindsym $mod+Shift+n [con_mark="mixer"] scratchpad show +bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show for_window [class="Mail"] resize set 1600 850 for_window [class="Signal"] resize set 1600 850 From c421e6963ae68299ca51bc010c05a678ace9ae9e Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:17:36 +0200 Subject: [PATCH 08/13] instance in i3 is class for xprop... --- .config/i3/config_common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/i3/config_common b/.config/i3/config_common index 0e5543c..58756d8 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -216,16 +216,16 @@ for_window [class="telegram-desktop"] floating enable for_window [class="Thunderbird"] move position center for_window [class="Signal"] move position center -for_window [class="telegram-desktop"] move position center +for_window [instance="telegram-desktop"] move position center # scratchpad for_window [class="Signal"] move scratchpad -for_window [class="telegram-desktop"] move scratchpad +for_window [instance="telegram-desktop"] move scratchpad # we don't use class="Thunderbird" to not move windows like "MsgCompose" to scratchpad : only the main window will be in scratchpad for_window [instance="Mail"] move scratchpad bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center -bindsym $mod+Shift+t [class="telegram-desktop] scratchpad show, move position center +bindsym $mod+Shift+t [instance="telegram-desktop] scratchpad show, move position center # automatic workspace assign [class="(?i)Atom"] → number 2 From c29ca1384d271f9de29d218dc16e3536ed0cd4f7 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:19:05 +0200 Subject: [PATCH 09/13] forgot a " again --- .config/i3/config_common | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.config/i3/config_common b/.config/i3/config_common index 58756d8..abc3ad7 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -215,8 +215,6 @@ for_window [title="Preferences$"] floating enable for_window [class="telegram-desktop"] floating enable for_window [class="Thunderbird"] move position center -for_window [class="Signal"] move position center -for_window [instance="telegram-desktop"] move position center # scratchpad for_window [class="Signal"] move scratchpad @@ -225,7 +223,7 @@ for_window [instance="telegram-desktop"] move scratchpad for_window [instance="Mail"] move scratchpad bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center -bindsym $mod+Shift+t [instance="telegram-desktop] scratchpad show, move position center +bindsym $mod+Shift+t [instance="telegram-desktop"] scratchpad show, move position center # automatic workspace assign [class="(?i)Atom"] → number 2 From 7b7aa7f2070e2910a0f7b6105348692a7267e63b Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:19:48 +0200 Subject: [PATCH 10/13] resize Telegram like Signal --- .config/i3/config.d/desk | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index 3fe7cce..66c35e2 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -54,3 +54,4 @@ bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show for_window [class="Mail"] resize set 1600 850 for_window [class="Signal"] resize set 1600 850 +for_window [instance="telegram-desktop"] resize set 1600 850 From 9c2751a1a7296c9984723897b10719010c0e25f1 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:23:53 +0200 Subject: [PATCH 11/13] Finally class (= xprop name) was ok --- .config/i3/config.d/desk | 2 +- .config/i3/config_common | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index 66c35e2..67d9568 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -54,4 +54,4 @@ bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show for_window [class="Mail"] resize set 1600 850 for_window [class="Signal"] resize set 1600 850 -for_window [instance="telegram-desktop"] resize set 1600 850 +for_window [class="telegram-desktop"] resize set 1600 850 diff --git a/.config/i3/config_common b/.config/i3/config_common index abc3ad7..511f207 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -218,12 +218,12 @@ for_window [class="Thunderbird"] move position center # scratchpad for_window [class="Signal"] move scratchpad -for_window [instance="telegram-desktop"] move scratchpad +for_window [class="telegram-desktop"] move scratchpad # we don't use class="Thunderbird" to not move windows like "MsgCompose" to scratchpad : only the main window will be in scratchpad for_window [instance="Mail"] move scratchpad bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center -bindsym $mod+Shift+t [instance="telegram-desktop"] scratchpad show, move position center +bindsym $mod+Shift+t [class="telegram-desktop"] scratchpad show, move position center # automatic workspace assign [class="(?i)Atom"] → number 2 From d088fd113de0386626984a77d9a3a594789f2a7f Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Fri, 8 May 2020 19:25:10 +0200 Subject: [PATCH 12/13] Yeah but with the right name. Choosing a file is now excluded --- .config/i3/config.d/desk | 2 +- .config/i3/config_common | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index 67d9568..abfef69 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -54,4 +54,4 @@ bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show for_window [class="Mail"] resize set 1600 850 for_window [class="Signal"] resize set 1600 850 -for_window [class="telegram-desktop"] resize set 1600 850 +for_window [class="Telegram"] resize set 1600 850 diff --git a/.config/i3/config_common b/.config/i3/config_common index 511f207..12f1eac 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -212,18 +212,18 @@ for_window [title="^Terminator *"] floating enable for_window [window_role="pop-up"] floating enable for_window [window_role="task_dialog"] floating enable for_window [title="Preferences$"] floating enable -for_window [class="telegram-desktop"] floating enable +for_window [class="Telegram"] floating enable for_window [class="Thunderbird"] move position center # scratchpad for_window [class="Signal"] move scratchpad -for_window [class="telegram-desktop"] move scratchpad +for_window [class="Telegram"] move scratchpad # we don't use class="Thunderbird" to not move windows like "MsgCompose" to scratchpad : only the main window will be in scratchpad for_window [instance="Mail"] move scratchpad bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center -bindsym $mod+Shift+t [class="telegram-desktop"] scratchpad show, move position center +bindsym $mod+Shift+t [class="Telegram"] scratchpad show, move position center # automatic workspace assign [class="(?i)Atom"] → number 2 From b443f33530468dd5612b441b98857aecc5586837 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 11 May 2020 16:11:56 +0200 Subject: [PATCH 13/13] Add Mumble to mixer and jack patterns --- .config/jack-matchmaker/patterns | 4 ++++ .config/nonmixer/Home/snapshot | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.config/jack-matchmaker/patterns b/.config/jack-matchmaker/patterns index 1f0d824..7dcd6e5 100644 --- a/.config/jack-matchmaker/patterns +++ b/.config/jack-matchmaker/patterns @@ -27,3 +27,7 @@ Pianoteq.*?2$ # Audacity PortAudio:out_\d .*:Audacity/in-1 + +# Mumble +mumble:output_1 +.*:Mumble/in-1 diff --git a/.config/nonmixer/Home/snapshot b/.config/nonmixer/Home/snapshot index 905346f..ff508ec 100644 --- a/.config/nonmixer/Home/snapshot +++ b/.config/nonmixer/Home/snapshot @@ -25,4 +25,10 @@ Gain_Module 0x2B create :parameter_values "0.000000:0.000000" :is_default 1 :chain 0x29 :active 1 Meter_Module 0x2C create :is_default 1 :chain 0x29 :active 1 JACK_Module 0x2D create :parameter_values "2.000000:0.000000" :is_default 1 :chain 0x29 :active 1 + Mixer_Strip 0x2E create :name "Mumble" :width "narrow" :tab "fader" :color 1957747793 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 + Chain 0x2F create :strip 0x2E :tab "chain" + JACK_Module 0x30 create :parameter_values "0.000000:1.000000" :is_default 1 :chain 0x2F :active 1 + Gain_Module 0x31 create :parameter_values "0.000000:0.000000" :is_default 1 :chain 0x2F :active 1 + Meter_Module 0x32 create :is_default 1 :chain 0x2F :active 1 + JACK_Module 0x33 create :parameter_values "1.000000:0.000000" :is_default 1 :chain 0x2F :active 1 }