22 Commits f59bd72af4 ... b03b67d853

Author SHA1 Message Date
  Alex Kost b03b67d853 zathura: Use "C-s"/"C-r" to search forward/backward 3 years ago
  Alex Kost 95e5711ea8 etc/hosts: Add "holomorph" host 5 years ago
  Alex Kost 906e327132 sxiv: Add a note that my config is for version 24 5 years ago
  Alex Kost dab22e1d10 mpv: Update keys 3 years ago
  Alex Kost 24ecdeca96 mpv: Use "b" key to show time, file size, and file name 3 years ago
  Alex Kost 632860cd9d mpv: Do not show OSD on "seek" and "pause" 3 years ago
  Alex Kost f240f70967 mpv: Disable "On Screen Controller" 3 years ago
  Alex Kost 6eabb9e0cc mpv: Disable 'stop-screensaver' option 3 years ago
  Alex Kost 0b4e42cb9d mpv: Add some commented options 3 years ago
  Alex Kost 014e618f4d youtube-dl: Use "--no-continue" option 3 years ago
  Alex Kost 80b6fc809d Add 'yt-dlp' config 3 years ago
  Alex Kost 0739888990 xorg: Add some comments 4 years ago
  Alex Kost f3d2b42827 mpv: Use some NumPad keys for speed 4 years ago
  Alex Kost 6e1800aaba zathura: Add more colors 5 years ago
  Alex Kost e38f68544f zathura: Use RET for presentation mode 5 years ago
  Alex Kost 741469684a Add 'nbfc' config 5 years ago
  Alex Kost 834a2c8fa8 mpv: Use ","/"p" keys for frame steps 5 years ago
  Alex Kost e933c5ae58 mpv: Use "O" to cycle 'osd-level' through (0, 1, 3) 5 years ago
  Alex Kost 0c0222b316 mpv: Start mpv with volume=80 5 years ago
  Alex Kost 65335e4f25 mpv: Bind some NumPad keys 5 years ago
  Alex Kost 32cf3b7134 zathura: Add colors for index mode 6 years ago
  Alex Kost c7634e53cd zathura: Add keys for index mode 6 years ago
10 changed files with 173 additions and 28 deletions
  1. 3 0
      X/xorg.conf/10-input.conf
  2. 4 0
      config.scm
  3. 1 0
      etc/hosts
  4. 34 20
      mpv/input.conf
  5. 15 1
      mpv/mpv.conf
  6. 6 7
      mpv/scripts/show-osd.lua
  7. 3 0
      mpv/scripts/toggle-fullscreen.lua
  8. 76 0
      nbfc/Acer Aspire E5-576.xml
  9. 31 0
      nbfc/notes.org
  10. 0 0
      sxiv/config.h

+ 3 - 0
X/xorg.conf/10-input.conf

@@ -3,8 +3,11 @@ Section "InputClass"
     MatchIsKeyboard             "yes"
     MatchDevicePath             "/dev/input/event*"
     Driver                      "libinput"
+    # List of all options: </usr/share/X11/xkb/rules/base.lst>.
     Option "XkbLayout"          "us,ru,us"
     Option "XkbVariant"         "dvorak,,"
+    # 'pointerkeys' are enabled by "Shift+NumLock" (mouse is manipulated
+    # with numpad).
     Option "XkbOptions"         "grp:rctrl_rshift_toggle, keypad:pointerkeys"
     Option "XkbModel"           "microsoftmult"
 EndSection

+ 4 - 0
config.scm

@@ -153,6 +153,10 @@
             #:links (list
                      (link* #:filename (home-file ".config/youtube-dl")
                             #:target (config-file "youtube-dl"))))
+   (config* #:name "yt-dlp"
+            #:links (list
+                     (link* #:filename (home-file ".config/yt-dlp")
+                            #:target (config-file "yt-dlp"))))
    (config* #:name "openbox"
             #:links (list
                      (link* #:filename (home-file ".config/openbox")

+ 1 - 0
etc/hosts

@@ -6,5 +6,6 @@
 127.0.0.1	leviafan
 192.168.1.1	zeus
 192.168.1.40	hyperion
+192.168.1.64	holomorph
 
 # hosts ends here

+ 34 - 20
mpv/input.conf

@@ -9,14 +9,6 @@ Q quit
 l write-watch-later-config
 L ab-loop
 
-z cycle-values volume 50 90 130 170
-0 set volume 100
-KP0 set volume 100
-UP add volume 1
-DOWN add volume -1
-Alt+UP add volume 10
-Alt+DOWN add volume -10
-
 h playlist-prev
 n playlist-next
 
@@ -26,15 +18,37 @@ n playlist-next
 ; add sub-delay -0.1
 : add sub-delay +0.1
 
-Ctrl+RIGHT seek +3
-Ctrl+LEFT seek -3
-RIGHT seek +10
-LEFT seek -10
-Alt+RIGHT seek +60
-Alt+LEFT seek -60
-Ctrl+Alt+RIGHT seek +180
-Ctrl+Alt+LEFT seek -180
-Shift+RIGHT seek +600
-Shift+LEFT seek -600
-PGUP seek +600
-PGDWN seek -600
+, frame-back-step
+p frame-step
+
+O cycle-values osd-level 0 1 3
+z cycle-values volume 50 90 130 170
+0              set volume 100
+Ctrl+UP        add volume 1
+Ctrl+DOWN      add volume -1
+UP             add volume 3
+DOWN           add volume -3
+Alt+UP         add volume 10
+Alt+DOWN       add volume -10
+Ctrl+RIGHT     osd-msg seek +3
+Ctrl+LEFT      osd-msg seek -3
+RIGHT          osd-msg seek +10
+LEFT           osd-msg seek -10
+Alt+RIGHT      osd-msg seek +60
+Alt+LEFT       osd-msg seek -60
+Ctrl+Alt+RIGHT osd-msg seek +180
+Ctrl+Alt+LEFT  osd-msg seek -180
+Shift+RIGHT    osd-msg seek +600
+Shift+LEFT     osd-msg seek -600
+PGUP           osd-msg seek +600
+PGDWN          osd-msg seek -600
+
+KP1 no-osd seek -3
+KP3 no-osd seek +3
+KP4 no-osd seek -10
+KP6 no-osd seek +10
+KP2 osd-msg add volume -3
+KP5 osd-msg add volume +3
+KP7 add speed -0.1
+KP8 set speed 1.0
+KP9 add speed +0.1

+ 15 - 1
mpv/mpv.conf

@@ -1,13 +1,27 @@
 fullscreen
 no-ytdl
 write-filename-in-watch-later-config
+# keep-open=yes
+# keep-open-pause=no
 # ao=alsa
 vo=xv
-volume=70
+volume=80
 
+# does not work!
+background='#FF0000'
+
+# no-osd-bar
+# osd-on-seek=no
 osd-duration=2000
 osd-color='#23B13E'
 osd-font='DejaVu Sans:style=Bold'
 
 # Do not display image attachments when playing audio files.
 audio-display=no
+
+# Without this option, mpv disables/enables screensaver on every pause.
+stop-screensaver=no
+
+# On Screen Controller
+osc=no
+script-opts=osc-timetotal=yes

+ 6 - 7
mpv/scripts/show-osd.lua

@@ -1,11 +1,10 @@
 function al_show_osd (_event)
-    mp.command("show-progress")
-end
-
-function al_osd_on_pause (_name, _value)
-    al_show_osd()
+    mp.commandv("show-text",
+                mp.get_property_osd("duration")
+                .. " (" .. mp.get_property_osd("file-size") .. ")\n" ..
+                mp.get_property("filename/no-ext"),
+                4000)
 end
 
 mp.register_event("file-loaded", al_show_osd)
-mp.register_event("seek", al_show_osd)
-mp.observe_property("pause", "bool", al_osd_on_pause)
+mp.add_key_binding("b", al_show_osd)

+ 3 - 0
mpv/scripts/toggle-fullscreen.lua

@@ -4,6 +4,9 @@ function al_fs_on_pause (_name, value)
     if value == true then
         fs_state = mp.get_property("fullscreen")
         mp.set_property("fullscreen", "no")
+        -- For some reason, it shows progress only when we pause from a
+        -- fullscreen (maybe an mpv bug).
+        mp.command("show-progress")
     else
         mp.set_property("fullscreen", fs_state)
     end

+ 76 - 0
nbfc/Acer Aspire E5-576.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <NotebookModel>Aspire E5-576</NotebookModel>
+  <Author>alezost</Author>
+  <EcPollInterval>809</EcPollInterval>
+  <ReadWriteWords>false</ReadWriteWords>
+  <CriticalTemperature>80</CriticalTemperature>
+  <FanConfigurations>
+    <FanConfiguration>
+      <ReadRegister>85</ReadRegister>
+      <WriteRegister>85</WriteRegister>
+      <MinSpeedValue>0</MinSpeedValue>
+      <MaxSpeedValue>8</MaxSpeedValue>
+      <IndependentReadMinMaxValues>false</IndependentReadMinMaxValues>
+      <MinSpeedValueRead>0</MinSpeedValueRead>
+      <MaxSpeedValueRead>0</MaxSpeedValueRead>
+      <ResetRequired>true</ResetRequired>
+      <FanSpeedResetValue>0</FanSpeedResetValue>
+      <TemperatureThresholds>
+        <TemperatureThreshold>
+          <UpThreshold>0</UpThreshold>
+          <DownThreshold>0</DownThreshold>
+          <FanSpeed>0</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>43</UpThreshold>
+          <DownThreshold>39</DownThreshold>
+          <FanSpeed>12.5</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>48</UpThreshold>
+          <DownThreshold>41</DownThreshold>
+          <FanSpeed>25</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>53</UpThreshold>
+          <DownThreshold>45</DownThreshold>
+          <FanSpeed>37.5</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>58</UpThreshold>
+          <DownThreshold>50</DownThreshold>
+          <FanSpeed>50</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>62</UpThreshold>
+          <DownThreshold>53</DownThreshold>
+          <FanSpeed>75</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>66</UpThreshold>
+          <DownThreshold>57</DownThreshold>
+          <FanSpeed>87.5</FanSpeed>
+        </TemperatureThreshold>
+        <TemperatureThreshold>
+          <UpThreshold>70</UpThreshold>
+          <DownThreshold>62</DownThreshold>
+          <FanSpeed>100</FanSpeed>
+        </TemperatureThreshold>
+      </TemperatureThresholds>
+      <FanSpeedPercentageOverrides />
+    </FanConfiguration>
+  </FanConfigurations>
+  <RegisterWriteConfigurations>
+    <RegisterWriteConfiguration>
+      <WriteMode>Set</WriteMode>
+      <WriteOccasion>OnInitialization</WriteOccasion>
+      <Register>147</Register>
+      <Value>20</Value>
+      <ResetRequired>true</ResetRequired>
+      <ResetValue>4</ResetValue>
+      <ResetWriteMode>Set</ResetWriteMode>
+      <Description>Set EC to manual control</Description>
+    </RegisterWriteConfiguration>
+  </RegisterWriteConfigurations>
+</FanControlConfigV2>

+ 31 - 0
nbfc/notes.org

@@ -0,0 +1,31 @@
+This is my config for [[https://github.com/hirschmann/nbfc/][nbfc]] ("Notebook Fan Control").
+
+Some "self-notes" follows...
+
+[[file:Acer Aspire E5-576.xml]] originates from "Acer Aspire E5-575G.xml"
+file taken from [[https://github.com/hirschmann/nbfc/pull/651/files]].  It
+should be put to [[file:/opt/nbfc/Configs]]:
+
+#+BEGIN_SRC sh
+sudo ln -sv ~/config/nbfc/Acer\ Aspire\ E5-576.xml /opt/nbfc/Configs/
+#+END_SRC
+
+After starting nbfc service, I got "File Descriptor does not support
+writing" error.  This problem was mentioned on the [[https://wiki.archlinux.org/index.php/Fan_Speed_Control ][ArchWiki page]] and
+described [[https://github.com/hirschmann/nbfc/issues/439][here]].  A solution was simply to remove (rename) some library:
+
+#+BEGIN_SRC sh
+systemctl stop nbfc
+sudo mv -v /opt/nbfc/Plugins/StagWare.Plugins.ECSysLinux.dll /opt/nbfc/Plugins/StagWare.Plugins.ECSysLinux.dll.old
+systemctl start nbfc
+#+END_SRC
+
+Finally, some examples of "nbfc" usage:
+
+#+BEGIN_SRC sh
+nbfc config -a "Acer Aspire E5-576"
+nbfc status
+nbfc set -a    # set speed to "auto"
+nbfc set -s 0  # turn the fan off
+nbfc set -s 10 # turn it to 10%
+#+END_SRC

+ 0 - 0
sxiv/config.h


Some files were not shown because too many files changed in this diff