Archive unused files, pending deletion
This commit is contained in:
10
archive/i3/bin/i3_empty_workspace.sh
Executable file
10
archive/i3/bin/i3_empty_workspace.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
MAX_DESKTOPS=20
|
||||
|
||||
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
|
||||
|
||||
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
|
||||
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
|
||||
|
||||
i3-msg workspace ${EMPTY_WORKSPACE}
|
||||
5
archive/i3/bin/i3_reconfigure
Executable file
5
archive/i3/bin/i3_reconfigure
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pushd ~/.dotfiles/i3/ &> /dev/null
|
||||
python3 binds.py > config
|
||||
i3-msg reload
|
||||
14
archive/i3/bin/i3_send_to_workspace.sh
Executable file
14
archive/i3/bin/i3_send_to_workspace.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
function gen_workspaces()
|
||||
{
|
||||
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
|
||||
}
|
||||
|
||||
|
||||
WORKSPACE=$( gen_workspaces | rofi -dmenu -i -p "Select workspace:")
|
||||
|
||||
if [ -n "${WORKSPACE}" ]
|
||||
then
|
||||
i3-msg move container to workspace "${WORKSPACE}"
|
||||
fi
|
||||
17
archive/i3/bin/i3_switch_workspace.sh
Executable file
17
archive/i3/bin/i3_switch_workspace.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
function gen_workspaces()
|
||||
{
|
||||
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
|
||||
}
|
||||
|
||||
|
||||
WORKSPACE=$( (echo empty; gen_workspaces) | rofi -dmenu -i -p "Select workspace:")
|
||||
|
||||
if [ x"empty" = x"${WORKSPACE}" ]
|
||||
then
|
||||
i3_empty_workspace.sh
|
||||
elif [ -n "${WORKSPACE}" ]
|
||||
then
|
||||
i3-msg workspace "${WORKSPACE}"
|
||||
fi
|
||||
22
archive/i3/bin/tat
Executable file
22
archive/i3/bin/tat
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Attach or create tmux session named the same as current directory.
|
||||
|
||||
session_name="$(basename "$PWD" | tr . -)"
|
||||
|
||||
session_exists() {
|
||||
tmux list-sessions | sed -E 's/:.*$//' | grep -q "^$session_name$"
|
||||
}
|
||||
|
||||
not_in_tmux() {
|
||||
[ -z "$TMUX" ]
|
||||
}
|
||||
|
||||
if not_in_tmux; then
|
||||
tmux new-session -As "$session_name"
|
||||
else
|
||||
if ! session_exists; then
|
||||
(TMUX='' tmux new-session -Ad -s "$session_name")
|
||||
fi
|
||||
tmux switch-client -t "$session_name"
|
||||
fi
|
||||
Reference in New Issue
Block a user