Skip to content

sway/auto_switch_kbd: new version (for contest)#4

Merged
hissssst merged 1 commit intotwmru:mainfrom
nacknime-official:main
May 10, 2021
Merged

sway/auto_switch_kbd: new version (for contest)#4
hissssst merged 1 commit intotwmru:mainfrom
nacknime-official:main

Conversation

@nacknime-official
Copy link
Copy Markdown
Contributor

No description provided.

@nacknime-official nacknime-official force-pushed the main branch 2 times, most recently from 80c3d74 to 86319ec Compare December 27, 2020 11:28
@hissssst
Copy link
Copy Markdown
Contributor

Could you please create separate script instead the modification of existing one?

from i3ipc import Connection, Event, events

KB_ID = "1:1:AT_Translated_Set_2_keyboard"
MAX_WIN_HISTORY = 15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have these parameters configurable via enviroment variables or script arguments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if len(window_list) > MAX_WIN_HISTORY:
deleting_window_id = window_list.pop(-1)
del data[deleting_window_id]
print(window_list)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these print() necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I forgot to remove that line

@nacknime-official
Copy link
Copy Markdown
Contributor Author

nacknime-official commented Dec 27, 2020

Could you please create separate script instead the modification of existing one?

Yes, but what name I can give to the file?

@nacknime-official nacknime-official force-pushed the main branch 2 times, most recently from 83a1621 to 6043fab Compare December 27, 2020 13:51
@hissssst
Copy link
Copy Markdown
Contributor

Any filename, for example smart_layout.py

@nacknime-official
Copy link
Copy Markdown
Contributor Author

Any filename, for example smart_layout.py

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants