Kendim için böyle bir şey yaptım. İsteğim şu, EDP-1 olan kısımların en altına "Intel-NVIDIA GPU" EDP-1-1 olan kısımda ise "NVIDIA GPU" olacak şekilde yazı yazılmasını istiyorum fakat nasıl metin ekleyebilirim bulamadım ya da benim yabancı dilim yetmediği için gözümden kaçırdım.
Python:
from os import system, chdir
from tkinter import *
from tkinter import messagebox
pencere = Tk()
pencere.title("çözünürlük")
pencere.geometry("448x384")
u = Frame(pencere)
u.grid()
#button ekleme bölümü
button1 = Button(u, text = " 1000x1000 (eDP-1-1) " , bg='cyan' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --mode 1000x1000_95.00"))
button1.grid(row = 0, column = 2)
button2 = Button(u, text = " 1000x1000 (eDP-1) " , bg='#ffb3fe' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --mode 1000x1000_95.00"))
button2.grid(row = 0, column = 0)
button3 = Button(u, text = " 1024x768 (eDP-1-1) " , bg='cyan' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --mode 1024x768_95.00"))
button3.grid(row = 1, column = 2)
button4 = Button(u, text = " 1024x768 (eDP-1) " , bg='#ffb3fe' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --mode 1024x768_95.00"))
button4.grid(row = 1, column = 0)
button5 = Button(u, text = " 1280x1024 (eDP-1-1) " , bg='cyan' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --mode 1280x1024_95.00"))
button5.grid(row = 2, column = 2)
button6 = Button(u, text = " 1280x1024 (eDP-1) " , bg='#ffb3fe' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --mode 1280x1024_95.00"))
button6.grid(row = 2, column = 0)
button7 = Button(u, text = " 1600x900 (eDP-1-1) " , bg='cyan' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --mode 1600x900_95.00"))
button7.grid(row = 3, column = 2)
button8 = Button(u, text = " 1600x900 (eDP-1) " , bg='#ffb3fe' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --mode 1600x900_95.00"))
button8.grid(row = 3, column = 0)
button9 = Button(u, text = " 1920x1080 (eDP-1-1) " , bg='cyan' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --mode 1920x1080"))
button9.grid(row = 4, column = 2)
button10 = Button(u, text = " 1920x1080 (eDP-1) " , bg='#ffb3fe' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --mode 1920x1080"))
button10.grid(row = 4, column = 0)
button11 = Button(u, text = " Hybrid Mode (eDP-1) " , bg='white' , width=20,height=2, command=lambda: system("optimus-manager --switch hybrid --no-confirm"))
button11.grid(row = 5, column = 0)
button12 = Button(u, text = " Nvidia GPU Mode (eDP-1-1) " , bg='white' , width=20,height=2, command=lambda: system("optimus-manager --switch nvidia --no-confirm"))
button12.grid(row = 5, column = 2)
button13 = Button(u, text = " Intel GPU Mode " , bg='white' , width=12,height=2, command=lambda: system("optimus-manager --switch intel --no-confirm"))
button13.grid(row = 5, column = 1)
button14 = Button(u, text = " Strecth-on (eDP-1-1) " , bg='white' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --set 'scaling mode' Full "))
button14.grid(row = 6, column = 2)
button15 = Button(u, text = " Strecth-on (eDP-1) " , bg='white' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --set 'scaling mode' Full "))
button15.grid(row = 6, column = 0)
button16 = Button(u, text = " Strecth-off (eDP-1-1) " , bg='white' , width=20,height=2, command=lambda: system("xrandr --output eDP-1-1 --set 'scaling mode' 'Full aspect' "))
button16.grid(row = 7, column = 2)
button17 = Button(u, text = " Strecth-off (eDP-1) " , bg='white' , width=20,height=2, command=lambda: system("xrandr --output eDP-1 --set 'scaling mode' 'Full aspect' "))
button17.grid(row = 7, column = 0)
pencere.mainloop()
Son düzenleyen: Moderatör: