Update autorandr config

master
Florestan Bredow 2 years ago
parent 0ecf4cc244
commit 5f298e2959

3
.gitignore vendored

@ -1 +1,2 @@
config/i3/config
config/i3/config
config/fish/functions/fisher.fish

@ -20,7 +20,7 @@ rate 60.00
output DP2-3
crtc 2
mode 1920x1080
pos 1920x324
pos 1920x146
rate 60.00
output eDP1
crtc 0

@ -1,4 +1,13 @@
#!/usr/bin/env bash
ln -sf ${HOME}/.config/i3/config.home ${HOME}/.config/i3/config
i3-msg restart
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
readonly main_screen="eDP1"
readonly second_screen="DP2-1"
readonly third_screen="DP2-3"
function main() {
bash ${HOME}/.config/autorandr/set_workspaces.sh eDP1 DP2-1 DP2-3
pacmd set-card-profile 0 HiFi: Default
}
main

@ -1,3 +1,11 @@
ln -sf ${HOME}/.config/i3/config.mobile ${HOME}/.config/i3/config
i3-msg restart
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
#!/usr/bin/env bash
readonly main_screen="eDP1"
readonly second_screen="eDP1"
readonly third_screen="eDP1"
function main() {
bash ${HOME}/.config/autorandr/set_workspaces.sh "${main_screen}" "${second_screen}" "${third_screen}"
}
main

@ -0,0 +1,37 @@
#!/usr/bin/env bash
readonly main_screen="$1"
readonly second_screen="$2"
readonly third_screen="$3"
function move_workspace_to_screen() {
workspace="${1}"
screen="${2}"
i3-msg workspace "${workspace}"
i3-msg move workspace to output "${screen}"
sed -i "/^workspace \"${workspace}\" output/ c \\workspace \"${workspace}\" output \"${screen}\"" ${HOME}/.config/i3/config
}
function main() {
move_workspace_to_screen 1 "${main_screen}"
move_workspace_to_screen 3 "${main_screen}"
move_workspace_to_screen 4 "${main_screen}"
move_workspace_to_screen 5 "${second_screen}"
move_workspace_to_screen 6 "${second_screen}"
move_workspace_to_screen 7 "${second_screen}"
move_workspace_to_screen 8 "${second_screen}"
move_workspace_to_screen 9 "${third_screen}"
move_workspace_to_screen 10 "${third_screen}"
move_workspace_to_screen 11 "${third_screen}"
move_workspace_to_screen 12 "${third_screen}"
i3-msg workspace 1
bash ${HOME}/.config/polybar/launch.sh
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
}
main

@ -1,8 +1,8 @@
output DP1
off
output DP2
output DP1-3
off
output DP2-3
output DP2
off
output HDMI1
off
@ -18,12 +18,12 @@ mode 1920x1080
pos 0x0
primary
rate 60.00
output DP2-1
output DP1-1
crtc 1
mode 1920x1080
pos 1920x0
rate 60.00
output DP2-2
output DP1-2
crtc 2
mode 1920x1080
pos 3840x0

@ -1,3 +1,12 @@
ln -sf ${HOME}/.config/i3/config.work ${HOME}/.config/i3/config
i3-msg restart
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
#!/usr/bin/env bash
readonly main_screen="eDP1"
readonly second_screen="DP1-1"
readonly third_screen="DP1-2"
function main() {
bash ${HOME}/.config/autorandr/set_workspaces.sh "${main_screen}" "${second_screen}" "${third_screen}"
pacmd set-card-profile 0 HiFi: Default
}
main

@ -1,3 +1,3 @@
DP2-1 00ffffffffffff0010acd9d04c475530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00313835375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a20202020202000ae
DP2-2 00ffffffffffff0010acd9d04c4b5530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00484a34375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a2020202020200082
DP1-1 00ffffffffffff0010acd9d04c475530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00313835375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a20202020202000ae
DP1-2 00ffffffffffff0010acd9d04c4b5530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00484a34375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a2020202020200082
eDP1 00ffffffffffff003870560000000000121e0104951f1178027535955c578f281d5054000000010101010101010101010101010101012a3680a070381f403020350035ae1000001a522b80a070381f403020350035ae1000001a000000fe004a34594b4780313430354c3031000000000000412199001100000a010a2020000c

@ -1,30 +0,0 @@
output DP1
off
output DP1-3
off
output DP2
off
output HDMI1
off
output HDMI2
off
output HDMI3
off
output VIRTUAL1
off
output eDP1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.00
output DP1-1
crtc 1
mode 1920x1080
pos 1920x0
rate 60.00
output DP1-2
crtc 2
mode 1920x1080
pos 3840x0
rate 60.00

@ -1,3 +0,0 @@
ln -sf ${HOME}/.config/i3/config.work2 ${HOME}/.config/i3/config
i3-msg restart
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"

@ -1,3 +0,0 @@
DP1-1 00ffffffffffff0010acd9d04c475530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00313835375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a20202020202000ae
DP1-2 00ffffffffffff0010acd9d04c4b5530091d0104a5351e783a0565a756529c270f5054a54b00714f8180a9c0d1c00101010101010101023a801871382d40582c45000f282100001e000000ff00484a34375a54320a2020202020000000fc0044454c4c205032343139480a20000000fd00384c1e5311010a2020202020200082
eDP1 00ffffffffffff003870560000000000121e0104951f1178027535955c578f281d5054000000010101010101010101010101010101012a3680a070381f403020350035ae1000001a522b80a070381f403020350035ae1000001a000000fe004a34594b4780313430354c3031000000000000412199001100000a010a2020000c

@ -1 +1,7 @@
fisher self-complete
complete -c fisher -x -l help -d "print usage help"
complete -c fisher -x -l version -d "print fisher version"
complete -c fisher -x -n "__fish_use_subcommand" -a install -d "install plugins"
complete -c fisher -x -n "__fish_use_subcommand" -a update -d "update installed plugins"
complete -c fisher -x -n "__fish_use_subcommand" -a remove -d "remove installed plugins"
complete -c fisher -x -n "__fish_use_subcommand" -a list -d "list installed plugins matching <regex>"
complete -c fisher -x -n "__fish_seen_subcommand_from update remove" -a "(fisher list)"

@ -2,6 +2,8 @@
# VERSION: 3.0
SETUVAR --export --path GOPATH:/home/bredow/build/go
SETUVAR __fish_initialized:3100
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/bredow/\x2econfig/fish/functions/fisher\x2efish\x1e/home/bredow/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7

@ -1,5 +0,0 @@
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end

@ -1,15 +0,0 @@
function fish_mode_prompt
if test "$fish_key_bindings" = "fish_vi_key_bindings"
or test "$fish_key_bindings" = "fish_hybrid_key_bindings"
switch $fish_bind_mode
case default
prompt_segment blue black "N"
case insert
prompt_segment green black "I"
case replace_one
prompt_segment red black "R"
case visual
prompt_segment magenta black "V"
end
end
end

@ -1,266 +0,0 @@
# Set these options in your config.fish (if you want to :])
#
# set -g theme_display_user yes
# set -g theme_hostname never
# set -g theme_hostname always
# set -g default_user your_normal_user
# Backward compatibility
#
# Note: Do not depend on these behavior. These can be removed in anytime by the
# author in the name of code readability.
if set -q theme_hide_hostname
# Existing $theme_hostname will always override $theme_hide_hostname
if not set -q theme_hostname
if [ "theme_hide_hostname" = "yes" ]
set -g theme_hostname never
end
if [ "theme_hide_hostname" = "no" ]
set -g theme_hostname always
end
end
end
#
# Segments functions
#
set -g current_bg NONE
set -g segment_separator \uE0B0
function prompt_segment -d "Function to draw a segment"
set -l bg
set -l fg
if [ -n "$argv[1]" ]
set bg $argv[1]
else
set bg normal
end
if [ -n "$argv[2]" ]
set fg $argv[2]
else
set fg normal
end
if [ "$current_bg" != 'NONE' -a "$argv[1]" != "$current_bg" ]
set_color -b $bg
set_color $current_bg
echo -n "$segment_separator "
set_color -b $bg
set_color $fg
else
set_color -b $bg
set_color $fg
echo -n " "
end
set current_bg $argv[1]
if [ -n "$argv[3]" ]
echo -n -s $argv[3] " "
end
end
function prompt_finish -d "Close open segments"
if [ -n $current_bg ]
set_color -b normal
set_color $current_bg
echo -n "$segment_separator "
end
set_color normal
set -g current_bg NONE
end
#
# Components
#
function prompt_virtual_env -d "Display Python virtual environment"
if test "$VIRTUAL_ENV"
prompt_segment white black (basename $VIRTUAL_ENV)
end
end
function prompt_user -d "Display current user if different from $default_user"
set -l BG 444444
set -l FG BCBCBC
if [ "$theme_display_user" = "yes" ]
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
set USER (whoami)
get_hostname
if [ $HOSTNAME_PROMPT ]
set USER_PROMPT $USER@$HOSTNAME_PROMPT
else
set USER_PROMPT $USER
end
prompt_segment $BG $FG $USER_PROMPT
end
else
get_hostname
if [ $HOSTNAME_PROMPT ]
prompt_segment $BG $FG $HOSTNAME_PROMPT
end
end
end
function get_hostname -d "Set current hostname to prompt variable $HOSTNAME_PROMPT if connected via SSH"
set -g HOSTNAME_PROMPT ""
if [ "$theme_hostname" = "always" -o \( "$theme_hostname" != "never" -a -n "$SSH_CLIENT" \) ]
set -g HOSTNAME_PROMPT (hostname)
end
end
function prompt_dir -d "Display the current directory"
prompt_segment 666666 000000 (prompt_pwd)
end
function prompt_hg -d "Display mercurial state"
set -l branch
set -l state
if command hg id >/dev/null 2>&1
if command hg prompt >/dev/null 2>&1
set branch (command hg prompt "{branch}")
set state (command hg prompt "{status}")
set branch_symbol \uE0A0
if [ "$state" = "!" ]
prompt_segment red white "$branch_symbol $branch ±"
else if [ "$state" = "?" ]
prompt_segment yellow black "$branch_symbol $branch ±"
else
prompt_segment green black "$branch_symbol $branch"
end
end
end
end
function prompt_git -d "Display the current git state"
set -l ref
if command git rev-parse --is-inside-work-tree >/dev/null 2>&1
set ref (command git symbolic-ref HEAD 2> /dev/null)
if [ $status -gt 0 ]
set -l branch (command git show-ref --head -s --abbrev |head -n1 2> /dev/null)
set ref "$branch "
end
set branch_symbol \uE0A0
set -l branch (echo $ref | sed "s-refs/heads/-$branch_symbol -")
set -l BG PROMPT
set -l dirty (command git status --porcelain --ignore-submodules=dirty 2> /dev/null)
if [ "$dirty" = "" ]
set BG green
set PROMPT "$branch"
else
set BG yellow
set dirty ''
# Check if there's any commit in the repo
set -l empty 0
git rev-parse --quiet --verify HEAD > /dev/null 2>&1; or set empty 1
set -l target
if [ $empty = 1 ]
# The repo is empty
set target '4b825dc642cb6eb9a060e54bf8d69288fbee4904'
else
# The repo is not emtpy
set target 'HEAD'
# Check for unstaged change only when the repo is not empty
set -l unstaged 0
git diff --no-ext-diff --ignore-submodules=dirty --quiet --exit-code; or set unstaged 1
if [ $unstaged = 1 ]; set dirty $dirty'●'; end
end
# Check for staged change
set -l staged 0
git diff-index --cached --quiet --exit-code --ignore-submodules=dirty $target; or set staged 1
if [ $staged = 1 ]; set dirty $dirty'✚'; end
# Check for dirty
if [ "$dirty" = "" ]
set PROMPT "$branch"
else
set PROMPT "$branch $dirty"
end
end
prompt_segment $BG black $PROMPT
end
end
function prompt_svn -d "Display the current svn state"
set -l ref
if command svn ls . >/dev/null 2>&1
set branch (svn_get_branch)
set branch_symbol \uE0A0
set revision (svn_get_revision)
prompt_segment green black "$branch_symbol $branch:$revision"
end
end
function svn_get_branch -d "get the current branch name"
svn info 2> /dev/null | awk -F/ \
'/^URL:/ { \
for (i=0; i<=NF; i++) { \
if ($i == "branches" || $i == "tags" ) { \
print $(i+1); \
break;\
}; \
if ($i == "trunk") { print $i; break; } \
} \
}'
end
function svn_get_revision -d "get the current revision number"
svn info 2> /dev/null | sed -n 's/Revision:\ //p'
end
function prompt_status -d "the symbols for a non zero exit status, root and background jobs"
if [ $RETVAL -ne 0 ]
prompt_segment black red "✘"
end
# if superuser (uid == 0)
set -l uid (id -u $USER)
if [ $uid -eq 0 ]
prompt_segment black yellow "⚡"
end
# Jobs display
if [ (jobs -l | wc -l) -gt 0 ]
prompt_segment black cyan "⚙"
end
end
if printf '%s\n' '2.2.0' $FISH_VERSION | sort --check=silent --version-sort
# Current version ≥ 2.2.0
function __exists -a name -d "Check if a function or program does exist."
command -v "$name" ^/dev/null >&2
end
else
# Current version < 2.2.0
function __exists -a name -d "Check if a function or program does exist."
type "$name" ^/dev/null >&2
end
end
#
# Prompt
#
function fish_prompt
set -g RETVAL $status
prompt_status
prompt_virtual_env
prompt_user
prompt_dir
# __exists hg; and prompt_hg
__exists git; and prompt_git
# __exists svn; and prompt_svn
prompt_finish
end

@ -1,435 +1,206 @@
set -g fisher_version 3.2.10
set -g fisher_version 4.1.0
function fisher -a cmd -d "fish package manager"
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
set -g fish_config $XDG_CONFIG_HOME/fish
set -g fisher_cache $XDG_CACHE_HOME/fisher
set -g fisher_config $XDG_CONFIG_HOME/fisher
set -q fisher_path; or set -g fisher_path $fish_config
set -g fishfile $fish_config/fishfile
for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache
if test ! -d $path
command mkdir -p $path
end
end
if test ! -e $fisher_path/completions/fisher.fish
echo "fisher complete" >$fisher_path/completions/fisher.fish
_fisher_complete
end
if test -e $fisher_path/conf.d/fisher.fish
switch "$version"
case \*-\*
command rm -f $fisher_path/conf.d/fisher.fish
case 2\*
case \*
command rm -f $fisher_path/conf.d/fisher.fish
end
else
switch "$version"
case \*-\*
case 2\*
echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish
end
end
# 2019-10-22: temp code, migrates fishfile from old path back to $fish_config
if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile"
command mv -f "$fisher_path/fishfile" "$fishfile"
end
function fisher -a cmd -d "fish plugin manager"
set -q fisher_path || set -l fisher_path $__fish_config_dir
set -l fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case {,self-}complete
_fisher_complete
case copy-user-key-bindings
_fisher_copy_user_key_bindings
case ls
set -e argv[1]
if test -s "$fishfile"
set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||")
_fisher_ls | _fisher_fmt | command awk -v FILE="$file" "
BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/
" | command sed "s|^$HOME|~|"
end
case self-update
_fisher_self_update (status -f)
case self-uninstall
_fisher_self_uninstall
case {,-}-v{ersion,}
echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|")
case {,-}-h{elp,}
_fisher_help
case ""
_fisher_commit --
case add rm
if not isatty
while read -l arg
set argv $argv $arg
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "usage: fisher install <plugins...> install plugins"
echo " fisher remove <plugins...> remove installed plugins"
echo " fisher update <plugins...> update installed plugins"
echo " fisher update update all installed plugins"
echo " fisher list [<regex>] list installed plugins matching regex"
echo "options:"
echo " -v or --version print fisher version"
echo " -h or --help print this help message"
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read -laz stdin && set -a argv $stdin
set -l install_plugins
set -l update_plugins
set -l remove_plugins
set -l arg_plugins $argv[2..-1]
set -l old_plugins $_fisher_plugins
set -l new_plugins
if not set -q argv[2]
if test "$cmd" != update || test ! -e $fish_plugins
echo "fisher: not enough arguments for command: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string trim <$fish_plugins)
end
if test (count $argv) = 1
echo "fisher: invalid number of arguments" >&2
_fisher_help >&2
return 1
for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $plugin)
contains -- "$plugin" $new_plugins || set -a new_plugins $plugin
end
_fisher_commit $argv
case \*
echo "fisher: unknown flag or command \"$cmd\"" >&2
_fisher_help >&2
return 1
end
end
function _fisher_complete
complete -ec fisher
complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages"
complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages"
complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX"
complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help"
complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version"
complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
for pkg in (fisher ls)
complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg
end
end
function _fisher_copy_user_key_bindings
if functions -q fish_user_key_bindings
functions -c fish_user_key_bindings fish_user_key_bindings_copy
end
function fish_user_key_bindings
for file in $fisher_path/conf.d/*_key_bindings.fish
source $file >/dev/null 2>/dev/null
end
if functions -q fish_user_key_bindings_copy
fish_user_key_bindings_copy
end
end
end
function _fisher_ls
for pkg in $fisher_config/*/*/*
command readlink $pkg; or echo $pkg
end
end
function _fisher_fmt
command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||"
end
function _fisher_help
echo "usage: fisher add <package...> Add packages"
echo " fisher rm <package...> Remove packages"
echo " fisher Update all packages"
echo " fisher ls [<regex>] List installed packages matching <regex>"
echo " fisher --help Show this help"
echo " fisher --version Show the current version"
echo " fisher self-update Update to the latest version"
echo " fisher self-uninstall Uninstall from your system"
echo "examples:"
echo " fisher add jethrokuan/z rafaelrinaldi/pure"
echo " fisher add gitlab.com/foo/bar@v2"
echo " fisher add ~/path/to/local/pkg"
echo " fisher add <file"
echo " fisher rm rafaelrinaldi/pure"
echo " fisher ls | fisher rm"
echo " fisher ls fish-\*"
end
function _fisher_self_update -a file
set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish"
echo "fetching $url" >&2
command curl -s "$url?nocache" >$file.
if set -q argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
if test "$cmd" = remove
set -a remove_plugins $plugin
else
set -a update_plugins $plugin
end
else if test "$cmd" != install
echo "fisher: plugin not installed: \"$plugin\"" >&2 && return 1
else
set -a install_plugins $plugin
end
end
else
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
set -a update_plugins $plugin
else
set -a install_plugins $plugin
end
end
set -l next_version (command awk '{ print $4 } { exit }' <$file.)
switch "$next_version"
case "" $fisher_version
command rm -f $file.
if test -z "$next_version"
echo "fisher: cannot update fisher -- are you offline?" >&2
return 1
for plugin in $old_plugins
if not contains -- "$plugin" $new_plugins
set -a remove_plugins $plugin
end
end
end
echo "fisher is already up-to-date" >&2
case \*
echo "linking $file" | command sed "s|$HOME|~|" >&2
command mv -f $file. $file
source $file
echo "updated to fisher $fisher_version -- hooray!" >&2
_fisher_complete
end
end
function _fisher_self_uninstall
for pkg in (_fisher_ls)
_fisher_rm $pkg
end
for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile
echo "removing $file"
command rm -Rf $file 2>/dev/null
end | command sed "s|$HOME|~|" >&2
for name in (set -n | command awk '/^fisher_/')
set -e "$name"
end
functions -e (functions -a | command awk '/^_fisher/') fisher
complete -c fisher --erase
end
function _fisher_commit -a cmd
set -e argv[1]
set -l elapsed (_fisher_now)
if test ! -e "$fishfile"
command touch $fishfile
echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
end
set -l old_pkgs (_fisher_ls | _fisher_fmt)
for pkg in (_fisher_ls)
_fisher_rm $pkg
end
command rm -Rf $fisher_config
command mkdir -p $fisher_config
set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt))
set -l actual_pkgs (_fisher_fetch $next_pkgs)
set -l updated_pkgs
for pkg in $old_pkgs
if contains -- $pkg $actual_pkgs
set updated_pkgs $updated_pkgs $pkg
end
end
set -l pid_list
set -l source_plugins
set -l fetch_plugins $update_plugins $install_plugins
echo -e "\x1b[1mfisher $cmd version $fisher_version\x1b[22m"
for plugin in $fetch_plugins
set -l source (command mktemp -d)
set -a source_plugins $source
command mkdir -p $source/{completions,conf.d,functions}
fish -c "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
set -q fisher_user_api_token && set opts -u $fisher_user_api_token
echo -e \"fetching \x1b[4m\$url\x1b[24m\"
if command curl $opts -Ss -w \"\" \$url 2>&1 | command tar -xzf- -C \$temp 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs"
echo "fisher: nothing to commit -- try adding some packages" >&2
return 1
end
test ! -e $source && exit
command mv -f (string match --entire --regex -- \.fish\\\$ $source/*) $source/functions 2>/dev/null" &
set -l out_pkgs
if test "$cmd" = "rm"
set out_pkgs $next_pkgs
else
for pkg in $next_pkgs
if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs
set out_pkgs $out_pkgs $pkg
set -a pid_list (jobs --last --pid)
end
end
end
printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile
_fisher_complete
wait $pid_list 2>/dev/null
command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) '
BEGIN {
res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U)))
printf((res ? res : "done") " in %.2fs\n", E / 1000)
}
function fmt(action, n, s) {
return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s
}
' >&2
end
function _fisher_parse -a mode cmd
set -e argv[1..2]
command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" '
BEGIN {
for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i]
}
!NF { next } { k = getkey($1) }
MODE == "-R" && !(k in pkgs) && $0 = $1
MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") }
MODE == "-W" || CMD == "rm" { delete pkgs[k] }
END {
for (k in pkgs) {
if (CMD != "rm" || MODE == "-W") print pkgs[k]
else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr"
}
}
function getkey(s, a) {
return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1]
}
'
end
function _fisher_fetch
set -l pkg_jobs
set -l out_pkgs
set -l next_pkgs
set -l local_pkgs
set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token
for pkg in $argv
switch $pkg
case \~\* /\*
set -l path (echo "$pkg" | command sed "s|^~|$HOME|")
if test -e "$path"
set local_pkgs $local_pkgs $path
else
echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2
for plugin in $fetch_plugins
if set -l source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set -l index (contains --index -- "$plugin" $install_plugins)
set -e install_plugins[$index]
else
set -e update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
continue
end
command awk -v PKG="$pkg" -v FS=/ '
BEGIN {
if (split(PKG, tmp, /@+|:/) > 2) {
if (tmp[4]) sub("@"tmp[4], "", PKG)
print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master")
} else {
pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1]
tag = tmp[2] ? tmp[2] : "master"
print (\
pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \
pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \
pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \
) "\t" pkg
}
}
' | read -l url pkg branch
end
if test ! -d "$fisher_config/$pkg"
fish -c "
echo fetching $url >&2
command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg)
if test ! -z \"$branch\"
command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null
or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2
else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null
command rm -Rf $fisher_cache/$pkg
command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg
command rm -Rf $fisher_config/$pkg
command cp -Rf {$fisher_cache,$fisher_config}/$pkg
else if test -d \"$fisher_cache/$pkg\"
echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..
else
command rm -Rf $fisher_config/$pkg
echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2
for plugin in $update_plugins $remove_plugins
if set -l index (contains --index -- "$plugin" $_fisher_plugins)
set -l plugin_files_var _fisher_(string escape --style=var $plugin)_files
if contains -- "$plugin" $remove_plugins && set --erase _fisher_plugins[$index]
for file in (string match --entire --regex -- "conf\.d/" $$plugin_files_var)
emit (string replace --all --regex -- '^.*/|\.fish$' "" $file)_uninstall
end
echo -es "removing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
end
command rm -rf $$plugin_files_var
functions --erase (string match --entire --regex -- "functions/" $$plugin_files_var \
| string replace --all --regex -- '^.*/|\.fish$' "")
set --erase $plugin_files_var
end
" >/dev/null &
set pkg_jobs $pkg_jobs (_fisher_jobs --last)
set next_pkgs $next_pkgs "$fisher_config/$pkg"
end
end
if set -q pkg_jobs[1]
while for job in $pkg_jobs
contains -- $job (_fisher_jobs); and break
end
end
for pkg in $next_pkgs
if test -d "$pkg"
set out_pkgs $out_pkgs $pkg
_fisher_add $pkg
if set -q update_plugins[1] || set -q install_plugins[1]
command mkdir -p $fisher_path/{functions,conf.d,completions}
end
end
end
set -l local_prefix $fisher_config/local/$USER
if test ! -d "$local_prefix"
command mkdir -p $local_prefix
end
for pkg in $local_pkgs
set -l target $local_prefix/(command basename $pkg)
if test ! -L "$target"
command ln -sf $pkg $target
set out_pkgs $out_pkgs $pkg
_fisher_add $pkg --link
end
end
for plugin in $update_plugins $install_plugins
set -l source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set -l files $source/{functions,conf.d,completions}/*
set -l plugin_files_var _fisher_(string escape --style=var $plugin)_files
set -q files[1] && set -U $plugin_files_var (string replace $source $fisher_path $files)
if set -q out_pkgs[1]
_fisher_fetch (
for pkg in $out_pkgs
if test -s "$pkg/fishfile"
_fisher_fmt <$pkg/fishfile | _fisher_parse -R
for file in (string replace -- $source "" $files)
command cp -Rf $source/$file $fisher_path/$file
end
end)
printf "%s\n" $out_pkgs | _fisher_fmt
end
end
function _fisher_add -a pkg opts
for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish
set -l target (command basename $src)
switch $src
case $pkg/conf.d\*
set target $fisher_path/conf.d/$target
case $pkg/completions\*
set target $fisher_path/completions/$target
case $pkg/{functions,}\*
switch $target
case uninstall.fish
continue
case {init,key_bindings}.fish
set target $fisher_path/conf.d/(command basename $pkg)\_$target
case \*
set target $fisher_path/functions/$target
end
end
echo "linking $target" | command sed "s|$HOME|~|" >&2
if set -q opts[1]
command ln -sf $src $target
else
command cp -f $src $target
end
switch $target
case \*.fish
source $target >/dev/null 2>/dev/null
end
end
end
contains -- $plugin $_fisher_plugins || set -Ua _fisher_plugins $plugin
contains -- $plugin $install_plugins && set -l event "install" || set -l event "update"
echo -es "installing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
function _fisher_rm -a pkg
for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish
set -l target (command basename $src)
set -l filename (command basename $target .fish)
switch $src
case $pkg/conf.d\*
test "$filename.fish" = "$target"; and emit "$filename"_uninstall
set target conf.d/$target
case $pkg/completions\*
test "$filename.fish" = "$target"; and complete -ec $filename
set target completions/$target
case $pkg/{,functions}\*
test "$filename.fish" = "$target"; and functions -e $filename
switch $target
case uninstall.fish
source $src
continue
case {init,key_bindings}.fish
set target conf.d/(command basename $pkg)\_$target
case \*
set target functions/$target
for file in (string match --entire --regex -- "[functions/|conf\.d/].*fish\$" $$plugin_files_var)
source $file
if string match --quiet --regex -- "conf\.d/" $file
emit (string replace --all --regex -- '^.*/|\.fish$' "" $file)_$event
end
end
end
command rm -f $fisher_path/$target
end
if not functions -q fish_prompt
source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish"
end
end
end
function _fisher_jobs
jobs $argv | command awk '/^[0-9]+\t/ { print $1 }'
end
command rm -rf $source_plugins
functions -q fish_prompt || source $__fish_data_dir/functions/fish_prompt.fish
function _fisher_now -a elapsed
switch (command uname)
case Darwin \*BSD
command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
set -q _fisher_plugins[1] || set -e _fisher_plugins
set -q _fisher_plugins && printf "%s\n" $_fisher_plugins >$fish_plugins || command rm -f $fish_plugins
set -l total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "installed $total[1]") (
test $total[2] = 0 || echo "updated $total[2]") (
test $total[3] = 0 || echo "removed $total[3]")
) "plugin/s"
case \*
math (command date "+%s%3N") - "0$elapsed"
echo "fisher: unknown flag or command: \"$cmd\" (see `fisher -h`)" >&2 && return 1
end
end
## Migrations ##
if functions -q _fisher_self_update || test -e $__fish_config_dir/fishfile # 3.x
function _fisher_migrate
function _fisher_complete
fisher install jorgebucaran/fisher >/dev/null 2>/dev/null
functions --erase _fisher_complete
end
set -q XDG_DATA_HOME || set XDG_DATA_HOME ~/.local/share
set -q XDG_CACHE_HOME || set XDG_CACHE_HOME ~/.cache
set -q XDG_CONFIG_HOME || set XDG_CONFIG_HOME ~/.config
set -q fisher_path || set fisher_path $__fish_config_dir
test -e $__fish_config_dir/fishfile && command awk '/#|^gitlab|^ *$/ { next } $0' <$__fish_config_dir/fishfile >>$__fish_config_dir/fish_plugins
command rm -rf $__fish_config_dir/fishfile $fisher_path/{conf.d,completions}/fisher.fish {$XDG_DATA_HOME,$XDG_CACHE_HOME,$XDG_CONFIG_HOME}/fisher
functions --erase _fisher_migrate _fisher_copy_user_key_bindings _fisher_ls _fisher_fmt _fisher_self_update _fisher_self_uninstall _fisher_commit _fisher_parse _fisher_fetch _fisher_add _fisher_rm _fisher_jobs _fisher_now _fisher_help
fisher update
end
echo "upgrading to fisher $fisher_version -- learn more at" (set_color --bold --underline)"https://git.io/fisher-4"(set_color normal)
_fisher_migrate >/dev/null 2>/dev/null
else if functions -q _fisher_list # 4.0
set -q XDG_DATA_HOME || set -l XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
echo -n "upgrading to fisher $fisher_version new in-memory state.."
fisher update >/dev/null 2>/dev/null
echo -ne "done\r\n"
end

@ -1,249 +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).
#
workspace "1" output "DP-4"
workspace "2" output "DP-4"
workspace "3" output "DP-4"
workspace "4" output "DP-4"
workspace "5" output "DP-4"
workspace "6" output "DP-4"
workspace "7" output "DP-0"
workspace "8" output "DP-0"
workspace "9" output "DP-0"
workspace "10" output "DP-0"
workspace "11" output "DP-0"
workspace "12" output "DP-0"
focus_follows_mouse no
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:DejaVu Sans 6
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:Hack 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnt scale on retina/hidpi displays.
gaps inner 10
gaps outer 0
smart_gaps on
smart_borders on
for_window [class="^.*"] border pixel 2
#gaps inner all set 40
#gaps outer current plus 20
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+A kill
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec rofi -show drun
# 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
# 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+q focus parent
# focus the child container
#bindsym $mod+d focus child
# switch to workspace
bindsym $mod+ampersand workspace 1
bindsym $mod+eacute workspace 2
bindsym $mod+quotedbl workspace 3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10
bindsym $mod+parenright workspace 11
bindsym $mod+equal workspace 12
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+eacute move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+egrave move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+ccedilla move container to workspace 9
bindsym $mod+Shift+agrave move container to workspace 10
bindsym $mod+Shift+degree move container to workspace 11
bindsym $mod+Shift+plus move container to workspace 12
bindsym $mod+w sticky toggle
# move current workspace between monitors
bindsym $mod+Control+left move workspace to output left
bindsym $mod+Control+right move workspace to output down
bindsym $mod+Control+up move workspace to output up
bindsym $mod+Control+down move workspace to output right
# 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'"
bindsym $mod+Shift+e exit
bindsym $mod+l exec i3lock -f -c 222222
# 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.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym m resize grow width 10 px or 10 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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
set $displayMode "Set display mode [w]ork [l]aptop [h]ome"
mode $displayMode {
bindsym w exec "~/.config/screenlayout/work.sh"; exec --no-startup-id "bash ~/.config/polybar/launch.s"; mode "default"
bindsym l exec "~/.config/screenlayout/laptop.sh"; exec --no-startup-id "bash ~/.config/polybar/launch.sh"; mode "default"
bindsym h exec "~/.config/screenlayout/home.sh"; exec --no-startup-id "bash ~/.config/polybar/launch.sh"; mode "default"
}
bindsym $mod+x mode $displayMode
set $blue #0a6cf5
set $orange #ffb52a
set $base00 #272822
set $base01 #383830
set $base02 #49483e
set $base03 #75715e
set $base04 #a59f85
set $base05 #f8f8f2
set $base06 #f5f4f1
set $base07 #f9f8f5
set $base08 #f92672
set $base09 #fd971f
set $base0A #f4bf75
set $base0B #a6e22e
set $base0C #a1efe4
set $base0D #66d9ef
set $base0E #ae81ff
set $base0F #cc6633
# <colorclass> <border> <background> <test> <indicator> <child_border>
client.focused $orange $orange $base00 $base01
client.focused_inactive $blue $blue $base03 $base01
client.unfocused $blue $blue $base03 $base01
client.urgent $base02 $base08 $base07 $base08
exec xsetroot -solid "#222222"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Construit avec arandr
exec --no-startup-id pulseaudio -k && pulseaudio --start
exec --no-startup-id ~/.config/screenlayout/alcyon.sh
exec --no-startup-id nm-applet
exec --no-startup-id nextcloud
exec --no-startup-id rofi
exec_always --no-startup-id bash ~/.config/polybar/launch.sh

@ -1,235 +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).
#
workspace "1" output "eDP1"
workspace "2" output "eDP1"
workspace "3" output "eDP1"
workspace "4" output "eDP1"
workspace "5" output "DP1-1"
workspace "6" output "DP1-1"
workspace "7" output "DP1-1"
workspace "8" output "DP1-1"
workspace "9" output "DP1-2"
workspace "10" output "DP1-2"
workspace "11" output "DP1-2"
workspace "12" output "DP1-2"
focus_follows_mouse no
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:DejaVu Sans 6
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:Hack 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnt scale on retina/hidpi displays.
gaps inner 10
gaps outer 0
smart_gaps on
smart_borders on
for_window [class="^.*"] border pixel 2
#gaps inner all set 40
#gaps outer current plus 20
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+A kill
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec rofi -show drun
# 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
# 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+q focus parent
# focus the child container
#bindsym $mod+d focus child
# switch to workspace
bindsym $mod+ampersand workspace 1
bindsym $mod+eacute workspace 2
bindsym $mod+quotedbl workspace 3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10
bindsym $mod+parenright workspace 11
bindsym $mod+equal workspace 12
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+eacute move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+egrave move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+ccedilla move container to workspace 9
bindsym $mod+Shift+agrave move container to workspace 10
bindsym $mod+Shift+degree move container to workspace 11
bindsym $mod+Shift+plus move container to workspace 12
# move current workspace between monitors
bindsym $mod+Control+left move workspace to output left
bindsym $mod+Control+right move workspace to output down
bindsym $mod+Control+up move workspace to output up
bindsym $mod+Control+down move workspace to output right
# 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'"
bindsym $mod+Shift+e exit
bindsym $mod+l exec i3lock -f -c 222222
# 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.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym m resize grow width 10 px or 10 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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
set $displayMode "Set display mode [w]ork [l]aptop [h]ome"
mode $displayMode {
bindsym w exec "~/.screenlayout/work.sh"; restart; mode "default"
bindsym l exec "~/.screenlayout/laptop.sh"; restart; mode "default"
bindsym h exec "~/.screenlayout/home.sh"; restart; mode "default"
}
bindsym $mod+x mode $displayMode
# Color scheme night owl
client.focused #a2bffc #a2bffc #282828 #282828
client.focused_inactive #1d2021 #1d2021 #928374 #282828
client.unfocused #32302f #32302f #928374 #282828
client.urgent #cc241d #cc241d #ebdbb2 #282828
exec xsetroot -solid "#222222"
exec "setxkbmap -option 'grp:alt_shift_toggle' -layout fr,fr -variant oss,bepo"
# Pulse Audio controls