iT邦幫忙

2022 iThome 鐵人賽

DAY 16
0
自我挑戰組

Linux in my LIFE系列 第 16

我的Linux生活日記 16.筆電環境設定

  • 分享至 

  • xImage
  •  

Linux 除了安裝在桌面主機或是虛擬中,我已經把Linux 安裝在筆電裡三四年了,儼然已經成了我日常生活的一部分。在使用的經驗,筆電需要設定一些事項在使用上會比較順手,也或許我挑選的發行板是 Debian 相較 Ubuntu 較陽春需要堆花一點心思。

觸控手勢-fusuma

如果你是把Ubuntu安裝在筆記行電腦中,在操作的過程中多窩少少會需要依賴觸控板,這邊我還蠻推薦 fusuma 這套軟體。因為這挑可以自由的設定觸控板手勢。然而在 Gnome 42 以後觸控手勢我覺的已經可以不用另外設定了,預設就已經很好用。

安裝指令如下:

sudo apt-get install libinput-tools
sudo apt-get install ruby
sudo gem install fusuma
sudo apt-get install xdotool
gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
mkdir -p ~/.config/fusuma #建立觸控板手勢參數檔
vim ~/.config/fusuma/config.yml  #設定觸控板手勢

安裝完成之後將設定輸入到 ~/.config/fusuma/config.yml,下面試我自己行慣的設定

swipe:
      3: 
        left: 
          command: 'xdotool key alt+Left' #上一個歷程
        right: 
          command: 'xdotool key alt+Right' #下一個歷程
        up:
          command: 'xdotool key super+Up' #開新分頁
        down: 
          command: 'xdotool key super+Down' #關閉程式
      4:
        left: 
          command: 'xdotool key super+Right' #將視窗移至右邊
        right: 
          command: 'xdotool key super+Left' #將視窗移至左邊
        up: 
          command: 'xdotool key super+a' #顯示應用程式
        down: 
          command: 'xdotool key super' #顯示概覽
    pinch:
      2:
        in:
          command: 'xdotool key ctrl+plus' #縮小
          threshold: 0.1
        out:
          command: 'xdotool key ctrl+minus' #放大
          threshold: 0.1

    threshold:
      swipe: 0.1
      pinch: 0.1

    interval:
      swipe: 0,1
      pinch: 0.1

設定完成之後可以輸入下面這條指令確認設定是不是符合你自己需要的

sudo fusuma #啟動試試看是不是符合你的操作
sudo fusuma -d # -d代表背景執行

最後在將設定設定為啟動gome 桌面時自動啟動 fusuma

gnome-session-properties #設定啟動game桌面的參數

關閉休眠

這部份我也會在我的工作機上面設定,主要是Debian 安裝 Gnome 桌面系統在開機未完成登入之前,超過五分鐘就會進入休眠狀態。

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

接上滑鼠自動關閉觸控板

這個功能對我來說非常重要,因為打字時我的手總是不小心碰到觸控板。

  • Touchpad Indicator

https://ithelp.ithome.com.tw/upload/images/20220917/20128528lKacCg96nO.png

設定蓋上不進入休眠狀態

這部份很重要,因為使用筆電的過程中暫時離開座位,為了避免毛小孩偷襲就會把筆電蓋上。但是有不希望暫時蓋上筆電就進入休眠狀態,可以這樣設定,如下:

  • 設定
# vim /etc/systemd/logind.conf
HandleLidSwitch=ignore 
  • 重起登入
systemctl restart systemd-logind 

讀取 iphone 資料-iFuse

安裝 iFuse

jameschang@debian:~$ sudo apt-get install ifuse
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  ifuse
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.7 kB of archives.
After this operation, 48.1 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 ifuse amd64 1.1.4~git20181007.3b00243-1 [15.7 kB]
Fetched 15.7 kB in 2s (7,099 B/s)
Selecting previously unselected package ifuse.
(Reading database ... 335631 files and directories currently installed.)
Preparing to unpack .../ifuse_1.1.4~git20181007.3b00243-1_amd64.deb ...
Unpacking ifuse (1.1.4~git20181007.3b00243-1) ...
Setting up ifuse (1.1.4~git20181007.3b00243-1) ...
Processing triggers for man-db (2.9.4-2) ...

掛載

  1. 選擇或新造要掛載的目錄
jameschang@debian:~$ mkdir ~/iphone
  1. 掛載
jameschang@debian:~$ ifuse ~/iphone

以上就是我在筆電中,每次重新安裝一定會用到的設定。

參考資料

[Ubuntu] 讓筆電闔上螢幕後不休眠

logind.conf, logind.conf.d - 登陸管理器配置文件

Linux 修改合上筆記本蓋子和按下電源按鈕鎖定螢幕

fusuma


上一篇
我的Linux生活日記 15.系統檢測工具(硬體)
下一篇
我的Linux生活日記 17.Linux主機選購(一)
系列文
Linux in my LIFE32
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言