Skip to content

Maximize scratchpad on current monitor without fullscreen? #4590

Answered by Oisov
Oisov asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to solve my issue using the following Python code

for_window [instance="qalc"] floating enable
for_window [instance="qalc"] move to scratchpad
for_window [instance="qalc"] resize set 100 ppt 100ppt
exec --no-startup-id alacritty --class "qalc" --config-file /home/oisov/.config/alacritty/alacritty_xxl.yml -e qalc
bindsym $mod+u exec python ~/.config/i3/qalc.py

Where calc.py is implemented as follows

#!/usr/bin/env python3
import i3ipc
import subprocess
from collections import namedtuple

Pos = namedtuple("Pos", "x y")

i3 = i3ipc.Connection()


def current_output():
    workspaces = i3.get_workspaces()
    focused_workspace = [w for w in workspaces if w.focused][0]

    focused_…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Oisov
Comment options

Comment options

You must be logged in to vote
2 replies
@Airblader
Comment options

@Oisov
Comment options

Answer selected by Oisov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants