i3 configuration merge for different environments

Also, init_config will copy external configuration files only if they have been changed. It is also now capable of deleting existing files is they have been deleted on the repo
master
Quentin Duchemin 2019-11-14 15:35:59 +01:00
parent ace9c5aa27
commit fcdd827261
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
6 changed files with 221 additions and 567 deletions

View File

@ -1,214 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Ardour>
<Config>
<Option name="auto-connect-standard-busses" value="1"/>
<Option name="output-auto-connect" value="AutoConnectMaster"/>
<Option name="input-auto-connect" value="AutoConnectPhysical"/>
<Option name="strict-io" value="1"/>
<Option name="tracks-auto-naming" value="UseDefaultNames"/>
<Option name="trace-midi-input" value="0"/>
<Option name="trace-midi-output" value="0"/>
<Option name="send-mtc" value="0"/>
<Option name="send-mmc" value="1"/>
<Option name="send-midi-clock" value="0"/>
<Option name="mmc-control" value="1"/>
<Option name="midi-feedback" value="0"/>
<Option name="mmc-receive-device-id" value="127"/>
<Option name="mmc-send-device-id" value="0"/>
<Option name="initial-program-change" value="-1"/>
<Option name="display-first-midi-bank-as-zero" value="0"/>
<Option name="inter-scene-gap-frames" value="1"/>
<Option name="midi-input-follows-selection" value="1"/>
<Option name="mtc-qf-speed-tolerance" value="5"/>
<Option name="timecode-sync-frame-rate" value="1"/>
<Option name="timecode-source-is-synced" value="0"/>
<Option name="timecode-source-2997" value="0"/>
<Option name="sync-source" value="JACK"/>
<Option name="ltc-source-port" value="system:capture_1"/>
<Option name="send-ltc" value="0"/>
<Option name="ltc-send-continuously" value="1"/>
<Option name="ltc-output-port" value=""/>
<Option name="ltc-output-volume" value="0.1258929967880249"/>
<Option name="feedback-interval-ms" value="100"/>
<Option name="use-tranzport" value="0"/>
<Option name="minimum-disk-read-bytes" value="262144"/>
<Option name="minimum-disk-write-bytes" value="262144"/>
<Option name="midi-readahead" value="1"/>
<Option name="buffering-preset" value="Medium"/>
<Option name="capture-buffer-seconds" value="10"/>
<Option name="playback-buffer-seconds" value="10"/>
<Option name="midi-track-buffer-seconds" value="1"/>
<Option name="disk-choice-space-threshold" value="57600000"/>
<Option name="auto-analyse-audio" value="0"/>
<Option name="transient-sensitivity" value="50"/>
<Option name="osc-port" value="3819"/>
<Option name="use-osc" value="0"/>
<Option name="layer-model" value="Manual"/>
<Option name="automation-follows-regions" value="1"/>
<Option name="region-boundaries-from-selected-tracks" value="1"/>
<Option name="region-boundaries-from-onscreen_tracks" value="1"/>
<Option name="default-fade-shape" value="FadeLinear"/>
<Option name="region-selection-after-split" value="None"/>
<Option name="mute-affects-pre-fader" value="0"/>
<Option name="mute-affects-post-fader" value="1"/>
<Option name="mute-affects-control-outs" value="1"/>
<Option name="mute-affects-main-outs" value="1"/>
<Option name="monitoring-model" value="SoftwareMonitoring"/>
<Option name="listen-position" value="AfterFaderListen"/>
<Option name="pfl-position" value="PFLFromAfterProcessors"/>
<Option name="afl-position" value="AFLFromAfterProcessors"/>
<Option name="use-monitor-bus" value="0"/>
<Option name="solo-control-is-listen-control" value="0"/>
<Option name="exclusive-solo" value="0"/>
<Option name="latched-record-enable" value="0"/>
<Option name="all-safe" value="0"/>
<Option name="show-solo-mutes" value="1"/>
<Option name="solo-mute-override" value="0"/>
<Option name="tape-machine-mode" value="0"/>
<Option name="solo-mute-gain" value="0"/>
<Option name="monitor-bus-preferred-bundle" value=""/>
<Option name="quieten-at-speed" value="1"/>
<Option name="link-send-and-route-panner" value="1"/>
<Option name="midi-audition-synth-uri" value="https://community.ardour.org/node/7596"/>
<Option name="clicking" value="1"/>
<Option name="click-record-only" value="0"/>
<Option name="click-sound" value=""/>
<Option name="click-emphasis-sound" value=""/>
<Option name="click-gain" value="1"/>
<Option name="use-click-emphasis" value="1"/>
<Option name="skip-playback" value="1"/>
<Option name="plugins-stop-with-transport" value="0"/>
<Option name="stop-recording-on-xrun" value="0"/>
<Option name="create-xrun-marker" value="1"/>
<Option name="stop-at-session-end" value="0"/>
<Option name="seamless-loop" value="0"/>
<Option name="preroll-seconds" value="1"/>
<Option name="loop-is-mode" value="0"/>
<Option name="preroll" value="0"/>
<Option name="postroll" value="0"/>
<Option name="rf-speed" value="2"/>
<Option name="shuttle-speed-factor" value="1"/>
<Option name="shuttle-speed-threshold" value="5"/>
<Option name="shuttle-behaviour" value="Sprung"/>
<Option name="shuttle-units" value="Percentage"/>
<Option name="shuttle-max-speed" value="8"/>
<Option name="locate-while-waiting-for-sync" value="0"/>
<Option name="disable-disarm-during-roll" value="0"/>
<Option name="auto-return-target-list" value="LastLocate,RangeSelectionStart,Loop,RegionSelectionStart"/>
<Option name="meter-falloff" value="13.300000190734863"/>
<Option name="meter-type-master" value="MeterK20"/>
<Option name="meter-type-track" value="MeterPeak"/>
<Option name="meter-type-bus" value="MeterPeak"/>
<Option name="try-autostart-engine" value="0"/>
<Option name="hide-dummy-backend" value="1"/>
<Option name="copy-demo-sessions" value="1"/>
<Option name="auditioner-output-left" value="default"/>
<Option name="auditioner-output-right" value="default"/>
<Option name="replicate-missing-region-channels" value="0"/>
<Option name="hiding-groups-deactivates-groups" value="1"/>
<Option name="verify-remove-last-capture" value="1"/>
<Option name="save-history" value="1"/>
<Option name="save-history-depth" value="20"/>
<Option name="history-depth" value="20"/>
<Option name="use-overlap-equivalency" value="0"/>
<Option name="periodic-safety-backups" value="1"/>
<Option name="periodic-safety-backup-interval" value="120"/>
<Option name="automation-interval-msecs" value="30"/>
<Option name="default-session-parent-dir" value="/mnt/data/Documents/Ardour"/>
<Option name="allow-special-bus-removal" value="0"/>
<Option name="processor-usage" value="-1"/>
<Option name="max-gain" value="2"/>
<Option name="max-recent-sessions" value="10"/>
<Option name="max-recent-templates" value="10"/>
<Option name="automation-thinning-factor" value="20"/>
<Option name="freesound-download-dir" value="/home/chosty/Freesound/snd"/>
<Option name="range-location-minimum" value="128"/>
<Option name="edit-mode" value="Slide"/>
<Option name="new-plugins-active" value="1"/>
<Option name="use-plugin-own-gui" value="1"/>
<Option name="use-windows-vst" value="1"/>
<Option name="use-lxvst" value="1"/>
<Option name="use-macvst" value="1"/>
<Option name="discover-vst-on-start" value="1"/>
<Option name="verbose-plugin-scan" value="0"/>
<Option name="vst-scan-timeout" value="0"/>
<Option name="discover-audio-units" value="0"/>
<Option name="ask-replace-instrument" value="1"/>
<Option name="ask-setup-instrument" value="0"/>
<Option name="plugin-path-vst" value="/home/chosty/.vst:/usr/lib/vst:/usr/local/lib/vst"/>
<Option name="plugin-path-lxvst" value="/usr/local/lib64/lxvst:/usr/local/lib/lxvst:/usr/lib64/lxvst:/usr/lib/lxvst:/usr/local/lib64/linux_vst:/usr/local/lib/linux_vst:/usr/lib64/linux_vst:/usr/lib/linux_vst:/usr/lib/vst:/usr/local/lib/vst"/>
<Option name="denormal-protection" value="0"/>
<Option name="denormal-model" value="DenormalFTZDAZ"/>
<Option name="osx-pingback-url" value="http://community.ardour.org/pingback/osx/"/>
<Option name="linux-pingback-url" value="http://community.ardour.org/pingback/linux/"/>
<Option name="windows-pingback-url" value="http://community.ardour.org/pingback/windows/"/>
<Option name="tutorial-manual-url" value="http://ardour.org/tutorial"/>
<Option name="reference-manual-url" value="http://manual.ardour.org/"/>
<Option name="updates-url" value="http://ardour.org/whatsnew.html"/>
<Option name="donate-url" value="http://ardour.org/donate"/>
<Option name="video-advanced-setup" value="0"/>
<Option name="video-server-url" value="http://127.0.0.1:1554"/>
<Option name="video-server-docroot" value="/"/>
<Option name="show-video-export-info" value="1"/>
<Option name="show-video-server-dialog" value="0"/>
<Option name="export-preroll" value="10"/>
<Option name="export-silence-threshold" value="-inf"/>
</Config>
<Metadata/>
<Extra>
<Keyboard copy-modifier="4" edit-button="3" edit-modifier="4" delete-button="3" delete-modifier="1" snap-modifier="8" snap-delta-modifier="67108936" insert-note-button="1" insert-note-modifier="4" constraint-modifier="1" trim-contents-modifier="4" trim-overlap-modifier="1" trim-anchored-modifier="5" fine-adjust-modifier="12" push-points-modifier="67108932" note-size-relative-modifier="1"/>
<UI status-bar="WallClock,Disk,DSP,Buffers,Audio,TCFormat,Format">
<Window name="key-editor" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="session-options-editor" visible="0" x-off="1626" y-off="231" x-size="782" y-size="365"/>
<Window name="speaker-config" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="about" visible="0" x-off="0" y-off="0" x-size="424" y-size="610"/>
<Window name="add-routes" visible="0" x-off="-1" y-off="-1" x-size="669" y-size="503"/>
<Window name="add-video" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="inspector" visible="0" x-off="1968" y-off="0" x-size="620" y-size="616"/>
<Window name="audio-midi-setup" visible="0" x-off="1928" y-off="0" x-size="612" y-size="430"/>
<Window name="video-export" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="script-manager" visible="0" x-off="2866" y-off="449" x-size="355" y-size="356"/>
<Window name="bundle-manager" visible="0" x-off="2043" y-off="73" x-size="480" y-size="240"/>
<Window name="locations" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="big-clock" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="audio-connection-manager" visible="0" x-off="1996" y-off="62" x-size="530" y-size="505"/>
<Window name="midi-connection-manager" visible="0" x-off="2104" y-off="84" x-size="459" y-size="401"/>
<Window name="idle-o-meter" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="RPM-54" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="RPM-801" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="P-54-85" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="P-54-84" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="P-54-86" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="P-54-87" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="PM-85-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-84-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-86-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-87-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="P-801-833" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="P-801-831" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="P-801-868" visible="0" x-off="731" y-off="312" x-size="884" y-size="652" custom-ui="1"/>
<Window name="P-801-834" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" custom-ui="1"/>
<Window name="PM-833-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-831-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-868-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Window name="PM-834-" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1"/>
<Tearoffs/>
</UI>
<AudioMIDISetup>
<EngineStates>
<State backend="JACK" driver="" device="" input-device="" output-device="" sample-rate="48000" buffer-size="1024" n-periods="1082" input-latency="0" output-latency="0" input-channels="0" output-channels="0" active="1" use-buffered-io="0" midi-option="" lru="1529541541">
<MIDIDevices/>
</State>
</EngineStates>
</AudioMIDISetup>
</Extra>
<ControlProtocols>
<Protocol name="PreSonus FaderPort" active="0"/>
<Protocol name="Open Sound Control (OSC)" active="0"/>
<Protocol name="Ableton Push 2" active="0"/>
<Protocol name="Mackie" active="0"/>
<Protocol name="PreSonus FaderPort8" active="0"/>
<Protocol name="Generic MIDI" active="0"/>
<Protocol name="Steinberg CC121" active="0"/>
</ControlProtocols>
</Ardour>

View File

@ -0,0 +1,45 @@
##################################
# STARTING CONFIGURATION
##################################
# ALSA key binding (media keys do not even have keycode...)
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%-
bindsym KP_Multiply exec --no-startup-id amixer set 'Master' toggle
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPrev exec --no-startup-ip playerctl prev
bindsym XF86AudioNext exec --no-startup-id playerctl next
##################################
# PROGRAMS STARTED AUTOMATICALLY
##################################
# cadence will take care of all we need :
# - Config tells Cadence to start LADISH, export MIDI hw and start A2J ;
# - LADISH implies JACK starts, then it will starts needed apps (e.g. Non-Mixer)
exec --no-startup-id cadence-session-start --start
exec --no-startup-id catia
# automate port mapping for applications
exec --no-startup-id jack-matchmaker -p ~/.config/jack-matchmaker/patterns
# set mouse acceleration
exec --no-startup-id xinput set-prop 'pointer:Razer Razer DeathAdder Chroma' --type=float 'libinput Accel Speed' -.4
##################################
# BINDINGS FOR STARTING PROGRAMS
##################################
##################################
# BINDINGS FOR STANDARD OPERATIONS
##################################
##################################
# OPERATIONS FOR SPECIFIC WINDOWS
##################################
# scratchpad
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+m [con_mark="mixer"] scratchpad show

View File

@ -0,0 +1,42 @@
##################################
# STARTING CONFIGURATION
##################################
# alterning workspace between each screen
workspace 1 output DVI-D-0
workspace 2 output HDMI-0
workspace 3 output DVI-D-0
workspace 4 output HDMI-0
workspace 5 output DVI-D-0
workspace 6 output HDMI-0
# ALSA keybinding
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D hw:PCH -M sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset 'Master' toggle
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPrev exec --no-startup-ip playerctl prev
bindsym XF86AudioNext exec --no-startup-id playerctl next
# set DPI along with .Xresources
exec xrandr --dpi 160
##################################
# PROGRAMS STARTED AUTOMATICALLY
##################################
# set mouse acceleration
exec --no-startup-id xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' 'libinput Accel Speed' 0.8
exec --no-startup-id xinput set-prop 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)' 'libinput Accel Speed' 0.8
##################################
# BINDINGS FOR STARTING PROGRAMS
##################################
##################################
# BINDINGS FOR STANDARD OPERATIONS
##################################
##################################
# OPERATIONS FOR SPECIFIC WINDOWS
##################################

View File

@ -1,224 +0,0 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Roboto, Bold 10
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec rofi -show run -theme sidebar
bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py
# 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
# 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
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter 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+z 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
# focus the parent container
bindsym $mod+Shift+q focus parent
# switch to workspace
bindsym $mod+ampersand workspace number 1
bindsym $mod+eacute workspace number 2
bindsym $mod+quotedbl workspace number 3
bindsym $mod+apostrophe workspace number 4
bindsym $mod+parenleft workspace number 5
bindsym $mod+minus workspace number 6
bindsym $mod+egrave workspace number 7
bindsym $mod+underscore workspace number 8
bindsym $mod+ccedilla workspace number 9
bindsym $mod+agrave workspace number 10
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace 1
bindsym $mod+Shift+eacute move container to workspace 2
bindsym $mod+Shift+quotedbl move container to workspace 3
bindsym $mod+Shift+apostrophe move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+minus move container to workspace 6
bindsym $mod+Shift+egrave move container to workspace 7
bindsym $mod+Shift+underscore move container to workspace 8
bindsym $mod+Shift+ccedilla move container to workspace 9
bindsym $mod+Shift+agrave move container to workspace 10
# 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 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'"
# no border nor title
new_window none
# hide borders when touching edges
hide_edge_borders both
#do not sync mouse position and focus
focus_follows_mouse no
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
# 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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#start compositor
exec --no-startup-id compton
#start polybar
exec_always --no-startup-id $HOME/.config/polybar/scripts/launch_polybar.sh
#fr
exec setxkbmap fr
#numlock
exec numlockx on
#popup config Firefox / Terminator / General Purpose
for_window [window_role="Steam"] floating enable
for_window [window_role="About"] floating enable
for_window [window_role="Organizer"] floating enable
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
set $Locker ~/.config/i3/lock/lock.sh
#Just lock the screen
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
#Lock and suspend to RAM
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl suspend
exec_always --no-startup-id xset dpms 600
exec_always --no-startup-id xautolock -time 9 -locker $Locker
#Notifications
exec --no-startup-id dunst
#i3 gaps
gaps inner 10
gaps outer 0
smart_gaps on
# Set mouse acceleration
exec_always --no-startup-id xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' 'libinput Accel Speed' 0.8
exec_always --no-startup-id xinput set-prop 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)' 'libinput Accel Speed' 0.8
# ALSA key binding (media keys do not even have keycode...)
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D hw:PCH -M sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset 'Master' toggle
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPrev exec --no-startup-ip playerctl prev
bindsym XF86AudioNext exec --no-startup-id playerctl next
# Luminosity on laptop (not xorg-xbacklight but the compatible and working acpilight)
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 -steps 200
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 -steps 200
bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -dec 30
bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -inc 30
#Open explorer without last tabs
bindsym Mod4+e exec spacefm -n
#Open explorer with last tabs (sym to Ctrl+T, Ctrl+Maj+T)
bindsym Mod4+Shift+e exec spacefm
#Gamma, color temp and brightness night adjuster
exec --no-startup-id redshift-gtk
# Set ALSA initial volume
exec-always --no-startup-id amixer -D hw:PCH -M sset Master 50%
exec --no-startup-id pavucontrol
exec standardnotes-desktop
exec atom
exec firefox
for_window [class="^Firefox*"] move to workspace 3
for_window [class="^Thunderbird*"] move scratchpad
bindsym $mod+Shift+t [class="^Thunderbird*"] scratchpad show
for_window [class="^Signa*"] move scratchpad
bindsym $mod+Shift+s [class="^Signa*"] scratchpad show
for_window [class="^Pavucontrol"] move scratchpad
bindsym $mod+Shift+p [class="^Pavucontrol"] move scratchpad
for_window [class="Atom"] move to workspace 2
for_window [class="Tor Browser"] move to workspace 5
for_window [class="Standard Notes"] move to workspace 4
# Automate port mapping for applications
exec --no-startup-id jack-matchmaker -p ~/.config/jack-matchmaker/patterns
# Set DPI along with .Xresources
exec xrandr --dpi 160
# Communication
exec thunderbird
exec signal-desktop
# Screenshot
# Save to file
bindsym $mod+Print exec ~/.config/i3/scripts/screenshot.py -s
# Upload to Lychee
bindsym Print exec ~/.config/i3/scripts/screenshot.py -u

View File

@ -1,40 +1,112 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4) # i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
##################################
# STARTING CONFIGURATION
##################################
# Mod1 = alt
set $mod Mod1 set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font # font for window titles.
# is used in the bar {} block below.
font pango:Roboto, Bold 10 font pango:Roboto, Bold 10
# 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
# no border nor title
new_window none
# hide borders when touching edges
hide_edge_borders both
# do not sync mouse position and focus
focus_follows_mouse no
# script to lock the screen
set $Locker ~/.config/i3/lock/lock.sh
# settings for i3 gaps
gaps inner 10
gaps outer 0
smart_gaps on
##################################
# PROGRAMS STARTED AUTOMATICALLY
##################################
#start compositor
exec --no-startup-id compton
#start polybar
exec --no-startup-id $HOME/.config/polybar/scripts/launch_polybar.sh
# configure keyboard layout
exec setxkbmap fr
# set numlock on
exec numlockx on
# turn to black screen after 9 minutes of doing nothing
exec --no-startup-id xset dpms 600
# autolock after 9 minutes of doing nothing
exec --no-startup-id xautolock -time 9 -locker $Locker -corners ----
# notifications
exec dunst
# gamma, color temp and brightness night adjuster
exec redshift-gtk
# set ALSA initial volume
exec --no-startup-id amixer -D hw:PCH -M sset Master 50%
# standard apps for working
exec standardnotes-desktop
exec atom
exec firefox
exec terminator
exec thunderbird
exec signal-desktop
##################################
# BINDINGS FOR STARTING PROGRAMS
##################################
# start a terminal # start a terminal
bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+Return exec i3-sensible-terminal
# kill focused window # start rofi (a program launcher)
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec rofi -show run -theme sidebar bindsym $mod+d exec rofi -show run -theme sidebar
bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py
# alternatively, you can use the cursor keys: # just lock the screen
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
# lock and suspend to RAM
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl suspend
# open explorer without last tabs
bindsym Mod4+e exec spacefm -n
# open explorer with last tabs (sym to Ctrl+T, Ctrl+Maj+T)
bindsym Mod4+Shift+e exec spacefm
# screenshot and save to file
bindsym $mod+Print exec ~/.config/i3/scripts/screenshot.py -s
# screenshot and upload to Lychee
bindsym Print exec ~/.config/i3/scripts/screenshot.py -u
##################################
# BINDINGS FOR STANDARD OPERATIONS
##################################
# kill focused window
bindsym $mod+q kill
# change focus
bindsym $mod+Left focus left bindsym $mod+Left focus left
bindsym $mod+Down focus down bindsym $mod+Down focus down
bindsym $mod+Up focus up bindsym $mod+Up focus up
bindsym $mod+Right focus right bindsym $mod+Right focus right
# alternatively, you can use the cursor keys: # move containers
bindsym $mod+Shift+Left move left bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up bindsym $mod+Shift+Up move up
@ -51,17 +123,17 @@ bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking bindsym $mod+s layout stacking
bindsym $mod+z layout tabbed bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split bindsym $mod+e layout toggle split
# toggle tiling / floating # toggle tiling / floating
bindsym $mod+Shift+space floating toggle bindsym $mod+space floating toggle
# change focus between tiling / floating windows # change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle bindsym $mod+Shift+space focus mode_toggle
# focus the parent container # focus the parent container
bindsym $mod+Shift+q focus parent bindsym $mod+a focus parent
# switch to workspace # switch to workspace
bindsym $mod+ampersand workspace number 1 bindsym $mod+ampersand workspace number 1
@ -89,63 +161,34 @@ bindsym $mod+Shift+agrave move container to workspace 10
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart bindsym $mod+Shift+r 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'"
# no border nor title
new_window none
# hide borders when touching edges
hide_edge_borders both
#do not sync mouse position and focus
focus_follows_mouse no
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
mode "resize" { mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width. # Pressing left will shrink the windows width.
# Pressing right will grow the windows width. # Pressing right will grow the windows width.
# Pressing up will shrink the windows height. # Pressing up will shrink the windows height.
# Pressing down will grow the windows height. # Pressing down will grow the windows height.
# same bindings, but for the arrow keys # same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize grow width 10 px or 10 ppt
bindsym Down resize grow height 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 Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize shrink width 10 px or 10 ppt
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
#put workspace 1 on main screen ##################################
workspace 1 output DVI-D-0 # OPERATIONS FOR SPECIFIC WINDOWS
workspace 2 output HDMI-0 ##################################
workspace 3 output DVI-D-0
workspace 4 output HDMI-0
workspace 5 output DVI-D-0
workspace 6 output HDMI-0
#start compositor # some windows will float automatically
exec --no-startup-id compton
#start polybar
exec --no-startup-id $HOME/.config/polybar/scripts/launch_polybar.sh
#fr
exec setxkbmap fr
#numlock
exec numlockx on
#popup config Firefox / Terminator / General Purpose
for_window [window_role="Steam"] floating enable for_window [window_role="Steam"] floating enable
for_window [window_role="About"] floating enable for_window [window_role="About"] floating enable
for_window [window_role="Organizer"] floating enable for_window [window_role="Organizer"] floating enable
@ -154,79 +197,15 @@ for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable for_window [window_role="task_dialog"] floating enable
for_window [title="Preferences$"] floating enable for_window [title="Preferences$"] floating enable
set $Locker ~/.config/i3/lock/lock.sh # scratchpad
#Just lock the screen for_window [class="Signal"] mark "msg", move scratchpad
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
#Lock and suspend to RAM
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl suspend
exec_always --no-startup-id xset dpms 600
exec_always --no-startup-id xautolock -time 9 -locker $Locker -corners ----
#Notifications
exec --no-startup-id dunst
#i3 gaps
gaps inner 10
gaps outer 0
smart_gaps on
# ALSA key binding (media keys do not even have keycode...)
bindsym KP_Add exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
bindsym KP_Subtract exec --no-startup-id amixer -D hw:PCH -M sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer set 'Master' toggle
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPrev exec --no-startup-ip playerctl prev
bindsym XF86AudioNext exec --no-startup-id playerctl next
#Open explorer without last tabs
bindsym Mod4+e exec spacefm -n
#Open explorer with last tabs (sym to Ctrl+T, Ctrl+Maj+T)
bindsym Mod4+Shift+e exec spacefm
#Gamma, color temp and brightness night adjuster
exec --no-startup-id redshift-gtk
# Set ALSA initial volume
exec-always --no-startup-id amixer -D hw:PCH -M sset Master 50%
for_window [class="Non-Mixer"] mark "jack", move scratchpad
for_window [class="Catia*"] move to workspace 4
for_window [class="^Signal"] mark "msg", move scratchpad
for_window [class="Thunderbird"] mark "mail", move scratchpad for_window [class="Thunderbird"] mark "mail", move scratchpad
bindsym $mod+Shift+t [con_mark="mail"] scratchpad show bindsym $mod+Shift+t [con_mark="mail"] scratchpad show
bindsym $mod+Shift+j [con_mark="jack"] scratchpad show
bindsym $mod+Shift+s [con_mark="msg"] scratchpad show bindsym $mod+Shift+s [con_mark="msg"] scratchpad show
# automatic workspace
for_window [class="Terminator"] move to workspace 1 for_window [class="Terminator"] move to workspace 1
for_window [class="Atom"] move to workspace 2 for_window [class="Atom"] move to workspace 2
for_window [class="Firefox"] move to workspace 3 for_window [class="Firefox"] move to workspace 3
for_window [class="Standard Notes"] move to workspace 4 for_window [class="Standard Notes"] move to workspace 4
for_window [class="Tor Browser"] move to workspace 5 for_window [class="Tor Browser"] move to workspace 5
exec standardnotes-desktop
exec atom
exec firefox
exec terminator
# Cadence will take care of all we need :
# - Config tells Cadence to start LADISH, export MIDI hw and start A2J ;
# - LADISH implies JACK starts, then it will starts needed apps (e.g. Non-Mixer)
exec --no-startup-id cadence-session-start --start
exec --no-startup-id catia
# Automate port mapping for applications
exec --no-startup-id jack-matchmaker -p ~/.config/jack-matchmaker/patterns
# Set mouse acceleration
exec --no-startup-id xinput set-prop 'pointer:Razer Razer DeathAdder Chroma' --type=float 'libinput Accel Speed' -.4
# Communication
exec thunderbird
exec signal-desktop
# Screenshot
# Save to file
bindsym $mod+Print exec ~/.config/i3/scripts/screenshot.py -s
# Upload to Lychee
bindsym Print exec ~/.config/i3/scripts/screenshot.py -u

View File

@ -4,6 +4,24 @@ LAPTOP="laptop"
DESKTOP="desk" DESKTOP="desk"
DEST_FILENAME="dest" DEST_FILENAME="dest"
# Check if a file has been modified and deleted since last commit, if so perform an action
# $1 : path of file
# $2 : command to launch if file has been created of modifed
# $3 : command to launch if file has been deleted
function check_copy() {
echo "$changed_files" | grep --quiet "$1"
if [ $? == "0" ]; then
echo "$changed_files" | cut -f 1 | grep --quiet "R"
if [ $? == "0" ]; then
echo "* $1 has been removed"
echo "* Running $3" && eval "$3"
else
echo "* Changes detected in $1"
echo "* Running $2" && eval "$2"
fi
fi
}
function usage() { function usage() {
echo "$0: creates symlink for divergent config between laptop and desktop (e.g. battery management...) and copy configuration to external locations" echo "$0: creates symlink for divergent config between laptop and desktop (e.g. battery management...) and copy configuration to external locations"
echo "usage: $0 [${LAPTOP}|${DESKTOP}]" echo "usage: $0 [${LAPTOP}|${DESKTOP}]"
@ -22,6 +40,8 @@ if [ "${1}" != "${LAPTOP}" ] && [ "${1}" != "${DESKTOP}" ]; then
usage usage
fi fi
changed_files="$(git --git-dir=$HOME/.cfg/ --work-tree=$HOME diff-tree -r --name-status --no-commit-id HEAD@{1} HEAD)"
echo "=== Create symlink to *.${1} regular files ===" echo "=== Create symlink to *.${1} regular files ==="
# Take all specific files and create a symlink pointing to it without the extension # Take all specific files and create a symlink pointing to it without the extension
# This file will be used by applications # This file will be used by applications
@ -36,7 +56,7 @@ for f in `find ${HOME} -maxdepth 1 -mindepth 1 -type f -name "*.${1}"`; do
ln -sf ${f} ${f%.*} ln -sf ${f} ${f%.*}
done done
echo -e "\n=== Copy configuration which resides in outer directory ===" echo -e "\n=== Copy changed configuration which resides in outer directory ==="
# Destination files are regular files # Destination files are regular files
for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
DIR=`dirname "${f}"` DIR=`dirname "${f}"`
@ -45,7 +65,13 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
# This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage # This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage
for config_file in `find ${DIR} -maxdepth 1 -mindepth 1 -not \( -name "*.${LAPTOP}" -o -name "*.${DESKTOP}" -o -name "${DEST_FILENAME}" \)`; do for config_file in `find ${DIR} -maxdepth 1 -mindepth 1 -not \( -name "*.${LAPTOP}" -o -name "*.${DESKTOP}" -o -name "${DEST_FILENAME}" \)`; do
# Now copy to destination # Now copy to destination
echo "Copying ${config_file} to ${DEST}..." check_copy "${config_file}" "sudo cp ${config_file} ${DEST}" "sudo rm ${DEST}"
sudo cp ${config_file} ${DEST}
done done
done done
echo -e "\n=== Generate i3 config file ==="
cp ${CONFIG}/i3/config_common ${CONFIG}/i3/config
for f in `find ${CONFIG}/i3/config.d -type f -name "${1}"`; do
echo "Found ${f}, add to regular config file"
cat "${f}" >> ${CONFIG}/i3/config
done