update

update
This commit is contained in:
cho 2023-07-02 16:41:21 +07:00
parent 20e21fbc3a
commit a542cb199b
23 changed files with 334 additions and 76 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
home/default/.config/shell/zshnameddirrc home/default/.config/shell/zshnameddirrc
home/default/.config/shell/shortcutrc home/default/.config/shell/shortcutrc
home/default/.config/shell/privrc
*.log *.log
notes.org notes.org
home/default/.config/mpd/mpd.db home/default/.config/mpd/mpd.db
@ -8,3 +9,5 @@ home/default/.config/mpd/sticker.sql
home/default/.config/mpd/mpd.state home/default/.config/mpd/mpd.state
home/default/.config/gtk-3.0/bookmarks home/default/.config/gtk-3.0/bookmarks
home/default/.config/zsh/.zcompdump home/default/.config/zsh/.zcompdump
home/default/.local/bin/start-tasks
home/default/.config/newsboat/urls

View File

@ -0,0 +1,12 @@
[Unit]
Description=Control Radeon Card
After=getty.target
[Service]
Restart=on-failure
Type=simple
RestartSec=10
ExecStart=/usr/local/bin/radcard-autoset.sh
[Install]
WantedBy=multi-user.target

View File

@ -34,6 +34,7 @@
(setq doom-theme 'doom-tomorrow-night) (setq doom-theme 'doom-tomorrow-night)
;(setq doom-theme 'doom-one) ;(setq doom-theme 'doom-one)
;(setq doom-theme 'doom-wilmersdorf) ;(setq doom-theme 'doom-wilmersdorf)
;(setq doom-theme 'doom-plain-dark)
;(setq doom-theme 'doom-plain) ;(setq doom-theme 'doom-plain)
;(setq doom-theme 'doom-flatwhite) ;(setq doom-theme 'doom-flatwhite)

View File

@ -2,8 +2,8 @@
# Any customization should be done in ~/.gtkrc-2.0.mine instead. # Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/default/.gtkrc-2.0.mine" include "/home/default/.gtkrc-2.0.mine"
gtk-theme-name="Adwaita-dark" gtk-theme-name="Materia-dark"
gtk-icon-theme-name="hicolor" gtk-icon-theme-name="Papirus-Dark"
gtk-font-name="Sans 10" gtk-font-name="Sans 10"
gtk-cursor-theme-name="Adwaita" gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0 gtk-cursor-theme-size=0

View File

@ -13,3 +13,4 @@ gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1 gtk-xft-antialias=1
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull gtk-xft-hintstyle=hintfull
gtk-application-prefer-dark-theme=1

View File

@ -126,5 +126,7 @@ map W $setsid -f $TERMINAL >/dev/null 2>&1
map Y $printf "%s" "$fx" | xclip -selection clipboard map Y $printf "%s" "$fx" | xclip -selection clipboard
map <c-f> $setsid -f thunar . ; kill @#
# Source Bookmarks # Source Bookmarks
source "~/.config/lf/shortcutrc" source "~/.config/lf/shortcutrc"

View File

@ -26,7 +26,8 @@ color listnormal cyan default
color listfocus black yellow standout bold color listfocus black yellow standout bold
color listnormal_unread blue default color listnormal_unread blue default
color listfocus_unread yellow default bold color listfocus_unread yellow default bold
color info red black bold #color info red black bold
color info red default
color article white default bold color article white default bold
browser linkhandler browser linkhandler

View File

@ -0,0 +1,34 @@
#!/bin/sh
# todo: import to wayland
while read -r file
do
case "$1" in
"w") change-background "$file" & ;;
"c")
[ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
[ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
"r")
convert -rotate 90 "$file" "$file" ;;
"R")
convert -rotate -90 "$file" "$file" ;;
"f")
convert -flop "$file" "$file" ;;
"y")
printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;;
"Y")
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
"d")
[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
"g") setsid -f gimp "$file" ;;
"i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;;
esac
done

View File

@ -56,7 +56,8 @@ alias \
ytvid="yt-dlp --embed-metadata --embed-thumbnail --embed-chapters --write-auto-subs -f bestvideo'[height<=1080]''[ext=mp4]'+bestaudio'[ext=m4a]'/best'[ext=mp4]'/best" \ ytvid="yt-dlp --embed-metadata --embed-thumbnail --embed-chapters --write-auto-subs -f bestvideo'[height<=1080]''[ext=mp4]'+bestaudio'[ext=m4a]'/best'[ext=mp4]'/best" \
t="todo.sh -t -d $HOME/notebook/todo/todo.cfg" \ t="todo.sh -t -d $HOME/notebook/todo/todo.cfg" \
fj="firejail --profile=$HOME/.config/firejail/game.profile" \ fj="firejail --profile=$HOME/.config/firejail/game.profile" \
dj="dijo" dj="dijo" \
hgs="hugo server --noHTTPCache --disableFastRender"
# ytfzf # ytfzf
alias \ alias \

View File

@ -1,5 +1,6 @@
### sway settings ### sway settings
# logo key. Use Mod1 for Alt. # logo key. Use Mod1 for Alt.
set $mod Mod4 set $mod Mod4
@ -49,8 +50,8 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# emacs daemon # emacs daemon
exec /usr/bin/emacs --daemon exec /usr/bin/emacs --daemon
#assign [app_id="librewolf"] 2 assign [app_id="librewolf"] 2
#assign [app_id="firefox"] 2 assign [app_id="firefox"] 2
assign [app_id="mumble"] 9 assign [app_id="mumble"] 9
assign [app_id="dino"] 9 assign [app_id="dino"] 9
assign [app_id="deluge"] 10 assign [app_id="deluge"] 10
@ -68,8 +69,8 @@ show_marks yes
# looks # looks
font pango: monospace 8 font pango: monospace 8
gaps inner 25 #gaps inner 25
#default_border pixel 2 default_border pixel 2
bindsym $mod+Control+y border toggle bindsym $mod+Control+y border toggle
set $cl_high #333333 set $cl_high #333333
@ -83,6 +84,13 @@ client.focused_inactive $cl_back $cl_back $cl_fore $cl_back $cl_back
client.unfocused $cl_back $cl_back $cl_fore $cl_back $cl_back client.unfocused $cl_back $cl_back $cl_fore $cl_back $cl_back
client.urgent $cl_urge $cl_urge $cl_fore $cl_urge $cl_urge client.urgent $cl_urge $cl_urge $cl_fore $cl_urge $cl_urge
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Materia-dark'
gsettings set $gnome-schema icon-theme 'Papirus-Dark'
gsettings set $gnome-schema color-scheme 'prefer-dark'
}
### Idle configuration ### Idle configuration
# timeout # timeout
@ -135,27 +143,30 @@ bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right bindsym $mod+Shift+$right move right
# screenshot # screenshot
bindsym Print exec grimshot save output $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym Print exec screenshot.sh output
bindsym $mod+Print exec grimshot save active $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Print exec screenshot.sh active
bindsym $mod+Shift+Print exec grimshot save window $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Shift+Print exec screenshot.sh window
# alternative keybind # alternative keybind
bindsym $mod+Control+u exec grimshot save output $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Control+u exec screenshot.sh output
bindsym $mod+u exec grimshot save active $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+u exec screenshot.sh active
bindsym $mod+Shift+u exec grimshot save window $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Shift+u exec screenshot.sh window
### programs ### programs
# sway config # files
bindsym $mod+F1 exec em ~/.config/sway/config bindsym $mod+F1 exec em ~/.config/sway/config
bindsym $mod+F2 exec em ~/.dotroot/packages.txt bindsym $mod+F2 exec em ~/.dotroot/packages.txt
bindsym $mod+F3 exec em ~/.dotroot/instructions.org bindsym $mod+F3 exec em ~/.dotroot/instructions.org
bindsym $mod+F4 exec em ~/notebook/studies/college.org
bindsym $mod+F5 exec em ~/notebook/ag/habits.org
bindsym $mod+F6 exec em ~/notebook/ag/todo.org
# browser # browser
bindsym $mod+w exec $browser bindsym $mod+w exec $browser
# agenda # agenda
bindsym $mod+c exec emacsclient -c --eval '(org-agenda-list)' || emacs --eval '(org-agenda-list)' bindsym $mod+c exec emacsclient --eval '(org-agenda-list)' || emacs --eval '(org-agenda-list)'
# notebook # notebook
bindsym $mod+n exec $term -e $editor ~/notebook/index.org bindsym $mod+n exec $term -e $editor ~/notebook/index.org

View File

@ -1,6 +1,6 @@
{ {
// "layer": "top", // Waybar at top layer // "layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right) "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height) "height": 20, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width // "width": 1280, // Waybar width
// Choose the order of the modules // Choose the order of the modules
@ -12,14 +12,26 @@
}, },
// Modules configuration // Modules configuration
"sway/workspaces": { "sway/workspaces": {
"persistent_workspaces": {
"1": ["HDMI-A-1"],
"2": ["HDMI-A-1"],
"3": ["HDMI-A-1"],
"4": ["HDMI-A-1"],
"5": ["HDMI-A-1"],
"6": ["DVI-D-1"],
"7": ["DVI-D-1"],
"8": ["DVI-D-1"],
"9": ["DVI-D-1"],
"10": ["DVI-D-1"]
},
// "disable-scroll": true, // "disable-scroll": true,
"all-outputs": true, "all-outputs": false,
"format": "{icon}", "format": "{icon}",
"format-icons": { "format-icons": {
"1": "1-em", // emacs "1": "1-em", // emacs
"2": "2-se", // search/web "2": "2-se", // search/web
"3": "3-tm", // terminal "3": "3-tm", // terminal
"4": "4", "4": "4-gm",
"5": "5", "5": "5",
"6": "6", "6": "6",
"7": "7", "7": "7",

View File

@ -7,11 +7,40 @@
min-height: 0; min-height: 0;
} }
#workspaces {
margin: 0 4px;
}
#workspaces button {
/*background-color: #6B313D;*/
/*color: #bbbbbb;*/
background-color: #444444;
color: #bbbbbb;
padding: 0 8px;
min-width: 0;
}
#workspaces button.persistent {
/*background-color: #000000;*/
background-color: #222222;
color: #bbbbbb;
}
#workspaces button.focused {
color: #000000;
background-color: #888888;
}
#workspaces button.visible {
color: #000000;
background-color: #888888;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
window#waybar { window#waybar {
background-color: #000; /*background-color: #000;*/
background-color: #222222;
color: #ffffff; color: #ffffff;
transition-property: background-color; /*transition-property: background-color;*/
transition-duration: .5s; /*transition-duration: .5s;*/
} }
window#waybar.hidden { window#waybar.hidden {
@ -36,27 +65,6 @@ window#waybar.chromium {
border: none; border: none;
} }
#workspaces button {
padding: 0 8px;
background-color: #6B313D;
color: #bbbbbb;
/* background-color: transparent;
color: #ffffff;*/
min-width: 0;
}
#workspaces button.focused {
/*colorful*/
color: #000000;
background-color: #888888;
/*background-color: #424242;
color: #ffffff;
box-shadow: inset 2px 2px #555555, inset -2px -2px #555555;*/
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode { #mode {
background-color: #64727D; background-color: #64727D;
@ -91,9 +99,6 @@ window#waybar.chromium {
} }
#window, #window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
@ -136,11 +141,11 @@ window#waybar.chromium {
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
background-color: #f53c3c; background-color: #f53c3c;
color: #ffffff; color: #ffffff;
animation-name: blink; /*animation-name: blink;
animation-duration: 0.5s; animation-duration: 0.5s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;*/
} }
label:focus { label:focus {

View File

@ -0,0 +1 @@
hsts-file=~/.cache/wget-hsts

View File

@ -17,6 +17,7 @@ HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
# Load aliases and shortcuts if existent. # Load aliases and shortcuts if existent.
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/privrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/privrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
# Basic auto/tab complete: # Basic auto/tab complete:

View File

@ -1,3 +0,0 @@
[dotfiles]
repository = ~/.dotfiles
packages = ['.config', '.local/share/applications', '.local/bin']

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
setsid -f emacsclient --create-frame --alternate-editor='emacs' $@ >/dev/null 2>&1 setsid -f emacsclient --alternate-editor='emacs' $@ >/dev/null 2>&1

View File

@ -0,0 +1,34 @@
#!/bin/sh
[ -z "$1" ] && printf "Usage: screenshot.sh [output|active|window] \n" && exit 0
file=$HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
if [[ -n "$1" ]]; then
case "$1" in
output) grimshot save output $file
break
;;
active) grimshot save active $file
break
;;
window) grimshot save window $file
break
;;
screen) grimshot save screen $file
break
;;
*)
echo $@ is not an argument
break
;;
esac
fi
if [[ -N $file ]]; then
echo "screenshot saved."
notify-send "screenshot saved." -i $file
exit 0
else
echo "screenshot failed."
exit 1
fi

View File

@ -7,7 +7,7 @@ case "$(readlink -f /sbin/init)" in
*) ctl='loginctl' ;; *) ctl='loginctl' ;;
esac esac
case "$(printf "🔒 lock\n🚪 leave $WM\n♻ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥 shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | dmenu -i -l 16 -p 'Action: ')" in case "$(printf "🔒 lock\n🚪 leave $WM\n♻ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥 shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | rofi -dmenu -i -l 16 -p 'action')" in
'🔒 lock') '🔒 lock')
setsid -f swaylock setsid -f swaylock
setsid -f sleep 2 && swayidle -w timeout 1 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on" && kill $#' setsid -f sleep 2 && swayidle -w timeout 1 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on" && kill $#'

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=Whatsapp
Exec=/usr/bin/librewolf -P wa https://web.whatsapp.com

View File

@ -26,10 +26,26 @@ sudo dnf install curl ca-certificates make automake gcc gcc-c++ kernel-devel git
git clone https://gitea.bubbletea.dev/cho/dotfiles ~/.dots git clone https://gitea.bubbletea.dev/cho/dotfiles ~/.dots
cp -rv ~/.dots/home/default/.* ~/ cp -rv ~/.dots/home/default/.* ~/
# or using stow # or using stow
# make sure you make directories you don't want as symlinks
mkdir -p ~/.local/share/applications
mkdir -p ~/.local/bin
mkdir -p ~/.config
mkdir -p ~/.config/shell
mkdir -p ~/.config/mpd
mkdir -p ~/.config/zsh
mkdir -p ~/.config/newsboat
cd ~/.dots/home/ && stow default --target=$HOME/ cd ~/.dots/home/ && stow default --target=$HOME/
#+END_SRC #+END_SRC
*** how to unstow dotfiles
#+BEGIN_SRC sh
cd ~/.dots/home/ && stow -D default --target=$HOME/
#+END_SRC
** rpmfusion ** rpmfusion
from https://rpmfusion.org/Configuration and https://rpmfusion.org/Howto/Multimedia from https://rpmfusion.org/Configuration and https://rpmfusion.org/Howto/Multimedia
@ -93,6 +109,10 @@ sudo dnf config-manager --add-repo https://rpm.librewolf.net/librewolf-repo.repo
sudo dnf install librewolf sudo dnf install librewolf
#+END_SRC #+END_SRC
*** plugins, etc
https://github.com/ranmaru22/firefox-vertical-tabs
https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
** doom emacs ** doom emacs
first we need marked for markdown support first we need marked for markdown support
@ -174,6 +194,13 @@ sudo dnf copr enable marcusmueller/sc-im
sudo dnf install sc-im sudo dnf install sc-im
#+END_SRC #+END_SRC
** nsxiv (image viewer)
#+BEGIN_SRC sh
dnf copr enable mamg22/nsxiv
dnf install nsxiv
#+END_SRC
** pip ** pip
*** keepmenu (dmenu keepassxc client) *** keepmenu (dmenu keepassxc client)
@ -182,6 +209,18 @@ https://github.com/firecat53/keepmenu/blob/main/docs/install.md#install-recommen
pip install --user keepmenu pip install --user keepmenu
#+END_SRC #+END_SRC
*** pulsemixer (pulseaudio controller)
#+BEGIN_SRC sh
pip install --user pulsemixer
#+END_SRC
*** termdown (terminal timer/stopwatch)
#+BEGIN_SRC sh
pip install termdown
#+END_SRC
** go packages ** go packages
*** pup *** pup
@ -235,7 +274,25 @@ from https://flatpak.org/setup/Fedora
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
#+END_SRC #+END_SRC
** setting up virtualbox
#+BEGIN_SRC sh
sudo usermod -a -G vboxusers default
#+END_SRC
** flatpak packages ** flatpak packages
*** Unity
#+BEGIN_SRC sh
flatpak install flathub com.unity.UnityHub
#+END_SRC
*** Foliate (Epub reader)
#+BEGIN_SRC sh
flatpak install com.github.johnfactotum.Foliate
#+END_SRC
*** bottles and dependencies *** bottles and dependencies
- gamescope - gamescope
@ -270,6 +327,25 @@ sudo su
printf '* hard memlock unlimited\n* soft memlock unlimited' >> /etc/security/limits.conf printf '* hard memlock unlimited\n* soft memlock unlimited' >> /etc/security/limits.conf
#+END_SRC #+END_SRC
*** cemu
#+BEGIN_SRC sh
flatpak install flathub info.cemu.Cemu
#+END_SRC
*** discord
#+BEGIN_SRC sh
flatpak install flathub com.discordapp.Discord
#+END_SRC
*** spotify
#+BEGIN_SRC sh
flatpak install flathub io.github.hrkfdn.ncspot
flatpak install flathub com.spotify.Client
#+END_SRC
** installing cargo ** installing cargo
https://doc.rust-lang.org/cargo/getting-started/installation.html https://doc.rust-lang.org/cargo/getting-started/installation.html
@ -280,34 +356,21 @@ curl https://sh.rustup.rs -sSf | sh
** other ** other
*** crashes with wayland under amd gpus *** crashes with wayland under amd gpus
this happens on my machine. changing kernel to improves this issue, but it does still happen infrequently. may have to do with gpu drivers.
see https://bbs.archlinux.org/viewtopic.php?id=270468
https://forum.manjaro.org/t/graphics-glitches-freeze-up-with-new-comp-error-ring-gfx-timeout/55979/6
#+BEGIN_SRC sh #+BEGIN_SRC sh
sudo dnf install 'dnf-command(versionlock)' sudo cp ~/.dots/usr/local/bin/radcard* /usr/local/bin/
sudo cp ~/.dots/etc/systemd/system/radcard.service /etc/systemd/system/
# create a temporary directory sudo systemctl enable --now radcard.service
mkdir /tmp/kernel && cd /tmp/kernel
# get packages
wget https://kojipkgs.fedoraproject.org/packages/kernel/6.0.14/300.fc37/x86_64/kernel-6.0.14-300.fc37.x86_64.rpm https://kojipkgs.fedoraproject.org/packages/kernel/6.0.14/300.fc37/x86_64/kernel-core-6.0.14-300.fc37.x86_64.rpm https://kojipkgs.fedoraproject.org/packages/kernel/6.0.14/300.fc37/x86_64/kernel-devel-6.0.14-300.fc37.x86_64.rpm https://kojipkgs.fedoraproject.org/packages/kernel/6.0.14/300.fc37/x86_64/kernel-modules-6.0.14-300.fc37.x86_64.rpm
# install them
sudo dnf install *.rpm
# lock them in their versions
sudo dnf versionlock add kernel-0:6.0.14-300.fc37 kernel-core-0:6.0.14-300.fc37 kernel-devel-0:6.0.14-300.fc37 kernel-modules-0:6.0.14-300.fc37
#+END_SRC #+END_SRC
using sway 1.7 alongside the kernel seems to fix this (will update later if it works) you can check the status with `radcard.sh get` , make sure the output is as follows:
#+BEGIN_SRC
#+BEGIN_SRC sh power_dpm_state: performance
wget https://kojipkgs.fedoraproject.org/packages/sway/1.7/2.fc37/x86_64/sway-1.7-2.fc37.x86_64.rpm power_dpm_force_performance_level: high
# sway-config-upstream doesn't exist for sway 1.7-2
sudo dnf install sway-1.7-2.fc37.x86_64.rpm --allowerasing
sudo dnf versionlock sway-1.7-2.fc37
#+END_SRC #+END_SRC
* todos * todos
** add packages ** add packages
*** TODO add simple-mtpfs *** TODO add simple-mtpfs

View File

@ -93,7 +93,7 @@ grimshot
mumble mumble
dino dino
gammastep gammastep
sqlite3 sqlite
gnome-themes-extra gnome-themes-extra
adwaita-qt5 adwaita-qt5
adwaita-qt6 adwaita-qt6
@ -122,3 +122,11 @@ vulkan-validation-layers
xorg-x11-drv-amdgpu xorg-x11-drv-amdgpu
amd-gpu-firmware amd-gpu-firmware
emacs emacs
tmux
gamescope
dotnet
mono-devel
VirtualBox
virtualbox-guest-additions
@virtualization
texlive-scheme-basic

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo performance > /sys/class/drm/card1/device/power_dpm_state
echo high > /sys/class/drm/card1/device/power_dpm_force_performance_level

64
usr/local/bin/radcard.sh Executable file
View File

@ -0,0 +1,64 @@
#!/bin/bash
# Radcard
# Script to control radeon DPM power saving
# Ref: https://wiki.archlinux.org/index.php/ATI#Powersaving
# Version: 2019-02-12
# License: GPLv3
# Authors: jamie.bainbridge@gmail.com
CARDPATH="/sys/class/drm/card1/device"
do_set() {
case "$1" in
bat*)
sudo sh -c "echo battery > $CARDPATH/power_dpm_state"
;;
bal*)
sudo sh -c "echo balanced > $CARDPATH/power_dpm_state"
;;
per*)
sudo sh -c "echo performance > $CARDPATH/power_dpm_state"
;;
a*)
sudo sh -c "echo auto > $CARDPATH/power_dpm_force_performance_level"
;;
l*)
sudo sh -c "echo low > $CARDPATH/power_dpm_force_performance_level"
;;
h*)
sudo sh -c "echo high > $CARDPATH/power_dpm_force_performance_level"
;;
*)
do_usage
;;
esac
}
do_get() {
echo -n "power_dpm_state: "; cat "$CARDPATH/power_dpm_state"
echo -n "power_dpm_force_performance_level: "; cat "$CARDPATH/power_dpm_force_performance_level"
}
do_usage() {
echo "Usage: $(basename "$0") [get|set [battery|balanced|performance|auto|low|high|bat|bal|per|a|h|l]]"
exit 1
}
case "$1" in
"set")
shift
for VAR in "$@"; do
do_set "$VAR"
done
do_get
;;
"get")
do_get
;;
*)
do_usage
;;
esac
exit 0