Skip to content

Commit

Permalink
fix: init some changes, add subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
edapess committed Aug 18, 2023
1 parent 6311ee6 commit 6c06cf1
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions qtile/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,40 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from libqtile import bar, layout, widget
from libqtile import bar, layout, widget, hook
import subprocess
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from topBar import get_bar
from keyBindings import init_key_bindings
from layouts import init_layouts
from workspaces import groups

mod = "mod4"
terminal = guess_terminal()

@hook.subscribe.startup_once
def autostart_once():
subprocess.run('~/.config/qtile/autostart_once.sh')
subprocess.call([home])

keys=init_key_bindings(mod)

groups = [Group(i) for i in "123456789"]

for i in groups:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
i.name,
lazy.group[i.name].toscreen(),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name, switch_group=True),
desc="Switch to & move focused window to group {}".format(i.name),
),
# Or, use below if you prefer not to switch to that group.
# # mod1 + shift + letter of group = move focused window to group
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
# desc="move focused window to group {}".format(i.name)),
]
)
keys.extend([

#CHANGE WORKSPACES
Key([mod], i.name, lazy.group[i.name].toscreen()),
Key([mod, "shift" ], "Tab", lazy.screen.prev_group()),
Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()),

# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE
#Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND FOLLOW MOVED WINDOW TO WORKSPACE
Key([mod, "shift"], i.name, lazy.window.togroup(i.name) , lazy.group[i.name].toscreen()),
])

layouts = init_layouts()

Expand Down

0 comments on commit 6c06cf1

Please sign in to comment.