$xrandr --current
xrandr --output HDMI-A-0 --mode 1920x1200 --pos 0x0 --output DisplayPort-2 --mode 1920x1080 --pos 1920x0
xrandr --output HDMI-A-0 --off
$xrandr --current
xrandr --output HDMI-A-0 --mode 1920x1200 --pos 0x0 --output DisplayPort-2 --mode 1920x1080 --pos 1920x0
xrandr --output HDMI-A-0 --off
https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-querysymbol
from pybit import inverse_perpetual
session_unauth = inverse_perpetual.HTTP(
endpoint="https://api-testnet.bybit.com"
)
r=session_unauth.query_symbol()
#len(r)
r
#len(r['result'])
pandas DataFrameを作成する。
import pandas as pd
df = pd.DataFrame(r['result'])
JypyterでPandas表示が切れるので全部表示するには
df = pd.DataFrame(r['result'])
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
pd.set_option('display.max_colwidth', None)
df
https://github.com/fvwmorg/fvwm3/releases/tag/1.0.5
https://github.com/fvwmorg/fvwm3
1年ぶりのアップデートがリリースされました。
いくつかの変更とバグフィックスがずらっとありますね。
Debianが先行し、Ubuntuにfvwm3が追加された具合である。
Ubuntu 22.10(kinetic)にパッケージ: fvwm3 (1.0.4+ds-1build1) [universe]
Debianはtestingとsidにパーケージが追加された。
bookworm (testing) (x11): F(?) Virtual Window Manager
1.0.5+ds-1: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x
sid (unstable) (x11): F(?) Virtual Window Manager
1.0.5+ds-1: alpha amd64 arm64 armel armhf hppa i386 m68k mips64el mipsel ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
自分はUbuntu 22.04 LTS “Jammy Jellyfish”を使っている。パッケージはなく、いつものようにコンパイルしてインストールをする。
必要なパッケージはインストール
$sudo apt install libevent-dev libx11-dev libxrandr-dev libxrender-dev libxt-dev libxft-dev asciidoctor libfontconfig-dev libfreetype6-dev libfribidi-dev libncurses5-dev libpng-dev libreadline-dev librsvg2-dev libsm-dev libxcursor-dev libxext-dev libxi-dev libxpm-dev sharutils
gitからインストールを行う
$git clone https://github.com/fvwmorg/fvwm3.git
fvwm3ディレクトリーに移動し
$./autogen.sh $./configure --enable-mandoc --enable-golang
Makefileの、’CPPFLAGS’を、CPPFLAGS = -march=nativeにして
$make clean && make -j10
sudoでインストールする
sudo make install
過去の記事
DestroyMenuStyle * Fvwm ##これエラーになる。
MenuStyle * Fvwm
ログを見るとエラーが出てる。
CMD_DestroyMenuStyle: cannot destroy default menu style. To reset the default menu style use
MenuStyle * fvwm, Foreground black, Background grey, Greyed slategrey, MenuColorset, ActiveColorset, GreyedColorset
MenuStyleをいじっていたので、どこでエラーがでるのかこのエラーメッセージだと分からないんだな。試してみて分かったのが、DestroyMenuStyle * Fvwmであった。そもそもDestroyMenuStyle * で エラーがでる。デフォルトのメニュースタイルは、Fvwm, Mwm, Winが用意されているが。これはDestroyMenuStyleできませんよ、ということですな。
Fvwm, Mwm, Win reset all options to the style with the same name in former versions of fvwm. The default for new menu styles is Fvwm style. These options
override all others except Foreground, Background, Greyed, HilightBack, ActiveFore and PopupDelay, so they should be used only as the first option
specified for a menu style or to reset the style to defined behavior. The same effect can be created by setting all the other options one by one.
Mwm and Win style menus popup sub menus automatically. Win menus indicate the current menu item by changing the background to dark. Fvwm sub menus
overlap the parent menu, Mwm and Win style menus never overlap the parent menu.
Fvwm style is equivalent to !HilightBack, Hilight3DThin, !ActiveFore, !Animation, Font, MenuFace, PopupOffset 0 67, TitleWarp, TitleUnderlines1,
SeparatorsShort, TrianglesRelief, PopupDelayed, PopdownDelayed, PopupDelay 150, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight,
BorderWidth 2, !AutomaticHotkeys, UniqueHotkeyActivatesImmediate, PopupActiveArea 75.
Mwm style is equivalent to !HilightBack, Hilight3DThick, !ActiveFore, !Animation, Font, MenuFace, PopupOffset -3 100, !TitleWarp, TitleUnderlines2,
SeparatorsLong, TrianglesRelief, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2,
UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75.
Win style is equivalent to HilightBack, Hilight3DOff, ActiveFore, !Animation, Font, MenuFace, PopupOffset -5 100, !TitleWarp, TitleUnderlines1,
SeparatorsShort, TrianglesSolid, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, RemoveSubmenus, SubmenusRight, BorderWidth 2,
UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75.
Fvwm3になってFvwmPagerのラベル名が *FvwmPager: Label 0 ラベル名 の様に設定できなくなった。DesktopName 0 デスクトップ名(旧ラベル名)で設定するようになった。StartFunctionのあたりに記述した。
要するにラベル名が指定できなくなって、デスクトップ名が表示される。デスクトップ名はDesktopName コマンドで設定する。
/usr/share/xsessions に fvwm3.desktop名で以下のファイルを作る
[Desktop Entry]
Name=Fvwm3
Comment=fvwm3
Exec=/usr/local/bin/fvwm3 -v
#Exec=/usr/local/bin/fvwm3 -v -debug >> ${HOME}/fvwm.log 2>&1
TryExec=/usr/local/bin/fvwm3
Type=Application
/usr/share/xsessions/fvwm3.desktop
この方法だと、-debug >> ${HOME}/fvwm.log 2>&1 のオプションが使えない。どうやったらできるだろう。
-v オプションについて
このオプションで/.fvwm/fvwm3-output.log by default.にログを付け加える。
-v | –verbose
Enables debug logging. Writes in append mode to fvwm log file, which is ~/.fvwm/fvwm3-output.log by default. See ENVIRONMENT section on how to override this location on fvwm3 startup using $FVWM_USERDIR or $FVWM3_LOGFILE .
Logging can also be dynamically toggled on and off using signals:
インストール後、swapファイルは2047M使用してファイルでのswapを行うようになっている。メモリー5536Mあり、ハイバネートするにはメモリー半分以下なので、余裕を持たせてswapファイルを拡大する。
sudo swapoff /swapfile
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo swapon /swapfile
sudo swapon -s
swapファイルができたら、/etc/default/grubの編集を行う。GRUB_CMDLINE_LINUX_DEFAULTにresume=UUID= resume_offset= の値を付けて追記する。UUIDの方はblkidでswapファイルのあるパーティションのUUIDを、resume_offsetは
sudo filefrag -v /swapfile
を行って表示される0:の行のphysical_offsetの開始の数値である。..が付いてる方で、..は開始を意味するもので、offsetの数値ではない。
sudo filefrag -v /swapfile |grep " 0:"| awk '{print $4}'|sed -e 's/\..//'
上記のコマンドで表示される数値である。
sudo update-grub
で、再起動を行う。
sudo systemctl hibernate
これでハイバネートできる。
https://codepre.com/how-to-enable-hibernation-on-ubuntu-when-using-swap-file.html
WindowManagerに必要な要件を考える。Linuxのディスクトップ環境を作る為にどうあるのか、何が必要なのかを確認する。Fvwmでは高い自由度でカスタマイズできるからである。
まずはランチャーの役目は欠かせない。マウスで起動させるか、キーボードでターミナルか、ショートカットで起動させるか。また、常用するアプリか、インストールされたアプリか。コマンドからだと、分からないものは、GUIでアイコンで起動させるか。
次にウィンドウの操作がある。どこに配置するか、大きさは、重なり方は。アイコンに収納できるか。自動の部分と、手動の部分があり、マウスで行うか、キーボードで行うか。
次に、情報を表示する部分。アイコン、メモリー、時間、ロードなど。タスクバーの部分とFVWMならボタンの部分、ページャーの部分がある。
つづく
font-family:”Noto Sans CJK JP”
font-size:16px;
font-style: normal;
font-weight: 400;
本サイトの表示を、このようにした。
ターミナルのソフトを最大表示させると、下部のフレームがズレて隙間ができてしまう。これを解決するのが、ResizeHintOverrideである。文字のリサイズステップサイズを無視するようにするのだ。
ResizeHintOverride instructs fvwm to ignore the program supplied minimum and maximum size as well as the resize step size (the character size in many applications). This can be handy for broken applications that refuse to be resized. Do not use it if you do not need it. The default (opposite) style is NoResizeOverride.
しかし、最大サイズのリサイズはうまくいくが、フレームの端を動かすリサイズはうまく動かない。Style * ResizeOpaqueをデフォルトで使っているのだが。これか?と思いResizeOutlineを使用するとうまく動いた。
Style * ResizeOpaque
Style "Gnome-terminal" ResizeOutline
Style "xfce4-terminal" ResizeOutline
Style "Gnome-terminal" ResizeHintOverride
Style "xfce4-terminal" ResizeHintOverride