Giter Site home page Giter Site logo

mode_vertical/horizontal about qtile-plasma HOT 3 CLOSED

numirias avatar numirias commented on June 24, 2024
mode_vertical/horizontal

from qtile-plasma.

Comments (3)

numirias avatar numirias commented on June 24, 2024

The commands are implemented and tested. Could you share your config (and in particular, your configured layouts)? This might happen because you execute the plasma-specific layout commands while having another layout activated.

from qtile-plasma.

nazar-pc avatar nazar-pc commented on June 24, 2024

Sure, here is the whole thing as it is right now:

#!/usr/bin/env python3
from libqtile.config import EzDrag, EzKey, EzClick, Screen, Group, Match
from libqtile.command import lazy
from libqtile import layout, hook
from plasma import Plasma
import subprocess
import os

# from plasma import Plasma

@hook.subscribe.startup_once
def dbus_register ():
	id = os.environ.get('DESKTOP_AUTOSTART_ID')
	if not id:
		return
	subprocess.Popen([
		'dbus-send',
		'--session',
		'--print-reply',
		'--dest=org.gnome.SessionManager',
		'/org/gnome/SessionManager',
		'org.gnome.SessionManager.RegisterClient',
		'string:qtile',
		'string:' + id
	])

@hook.subscribe.client_name_updated
def move_cerebro_to_current_group (window):
	if window.window.get_name() == 'Cerebro':
		window.togroup()

show_current_group_notification = lazy.function(
	lambda qtile:
		qtile.cmd_spawn('notify-send -h string:x-canonical-private-synchronous:qtile -t 50 "' + qtile.currentGroup.name + ': ' + qtile.currentLayout.name + '"')
)

mod = 'mod4'

keymap = {
	'M-<Left>'     : lazy.layout.left(),
	'M-<Down>'     : lazy.layout.down(),
	'M-<Up>'       : lazy.layout.up(),
	'M-<Right>'    : lazy.layout.right(),
	'M-S-<Left>'   : [lazy.layout.move_left(), lazy.layout.shuffle_up()],
	'M-S-<Down>'   : [lazy.layout.move_down(), lazy.layout.shuffle_down()],
	'M-S-<Up>'     : [lazy.layout.move_up(), lazy.layout.shuffle_up()],
	'M-S-<Right>'  : [lazy.layout.move_right(), lazy.layout.shuffle_down()],
	'M-A-<Left>'   : lazy.layout.integrate_left(),
	'M-A-<Down>'   : lazy.layout.integrate_down(),
	'M-A-<Up>'     : lazy.layout.integrate_up(),
	'M-A-<Right>'  : lazy.layout.integrate_right(),
	'A-S-<Tab>'    : lazy.layout.prev(),
	'A-<Tab>'      : lazy.layout.next(),
	'M-h'          : lazy.layout.mode_horizontal(),
	'M-v'          : lazy.layout.mode_vertical(),
	'M-S-h'        : lazy.layout.mode_horizontal_split(),
	'M-S-v'        : lazy.layout.mode_vertical_split(),
	'M-<End>'      : lazy.layout.grow_width(30),
	'M-<Home>'     : lazy.layout.grow_width(-30),
	'M-<Page_Up>'  : lazy.layout.grow_height(30),
	'M-<Page_Down>': lazy.layout.grow_height(-30),
	'M-<Tab>'      : [lazy.next_layout(), show_current_group_notification],
	'C-A-<Up>'     : [lazy.screen.prev_group(), show_current_group_notification],
	'C-A-<Down>'   : [lazy.screen.next_group(), show_current_group_notification],
	'M-w'          : lazy.window.kill(),
	'C-A-t'        : lazy.spawn('terminator'),
	'C-A-c'        : lazy.spawn('gnome-calculator'),
	'C-A-s'        : lazy.spawn('env XDG_CURRENT_DESKTOP=GNOME gnome-system-monitor'),
	'M-n'          : lazy.spawn('env XDG_CURRENT_DESKTOP=GNOME nemo'),
	'M-S-c'        : lazy.spawn('killall -9 cerebro'),
	'M-c'          : lazy.spawn('cerebro'),
	'M-a'          : lazy.spawn('pavucontrol'),
	'<XF86Tools>'  : lazy.spawn('clementine'),
	'<Print>'      : lazy.spawn('gnome-screenshot'),
	'A-<Print>'    : lazy.spawn('gnome-screenshot --window'),
	'S-<Print>'    : lazy.spawn('gnome-screenshot --area'),
	'<Caps_Lock>'  : lazy.spawn('xdotool key Alt+F2'),
	'M-C-r'        : lazy.restart(),
	'M-r'          : lazy.layout.reset_size(),
}

# Drag floating layouts.
mouse = [
	EzDrag('M-1', lazy.window.set_position_floating(), start = lazy.window.get_position()),
	EzDrag('M-3', lazy.window.set_size_floating(), start = lazy.window.get_size()),
	EzClick('M-2', lazy.window.bring_to_front()),
	EzClick('9', lazy.screen.prev_group()),
	EzClick('8', lazy.screen.next_group()),
]

layouts = [
	layout.MonadTall(name = 'MonadTall'),
	layout.Max(name = 'Max'),
	layout.Matrix(name = 'Matrix'),
	layout.Stack(name = 'Stack'),
	Plasma(name = 'Plasma')
]

groups = [
	Group('1', layout = 'MonadTall', matches = [Match(wm_class = ['Thunderbird'])]),
	Group('2', layout = 'MonadTall', matches = [Match(wm_class = ['Firefox', 'qBittorrent'])]),
	Group('3', layout = 'Max', matches = [Match(wm_class = ['jetbrains-idea'])]),
	Group('4', layout = 'Matrix', matches = [Match(wm_class = ['Clementine', 'Pavucontrol', 'Synaptic'])]),
	Group('5', layout = 'Matrix')
]

for i in groups:
	keymap['M-' + i.name] = [
		lazy.group[i.name].toscreen(),
		show_current_group_notification
	]
	keymap['M-S-' + i.name] = [
		lazy.window.togroup(i.name),
		lazy.group[i.name].toscreen(),
		show_current_group_notification
	]

keys = []
for k, v in keymap.items():
	if type(v) is list:
		keys.append(EzKey(k, *v))
	else:
		keys.append(EzKey(k, v))

screens = [
	Screen(),
]

follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating()
auto_fullscreen = True
focus_on_window_activation = 'smart'

wmname = 'LG3D'

from qtile-plasma.

nazar-pc avatar nazar-pc commented on June 24, 2024

Indeed, I was on different layout, sorry about that.

from qtile-plasma.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.