Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Kanshiのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Kanshi
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{Lowercase title}} [[Category:Wayland]] [[en:Kanshi]] [[zh-hans:Kanshi]] {{Related articles start}} {{Related|Sway}} {{Related articles end}} [https://gitlab.freedesktop.org/emersion/kanshi kanshi] allows you to define output profiles that are automatically enabled and disabled on hotplug. For instance, this can be used to turn a laptop's internal screen off when docked. This is a Wayland equivalent for tools like [https://github.com/phillipberndt/autorandr autorandr]. kanshi can be used on Wayland compositors supporting the wlr-output-management protocol. == Installation == [[Install]] {{Pkg|kanshi}} or {{AUR|kanshi-git}}. == Configuration == === Basic === Create kanshi configuration file: {{hc|1=~/.config/kanshi/config|2= profile { output LVDS-1 disable output "Some Company ASDF 4242" mode 1600x900 position 0,0 } profile { output LVDS-1 enable scale 2 } }} Each output profile is delimited by brackets. It contains several output directives (whose syntax is similar to {{man|5|sway-output}}). A profile will be enabled if all of the listed outputs are connected. {{Tip|You can get a list of output names and additional information using commands like {{ic|wlr-randr}}, {{ic|swaymsg -t get_outputs}} or use the GUI applications {{AUR|wdisplays-git}} or {{AUR|wdisplays-persistent}} which will write also directly to kanshi's configuration file.}} === Advanced === For easier management of multiple setups ''(e.g. Internal laptop monitor only, Docked to one monitor at home, Docked to two work monitors, ...)'' you can define defaults for the outputs used inside profiles and assign them aliases. The defaults will apply to all profiles where the respective output is mentioned. For more see {{man|5|kanshi}}). {{hc|1=~/.config/kanshi/config|2= output "Dell Inc. DELL S2721DGF G52TR83" { mode 2560x1440@165.08 position 1280,0 scale 2 alias $HOME_1 } output "LG Display 0x058B Unknown" { mode 2560x1440@59.99800 position 0,0 scale 2 alias $INTERNAL } profile home_1 { output $INTERNAL disable output $HOME_1 enable } }} You can find out these values with a command like [https://wiki.hyprland.org/Configuring/Using-hyprctl/ hyprctl monitors] which will display all three of those in its output. {{hc|1=hyprctl monitors|2= make: LG Display model: 0x058B serial: }} It is also possible to further integrate kanshi with your workflow by using the ''exec'' directive to execute a command once the profile was successfully applied. {{hc|1=~/.config/kanshi/config|2= profile home_1 { output $INTERNAL disable output $HOME_1 enable exec uwsm app -- $HOME/.config/hypr/scripts/move-workspaces.sh "LG Display 0x058B" } }} == Usage == Run the command: $ kanshi See [[#Manage kanshi with systemd]] for an automated usage. == Tips and tricks == === Manage kanshi with systemd === Create and start {{ic|~/.config/systemd/user/sway-session.target}} (if you don't have created yet) by following [[Sway#Manage Sway-specific daemons with systemd]]. Create the {{ic|kanshi.service}} file: {{hc|1=~/.config/systemd/user/kanshi.service|2= [Unit] Description=Dynamic output configuration for Wayland compositors Documentation=man:kanshi(1) BindsTo=sway-session.target [Service] Type=simple ExecStart=/usr/bin/kanshi [Install] WantedBy=sway-session.target }} [[Enable]] this [[user unit]]. It is only activated when Sway is running and deactivated when Sway stops. == Troubleshooting == === Workspace number starts from 2 in external monitor after wake up === If you have a configuration like [[#Configuration|above]], when you connected a second display to your computer, the workspace in the second display should start from 1 since the first display is disabled. This should be the case when you plugged your monitor in the first time or after starting the system. But after sleep, this number might be 2. In this case just move the first workspace to this monitor by adding a directive to the kanshi configuration file: {{hc|1=~/.config/kanshi/config|2= profile { output LVDS-1 disable output "Some Company ASDF 4242" mode 1600x900 position 0,0 # We've added this directive here (do not forget to update the output name): exec swaymsg workspace 1, move workspace to HDMI-A-1 } profile { output LVDS-1 enable scale 2 } }} == See also == * [https://gitlab.freedesktop.org/emersion/kanshi Source code and documentation]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
Kanshi
に戻る。
検索
検索
Kanshiのソースを表示
話題を追加