メインコンテンツへスキップ
見出し画像

Hyprland設定を少し頑張る(2)

    前回はHyprlandでログインしてすぐ抜けるところまで行きました。
    ~/.config/hypr/hyprland.conf が生成されたところで、Xfce4のMousepadエディタやVS Codeを使ってこの設定ファイルを編集していきます。

    設定ファイル (~/.config/hypr/hyprland.conf) の編集

    自動設定で表示される警告の除去

    アンコメントするだけ

    #autogenerated = 1 # remove this line to remove the warning

    環境変数(Fcitx5)

    # See https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
    env = XMODIFIERS, @im=fcitx

    環境変数(その他)

    マウスカーソルを少し大きくしています。

    # Some default env vars.
    env = XCURSOR_SIZE,24
    env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
    env = GDK_SCALE,auto

    ディスプレイ設定

    12型ノートPCで高解像度の文字を読むのがキツイならデフォルトで、平気なら2行目の設定で。

    # See https://wiki.hyprland.org/Configuring/Monitors/
    monitor=,preferred,auto,auto
    #monitor=,highres,auto,1

    自動起動アプリケーション設定

    hyprpaper(壁紙)←今後のために準備だけ。ひとまずコメントアウト。
    waybar(ステータスバー)
    dunst(通知)
    nm-applet(ネットワーク制御アプレット)
    fcitx5(インプットメソッド)

    # Execute your favorite apps at launch
    # exec-once = waybar & hyprpaper & firefox
    #exec-once = hyprpaper
    exec-once = waybar
    exec-once = dunst
    exec-once = nm-applet
    exec-once = fcitx5 -d --replace

    ターミナル、ファイルマネージャ、ランチャーの設定

    ターミナル:kitty -> alacritty
    ファイルマネージャ:dolphin -> thunar
    ランチャーはwofiのまま変えない

    # Set programs that you use
    $terminal = alacritty
    $fileManager = thunar
    $menu = wofi --show drun

    xwaylandカテゴリを追加

    xwayland {
        force_zero_scaling = true
    }

    入力デバイスの設定

    キーボード:日本語
    タッチパッド:タップでクリックを有効に

    input {
        kb_layout = jp
    
    #省略
    
        touchpad {
            natural_scroll = no
            clickfinger_behavior = true
            tap-to-click = true
        }

    キーバインドの設定

    ターミナル起動:Win + Enter (設定では"RETURN"であることに注意。間違えて嵌ることがよくある)
    現在のウィンドウを閉じる:Win + Q
    wlogout(終了メニュー):Win + Shift + X

    # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
    #bind = $mainMod, Q, exec, $terminal
    #bind = $mainMod, C, killactive, 
    
    bind = $mainMod, RETURN, exec, $terminal
    bind = $mainMod, Q, killactive, 
    
    #省略
    
    bind = $mainMod SHIFT, X, exec, wlogout
    
    #省略
    
    # Switch workspaces with mainMod + CTRL + left/right
    bind = $mainMod CTRL, left, workspace, -1
    bind = $mainMod CTRL, right, workspace, +1

    壁紙を固定にする

    misc {
        # See https://wiki.hyprland.org/Configuring/Variables/ for more
        #force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
        force_default_wallpaper = 2
    }

    壁紙があるディレクトリは /usr/share/hyprland/ です。ここにwall0.png, wall1.png, wall2.pngの3つの壁紙用画像があります。初期設定では、Hyprland起動時に3つの画像からランダムで表示されます。

    壁紙選択はmiscカテゴリで行います。初期値は-1で、HyprlandのWikiを読むと、これはランダム表示の意味だとわかります。
    コメントにあるように、設定値を0か1にすると、アニメ絵のキャラを選ばないようになります。
    ということは、設定値を2にすればアニメ絵のキャラに固定されるということ。

    ここまでで、とりあえずHyprland環境でネットサーフィン(日本語で検索も)できる状態になったかと思います。

    hyprpaperはチョットワカランので、ひとまず保留。

    参考


    あなたへのおすすめ