1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
7f79cca7bc
scripts/systemd-run-i3: fix overriding unit name
systemd-run uses the last passed argument for each flag, so specify the
default first, and the override afterwards, if set
2020-04-02 11:33:57 +01:00
928ef584e6
picom: fix focus/blur/shadows with Zoom 2020-04-02 11:32:21 +01:00
b58469c1ea
i3: rearrange terminal shortcuts
Also directly invoke alacritty instead of i3-sensible-terminal as the
arguments passed are alacritty specific. Ideally there would be a
wrapper script that handles terminal-emulator specific arguments so this
would work with many/multiple emulators.
2020-04-02 11:30:35 +01:00
3 changed files with 12 additions and 10 deletions

View File

@ -132,12 +132,12 @@ bindsym $mod+Shift+j reload
bindsym --release $mod+x exec xkill bindsym --release $mod+x exec xkill
bindsym $mod+c exec notify-send "Try again" "You meant \\\$mod+b" bindsym $mod+c exec notify-send "Try again" "You meant \\\$mod+b"
bindsym $mod+b exec systemd-run-i3 -c -s firefox firefox bindsym $mod+b exec systemd-run-i3 -c -s firefox firefox
bindsym $mod+v exec systemd-run-i3 i3-sensible-terminal -e sh -c "($SHELL -c $EDITOR || :) && $SHELL" bindsym $mod+Return exec systemd-run-i3 -n alacritty
bindsym $mod+Ctrl+v exec systemd-run-i3 i3-sensible-terminal --class floating-term -e sh -c "($SHELL -c $EDITOR || : ) && $SHELL" bindsym $mod+Ctrl+Return exec systemd-run-i3 -n alacritty --class floating
bindsym $mod+Return exec systemd-run-i3 i3-sensible-terminal bindsym $mod+Shift+Return exec systemd-run-i3 -n alacritty --working-directory "$(xcwd)"
bindsym $mod+Ctrl+Return exec systemd-run-i3 i3-sensible-terminal --class floating-term bindsym $mod+Ctrl+Shift+Return exec systemd-run-i3 -n alacritty --class floating --working-directory "$(xcwd)"
bindsym $mod+Shift+Return exec systemd-run-i3 i3-sensible-terminal --working-directory "$(xcwd)" bindsym $mod+v exec systemd-run-i3 -n alacritty -e sh -c "($SHELL -c $EDITOR || :) && $SHELL"
bindsym $mod+Ctrl+Shift+Return exec systemd-run-i3 i3-sensible-terminal --class floating-term --working-directory "$(xcwd)" bindsym $mod+Ctrl+v exec systemd-run-i3 -n alacritty --class floating -e sh -c "($SHELL -c $EDITOR || : ) && $SHELL"
bindsym $mod+l exec dm-tool switch-to-greeter bindsym $mod+l exec dm-tool switch-to-greeter
bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window -run-command 'systemd-run-i3 -n {cmd}'" bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window -run-command 'systemd-run-i3 -n {cmd}'"
bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g' bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g'

View File

@ -18,6 +18,7 @@ shadow-exclude = [
"class_g = 'Cairo-clock'", "class_g = 'Cairo-clock'",
"class_g = 'firefox' && argb", "class_g = 'firefox' && argb",
"name = 'Notification'", "name = 'Notification'",
"name = 'cpt_frame_window'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
]; ];
# shadow-exclude = "n:e:Notification"; # shadow-exclude = "n:e:Notification";
@ -79,6 +80,7 @@ vsync = true;
focus-exclude = [ focus-exclude = [
"i:ai:chromium", "i:ai:chromium",
"class_g = 'firefox'", "class_g = 'firefox'",
"class_g = 'zoom'"
]; ];
detect-transient = true; detect-transient = true;
detect-client-leader = true; detect-client-leader = true;

View File

@ -1,9 +1,11 @@
#!/bin/bash -e #!/bin/bash -e
rand=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16)
args=() args=()
while getopts "u:s:e:d:cnw" opt while getopts "u:s:e:d:cnw" opt
do case "$opt" in do case "$opt" in
u) args+=("--unit=$OPTARG");; u) args+=("--unit=$OPTARG-$rand");;
s) args+=("--slice=$OPTARG");; s) args+=("--slice=$OPTARG");;
e) args+=("--setenv=$OPTARG");; e) args+=("--setenv=$OPTARG");;
d) args+=("--working-directory=$OPTARG");; d) args+=("--working-directory=$OPTARG");;
@ -15,6 +17,4 @@ do case "$opt" in
done done
shift $((OPTIND-1)) shift $((OPTIND-1))
rand=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16) exec systemd-run --user --collect --unit="$1-$rand" ${args[@]} -- "$@"
exec systemd-run --user --collect ${args[@]} --unit="$1-$rand" -- "$@"